/* ==========================================================================
   种苗培育全流程管理系统 · 设计系统
   ========================================================================== */
:root {
  --green-900: #10331B;
  --green-800: #17451F;
  --green-700: #1E5B29;
  --green-600: #2E7D32;
  --green-500: #3C9A46;
  --green-100: #E4F1E6;
  --green-50: #F2F8F3;
  --teal-600: #00796B;
  --amber-600: #B26A00;
  --amber-100: #FFF3DC;
  --red-600: #C62828;
  --red-100: #FDE8E8;
  --blue-600: #1565C0;
  --blue-100: #E7F0FB;

  --ink-900: #16201A;
  --ink-700: #37474F;
  --ink-500: #6B7B72;
  --ink-400: #93A29A;
  --line: #E2E8E4;
  --line-strong: #CBD6CF;
  --bg: #F5F7F5;
  --panel: #FFFFFF;
  --panel-soft: #FAFBFA;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --shadow-s: 0 1px 2px rgba(16, 51, 27, .05);
  --shadow: 0 4px 16px rgba(16, 51, 27, .07);
  --shadow-l: 0 24px 64px rgba(16, 51, 27, .18);
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sidebar: 224px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-600); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D3DDD6; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ 启动 */
.boot {
  height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; color: var(--ink-500);
}
.boot-logo { font-size: 44px; }
.boot-text { font-size: 18px; font-weight: 600; color: var(--green-700); letter-spacing: .04em; }
.boot-sub { font-size: 12px; }

/* ------------------------------------------------------------------ 布局 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar); flex: 0 0 var(--sidebar);
  background: linear-gradient(180deg, #123A1D 0%, #0E2C16 100%);
  color: #D8E6DB; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, #4CAF50, #1B5E20); font-size: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.brand-name { font-size: 13.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.3; }
.brand-sub { font-size: 10.5px; color: #8FAE97; letter-spacing: .16em; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-group { margin-top: 12px; padding: 0 10px 6px; font-size: 10.5px; letter-spacing: .16em;
  color: #6E9179; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 2px 0;
  border-radius: 8px; color: #C8DBCE; font-size: 13.5px; cursor: pointer;
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(76, 175, 80, .28), rgba(76, 175, 80, .06));
  color: #fff; box-shadow: inset 2px 0 0 #66BB6A; }
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.nav-item .badge-dot { margin-left: auto; background: #E53935; color: #fff; font-size: 10.5px;
  padding: 1px 6px; border-radius: 9px; }
.sidebar-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11px; color: #6E9179; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 14px; padding: 0 22px; position: sticky; top: 0; z-index: 15;
}
.page-title { font-size: 16px; font-weight: 650; letter-spacing: .01em; }
.page-desc { font-size: 12px; color: var(--ink-400); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap; }
.crumb-group { color: var(--ink-400); }
.crumb-sep { color: var(--ink-400); font-size: 11px; }
.crumb-page { color: var(--ink-900); font-weight: 600; }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px;
  border-radius: 999px; background: var(--green-50); cursor: pointer; border: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-600); color: #fff; font-size: 12px; font-weight: 600; }
.user-chip .u-name { font-size: 12.5px; font-weight: 600; }
.user-chip .u-role { font-size: 10.5px; color: var(--ink-400); }
.user-menu { position: absolute; right: 20px; top: 54px; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-l); border: 1px solid var(--line); padding: 6px; min-width: 160px; z-index: 60; }
.user-menu div { padding: 9px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.user-menu div:hover { background: var(--green-50); }

.content { padding: 20px 22px 40px; flex: 1; }
.page-enter { animation: fade-up .22s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ 组件 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); }
.card-title { font-size: 13.5px; font-weight: 650; }
.card-sub { font-size: 11.5px; color: var(--ink-400); }
.card-body { padding: 16px; }
.card-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.kpi { padding: 15px 16px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow-s); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green-600); }
.kpi.warn::after { background: var(--amber-600); }
.kpi.danger::after { background: var(--red-600); }
.kpi.info::after { background: var(--blue-600); }
.kpi-label { font-size: 12px; color: var(--ink-500); display: flex; align-items: center; gap: 5px; }
.kpi-value { font-size: 26px; font-weight: 650; letter-spacing: -.01em; margin-top: 6px;
  font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--ink-400); margin-left: 3px; }
.kpi-foot { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: 7px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-700);
  font-size: 13px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn:hover { border-color: var(--green-500); color: var(--green-700); background: var(--green-50); }
.btn.primary { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn.primary:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red-600); border-color: #F0C4C4; }
.btn.danger:hover { background: var(--red-100); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; background: var(--green-100); color: var(--green-700);
  border: 1px solid transparent; white-space: nowrap; }
.badge.gray { background: #EEF1EF; color: var(--ink-500); }
.badge.amber { background: var(--amber-100); color: var(--amber-600); }
.badge.red { background: var(--red-100); color: var(--red-600); }
.badge.blue { background: var(--blue-100); color: var(--blue-600); }
.badge.teal { background: #E0F2F1; color: var(--teal-600); }
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-500);
  padding: 10px 12px; background: var(--panel-soft); border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; }
table.tb td { padding: 10px 12px; border-bottom: 1px solid #F0F3F1; vertical-align: middle;
  white-space: nowrap; }
table.tb td.wrap { white-space: normal; }
table.tb tbody tr:hover td { background: var(--green-50); }
table.tb tbody tr.clickable { cursor: pointer; }
table.tb td.num, table.tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tb td.mono { font-family: var(--mono); font-size: 12px; }
.empty { padding: 34px; text-align: center; color: var(--ink-400); font-size: 13px; }

/* ===== 数据大屏 ===== */
.bigscreen { max-width: 1480px; margin: 0 auto; padding: 2px 0 18px; }
.bs-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  background: linear-gradient(180deg, #F4FBF4 0%, var(--panel) 100%);
  border: 1px solid var(--line); border-bottom: 2px solid #2E7D32;
  border-radius: var(--radius); margin-bottom: 12px; position: relative; }
.bs-head::before, .bs-head::after { content: ""; position: absolute; bottom: -2px; width: 60px; height: 2px;
  background: linear-gradient(90deg, #2E7D32, transparent); }
.bs-head::before { left: 0; }
.bs-head::after { right: 0; transform: scaleX(-1); }
.bs-title-wrap { flex: 1; text-align: center; }
.bs-title { font-size: 25px; font-weight: 800; letter-spacing: 4px; color: var(--ink-900);
  background: linear-gradient(90deg, #2E7D32, #1565C0); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
.bs-subtitle { font-size: 12.5px; color: var(--ink-400); margin-top: 3px; letter-spacing: 1px; }
.bs-clock { font-size: 13px; color: var(--ink-600); font-variant-numeric: tabular-nums; text-align: right;
  min-width: 160px; line-height: 1.4; }
.bs-clock .d { font-size: 11.5px; color: var(--ink-400); }
.bs-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.bs-metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; box-shadow: var(--shadow-s); animation: bsIn .5s ease both; }
.bs-metric.warn { border-left: 3px solid #C62828; }
.bs-m-label { font-size: 12px; color: var(--ink-500); }
.bs-m-value { font-size: 30px; font-weight: 700; color: var(--ink-900); margin-top: 4px; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.bs-m-value small { font-size: 13px; font-weight: 500; color: var(--ink-400); margin-left: 3px; }
.bs-m-sub { font-size: 11.5px; color: var(--ink-400); margin-top: 6px; }
.bs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bs-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-s); min-height: 230px; display: flex; flex-direction: column; }
.bs-card.span2 { grid-column: span 2; }
.bs-ct { font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 8px; }
.bs-cb { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.bs-cb .chart-svg, .bs-cb svg { width: 100%; height: auto; }
.bs-legend { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 11.5px; color: var(--ink-500); margin-top: 8px; }
.bs-legend span { display: flex; align-items: center; gap: 5px; }
.bs-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.bs-rings { display: flex; gap: 8px; justify-content: space-around; align-items: center; }
.bs-ring { text-align: center; }
.bs-ring-l { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.bs-foot { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-400);
  margin-top: 12px; padding: 0 4px; }
.bs-foot .btn { margin-left: auto; }
.bs-skeleton { padding: 30px; text-align: center; color: var(--ink-400); }
@keyframes bsIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .bs-metrics { grid-template-columns: repeat(2, 1fr); }
  .bs-grid { grid-template-columns: repeat(2, 1fr); }
  .bs-card.span2 { grid-column: span 2; }
}
@media (max-width: 700px) {
  .bs-metrics { grid-template-columns: 1fr; }
  .bs-grid { grid-template-columns: 1fr; }
  .bs-card.span2 { grid-column: span 1; }
}

/* 生产看板内嵌的数据大屏区块 */
.bs-embed-chart { display: flex; flex-direction: column; }
.bs-sub { font-size: 12px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.bs-embed .card-body .chart-svg { width: 100%; height: auto; }

/* 供苗漏斗 */
.bs-funnel { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.bs-funnel.compact { gap: 0; }
.fn-row { display: flex; align-items: center; gap: 10px; }
.fn-label { width: 48px; font-size: 12px; color: var(--ink-600); flex: none; }
.fn-bar { flex: 1; height: 22px; background: var(--panel-soft); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.fn-fill { height: 100%; border-radius: 6px; transition: width .4s ease; }
.fn-val { width: 72px; text-align: right; font-size: 13px; font-weight: 600; color: var(--ink-800); flex: none; }
.fn-val small { font-size: 11px; color: var(--ink-400); font-weight: 400; margin-left: 2px; }
.fn-foot { font-size: 12px; color: var(--ink-500); margin-top: 4px; }
.fn-foot b { color: var(--ink-800); }

/* ============ 数据大屏·深色全屏模式 ============ */
body.screen-mode { overflow: hidden; background: #060b18; }
body.screen-mode .sidebar,
body.screen-mode .topbar { display: none !important; }
body.screen-mode .layout { display: block; }
body.screen-mode .main { display: block; height: 100vh; }
body.screen-mode .content {
  position: fixed; inset: 0; padding: 0; overflow: hidden;
  background:
    radial-gradient(1200px 620px at 50% -12%, rgba(46,125,50,0.20), transparent 60%),
    radial-gradient(900px 520px at 102% 112%, rgba(21,101,192,0.18), transparent 55%),
    linear-gradient(180deg, #070d1c 0%, #0a1428 100%);
}
body.screen-mode .bigscreen {
  height: 100vh; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; overflow: hidden;
  max-width: none; margin: 0; width: 100%;
}

body.screen-mode .bs-head {
  flex: none; padding: 6px 14px;
  background: linear-gradient(180deg, rgba(46,125,50,0.18), rgba(255,255,255,0.02));
  border: 1px solid rgba(120,200,150,0.30); border-bottom: 2px solid #2E7D32;
  box-shadow: 0 0 24px rgba(46,125,50,0.20);
}
body.screen-mode .bs-subtitle { color: #8aa0b8; }
body.screen-mode .bs-clock { color: #b9c6d6; }
body.screen-mode .bs-clock .d { color: #7e93aa; }

body.screen-mode .bs-metrics { gap: 6px 10px; grid-template-columns: repeat(8, 1fr); flex: none; margin: 0; }
body.screen-mode .bs-metric { padding: 4px 8px; }
body.screen-mode .bs-m-label { font-size: 11px; }
body.screen-mode .bs-m-value { font-size: 19px; }
body.screen-mode .bs-m-sub { font-size: 10.5px; margin-top: 2px; }
body.screen-mode .bs-metric {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(120,200,150,0.24);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 6px 20px rgba(0,0,0,0.40);
}
body.screen-mode .bs-metric.warn { border-left: 3px solid #FBBF24; }
body.screen-mode .bs-m-label { color: #8aa0b8; }
body.screen-mode .bs-m-value { color: #ffffff; text-shadow: 0 0 18px rgba(74,222,128,0.28); }
body.screen-mode .bs-m-value small { color: #8aa0b8; }
body.screen-mode .bs-m-sub { color: #7e93aa; }
body.screen-mode .bs-metric.good .bs-m-value { color: #4ADE80; text-shadow: 0 0 18px rgba(74,222,128,0.40); }
body.screen-mode .bs-metric.warn .bs-m-value { color: #FBBF24; text-shadow: 0 0 18px rgba(251,191,36,0.35); }

body.screen-mode .bs-grid {
  gap: 6px; flex: 1 1 auto; min-height: 0;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}
body.screen-mode .bs-card {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(120,200,150,0.22);
  box-shadow: 0 6px 20px rgba(0,0,0,0.40);
}
body.screen-mode .bs-card.span2 { grid-column: span 1; }
body.screen-mode .bs-ct { flex: none; margin-bottom: 4px; font-size: 12px; }
body.screen-mode .bs-cb { flex: 1 1 auto; min-height: 0; }
body.screen-mode .bs-cb .chart-svg { flex: 1 1 auto; min-height: 0; width: 100% !important; display: block; }
body.screen-mode .bs-ct { color: #d4e3d8; }
body.screen-mode .bs-legend { color: #9fb2c6; }
body.screen-mode .bs-ring-l { color: #9fb2c6; }
body.screen-mode .bs-sub2 { color: #9fb2c6; }
body.screen-mode .bs-foot { flex: none; padding: 2px 10px; color: #7e93aa; }
body.screen-mode .empty { color: #7e93aa; }

/* 图表在深色下的文字 / 轨道覆盖（CSS 优先级高于 SVG 表现属性） */
body.screen-mode svg text { fill: #cdd9e6 !important; }
body.screen-mode svg circle[stroke="#EEF1EF"] { stroke: rgba(255,255,255,0.12) !important; }
body.screen-mode .chart-svg line { stroke: rgba(255,255,255,0.10) !important; }
body.screen-mode .bar-track { background: rgba(255,255,255,0.10); }
body.screen-mode .fn-bar { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }
body.screen-mode .fn-label { color: #9fb2c6; }
body.screen-mode .fn-val { color: #e8eef4; }
body.screen-mode .fn-val small { color: #8aa0b8; }
body.screen-mode .fn-foot { color: #9fb2c6; }
body.screen-mode .fn-foot b { color: #e8eef4; }

/* 汇总大屏补充 */
.bs-biz-foot { font-size: 12.5px; color: var(--ink-500); margin-top: 8px; text-align: center; }
.bs-biz-foot b { color: var(--ink-900); font-size: 15px; }
.bs-sub2 { font-size: 12px; font-weight: 600; color: var(--ink-700); margin: 10px 0 6px; }

/* 品种（商品）缩略图 */
.thumb { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; display: inline-block;
  vertical-align: middle; flex: 0 0 auto; box-shadow: 0 1px 2px rgba(16, 51, 27, .12);
  background: var(--line); }
.thumb.sm { width: 22px; height: 22px; border-radius: 6px; }
.vc { display: inline-flex; align-items: center; gap: 8px; }
.vc-name { white-space: nowrap; }
.vc-more { font-size: 11px; color: var(--ink-500); margin-left: 2px; }

/* 商品图片上传预览 */
.img-preview { min-height: 120px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft, #F5F7F5); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.img-preview img { max-width: 100%; max-height: 260px; display: block; }
.img-empty { padding: 22px; text-align: center; font-size: 12.5px; color: var(--ink-400); line-height: 1.7; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--ink-500); font-weight: 500; }
.field .req::after { content: " *"; color: var(--red-600); }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], select, textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  font-size: 13px; font-family: inherit; color: var(--ink-900); background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 68px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(60, 154, 70, .12); }
input:disabled, select:disabled { background: #F4F6F5; color: var(--ink-400); }
.hint { font-size: 11.5px; color: var(--ink-400); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; }
.search input { padding-left: 30px; width: 220px; }
.search::before { content: "⌕"; position: absolute; left: 10px; top: 6px; color: var(--ink-400);
  font-size: 15px; }

/* 标签页 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
  overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 13px; color: var(--ink-500); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--green-700); }
.tab.active { color: var(--green-700); font-weight: 600; border-bottom-color: var(--green-600); }

/* 弹窗 */
.overlay { position: fixed; inset: 0; background: rgba(16, 32, 22, .42); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px;
  overflow-y: auto; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-l);
  width: min(720px, 100%); animation: pop .18s ease both; }
.modal.wide { width: min(1080px, 100%); }
.modal.narrow { width: min(460px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 10px; }
.modal-title { font-size: 15px; font-weight: 650; }
.modal-close { margin-left: auto; border: none; background: none; font-size: 18px; color: var(--ink-400);
  cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--ink-900); }
.modal-body { padding: 18px 20px; max-height: calc(100vh - 240px); overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px;
  justify-content: flex-end; background: var(--panel-soft); border-radius: 0 0 var(--radius-l) var(--radius-l); }

/* 提示 */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex;
  flex-direction: column; gap: 8px; }
.toast { min-width: 230px; max-width: 420px; padding: 11px 14px; border-radius: 9px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px;
  animation: slide-in .2s ease both; display: flex; gap: 8px; align-items: flex-start; }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.toast.ok { border-left: 3px solid var(--green-600); }
.toast.err { border-left: 3px solid var(--red-600); }
.toast.warn { border-left: 3px solid var(--amber-600); }
.toast .t-msg { flex: 1; line-height: 1.5; }

/* 图表 */
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-500); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.bar-row .rank { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; background: #E8EFE9; color: var(--ink-500);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bar-row .rank.top { background: #2E7D32; color: #fff; }
.bar-row .rank.r2 { background: #5B9BD5; color: #fff; }
.bar-row .rank.r3 { background: #C9962E; color: #fff; }
.bar-row .bl { width: 74px; color: var(--ink-500); flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; border-radius: 5px; background: #EEF1EF; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #66BB6A, #2E7D32);
  transition: width .5s ease; }
.bar-row .bv { width: 62px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-700); }

/* 详情描述 */
.desc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.desc.one { grid-template-columns: 1fr; }
.desc.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desc .d-item { font-size: 13px; }
.desc .d-label { font-size: 11.5px; color: var(--ink-400); margin-bottom: 2px; }
.desc .d-value { font-weight: 500; word-break: break-all; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px;
  width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px 0; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid #CFD8D2; }
.tl-item.done::before { background: var(--green-600); border-color: var(--green-600); }
.tl-item.cur::before { background: #fff; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(46,125,50,.16); }
.tl-title { font-size: 13px; font-weight: 550; }
.tl-meta { font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }

.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-radius: 8px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 12.5px; }
.check-item.bad { background: var(--red-100); border-color: #F3C7C7; }
.check-item.good { background: var(--green-50); border-color: #CDE6D2; }
.check-item .ci-ico { font-size: 14px; line-height: 1.2; }
.check-item .ci-title { font-weight: 600; margin-bottom: 1px; }
.check-item .ci-msg { color: var(--ink-500); }

.alert-row { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); margin-bottom: 8px; font-size: 12.5px; background: #fff; }
.alert-row .a-ico { color: var(--amber-600); }
.alert-row.error { border-color: #F3C7C7; background: #FFF7F7; }

.msg { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  background: var(--blue-100); color: #12457E; border: 1px solid #CFE0F7; }
.msg.warn { background: var(--amber-100); color: var(--amber-600); border-color: #F2DCB4; }
.msg.ok { background: var(--green-50); color: var(--green-700); border-color: #CDE6D2; }

.code { font-family: var(--mono); font-size: 12px; background: #F7F9F8; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; color: var(--ink-700); }

/* 登录 */
.login-wrap { height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  grid-template-rows: 100%; overflow: hidden; }
.login-art {
  position: relative; overflow: hidden; color: #E8F5E9;
  background: radial-gradient(circle at 22% 18%, #2E7D32 0%, #123A1D 46%, #0B2412 100%);
  padding: 54px 56px; display: flex; flex-direction: column;
}
.login-art::after {
  content: ""; position: absolute; inset: auto -12% -28% -12%; height: 62%;
  background: radial-gradient(ellipse at 50% 0%, rgba(129, 199, 132, .22), transparent 68%);
}
.login-art h1 { font-size: 30px; line-height: 1.35; margin: 0 0 14px; font-weight: 650;
  letter-spacing: .01em; }
.login-art p { color: #A9C6B2; font-size: 13.5px; line-height: 1.9; margin: 0; max-width: 430px; }
.login-points { margin-top: auto; display: grid; gap: 11px; position: relative; z-index: 1; }
.login-point { display: flex; gap: 10px; font-size: 13px; color: #C6DFCC; }
.login-point b { color: #fff; font-weight: 600; }
.login-panel { display: grid; place-items: center; background: #fff; padding: 40px; height: 100%; }
.login-box { width: min(368px, 100%); }
.login-box h2 { margin: 0 0 6px; font-size: 21px; font-weight: 650; }
.login-box .sub { color: var(--ink-400); font-size: 12.5px; margin-bottom: 26px; }
.login-box .field { margin-bottom: 14px; }
.login-box input { height: 40px; }
.login-submit { width: 100%; height: 40px; margin-top: 8px; justify-content: center; font-size: 14px; }
.login-tips { margin-top: 22px; font-size: 11.5px; color: var(--ink-400); line-height: 1.9;
  border-top: 1px dashed var(--line); padding-top: 14px; }
.login-tips b { color: var(--green-700); font-weight: 600; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* 移动端扫码条 */
.scan-bar { display: flex; gap: 8px; align-items: center; background: var(--green-50);
  border: 1px dashed #B9D9BF; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
  font-size: 12.5px; color: var(--green-800); }
.scan-bar input { max-width: 300px; height: 30px; background: #fff; }

/* 打印 */
@media print {
  .sidebar, .topbar, .toolbar, .card-actions { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
}
