:root {
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-700: #3730a3;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --violet: #7c3aed;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e9edf5;
  --line-2: #f1f4fa;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --success: #10b981;
  --success-50: #ecfdf5;
  --warning: #f59e0b;
  --warning-50: #fffbeb;
  --danger: #ef4444;
  --danger-50: #fef2f2;
  --info: #0ea5e9;
  --info-50: #f0f9ff;
  --cyan: #06b6d4;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -22px rgba(15, 23, 42, .25);
  --sidebar-w: 236px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

a { text-decoration: none; color: inherit; }

/* ============ 侧边栏 ============ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
}

.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 60%, #a855f7);
  color: #fff;
  display: grid; place-items: center;
  font-size: 18px;
  box-shadow: 0 8px 18px -8px rgba(99, 102, 241, .75);
  flex: 0 0 auto;
}

.brand-text { line-height: 1.15; min-width: 0; }
.brand-text strong { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.brand-text span { font-size: 11.5px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }

.sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 10px 18px; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.nav-group-title {
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: .12em;
  padding: 14px 10px 6px;
  font-weight: 600;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .18s, color .18s;
}

.side-nav a i { font-size: 16px; width: 18px; text-align: center; color: #94a3b8; transition: color .18s; }
.side-nav a:hover { background: #f7f8fc; color: var(--ink); }
.side-nav a:hover i { color: var(--primary); }

.side-nav a.active {
  background: linear-gradient(90deg, #eef2ff, #f6f4ff);
  color: var(--primary-600);
  font-weight: 600;
}
.side-nav a.active i { color: var(--primary); }
.side-nav a.active::before {
  content: "";
  position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #6366f1, #a855f7);
}

.side-nav a .nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  background: var(--danger-50);
  color: #dc2626;
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 700;
}

.sidebar-foot {
  flex: 0 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--muted-2);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-foot .dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 3px rgba(16,185,129,.12); }

/* ============ 主区域 ============ */
.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 1030;
  height: 64px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar .page-heading { min-width: 0; }
.topbar .page-heading h1 { font-size: 17px; font-weight: 700; margin: 0; color: var(--ink); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .page-heading .crumb { font-size: 12px; color: var(--muted-2); margin-top: 1px; }

.topbar-search {
  margin-left: auto;
  position: relative;
  width: 260px;
  max-width: 30vw;
}
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 14px; }
.topbar-search input {
  width: 100%; height: 38px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 0 14px 0 34px;
  font-size: 13px; color: var(--ink-2);
  outline: none;
  transition: all .2s;
}
.topbar-search input:focus { background: #fff; border-color: #c7d2fe; box-shadow: 0 0 0 4px rgba(99,102,241,.1); }

.topbar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 0; background: transparent;
  display: grid; place-items: center;
  color: #64748b; font-size: 17px;
  transition: background .18s, color .18s;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.icon-btn .dot-badge {
  position: absolute; top: 6px; right: 5px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
}

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  border: 0; background: transparent;
  transition: background .18s;
}
.user-chip:hover { background: #f8fafc; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 6px 14px -8px rgba(99,102,241,.8);
  flex: 0 0 auto;
}
.user-chip .u-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; text-align: left; }
.user-chip .u-role { font-size: 11px; color: var(--muted-2); text-align: left; }

.content { padding: 22px 26px 40px; flex: 1; }

/* ============ 卡片 ============ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line-2);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 10px;
}
.card-header h2, .card-header h3, .card-header h5 { font-size: 15px; font-weight: 650; margin: 0; color: var(--ink); letter-spacing: .01em; }
.card-header .sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.card-body { padding: 18px; }
.card-footer { background: transparent; border-top: 1px solid var(--line-2); padding: 12px 18px; }
.section-title { font-size: 12px; letter-spacing: .1em; color: var(--muted-2); font-weight: 600; text-transform: uppercase; }

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
  content: ""; position: absolute; right: -36px; top: -46px;
  width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.10), transparent 70%);
}
.stat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.stat-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  flex: 0 0 auto;
}
.ico-indigo { background: #eef2ff; color: #4f46e5; }
.ico-emerald { background: #ecfdf5; color: #059669; }
.ico-amber { background: #fffbeb; color: #d97706; }
.ico-sky { background: #f0f9ff; color: #0284c7; }
.ico-rose { background: #fff1f2; color: #e11d48; }
.ico-violet { background: #f5f3ff; color: #7c3aed; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin-top: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted-2); margin-left: 3px; }
.stat-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted-2); }
.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }

/* ============ 徽章 ============ */
.badge-soft {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.bs-green { background: var(--success-50); color: #047857; }
.bs-amber { background: var(--warning-50); color: #b45309; }
.bs-red { background: var(--danger-50); color: #b91c1c; }
.bs-blue { background: var(--info-50); color: #0369a1; }
.bs-indigo { background: var(--primary-50); color: #4338ca; }
.bs-gray { background: #f1f5f9; color: #475569; }
.bs-violet { background: #f5f3ff; color: #6d28d9; }

/* ============ 表格 ============ */
.table-modern { width: 100%; min-width: 1000px; border-collapse: separate; border-spacing: 0; margin: 0; }
.table-modern thead th {
  font-size: 12.5px; font-weight: 600; color: #64748b;
  background: #fafbfe;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: left;
}
.table-modern tbody td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  color: #334155;
  vertical-align: middle;
}
.table-modern tbody tr:last-child td { border-bottom: 0; }
.table-modern tbody tr:hover td { background: #fafbff; }
.table-modern tbody td, .table-modern thead th { white-space: nowrap; }
.table-modern td.wrap { white-space: normal; line-height: 1.55; }
.table-modern .cell-strong { font-weight: 600; color: var(--ink); }
.table-modern td > .cell-strong { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.table-modern .cell-muted { color: var(--muted-2); font-size: 12.5px; }
.table-modern td > .cell-muted { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.table-modern .num { font-variant-numeric: tabular-nums; text-align: right; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ============ 按钮 ============ */
.btn { border-radius: 9px; font-size: 13px; font-weight: 550; padding: .5rem .95rem; transition: all .18s; border: 1px solid transparent; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .85);
}
.btn-primary:hover, .btn-primary:focus { background: var(--primary-600); border-color: var(--primary-600); }
.btn-outline-primary { color: var(--primary-600); border-color: #c7d2fe; background: #fff; }
.btn-outline-primary:hover { background: var(--primary-50); border-color: #a5b4fc; color: var(--primary-700); }
.btn-soft { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.btn-soft:hover { background: #e8edf4; color: var(--ink); }
.btn-danger-soft { background: var(--danger-50); color: #b91c1c; border-color: #fecaca; }
.btn-danger-soft:hover { background: #fee2e2; }
.btn-sm { padding: .32rem .65rem; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.btn-light-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-light-ghost:hover { background: #f8fafc; color: var(--ink); }

/* ============ 表单 ============ */
.form-label { font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control, .form-select {
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  padding: .55rem .8rem;
  font-size: 13.5px;
  color: var(--ink-2);
  background-color: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}
.form-control::placeholder { color: #a8b3c4; }
.form-control.is-invalid, .form-select.is-invalid { border-color: #fca5a5; }
.invalid-feedback { font-size: 12px; }
.form-text { font-size: 11.5px; color: var(--muted-2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text { background: #f8fafc; border-color: #e2e8f0; color: var(--muted); font-size: 12.5px; border-radius: 9px; }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.filter-bar .form-control, .filter-bar .form-select { height: 38px; padding: .35rem .75rem; font-size: 13px; }

/* ============ 空状态 ============ */
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted-2); }
.empty-state .ico { font-size: 38px; color: #cbd5e1; display: block; margin-bottom: 10px; }
.empty-state p { margin: 0; font-size: 13px; }

/* ============ 时间线 ============ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: #eef1f8; }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #c7d2fe; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #c7d2fe;
}
.timeline-item.active::before { background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline-item .t-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.timeline-item .t-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.timeline-item .t-desc { font-size: 12.5px; color: #475569; margin-top: 5px; line-height: 1.6; }

/* ============ 页面头 ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 3px; letter-spacing: -.01em; }
.page-head p { margin: 0; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 分页 ============ */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--muted-2); }
.pager .pages { display: flex; gap: 4px; }
.pager .pages a, .pager .pages span {
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--line);
  display: inline-grid; place-items: center;
  font-size: 12.5px; color: #475569; background: #fff;
}
.pager .pages a:hover { border-color: #c7d2fe; color: var(--primary-600); background: var(--primary-50); }
.pager .pages .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pages .disabled { color: #cbd5e1; background: #f8fafc; }

/* ============ 提示 ============ */
.toast-stack { position: fixed; top: 78px; right: 24px; z-index: 1080; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 32px); }
.toast-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px;
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, .35);
  animation: toast-in .28s ease;
  font-size: 13px; color: var(--ink-2);
}
.toast-item.success { border-color: #bbf7d0; background: #f6fefb; }
.toast-item.success i { color: var(--success); }
.toast-item.error { border-color: #fecaca; background: #fffafa; }
.toast-item.error i { color: var(--danger); }
.toast-item i { font-size: 18px; }
.toast-item .msg { flex: 1; line-height: 1.5; }
.toast-item .msg pre { margin: 6px 0 0; font-size: 11.5px; white-space: pre-wrap; color: var(--muted); font-family: inherit; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ============ 图表 ============ */
.chart-box { width: 100%; height: 300px; }
.chart-box.sm { height: 236px; }

/* ============ 登录 ============ */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 12% 8%, #e0e7ff 0%, transparent 60%),
    radial-gradient(800px 600px at 88% 92%, #ede9fe 0%, transparent 62%),
    #f6f7fb;
}
.login-shell {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(30, 41, 59, .45);
  border: 1px solid #eef1f8;
}
.login-visual {
  position: relative;
  padding: 44px 40px;
  color: #fff;
  background: linear-gradient(150deg, #312e81, #4f46e5 52%, #7c3aed);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.login-visual::before, .login-visual::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  filter: blur(2px);
}
.login-visual::before { width: 320px; height: 320px; right: -110px; top: -110px; }
.login-visual::after { width: 220px; height: 220px; left: -70px; bottom: -90px; }
.login-visual .lv-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #e0e7ff; }
.login-visual h2 { font-size: 30px; font-weight: 700; line-height: 1.28; margin: 18px 0 12px; letter-spacing: -.01em; }
.login-visual p.lead { font-size: 13.5px; color: #e0e7ff; line-height: 1.8; margin: 0 0 26px; }
.login-features { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.login-features .lf { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #eef2ff; }
.login-features .lf i { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 14px; flex: 0 0 auto; }
.login-features .lf b { display: block; font-weight: 600; color: #fff; font-size: 13px; }
.login-features .lf span { font-size: 12px; color: #dbeafe; }
.login-visual .lv-foot { position: relative; z-index: 2; font-size: 11.5px; color: #c7d2fe; margin-top: 28px; }

.login-form { padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form h3 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.login-form .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 26px; }
.login-form .form-label { font-size: 12.5px; }
.login-form .form-control { height: 44px; font-size: 14px; }
.login-form .btn-primary { height: 44px; font-size: 14px; font-weight: 600; }
.demo-accounts { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.demo-accounts .da-title { font-size: 11.5px; color: var(--muted-2); letter-spacing: .08em; margin-bottom: 8px; }
.demo-accounts .da { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-accounts .chip {
  font-size: 11.5px; padding: 4px 9px; border-radius: 999px;
  background: #f8fafc; border: 1px solid var(--line); color: #475569; cursor: pointer;
  transition: all .15s;
}
.demo-accounts .chip:hover { border-color: #c7d2fe; background: var(--primary-50); color: var(--primary-600); }

/* ============ 详情 ============ */
.detail-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #ffffff, #fafaff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.detail-hero .hero-ico {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: var(--primary);
  display: grid; place-items: center; font-size: 28px;
  flex: 0 0 auto;
}
.detail-hero .hero-main { flex: 1; min-width: 220px; }
.detail-hero h2 { font-size: 19px; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.detail-hero .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.detail-hero .hero-value { text-align: right; }
.detail-hero .hero-sep { width: 1px; height: 34px; background: var(--line); margin: 0 4px; }
.detail-hero .hero-value .v { font-size: 21px; line-height: 1.2; font-weight: 700; color: var(--primary-600); font-variant-numeric: tabular-nums; }
.detail-hero .hero-value .l { font-size: 11.5px; color: var(--muted-2); margin-bottom: 2px; }
.detail-hero .hero-value .v-sub { font-size: 17px; font-weight: 600; color: #0f172a; }

.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.kv .k { font-size: 11.5px; color: var(--muted-2); margin-bottom: 3px; }
.kv .v { font-size: 13.5px; color: var(--ink-2); font-weight: 500; word-break: break-all; }

.progress-thin { height: 6px; border-radius: 999px; background: #eef1f8; overflow: hidden; }
.progress-thin > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #a855f7); }

/* ============ 标签打印 ============ */
.label-page { background: #fff; }
.asset-label {
  width: 360px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px;
  display: flex; gap: 14px; align-items: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.asset-label .qr { width: 104px; height: 104px; flex: 0 0 auto; }
.asset-label .info { flex: 1; min-width: 0; }
.asset-label .info .co { font-size: 10px; color: #94a3b8; letter-spacing: .05em; }
.asset-label .info .nm { font-size: 14px; font-weight: 700; margin: 4px 0 4px; line-height: 1.3; }
.asset-label .info .no { font-size: 12px; font-weight: 600; color: #4f46e5; font-variant-numeric: tabular-nums; }
.asset-label .info .sub { font-size: 10.5px; color: #64748b; margin-top: 4px; line-height: 1.5; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .app-main { margin-left: 0; }
  .sidebar, .topbar { display: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 1199px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 20px 60px rgba(15,23,42,.2); }
  .sidebar.open { transform: none; }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 32px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .topbar-search { display: none; }
}
@media (max-width: 575px) {
  .stat-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .user-chip .u-role { display: none; }
}

/* 杂项 */
.text-money { font-variant-numeric: tabular-nums; }
.text-primary-brand { color: var(--primary-600); }
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.divider-y { height: 1px; background: var(--line-2); margin: 14px 0; }
.avatar-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg,#6366f1,#a855f7); }

/* 附件选择器 */
.file-field { display: flex; align-items: center; gap: 6px; border: 1px dashed #d8e0ee; background: #fbfcff; border-radius: 10px; padding: 5px 6px 5px 10px; }
.file-field input[type=file] { display: none; }
.file-field .pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 12.5px; color: #64748b; }
.file-field .pick i { font-size: 16px; color: var(--primary); }
.file-field .pick .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.toast-item .import-errors { margin: 6px 0 0; padding: 8px 10px; background: #fff7f7; border-radius: 8px; color: #b91c1c; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; max-height: 170px; overflow: auto; }
