/* 质检打分系统 - 统一视觉系统 */
:root {
  --primary: #4058c7;
  --primary-hover: #3047b2;
  --primary-active: #243991;
  --primary-light: #eef1ff;
  --primary-ring: rgba(64, 88, 199, .16);
  --nav: #123130;
  --nav-deep: #0c2423;
  --nav-muted: #a9c0bd;
  --danger: #c43b47;
  --danger-light: #fff0f1;
  --success: #147b58;
  --success-light: #e9f7f1;
  --warning: #b36a0b;
  --warning-light: #fff5e4;
  --text: #172322;
  --text-secondary: #4f5f5d;
  --text-muted: #7b8987;
  --border: #dde4e2;
  --border-strong: #cad5d2;
  --bg: #f5f7f5;
  --card-bg: #ffffff;
  --surface-soft: #f9fbfa;
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(18, 49, 48, .04), 0 5px 18px rgba(18, 49, 48, .045);
  --shadow-lg: 0 18px 50px rgba(8, 34, 32, .16);
  --series-1: #2a78d6;
  --series-2: #008300;
  --series-3: #e87ba4;
  --series-4: #eda100;
  --series-5: #1baf7a;
  --series-6: #eb6834;
  --series-7: #4a3aa7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-width: 320px; background: var(--bg); }
body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 88% -8%, rgba(64, 88, 199, .065), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
::selection { color: #fff; background: var(--primary); }

.topbar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(115deg, var(--nav-deep), var(--nav) 65%, #183e3b);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 5px 18px rgba(9, 35, 33, .12);
}
.brand {
  display: flex;
  align-items: center;
  min-width: 214px;
  margin-right: 24px;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 11px;
  color: #173532;
  background: linear-gradient(145deg, #f4d487, #e3b84d);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 12px rgba(0,0,0,.18);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-copy small { margin-top: 4px; color: var(--nav-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 9px;
  color: #c9d8d6;
  font-size: 13px;
  font-weight: 550;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.075); }
.topbar nav a.active {
  color: #fff;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.topbar nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: #e9c264;
}
.user-area { display: flex; align-items: center; gap: 9px; margin-left: 18px; white-space: nowrap; }
.user-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #f7e6b8;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  font-weight: 750;
}
.username { max-width: 90px; overflow: hidden; text-overflow: ellipsis; color: #e3ecea; font-size: 13px; }
.link-btn {
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  color: #a9bfbc;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: .15s ease;
}
.link-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

.container { width: min(1420px, 100%); margin: 0 auto; padding: 26px 28px 52px; }
.page-title {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.015em;
}
.page-title::before {
  content: "";
  width: 4px;
  height: 22px;
  margin-right: 11px;
  border-radius: 3px;
  background: linear-gradient(var(--primary), #8c9be5);
}
.card {
  position: relative;
  margin-bottom: 16px;
  padding: 19px 20px;
  overflow: visible;
  background: var(--card-bg);
  border: 1px solid rgba(202, 213, 210, .72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: #263c39;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: .01em;
}
.card h3::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 13px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 15px;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: #fff;
  box-shadow: 0 1px 1px rgba(18,49,48,.025);
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { border-color: #aebdb9; background: var(--surface-soft); box-shadow: 0 3px 9px rgba(18,49,48,.07); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 1px; }
.btn:disabled { opacity: .52; cursor: not-allowed; box-shadow: none; }
.btn-primary { color: #fff; border-color: var(--primary); background: linear-gradient(180deg, #4c64d2, var(--primary)); box-shadow: 0 4px 12px rgba(64,88,199,.18); }
.btn-primary:hover { color: #fff; border-color: var(--primary-hover); background: var(--primary-hover); box-shadow: 0 6px 16px rgba(64,88,199,.23); }
.btn-danger { color: var(--danger); border-color: #ecc2c6; background: #fff; }
.btn-danger:hover { color: #a92e39; border-color: #e3aeb4; background: var(--danger-light); }
.btn-sm { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.btn-xs { min-height: 28px; padding: 4px 9px; font-size: 12px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 15px 16px; }
.form-item { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.form-item label { color: #596a67; font-size: 12px; font-weight: 620; }
.form-item label .req { margin-left: 2px; color: var(--danger); }
.form-item input, .form-item select, .form-item textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-item textarea { min-height: 84px; line-height: 1.65; resize: vertical; }
.form-item input:hover, .form-item select:hover, .form-item textarea:hover { border-color: #aab9b5; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-item input[readonly] { color: #3f5652; background: #f4f7f6; border-color: #e1e7e5; cursor: default; }
.form-full { grid-column: 1 / -1; }
.hint { color: var(--text-muted); font-size: 12px; }
.match-ok, .match-warn { display: inline-flex; align-items: center; margin-top: 2px; font-size: 12px; font-weight: 600; }
.match-ok { color: var(--success); }
.match-ok::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--success); }
.match-warn { color: var(--warning); }
.match-warn::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--warning); }

.suggest-dropdown, #staff-suggest {
  border: 1px solid var(--border-strong) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 16px 36px rgba(18,49,48,.15) !important;
  backdrop-filter: blur(8px);
}
.suggest-item { transition: background .12s ease; }
.suggest-item:hover { background: var(--primary-light); }

/* 筛选输入辅助选择下拉 */
.has-suggest { position: relative; }
.suggest-box {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 80;
  display: none; max-height: 260px; overflow: auto; margin-top: 4px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: rgba(255,255,255,.98); box-shadow: 0 14px 34px rgba(18,49,48,.16);
}
.suggest-box .suggest-item { padding: 8px 12px; border-bottom: 1px solid #edf1ef; cursor: pointer; font-size: 13px; color: var(--text); }
.suggest-box .suggest-item:last-child { border-bottom: 0; }
.suggest-box .suggest-item:hover { background: var(--primary-light); }
.suggest-box .suggest-item span { margin-left: 8px; color: var(--text-muted); font-size: 12px; }

.dim-card {
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfcfc);
}
.dim-card[data-dim="态度类红线"] { border-left: 4px solid var(--danger); background: linear-gradient(90deg, #fff8f8, #fff 26%); }
.dim-card[data-dim="规则类红线"] { border-left: 4px solid var(--warning); background: linear-gradient(90deg, #fffaf1, #fff 26%); }
.dim-card .dim-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.dim-card .dim-title { color: #2a403c; font-weight: 720; font-size: 13px; }
.dim-card[data-dim="态度类红线"] .dim-title { color: var(--danger); }
.dim-card[data-dim="规则类红线"] .dim-title { color: var(--warning); }
.dim-card .dim-deduct { color: var(--text-muted); font-size: 10px; text-align: right; }
.dim-options { display: flex; flex-wrap: wrap; gap: 6px; }
.dim-option {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  gap: 5px;
  border: 1px solid #d9e2e0;
  border-radius: 7px;
  color: #435653;
  background: #fff;
  cursor: pointer;
  user-select: none;
  font-size: 11.5px;
  transition: color .13s ease, border-color .13s ease, background .13s ease, transform .13s ease, box-shadow .13s ease;
}
.dim-option:hover { color: var(--primary); border-color: #aeb9ee; background: #f8f9ff; transform: translateY(-1px); }
.dim-option.selected { color: var(--primary-active); border-color: #8f9fe5; background: var(--primary-light); box-shadow: inset 0 0 0 1px rgba(64,88,199,.08); }
.dim-card[data-dim="态度类红线"] .dim-option.selected { color: var(--danger); border-color: #e3aab0; background: var(--danger-light); }
.dim-card[data-dim="规则类红线"] .dim-option.selected { color: var(--warning); border-color: #e8c58c; background: var(--warning-light); }
.dim-option input { accent-color: var(--primary); }
.dim-option .score { padding: 0 5px; border-radius: 5px; color: #6b7775; background: #f1f4f3; font-size: 10px; font-variant-numeric: tabular-nums; }
.dim-option.selected .score { color: inherit; background: rgba(255,255,255,.72); }

/* ---------- 录入页左右分栏 ---------- */
.edit-layout { display: grid; grid-template-columns: minmax(340px, 38%) 1fr; gap: 16px; align-items: start; }
.edit-left { display: grid; gap: 16px; min-width: 0; }
.edit-right { min-width: 0; }
.dim-cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dim-cards-grid .dim-card { margin-bottom: 0; }
@media (max-width: 1180px) {
  .edit-layout { grid-template-columns: 1fr; }
  .dim-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dim-cards-grid { grid-template-columns: 1fr; }
}

.score-preview {
  position: sticky;
  bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 70px;
  margin-top: 18px;
  padding: 11px 16px 11px 20px;
  gap: 14px;
  border: 1px solid rgba(202,213,210,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 13px 36px rgba(18,49,48,.13);
  backdrop-filter: blur(12px);
}
.score-preview > span:first-child { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.score-big { display: inline-block; min-width: 58px; font-size: 34px !important; font-weight: 800 !important; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.score-big.pass { color: var(--success); }
.score-big.fail { color: var(--danger); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e8edeb; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 2; color: #5f706d; background: #f3f6f5; font-size: 11px; font-weight: 720; letter-spacing: .025em; }
th:first-child { border-top-left-radius: 9px; }
th:last-child { border-top-right-radius: 9px; }
tbody tr { transition: background .1s ease; }
tbody tr:hover { background: #f8faf9; }
tbody tr:last-child td { border-bottom: 0; }
td .btn + .btn { margin-left: 4px; }
.score-cell { font-size: 14px; font-weight: 800; }
.score-cell.pass, td.pass { color: var(--success); }
.score-cell.fail, td.fail { color: var(--danger); }

.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 11px; margin-bottom: 0; }
.filter-bar .form-item { min-width: 132px; flex: 1 1 132px; }
.filter-bar .form-item label { font-size: 11px; }
.filter-bar .btn { flex: 0 0 auto; }
/* ---------- 高级筛选（列表页） ---------- */
.adv-filter-card { padding-bottom: 14px; }
.adv-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adv-title { display: flex; align-items: baseline; gap: 8px; font-weight: 720; color: #263c39; }
.adv-actions { display: flex; gap: 8px; }
.adv-body { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.filter-group { display: flex; align-items: flex-start; gap: 12px; }
.filter-group-label { flex: 0 0 96px; padding-top: 7px; color: #5f706d; font-size: 12px; font-weight: 650; }
.filter-group .dim-options { flex: 1; min-width: 0; }
.filter-group .dim-option { background: #fbfcfc; }

/* ---------- 结果筛选统计摘要 ---------- */
.result-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.summary-item { color: #5f706d; font-size: 12px; white-space: nowrap; }
.summary-num { display: inline-block; min-width: 26px; margin-left: 3px; font-size: 17px; font-weight: 800; color: #233936; font-variant-numeric: tabular-nums; }
.summary-num.pass { color: var(--success); }
.summary-num.fail, .summary-num.critical { color: var(--danger); }
.summary-num.warn { color: var(--warning); }
.summary-sep { width: 1px; height: 16px; background: var(--border-strong); }
@media (max-width: 720px) { .result-summary { flex-wrap: wrap; gap: 8px 12px; } }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.pagination .page-info { margin-right: 3px; color: var(--text-muted); font-size: 12px; }
.pagination .pg-num { min-width: 28px; text-align: center; font-weight: 640; }
.pagination .pg-num.pg-cur { min-width: 28px; text-align: center; padding: 5px 6px; border-radius: 7px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 680; cursor: default; }
.pagination .pg-ellipsis { color: var(--text-muted); padding: 0 1px; }
.pagination .pg-jump { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12px; }
.pagination .pg-jump input { width: 52px; min-height: 30px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 7px; text-align: center; }
.pagination .pg-size { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.pagination .pg-size select { min-height: 30px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font-size: 12px; cursor: pointer; }

.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border-radius: 7px; font-size: 11px; font-weight: 680; }
.badge-red { color: var(--danger); background: var(--danger-light); }
.badge-green { color: var(--success); background: var(--success-light); }
.badge-yellow { color: var(--warning); background: var(--warning-light); }
.badge-gray { color: #687673; background: #eef2f1; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: #f3f6f5; }
.tabs .tab { min-height: 33px; padding: 6px 13px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 640; }
.tabs .tab:hover { color: var(--text); background: rgba(255,255,255,.7); }
.tabs .tab.active { color: var(--primary); background: #fff; box-shadow: 0 1px 5px rgba(18,49,48,.09); }

.modal-mask { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,31,29,.54); backdrop-filter: blur(4px); }
.modal { width: 480px; max-width: 96vw; max-height: 90vh; overflow: auto; border: 1px solid rgba(255,255,255,.6); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); animation: modalIn .16s ease-out; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--border); }
.modal-header h3 { color: #263c39; font-size: 15px; }
.modal-body { display: grid; gap: 14px; padding: 19px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 19px; border-top: 1px solid var(--border); background: #fafcfb; }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

#toast-wrap { position: fixed; top: 76px; left: 50%; z-index: 300; display: flex; flex-direction: column; gap: 8px; transform: translateX(-50%); }
.toast { display: flex; align-items: center; min-width: 220px; padding: 11px 15px; border-radius: 10px; color: #fff; background: #173533; box-shadow: 0 12px 30px rgba(10,34,32,.2); font-size: 13px; animation: toastIn .2s ease; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }

.empty, .loading, .placeholder-page { text-align: center; color: var(--text-muted); }
.empty { padding: 48px 16px; }
.loading { padding: 40px 16px; }
.loading::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid #cbd6d3; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.placeholder-page { padding: 80px 0; font-size: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 13px; margin-bottom: 16px; }
.stat-card { position: relative; min-height: 114px; overflow: hidden; padding: 17px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--stat-accent, var(--primary)); }
.stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; right: -25px; bottom: -31px; border-radius: 50%; background: color-mix(in srgb, var(--stat-accent, var(--primary)) 10%, transparent); }
.stat-label { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.stat-value { margin-top: 9px; color: #233936; font-size: 29px; font-weight: 800; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 8px; color: #8b9795; font-size: 11px; }
.stat-card[data-tone="primary"] { --stat-accent: var(--primary); }
.stat-card[data-tone="good"] { --stat-accent: var(--success); }
.stat-card[data-tone="warning"] { --stat-accent: #fab219; }
.stat-card[data-tone="critical"] { --stat-accent: var(--danger); }

.viz-list { display: grid; gap: 10px; padding: 2px 0; }
.viz-row { display: grid; grid-template-columns: minmax(110px, 165px) 1fr 58px; align-items: center; gap: 12px; min-height: 27px; }
.viz-label { overflow: hidden; color: var(--text-secondary); font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.viz-track { position: relative; height: 14px; overflow: hidden; border-radius: 5px; background: #eef2f1; box-shadow: inset 0 0 0 1px rgba(18,49,48,.025); }
.viz-fill { height: 100%; min-width: 2px; border-radius: 4px; background: var(--bar-color, var(--primary)); transform-origin: left; animation: barIn .32s ease-out both; }
.viz-row:hover .viz-track { box-shadow: inset 0 0 0 1px rgba(64,88,199,.13); }
.viz-row:hover .viz-label { color: var(--text); font-weight: 650; }
.viz-value { color: #566663; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes barIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.upload-zone { position: relative; padding: 27px; border: 1.5px dashed #bdcac7; border-radius: 11px; color: #73827f; background: linear-gradient(180deg, #fbfcfc, #f6f9f8); text-align: center; cursor: pointer; transition: .15s ease; }
.upload-zone::before { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 8px; border: 1px solid #bac6e9; border-radius: 8px; color: var(--primary); background: var(--primary-light); font-size: 18px; }
.upload-zone:hover { color: var(--primary); border-color: #91a1e3; background: #f7f8ff; }
.thumb-grid { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 12px; }
.thumb-item { position: relative; width: 96px; height: 96px; overflow: hidden; border: 3px solid #fff; border-radius: 10px; background: #edf2f0; box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgba(18,49,48,.09); }
.thumb-item img { width: 100%; height: 100%; display: block; object-fit: cover; cursor: zoom-in; transition: transform .18s ease; }
.thumb-item:hover img { transform: scale(1.035); }
.thumb-del { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; color: #fff; background: rgba(10,29,28,.72); cursor: pointer; line-height: 1; }
.thumb-del:hover { background: var(--danger); }
.lightbox-mask { position: fixed; inset: 0; z-index: 500; display: flex; background: rgba(5,18,17,.94); backdrop-filter: blur(6px); }
.lightbox-stage { position: absolute; top: 0; left: 0; right: 0; bottom: 56px; overflow: auto; display: flex; padding: 16px; }
.lightbox-stage img { display: block; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: grab; user-select: none; -webkit-user-drag: none; box-shadow: 0 18px 70px rgba(0,0,0,.5); border-radius: 4px; }
.lightbox-stage img.zoomed { max-width: none; max-height: none; cursor: grab; border-radius: 0; }
.lightbox-toolbar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; background: rgba(8,29,28,.92); border-top: 1px solid rgba(255,255,255,.1); z-index: 3; }
.lb-btn { min-width: 34px; height: 32px; padding: 0 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 7px; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; font-size: 15px; line-height: 1; transition: background .15s ease; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-zoom { min-width: 48px; color: #e8eeec; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.lb-index { color: #a9c2be; font-size: 12px; }
.lb-spacer { flex: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 56px; border: 0; border-radius: 10px; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; font-size: 30px; line-height: 1; transition: background .15s ease; z-index: 3; }
.lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-nav.nav-prev { left: 14px; }
.lightbox-nav.nav-next { right: 14px; }

/* 列表附件缩略图 */
.thumb-mini { position: relative; display: inline-block; width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #edf2f0; cursor: zoom-in; transition: transform .12s ease, box-shadow .12s ease; }
.thumb-mini:hover { transform: scale(1.06); box-shadow: 0 3px 10px rgba(18,49,48,.18); }
.thumb-mini img { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumb-mini .thumb-count { position: absolute; right: 0; bottom: 0; padding: 0 5px; border-radius: 6px 0 6px 0; color: #fff; background: rgba(8,29,28,.72); font-size: 10px; font-style: normal; line-height: 16px; }

/* 列表注释（可点击放大） */
.note-cell {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px dashed #bcc8c5;
  border-radius: 6px;
  color: #4f5f5d;
  background: #f8faf9;
  cursor: pointer;
  font-size: 12px;
  vertical-align: middle;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.note-cell:hover { border-color: #91a1e3; color: var(--primary); background: var(--primary-light); }

.login-page { min-height: 100vh; background: #f3f6f4; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.04fr) minmax(420px, .96fr); }
.login-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 54px 64px 46px; overflow: hidden; color: #fff; background: linear-gradient(145deg, #0a2422, #123b37 65%, #1d4c47); }
.login-visual::before { content: ""; position: absolute; width: 420px; height: 420px; right: -150px; top: -110px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-visual::after { content: ""; position: absolute; width: 330px; height: 330px; left: -160px; bottom: -190px; border-radius: 50%; background: rgba(229,188,86,.1); }
.login-brand { position: relative; display: flex; align-items: center; z-index: 1; }
.login-brand .brand-mark { width: 42px; height: 42px; margin-right: 12px; }
.login-brand-copy strong { display: block; font-size: 15px; }
.login-brand-copy small { color: #a9c2be; font-size: 10px; letter-spacing: .15em; }
.login-message { position: relative; z-index: 1; max-width: 570px; margin: auto 0; }
.login-message .eyebrow { margin-bottom: 14px; color: #e6c879; font-size: 11px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
.login-message h1 { max-width: 520px; font-size: clamp(32px, 4vw, 54px); font-weight: 760; line-height: 1.14; letter-spacing: -.04em; }
.login-message p { max-width: 520px; margin-top: 20px; color: #b9cfcb; font-size: 15px; line-height: 1.8; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.login-points span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #d9e5e2; background: rgba(255,255,255,.055); font-size: 11px; }
.login-foot { position: relative; z-index: 1; color: #789792; font-size: 11px; }
.login-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 44px; }
.login-card { width: min(390px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(255,255,255,.96); box-shadow: 0 22px 60px rgba(18,49,48,.1); }
.login-card .mobile-logo { display: none; }
.login-card h2 { color: #213835; font-size: 24px; font-weight: 760; letter-spacing: -.025em; }
.login-card .sub { margin: 6px 0 24px; color: var(--text-muted); font-size: 13px; }
.login-card .form-item { margin-bottom: 15px; }
.login-card .form-item input { min-height: 43px; }
#login-err { min-height: 20px; margin-bottom: 8px; color: var(--danger); font-size: 12px; }
.btn-block { width: 100%; min-height: 43px; margin-top: 3px; font-size: 14px; }
.login-security { margin-top: 17px; color: #94a09e; font-size: 11px; text-align: center; }

.viz-card { min-height: 210px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-grid .card { min-width: 0; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h3 { margin-bottom: 3px; }
.section-head h3::after { display: none; }
.section-head p { color: var(--text-muted); font-size: 11px; }


  .topbar { padding: 0 16px; }
  .brand { min-width: auto; margin-right: 15px; }
  .brand-copy small { display: none; }
  .topbar nav a { padding-inline: 10px; }
  .username { display: none; }
  .stat-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding: 10px 12px 8px; }
  .brand { width: calc(100% - 150px); }
  .user-area { order: 2; margin-left: auto; }
  .topbar nav { order: 3; width: 100%; flex-basis: 100%; margin-top: 8px; }
  .topbar nav a { padding: 7px 10px; }
  .container { padding: 20px 14px 42px; }
  .page-title { font-size: 19px; }
  .card { padding: 16px; }
  .filter-bar .form-item { flex-basis: 150px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .viz-row { grid-template-columns: 100px 1fr 48px; gap: 8px; }
  .dim-card .dim-head { align-items: flex-start; flex-direction: column; }
  .dim-card .dim-deduct { text-align: left; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 24px; }
  .login-card .mobile-logo { display: flex; align-items: center; margin-bottom: 24px; }
}
@media (max-width: 520px) {
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-copy strong { font-size: 13px; }
  .link-btn { padding-inline: 5px; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar .form-item { flex-basis: 100%; }
  .filter-bar .btn { flex: 1 1 calc(50% - 6px); }
  .score-preview { bottom: 6px; padding-left: 13px; gap: 9px; }
  .score-preview .btn { padding-inline: 11px; }
  .stat-grid { grid-template-columns: 1fr; }
  .viz-row { grid-template-columns: 82px 1fr 38px; }
  .viz-label { font-size: 11px; }
  .modal-mask { padding: 10px; }
}
