/* ========================================
   仲安ERP v3.0 - 统一主题样式
   深空科技风 (Dark Cyberpunk Blue)
   ======================================== */

/* Report chart grid */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.9);
  --bg-hover: rgba(0, 212, 255, 0.05);
  --accent: #00d4ff;
  --accent2: #7b2cbf;
  --accent-gradient: linear-gradient(135deg, #00d4ff, #7b2cbf);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(0, 212, 255, 0.2);
  --border-strong: rgba(0, 212, 255, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-width: 240px;
  --header-height: 60px;
  --radius: 12px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f35 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #7dd3fc; }

/* ========================================
   Button
   ======================================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border: none; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  color: white; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--accent-gradient); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,212,255,0.35); }
.btn-secondary { background: rgba(0,212,255,0.15); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(0,212,255,0.25); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ========================================
   Form
   ======================================== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary);
  font-size: 0.9rem; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-secondary); color: white; }

/* ========================================
   Card
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

/* ========================================
   Table
   ======================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
th { background: rgba(0, 212, 255, 0.08); color: var(--accent); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
td { font-size: 0.9rem; }
tr:hover td { background: var(--bg-hover); }

/* ========================================
   Tags & Badges
   ======================================== */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
}
.tag-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.tag-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.tag-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.tag-info { background: rgba(0, 212, 255, 0.15); color: var(--accent); }
.tag-default { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: linear-gradient(145deg, #1a1f35, #0a0e1a);
  border: 2px solid var(--border-strong);
  border-radius: 16px; padding: 32px;
  min-width: 420px; max-width: 640px; max-height: 85vh;
  overflow-y: auto; animation: slideUp 0.3s ease;
}
.modal-large { min-width: 560px; max-width: 900px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 { color: var(--accent); font-size: 1.2rem; }
.modal-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 1.8rem; cursor: pointer; line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { color: var(--danger); }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: rgba(0, 212, 255, 0.06); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--text-secondary); font-size: 0.85rem; margin-top: 6px; }

/* ========================================
   Loading & Empty
   ======================================== */
.loading { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.loading::after { content: '...'; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '...'; } }
.empty { text-align: center; padding: 80px 20px; color: var(--text-muted); }

/* ========================================
   Toast
   ======================================== */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 24px; border-radius: var(--radius);
  color: white; font-size: 0.9rem; animation: slideInRight 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); cursor: pointer;
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
