/* ═══════════════════════════════════════
   太数智能 · 企业内部结算系统 — Design System
   Built on Tabler (Bootstrap-based admin template)
   ═══════════════════════════════════════ */

:root {
  --brand-dark: #0a0a1a;
  --brand-navy: #1a1a2e;
}

/* ── Neutral primary (replaces Tabler blue + brand gold) ── */
[data-bs-theme="light"] {
  --tblr-primary: #1f2937;
  --tblr-primary-rgb: 31, 41, 55;
}
[data-bs-theme="dark"] {
  --tblr-body-bg: var(--brand-dark);
  --tblr-bg-surface: #0f0f24;
  --tblr-bg-surface-secondary: #16162e;
  --tblr-navbar-vertical-bg: var(--brand-dark);
  --tblr-navbar-vertical-border-color: rgba(255,255,255,0.06);
}

/* ── Sidebar brand logo (neutral) ── */
.sidebar-brand-t {
  font-size: 22px;
  font-weight: 800;
  color: #e5e7eb;
  letter-spacing: 1px;
}
.sidebar-brand-gold {
  font-size: 22px;
  font-weight: 800;
  color: #e5e7eb;  /* neutral white, previously gold */
}
.sidebar-brand-light {
  font-size: 22px;
  font-weight: 800;
  color: #9ca3af;  /* muted gray for SHU */
  letter-spacing: 1px;
}
.sidebar-brand-sub {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 4px;
  margin-top: 2px;
  font-weight: 500;
}

/* ── Sidebar nav labels ── */
.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b7280;
  padding: 16px 12px 6px;
  list-style: none;
}

/* ── Sidebar nav link active state ── */
.nav-link.active {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  font-weight: 600;
}
.nav-link.active .nav-icon {
  color: #fff !important;
}

/* ── Stat cards ── */
.stat-card {
  background: var(--tblr-bg-surface, #fff);
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  padding: 20px;
  box-shadow: var(--tblr-box-shadow);
  transition: box-shadow 0.2s;
}
.stat-card:hover {
  box-shadow: var(--tblr-box-shadow-lg);
}
.stat-card-value {
  font-size: 28px;
  font-weight: 300;
  color: var(--tblr-body-color);
  line-height: 1.2;
}
.stat-card-label {
  font-size: 12px;
  color: var(--tblr-secondary);
  margin-top: 4px;
}
.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--tblr-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* ── Filter bar row ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-bar .form-control,
.filter-bar .form-select {
  width: auto;
}

/* ── Page header with description ── */
.page-header .page-description {
  font-size: 0.875rem;
  color: var(--tblr-secondary);
  margin-top: -4px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}
.empty-state p {
  font-size: 14px;
  color: var(--tblr-secondary);
  margin-bottom: 16px;
}

/* ── Quick links on dashboard ── */
.quick-grid {
  display: grid;
  gap: 8px;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--tblr-border-radius);
  border: 1px solid var(--tblr-border-color);
  color: var(--tblr-body-color);
  text-decoration: none;
  transition: all 0.15s;
  font-size: 13px;
}
.quick-link:hover {
  background: var(--tblr-bg-surface-secondary);
  border-color: var(--tblr-primary);
  color: var(--tblr-primary);
  text-decoration: none;
}

/* ── Workflow step cards ── */
.workflow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--tblr-border-radius);
  background: #f9fafb;
}
.workflow-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f2937;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Toast container ── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-container .toast {
  min-width: 280px;
}

/* ── Modal size overrides ── */
.dialog-box-lg {
  max-width: 900px !important;
}

/* ── Table row striping override (Tabler table-vcenter doesn't stripe by default) ── */
.table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.01);
}

/* ── Prevent icon SVGs from stretching ── */
.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Inactive row dimming ── */
tr.opacity-50 {
  opacity: 0.5;
}

/* ── Sort links ── */
.sort-link {
  color: inherit;
  text-decoration: none;
}
.sort-link:hover {
  color: var(--tblr-primary);
}

/* ── AI 识别标识（所有 AI 录入模式统一）── */
.scan-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

/* ── Primary button dark override ── */
.btn-primary {
  background: #1f2937 !important;
  border-color: #1f2937 !important;
  color: #fff !important;
}
.btn-primary:hover:not(:disabled) {
  background: #374151 !important;
  border-color: #374151 !important;
}

/* ── Outline primary ── */
.btn-outline-primary {
  color: #1f2937 !important;
  border-color: #1f2937 !important;
}
.btn-outline-primary:hover {
  background: #1f2937 !important;
  color: #fff !important;
}