/* ===== 智能申报管理系统 - 全局样式 ===== */
:root {
  --bg: #f4f7fb;
  --bg-deep: #0b1220;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --accent: #0ea5e9;
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --info: #0ea5e9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 60px rgba(15, 23, 42, 0.18);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --sidebar-w: 236px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* ===== 登录页面 ===== */
.login-shell {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 15% 15%, rgba(37, 99, 235, 0.45), transparent 60%),
    radial-gradient(900px 700px at 85% 80%, rgba(14, 165, 233, 0.4), transparent 55%),
    linear-gradient(135deg, #0b1220 0%, #1e293b 60%, #0f172a 100%);
  overflow: hidden;
}
.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: pulse 9s ease-in-out infinite;
}
.login-shell::before {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #3b82f6, transparent 60%);
  top: -120px; left: -80px;
}
.login-shell::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #22d3ee, transparent 60%);
  bottom: -160px; right: -120px;
  animation-delay: -4s;
}
@keyframes pulse {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.45; }
  50% { transform: scale(1.12) translateY(-12px); opacity: 0.62; }
}
.login-body {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  padding: 0 6vw;
  gap: 48px;
}
.login-brand { color: #e2e8f0; }
.login-brand .logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.5);
  margin-bottom: 24px;
}
.login-brand h1 {
  font-size: 36px; margin: 0 0 8px; color: #f8fafc; letter-spacing: 0.5px;
}
.login-brand p { color: #94a3b8; font-size: 15px; margin: 0 0 32px; max-width: 460px; }
.login-features { display: grid; gap: 14px; max-width: 520px; }
.login-feature {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  backdrop-filter: blur(10px); color: #cbd5e1;
}
.login-feature svg { flex-shrink: 0; color: #60a5fa; margin-top: 2px; }
.login-feature b { color: #f1f5f9; display: block; margin-bottom: 2px; }

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 36px 36px 28px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.4);
  max-width: 440px;
  justify-self: end;
  width: 100%;
  animation: riseIn 0.7s cubic-bezier(0.15, 0.9, 0.3, 1);
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card h2 {
  font-size: 22px; margin: 0 0 6px; color: #0f172a;
}
.login-card .sub { color: var(--text-soft); margin: 0 0 24px; font-size: 13px; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; color: var(--text-soft);
  margin-bottom: 6px; font-weight: 500;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong);
  background: #fff; border-radius: var(--radius); transition: all 0.18s ease;
  color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-input.error, .form-select.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error-tip { color: var(--danger); font-size: 12px; margin-top: 4px; }
.form-hint { color: var(--text-muted); font-size: 12px; }
.form-help { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13px; user-select: none; cursor: pointer; }
.checkbox input { accent-color: var(--primary); width: 14px; height: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; transition: all 0.18s ease;
  white-space: nowrap; border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-ghost { color: var(--text-soft); border: 1px solid var(--border-strong); background: #fff; }
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-success { background: var(--success-soft); color: var(--success); }
.btn-success:hover { filter: brightness(0.97); }
.btn-warning { background: var(--warning-soft); color: var(--warning); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }

.login-foot {
  margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--border-strong);
  color: var(--text-muted); font-size: 12px; text-align: center;
}
.login-foot code {
  background: var(--primary-soft); color: var(--primary-strong);
  padding: 2px 8px; border-radius: 6px; margin: 0 2px; font-size: 12px;
}
.loader-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 主应用布局 ===== */
.app-layout { display: flex; min-height: 100vh; position: relative; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a, #111c32);
  color: #cbd5e1;
  position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column;
  padding: 18px 14px 16px;
  z-index: 30;
  transition: width 0.25s ease;
  border-right: 1px solid rgba(15,23,42,0.5);
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.sidebar-brand .title { font-size: 15px; color: #f1f5f9; font-weight: 600; line-height: 1.2; }
.sidebar-brand .title small { display: block; color: #64748b; font-size: 11px; font-weight: 400; margin-top: 2px; }
.sidebar.collapsed .sidebar-brand .title { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 4px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: #94a3b8;
  font-size: 13.5px; transition: all 0.15s ease;
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.16));
  color: #fff; box-shadow: inset 2px 0 0 var(--accent);
}
.nav-group-header { cursor: pointer; justify-content: space-between; }
.nav-group-header .nav-chevron {
  margin-left: auto; transition: transform 0.2s; opacity: 0.7;
  display: flex; align-items: center;
}
.nav-group-header .nav-chevron svg { width: 14px; height: 14px; }
.nav-group.open .nav-group-header .nav-chevron { transform: rotate(180deg); }
.nav-sub {
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  display: flex; flex-direction: column; gap: 2px;
  padding-left: 20px;
}
.nav-group.open .nav-sub { max-height: 200px; padding-top: 4px; padding-bottom: 4px; }
.nav-sub-item {
  padding: 8px 12px; border-radius: 6px; color: #94a3b8;
  font-size: 13px; transition: all 0.15s ease; cursor: pointer;
}
.nav-sub-item:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }
.nav-sub-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #fff;
}
.sidebar.collapsed .nav-sub, .sidebar.collapsed .nav-chevron { display: none; }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar-user {
  padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; display: grid; place-items: center; font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user .info { min-width: 0; flex: 1; }
.sidebar-user .info .name { color: #e2e8f0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .info .role { color: #64748b; font-size: 11px; }
.sidebar.collapsed .sidebar-user .info { display: none; }
.sidebar-logout { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #fca5a5; font-size: 12.5px; transition: background 0.15s; cursor: pointer; justify-content: center; }
.sidebar-logout:hover { background: rgba(239, 68, 68, 0.12); color: #f87171; }

/* ===== 主体 ===== */
.app-main {
  flex: 1; margin-left: var(--sidebar-w);
  transition: margin-left 0.25s ease;
  min-width: 0;
  display: flex; flex-direction: column;
}
.sidebar.collapsed ~ .app-main { margin-left: var(--sidebar-w-collapsed); }

.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; padding: 0 24px;
  gap: 16px;
}
.topbar .toggle-btn {
  padding: 8px; border-radius: 8px; color: var(--text-soft);
  display: grid; place-items: center;
}
.topbar .toggle-btn:hover { background: var(--bg); color: var(--text); }
.topbar .menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13.5px; }
.crumbs .cur { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; color: var(--text-soft);
  position: relative; transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: 7px; right: 8px;
  background: var(--danger); color: #fff; font-size: 10px;
  padding: 1px 5px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.9);
  min-width: 16px; text-align: center; line-height: 1.2;
}
.user-dropdown {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: 30px;
  transition: background 0.15s; position: relative;
}
.user-dropdown:hover { background: var(--bg); }
.user-dropdown .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.user-dropdown .label { font-size: 13px; color: var(--text); font-weight: 500; }
.user-dropdown .chevron { color: var(--text-muted); }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; min-width: 180px; box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 50;
  animation: popIn 0.18s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.user-menu .item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  color: var(--text-soft); font-size: 13px; transition: background 0.15s;
}
.user-menu .item:hover { background: var(--bg); color: var(--text); }
.user-menu .item.danger { color: var(--danger); }
.user-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.page { padding: 22px 28px 48px; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.page-header .title { font-size: 20px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.page-header .desc { color: var(--text-muted); font-size: 13px; margin: 0; }
.page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 卡片 ===== */
.panel {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head .hint { font-size: 12px; color: var(--text-muted); }

/* 统计卡片 */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%; opacity: 0.18;
  pointer-events: none;
}
.stat-card.blue::before { background: radial-gradient(circle, #3b82f6, transparent 60%); }
.stat-card.cyan::before { background: radial-gradient(circle, #22d3ee, transparent 60%); }
.stat-card.violet::before { background: radial-gradient(circle, #8b5cf6, transparent 60%); }
.stat-card.red::before { background: radial-gradient(circle, #ef4444, transparent 60%); }
.stat-card .label { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; font-weight: 500; }
.stat-card .value { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.stat-card .breakdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.break-item { text-align: center; }
.break-item .n { font-size: 15px; font-weight: 600; color: var(--text); }
.break-item .t { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 客户分类 + 快捷操作 + 最近日志 三栏 */
.dashboard-row {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px;
}
.customer-classify {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.classify-card {
  background: var(--panel-strong); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; text-align: center;
}
.classify-card .icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center; margin-bottom: 8px;
}
.classify-card.c1 .icon { background: var(--primary-soft); color: var(--primary); }
.classify-card.c2 .icon { background: var(--success-soft); color: var(--success); }
.classify-card.c3 .icon { background: var(--warning-soft); color: var(--warning); }
.classify-card .n { font-size: 22px; font-weight: 700; }
.classify-card .t { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.quick-actions {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 10px;
}
.quick-action {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius);
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  color: var(--primary-strong); font-weight: 500; font-size: 13px;
  transition: all 0.2s;
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action.warn { background: linear-gradient(135deg, #fef3c7, #fee2e2); color: #b45309; }
.quick-action.good { background: linear-gradient(135deg, #dcfce7, #ecfccb); color: #15803d; }

.recent-logs { max-height: 340px; overflow-y: auto; }
.recent-logs::-webkit-scrollbar { width: 6px; }
.recent-logs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.log-item {
  display: grid; grid-template-columns: 80px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.log-item:last-child { border-bottom: none; }
.log-item .time { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.log-item .content { color: var(--text-soft); font-size: 13px; }
.log-item .content b { color: var(--text); font-weight: 500; }
.log-item .content .by { color: var(--text-muted); font-size: 12px; margin-top: 3px; }

/* Canvas 容器 */
.chart-wrap { position: relative; width: 100%; height: 280px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-bars-container {
  display: flex; align-items: flex-end; justify-content: space-between;
  height: 220px; padding: 0 10px; gap: 8px;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 4px;
  height: 200px; width: 100%; justify-content: center;
}
.bar {
  width: 20px; border-radius: 4px 4px 0 0;
  transition: height 0.3s ease; min-height: 2px;
}
.bar-blue { background: linear-gradient(180deg, #60a5fa, #3b82f6); }
.bar-green { background: linear-gradient(180deg, #34d399, #10b981); }
.chart-label { font-size: 12px; color: var(--text-muted); }
.legend { display: flex; gap: 18px; justify-content: center; font-size: 12px; color: var(--text-soft); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===== 表格 ===== */
.toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar .search {
  flex: 1; min-width: 220px; position: relative;
}
.toolbar .search input {
  width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
}
.toolbar .search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.toolbar select {
  padding: 9px 28px 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
  appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; color: var(--text);
}
.batch-bar {
  background: var(--primary-soft); border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--primary-strong); padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.batch-bar b { font-weight: 600; }

/* 筛选工具栏 */
.filter-grid {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-item {
  flex: 1; min-width: 160px;
}
.filter-item.search-box {
  flex: 2; min-width: 260px; position: relative;
}
.search-box input {
  width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-box .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.filter-item select {
  width: 100%; padding: 9px 28px 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
  appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; color: var(--text);
}
.filter-item input[type="date"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff; color: var(--text);
}

/* 表单项 */
.form-item { display: flex; flex-direction: column; }
.form-item label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.required { color: var(--danger); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-section { margin-bottom: 22px; }
.form-section-title { font-size: 12.5px; font-weight: 600; color: #1e40af; letter-spacing: 0.5px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px dashed #bfdbfe; }

/* 单元格 */
.cell-name { font-weight: 500; }
.cell-strong { font-weight: 600; font-family: monospace; color: #1e40af; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.data {
  width: 100%; border-collapse: collapse; background: #fff; font-size: 13px;
}
table.data th {
  text-align: left; padding: 12px 14px; background: #f8fafc;
  color: var(--text-soft); font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  user-select: none;
}
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--primary); }
table.data th .arrow { display: inline-block; margin-left: 4px; font-size: 10px; color: var(--text-muted); }
table.data td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
  border-right: 1px solid var(--border);
}
table.data td:last-child { border-right: none; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover { background: #f8fafc; }
table.data .col-check { width: 40px; border-right: 1px solid var(--border); }
table.data .col-actions { width: 180px; white-space: nowrap; border-right: none; }
table.data th { border-right: 1px solid var(--border); }
table.data th:last-child { border-right: none; }
.checkbox-cell { width: 16px; height: 16px; accent-color: var(--primary); }
.cell-primary { font-weight: 500; color: var(--text); }
.cell-muted { color: var(--text-muted); }

/* 状态标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
  line-height: 1.7;
}
.tag.blue { background: var(--primary-soft); color: var(--primary-strong); }
.tag.green { background: var(--success-soft); color: var(--success); }
.tag.orange { background: var(--warning-soft); color: #b45309; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.gray { background: #e2e8f0; color: #475569; }
.tag.cyan { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.tag.violet { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }

.action-buttons { display: inline-flex; gap: 6px; }
.link-btn { color: var(--primary); font-size: 13px; padding: 2px 4px; border-radius: 4px; }
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

/* 分页 */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; font-size: 13px; color: var(--text-soft);
}
.page-buttons { display: inline-flex; gap: 4px; align-items: center; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  color: var(--text-soft); font-size: 13px; transition: all 0.15s;
}
.page-btn:hover { color: var(--primary); border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.page-ellipsis { color: var(--text-muted); padding: 0 4px; }

/* ===== Modal ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px); z-index: 100;
  display: grid; place-items: center;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 640px; max-width: calc(100vw - 40px); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalRise 0.25s cubic-bezier(0.15, 0.9, 0.3, 1);
}
.modal.small { width: 440px; }
.modal.large { width: 880px; }
@keyframes modalRise {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .close {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-soft);
}
.modal-head .close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: #fafbff;
}

.field-section {
  margin-bottom: 22px;
}
.field-section-title {
  font-size: 12.5px; font-weight: 600; color: var(--primary-strong);
  letter-spacing: 0.5px; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px dashed var(--primary-soft);
  display: flex; align-items: center; gap: 6px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.field .req::after { content: " *"; color: var(--danger); }
.field .password-wrap { position: relative; }
.field .toggle-pwd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); padding: 6px; border-radius: 6px;
}
.field .toggle-pwd:hover { color: var(--primary); background: var(--bg); }

/* 工资表单 */
.table-section-title {
  font-size: 12px; font-weight: 600; color: #1e40af;
  letter-spacing: 0.3px; margin: 0 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid #dbeafe;
}
.salary-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px;
}
.salary-section { background: #f8fafc; border-radius: 12px; padding: 14px; border: 1px solid var(--border); }
.salary-section-title { font-size: 12.5px; font-weight: 600; color: #1e40af; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px dashed #bfdbfe; }
.salary-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.salary-row label { font-size: 13px; color: #475569; }
.salary-row small { grid-column: 2; font-size: 11.5px; color: #94a3b8; margin-top: -4px; }
.salary-preview { background: linear-gradient(135deg, #eff6ff, #f0fdf4); border: 1px solid #bfdbfe; border-radius: 12px; padding: 14px; }
.salary-preview-title { font-size: 12.5px; font-weight: 600; color: #1d4ed8; margin-bottom: 10px; }
.salary-preview-grid { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.salary-preview-grid > div { text-align: center; }
.salary-preview-grid .preview-total { margin-left: auto; background: #fff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 16px; }
.salary-preview-grid span { display: block; font-size: 11.5px; color: #64748b; margin-bottom: 4px; }
.salary-preview-grid strong { font-size: 15px; font-weight: 700; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-item { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.detail-item .k { color: var(--text-muted); }
.detail-item .v { color: var(--text); font-weight: 500; word-break: break-all; }

/* 员工台账 */
.emp-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.emp-list-header .title { font-size: 14px; font-weight: 600; }

/* ===== 任务 Tab ===== */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; border: 1px solid var(--border); }
.tab {
  padding: 9px 18px; border-radius: 9px; font-size: 13.5px; color: var(--text-soft);
  font-weight: 500; transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: #fff; color: var(--primary-strong); box-shadow: var(--shadow-sm); }

.task-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 14px 0;
}
.task-stat {
  padding: 14px 16px; border-radius: 12px; background: #fff;
  border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.task-stat .k { font-size: 12.5px; color: var(--text-muted); }
.task-stat .v { font-size: 22px; font-weight: 700; }

/* 终端日志 */
.terminal {
  background: #0b1220; color: #94a3b8; border-radius: 12px;
  padding: 14px 16px; font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.9; max-height: 420px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all;
}
.terminal::-webkit-scrollbar { width: 8px; }
.terminal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
.terminal .info { color: #67e8f9; }
.terminal .warn { color: #fbbf24; }
.terminal .error { color: #f87171; }
.terminal .success { color: #86efac; }
.terminal .time { color: #64748b; }

/* ===== Toast ===== */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 260px; max-width: 380px;
  padding: 12px 16px; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--info);
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text);
  animation: toastIn 0.3s cubic-bezier(0.15, 0.9, 0.3, 1);
  pointer-events: auto;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast.out { animation: toastOut 0.25s ease forwards; }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }
.toast .msg { flex: 1; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* ===== 通知面板抽屉 ===== */
.noti-drawer-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35);
  z-index: 80; animation: fadeIn 0.2s;
}
.noti-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px;
  background: #fff; z-index: 81; box-shadow: -20px 0 60px rgba(15,23,42,0.18);
  display: flex; flex-direction: column;
  animation: slideInRight 0.25s cubic-bezier(0.15, 0.9, 0.3, 1);
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.noti-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.noti-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.noti-head .read-all { font-size: 12.5px; color: var(--primary); cursor: pointer; }
.noti-head .read-all:hover { text-decoration: underline; }
.noti-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.noti-list::-webkit-scrollbar { width: 6px; }
.noti-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.noti-item {
  display: flex; gap: 12px; padding: 12px 20px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.noti-item:hover { background: var(--bg); }
.noti-item.unread { background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), transparent); }
.noti-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  flex-shrink: 0;
}
.noti-icon.success { background: var(--success-soft); color: var(--success); }
.noti-icon.danger { background: var(--danger-soft); color: var(--danger); }
.noti-icon.warning { background: var(--warning-soft); color: var(--warning); }
.noti-icon.info { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.noti-content { flex: 1; min-width: 0; }
.noti-content .title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.noti-content .body { font-size: 12.5px; color: var(--text-soft); line-height: 1.5; }
.noti-content .time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.noti-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 13px; }

/* 个人中心 */
.profile-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.profile-card { text-align: center; padding: 24px 18px; }
.profile-card .avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  display: grid; place-items: center; font-size: 30px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}
.profile-card .name { font-size: 18px; font-weight: 600; }
.profile-card .role-tag { display: inline-block; margin: 6px 0; }
.profile-card .meta { color: var(--text-muted); font-size: 12.5px; }
.profile-card .stats {
  margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.profile-card .stats .n { font-size: 17px; font-weight: 600; }
.profile-card .stats .t { font-size: 11px; color: var(--text-muted); }
.profile-meta { display: grid; gap: 8px; margin-top: 16px; text-align: left; }
.profile-meta > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.profile-meta > div span { color: #94a3b8; }
.profile-meta > div strong { color: #1e293b; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); text-align: center; }
.profile-stats .num { display: block; font-size: 20px; font-weight: 700; color: #1e40af; }
.profile-stats small { font-size: 11px; color: #94a3b8; }

/* 详情页 */
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-item { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.detail-item > span { display: block; font-size: 11.5px; color: #94a3b8; margin-bottom: 4px; }
.detail-item > div { font-size: 13px; color: #1e293b; font-weight: 500; }
.detail-title { font-size: 13px; font-weight: 600; color: #1e40af; margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px dashed #bfdbfe; }
.detail-remark { background: #f8fafc; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #475569; line-height: 1.6; }

/* 分隔线 */
.log-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.log-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.log-info-grid > div { background: #f8fafc; padding: 8px 10px; border-radius: 8px; }
.log-info-grid span { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.log-info-grid strong { font-size: 12.5px; color: #1e293b; }
.panel-hint { font-size: 12px; color: var(--text-muted); }

/* 任务统计 */
.task-stat { padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--border); text-align: center; }
.task-stat-num { font-size: 22px; font-weight: 700; color: #1e293b; }
.task-stat-label { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.task-stat-blue .task-stat-num { color: #2563eb; }
.task-stat-violet .task-stat-num { color: #7c3aed; }
.task-stat-green .task-stat-num { color: #16a34a; }
.task-stat-red .task-stat-num { color: #dc2626; }
.task-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

/* 状态标签 */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-blue { background: var(--primary-soft); color: var(--primary-strong); }
.tag-green { background: var(--success-soft); color: var(--success); }
.tag-orange { background: var(--warning-soft); color: #b45309; }
.tag-red { background: var(--danger-soft); color: var(--danger); }
.tag-gray { background: #e2e8f0; color: #475569; }
.tag-cyan { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.tag-violet { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }

/* 操作列 */
.action-col { display: inline-flex; gap: 6px; white-space: nowrap; }
.link-btn { color: var(--primary); font-size: 13px; padding: 2px 6px; border-radius: 4px; }
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }
.cell-muted { color: var(--text-muted); }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.pagination-controls { display: inline-flex; gap: 4px; align-items: center; }
.pagination-ellipsis { padding: 0 4px; color: var(--text-muted); }

/* 终端日志 */
.terminal { background: #0b1220; color: #94a3b8; border-radius: 12px; padding: 14px 16px; font-family: "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.9; max-height: 420px; overflow-y: auto; white-space: pre-wrap; }
.terminal-line { margin-bottom: 2px; }
.terminal-info { color: #67e8f9; }
.terminal-warn { color: #fbbf24; }
.terminal-error { color: #f87171; }
.terminal-success { color: #86efac; }
.log-time { color: #64748b; }

/* 仪表盘 */
.dashboard-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.customer-stats { display: grid; gap: 14px; margin-bottom: 16px; }
.cust-stat { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.cust-stat-val { font-size: 20px; font-weight: 700; color: #1e293b; min-width: 50px; }
.cust-stat-label { font-size: 12.5px; color: #64748b; }
.cust-stat-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; min-width: 100px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.quick-action { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--radius); background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary-strong); font-weight: 500; font-size: 13px; transition: all 0.2s; }
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action.warn { background: linear-gradient(135deg, #fef3c7, #fee2e2); color: #b45309; }
.quick-action.good { background: linear-gradient(135deg, #dcfce7, #ecfccb); color: #15803d; }
.recent-logs { max-height: 340px; overflow-y: auto; }
.recent-logs::-webkit-scrollbar { width: 6px; }
.recent-logs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.log-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.log-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; width: 60px; }
.log-main { flex: 1; }
.log-text { font-size: 13px; color: var(--text-soft); }
.log-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.log-tag { display: inline-flex; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.log-tag-blue { background: var(--primary-soft); color: var(--primary-strong); }
.log-tag-green { background: var(--success-soft); color: var(--success); }
.log-tag-red { background: var(--danger-soft); color: var(--danger); }
.log-tag-orange { background: var(--warning-soft); color: #b45309; }
.log-tag-violet { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
.stat-card { background: var(--panel-strong); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden; cursor: pointer; transition: all 0.2s; }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; opacity: 0.18; pointer-events: none; }
.stat-card.blue::before { background: radial-gradient(circle, #3b82f6, transparent 60%); }
.stat-card.cyan::before { background: radial-gradient(circle, #22d3ee, transparent 60%); }
.stat-card.violet::before { background: radial-gradient(circle, #8b5cf6, transparent 60%); }
.stat-card.red::before { background: radial-gradient(circle, #ef4444, transparent 60%); }
.stat-label { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.stat-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); text-align: center; }
.stat-breakdown .small { display: block; font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.stat-breakdown strong { font-size: 15px; font-weight: 600; color: var(--text); }
.legend-inline { display: flex; gap: 16px; font-size: 12px; color: var(--text-soft); }
.legend-inline em { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: middle; }

/* 财务统计项 */
.fin-stat-item { text-align: center; padding: 16px 12px; }
.fin-stat-label { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; font-weight: 500; }
.fin-stat-value { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.fin-stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }

/* 财务筛选栏 */
.filter-bar { background: var(--panel-strong); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }

/* 表格标题 */
.table-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 16px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.table-section-title .muted { color: var(--text-muted); }

/* 系统设置 */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot-green { background: #16a34a; }
.input-with-copy { display: flex; gap: 8px; }
.input-with-copy input { flex: 1; }

/* 权限表格 */
.perm-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.perm-row.head { background: #f8fafc; color: var(--text-soft); font-size: 12.5px; font-weight: 600; }
.perm-row .module { font-weight: 500; color: var(--text); }

/* tab相关 */
.tab-active { background: var(--primary-soft); color: var(--primary-strong) !important; box-shadow: var(--shadow-sm); }
.tab-badge { display: inline-flex; margin-left: 4px; background: rgba(37, 99, 235, 0.15); color: var(--primary-strong); font-size: 10px; padding: 1px 6px; border-radius: 10px; }

/* 翻页按钮 */
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-ghost { color: var(--text-soft); border: 1px solid var(--border-strong); background: #fff; }
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }

/* 仪表盘两列 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 响应式 */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-row { grid-template-columns: 1fr; }
  .profile-wrap { grid-template-columns: 1fr; }
  .login-body { grid-template-columns: 1fr; padding: 40px 6vw; }
  .login-brand { text-align: center; }
  .login-card { justify-self: center; }
  .task-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .topbar .menu-btn { display: grid; }
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .customer-classify { grid-template-columns: 1fr; }
  .topbar .user-dropdown .label, .topbar .crumbs .crumb-after { display: none; }
  .noti-drawer { width: 100%; }
  .task-summary { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .log-info-grid { grid-template-columns: 1fr 1fr; }
  .perm-row { grid-template-columns: 1fr; }
  .perm-row.head { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .salary-form-grid { grid-template-columns: 1fr; }
}

/* 系统设置 */
.settings-tabs { display: flex; flex-direction: column; gap: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.switch-row label { color: var(--text-soft); font-size: 13px; }
.switch {
  position: relative; width: 40px; height: 22px; background: #cbd5e1;
  border-radius: 12px; cursor: pointer; transition: background 0.2s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: left 0.2s;
}
.switch.on { background: var(--primary); }
.switch.on::after { left: 20px; }

.perm-table { margin-top: 10px; }
.perm-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border);
  align-items: center;
}
.perm-row.head { background: #f8fafc; color: var(--text-soft); font-size: 12.5px; font-weight: 600; }
.perm-row .module { font-weight: 500; color: var(--text); }
.perm-check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13px; }

/* 操作日志筛选行 */
.logs-filter-row {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
  gap: 10px; margin-bottom: 14px;
}
.logs-filter-row input, .logs-filter-row select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: #fff;
}

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .big { font-size: 36px; margin-bottom: 8px; opacity: 0.6; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-row { grid-template-columns: 1fr; }
  .profile-wrap { grid-template-columns: 1fr; }
  .login-body { grid-template-columns: 1fr; padding: 40px 6vw; }
  .login-brand { text-align: center; }
  .login-card { justify-self: center; }
  .logs-filter-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .topbar .menu-btn { display: grid; }
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .customer-classify { grid-template-columns: 1fr; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .topbar .user-dropdown .label, .topbar .crumbs .crumb-after { display: none; }
  .noti-drawer { width: 100%; }
  .mobile-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 29;
    animation: fadeIn 0.2s;
  }
  .modal.large, .modal { width: 100%; max-width: calc(100vw - 24px); }
  .task-stats { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .perm-row { grid-template-columns: 1fr; }
  .perm-row.head { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
