/* ==========================================================================
   ODIS Report · Design System  (dark tech / 2026 refresh)
   One stylesheet for every screen: app shell, dashboard, forms, tables, auth.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #060a12;
  --bg-soft: #0a1120;
  --surface: rgba(15, 23, 42, .72);
  --surface-solid: #0f172a;
  --surface-2: rgba(8, 13, 24, .72);
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .26);
  --text: #e6edf7;
  --text-dim: #a3b2c9;
  --text-muted: #7488a3;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-ink: #05121f;
  --accent-soft: rgba(56, 189, 248, .12);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -28px rgba(2, 6, 23, .95);
  --shadow-soft: 0 12px 30px -20px rgba(2, 6, 23, .9);
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sidebar-w: 264px;
}

/* ---------- reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient light + engineering grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58rem 34rem at 12% -8%, rgba(56, 189, 248, .17), transparent 62%),
    radial-gradient(52rem 32rem at 96% -4%, rgba(99, 102, 241, .18), transparent 60%),
    radial-gradient(46rem 30rem at 50% 110%, rgba(14, 116, 144, .12), transparent 65%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(75% 60% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(75% 60% at 50% 0%, #000 0%, transparent 100%);
  pointer-events: none;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.012em; line-height: 1.3; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; transition: color .16s ease; }
a:hover { color: #7dd3fc; }
img { max-width: 100%; }
svg { display: block; }
::selection { background: rgba(56, 189, 248, .3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .38); background-clip: content-box; }

/* ---------- app shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px 14px;
  background: linear-gradient(180deg, rgba(11, 18, 32, .94), rgba(6, 10, 18, .9));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 12px 26px -10px rgba(56, 189, 248, .9);
}

.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-text small { font-size: 11px; color: var(--text-muted); letter-spacing: .08em; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 0 12px;
}

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

.nav-label {
  padding: 0 12px 8px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.35;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.nav-link:hover { color: var(--text); background: rgba(148, 163, 184, .08); }

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(56, 189, 248, .17), rgba(99, 102, 241, .1));
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .24);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(56, 189, 248, .8);
}

.nav-icon { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav-link.is-active .nav-icon { opacity: 1; color: var(--accent); }
.nav-en {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--text-muted);
  opacity: .8;
  white-space: nowrap;
}

.side-foot {
  padding: 12px 10px 2px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-foot .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  display: inline-block;
  margin-right: 6px;
}

/* ---------- main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 3vw, 40px);
  background: rgba(6, 10, 18, .74);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(148, 163, 184, .08);
  color: var(--text);
  cursor: pointer;
}
.menu-btn:hover { background: rgba(148, 163, 184, .16); }
.menu-btn svg { width: 18px; height: 18px; }

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.crumb b { color: var(--text-dim); font-weight: 600; }
.crumb .sep { opacity: .45; }
.crumb .now { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.userbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .62);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; opacity: .8; }
.chip b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, .25), rgba(99, 102, 241, .3));
  border: 1px solid rgba(56, 189, 248, .35);
  color: #cfe9ff;
}
.avatar svg { width: 17px; height: 17px; }

.topbar-user {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 40px) 72px;
}

/* ---------- page head ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.page-head h1 { font-size: clamp(21px, 2.2vw, 26px); }
.page-sub { margin-top: 7px; font-size: 13px; color: var(--text-dim); max-width: 72ch; }

/* ---------- cards / grids ---------- */
.card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 26, 45, .88), rgba(10, 17, 32, .8));
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
}
.card-title svg { width: 17px; height: 17px; color: var(--accent); }
.card-sub { font-size: 12px; color: var(--text-muted); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.mt-lg { margin-top: 18px; }
.mt-md { margin-top: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, .22);
  background:
    radial-gradient(120% 170% at 100% 0%, rgba(99, 102, 241, .3), transparent 58%),
    radial-gradient(110% 150% at 0% 0%, rgba(56, 189, 248, .22), transparent 62%),
    linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(8, 13, 24, .92));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../images/R8.jpg) center 62% / cover no-repeat;
  opacity: .2;
  filter: saturate(.85) contrast(1.06);
  -webkit-mask-image: linear-gradient(100deg, transparent 34%, rgba(0, 0, 0, .9) 88%);
  mask-image: linear-gradient(100deg, transparent 34%, rgba(0, 0, 0, .9) 88%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 620px; }
.hero h1 { font-size: clamp(24px, 3vw, 35px); letter-spacing: -.025em; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { margin-top: 12px; color: #b9c8dc; font-size: 14px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---------- stats ---------- */
.stat { overflow: hidden; padding: 18px 20px; }
.stat::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .3), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.stat-label svg { width: 15px; height: 15px; color: var(--accent); }
.stat-value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 6px; letter-spacing: 0; }
.stat-hint { margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }

/* ---------- tiles ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .48);
  color: var(--text);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.tile:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, .45);
  background: rgba(56, 189, 248, .08);
}
.tile-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, .2);
  margin-bottom: 3px;
}
.tile-icon svg { width: 17px; height: 17px; }
.tile strong { font-size: 13.5px; font-weight: 620; }
.tile span { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 12px; }
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .45);
}
.step-no {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, .25);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.step b { display: block; font-size: 13px; font-weight: 620; margin-bottom: 3px; }
.step p { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* ---------- forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-template-columns: 1fr; grid-column: 1 / -1; }

.label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.label .en { font-size: 11px; font-weight: 400; color: var(--text-muted); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder { color: rgba(116, 136, 163, .8); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(148, 163, 184, .42); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(8, 13, 24, .92);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .16);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select option { background: #0f172a; color: var(--text); }

.input[readonly] {
  color: var(--text-dim);
  background: rgba(148, 163, 184, .06);
  border-style: dashed;
  cursor: default;
}
.input[readonly]:focus {
  border-color: var(--border-strong);
  box-shadow: none;
  background: rgba(148, 163, 184, .06);
}

.file {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  cursor: pointer;
}
.file:hover { border-color: rgba(56, 189, 248, .5); color: var(--text); }
.file::file-selector-button {
  margin-right: 10px;
  padding: 7px 13px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #dbeafe;
  background: rgba(56, 189, 248, .14);
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 8px;
  cursor: pointer;
}
.file::file-selector-button:hover { background: rgba(56, 189, 248, .24); }

.hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.field-error { font-size: 11.5px; color: var(--danger); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* input with inline action */
.input-group { position: relative; display: flex; }
.input-group .input { padding-right: 44px; }
.input-group .ghost-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.input-group .ghost-btn:hover { color: var(--text); background: rgba(148, 163, 184, .12); }
.input-group .ghost-btn svg { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 620;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s ease, filter .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 16px 32px -14px rgba(56, 189, 248, .9);
}
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.07); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(148, 163, 184, .08);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(148, 163, 184, .16); color: #fff; }

.btn-danger {
  background: rgba(251, 113, 133, .12);
  border-color: rgba(251, 113, 133, .35);
  color: #fecdd3;
}
.btn-danger:hover { background: rgba(251, 113, 133, .2); color: #fff; }

.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.link-arrow svg { width: 14px; height: 14px; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 13, 24, .45);
}

.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(8, 13, 24, .72);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  vertical-align: middle;
}
.table tbody tr { transition: background .14s ease; }
.table tbody tr:hover td { background: rgba(56, 189, 248, .05); color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .mono { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.table .nowrap { white-space: nowrap; }
.table .cell-strong { color: var(--text); font-weight: 600; }
.table a { font-weight: 600; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 46px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty svg { width: 34px; height: 34px; opacity: .5; }
.empty p { font-size: 13px; }
.empty .hint { max-width: 46ch; }

/* ---------- badges / alerts ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, .08);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-ok {
  border-color: rgba(52, 211, 153, .32);
  background: rgba(52, 211, 153, .12);
  color: #6ee7b7;
}
.badge-warn {
  border-color: rgba(251, 191, 36, .32);
  background: rgba(251, 191, 36, .12);
  color: #fde68a;
}
.badge-accent {
  border-color: rgba(56, 189, 248, .3);
  background: rgba(56, 189, 248, .12);
  color: #bae6fd;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, .25);
  background: rgba(56, 189, 248, .08);
  color: #bae6fd;
  font-size: 12.5px;
  line-height: 1.55;
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.alert-error {
  border-color: rgba(251, 113, 133, .34);
  background: rgba(251, 113, 133, .1);
  color: #fecdd3;
}
.alert-warn {
  border-color: rgba(251, 191, 36, .3);
  background: rgba(251, 191, 36, .09);
  color: #fde68a;
}
.alert-ok {
  border-color: rgba(52, 211, 153, .3);
  background: rgba(52, 211, 153, .09);
  color: #a7f3d0;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, .06);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.6;
}
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent); }
.note b { color: var(--text); font-weight: 620; }
.note-warn { border-color: rgba(251, 191, 36, .26); background: rgba(251, 191, 36, .07); }
.note-warn svg { color: var(--warn); }
.note + .note { margin-top: 10px; }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; font-size: 13px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text); }

.ref-img {
  display: block;
  width: 100%;
  max-width: 460px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 13, 24, .6);
}

.download-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, .28);
  background: rgba(56, 189, 248, .07);
  word-break: break-all;
}
.download-row .dl-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, .16);
  color: var(--accent);
}
.download-row .dl-icon svg { width: 18px; height: 18px; }
.download-row a { font-weight: 600; }

/* ---------- auth (login / register) ---------- */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 52px);
  background: #050a13 url(../images/R8.jpg) center 58% / cover no-repeat;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 19, .55) 0%, rgba(5, 10, 19, .9) 72%, #050a13 100%),
    linear-gradient(90deg, rgba(5, 10, 19, .88) 0%, rgba(5, 10, 19, .2) 70%, transparent 100%);
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual .brand { border-bottom: 0; padding: 0; margin: 0; }

.auth-copy { margin-top: auto; max-width: 540px; }
.auth-copy h1 {
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -.03em;
}
.auth-copy h1 .accent {
  background: linear-gradient(120deg, var(--accent), #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-copy p { margin-top: 14px; color: #b8c7db; font-size: 14px; max-width: 48ch; }
.auth-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.auth-point {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(255, 255, 255, .04);
  color: #cfdcee;
  font-size: 11.5px;
  backdrop-filter: blur(6px);
}
.auth-point svg { width: 13px; height: 13px; color: var(--accent); }
.auth-legal { font-size: 11.5px; color: rgba(148, 163, 184, .7); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px);
}

.auth-card { width: 100%; max-width: 404px; }
.auth-card h2 { font-size: 23px; letter-spacing: -.02em; }

/* single-column auth page (registration) */
.auth-single { grid-template-columns: minmax(0, 1fr); }
.auth-single .auth-panel { padding: clamp(24px, 5vw, 64px) 20px; }
.auth-single .auth-card {
  max-width: 620px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 26, 45, .9), rgba(10, 17, 32, .86));
  box-shadow: var(--shadow);
}
.auth-single .brand { border-bottom: 0; padding: 0 0 18px; margin: 0 0 4px; }
.auth-single .brand-mark svg { width: 22px; height: 22px; }
.auth-sub { margin-top: 6px; font-size: 13px; color: var(--text-dim); }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.auth-form .btn { width: 100%; min-height: 44px; }
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); text-align: center; }
.auth-foot a { font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; color: var(--text-muted); }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------- toast (unused fallback) ---------- */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
}
.toast {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, .3);
  background: rgba(15, 23, 42, .97);
  color: #bae6fd;
  font-size: 12.5px;
  box-shadow: var(--shadow);
}

/* ---------- utilities ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(3, 7, 14, .6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }

/* ---------- topbar tools / auth tools / report drawer ---------- */
.topbar-tools { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(148, 163, 184, .08);
  color: var(--text-dim);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.icon-btn:hover { background: rgba(148, 163, 184, .16); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

.lang-btn {
  width: auto;
  min-width: 44px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.theme-btn .i-moon { display: none; }
[data-theme="light"] .theme-btn .i-sun { display: none; }
[data-theme="light"] .theme-btn .i-moon { display: block; }

.auth-tools {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 90;
  display: flex;
  gap: 8px;
}
.auth-tools .icon-btn {
  background: rgba(15, 23, 42, .55);
  border-color: rgba(148, 163, 184, .35);
  color: #e6edf7;
  backdrop-filter: blur(8px);
}
[data-theme="light"] .auth-tools .icon-btn {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(15, 23, 42, .15);
  color: #0f172a;
}

/* 英文模式下隐藏重复的中文旁注 */
.lang-en .label .en,
.lang-en .nav-en { display: none; }

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(3, 7, 14, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}
body.drawer-open .drawer-scrim { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(1040px, 94vw);
  height: 100vh;
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  box-shadow: -40px 0 90px -50px rgba(2, 6, 23, .95);
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.drawer-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.drawer-title svg { width: 17px; height: 17px; color: var(--accent); }
.drawer-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.drawer-body { position: relative; flex: 1; min-height: 0; background: #fff; }
.drawer-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

.drawer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  background: var(--surface-solid);
  color: var(--text-muted);
  font-size: 12px;
  z-index: 1;
}
.drawer-loading[hidden] { display: none; }
.drawer-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: drawer-spin .8s linear infinite;
}
@keyframes drawer-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .drawer { width: 100vw; }
  .drawer-head { padding: 10px 12px; }
  .drawer-actions .btn { min-height: 32px; padding: 5px 10px; }
}

/* ---------- light theme ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f4f6fa;
  --border: rgba(15, 23, 42, .1);
  --border-strong: rgba(15, 23, 42, .18);
  --text: #0f172a;
  --text-dim: #475569;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-2: #4f46e5;
  --accent-ink: #05121f;
  --accent-soft: rgba(2, 132, 199, .1);
  --ok: #047857;
  --warn: #b45309;
  --danger: #be123c;
  --shadow: 0 24px 60px -34px rgba(15, 23, 42, .38);
  --shadow-soft: 0 12px 30px -22px rgba(15, 23, 42, .3);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(58rem 34rem at 12% -8%, rgba(2, 132, 199, .14), transparent 62%),
    radial-gradient(52rem 32rem at 96% -4%, rgba(79, 70, 229, .12), transparent 60%),
    radial-gradient(46rem 30rem at 50% 110%, rgba(14, 116, 144, .07), transparent 65%),
    var(--bg);
}
[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .05) 1px, transparent 1px);
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 247, 252, .94));
}
[data-theme="light"] .brand-text small { color: var(--text-muted); }
[data-theme="light"] .nav-link:hover { background: rgba(15, 23, 42, .05); }
[data-theme="light"] .nav-link.is-active {
  color: #0f172a;
  background: linear-gradient(90deg, rgba(2, 132, 199, .14), rgba(79, 70, 229, .08));
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, .25);
}
[data-theme="light"] .nav-link.is-active .nav-icon { color: var(--accent); }

[data-theme="light"] .topbar { background: rgba(255, 255, 255, .78); }
[data-theme="light"] .chip { background: rgba(255, 255, 255, .9); }
[data-theme="light"] .avatar {
  background: linear-gradient(135deg, rgba(2, 132, 199, .16), rgba(79, 70, 229, .18));
  border-color: rgba(2, 132, 199, .3);
  color: #075985;
}
[data-theme="light"] .card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
[data-theme="light"] .hero {
  background:
    radial-gradient(120% 170% at 100% 0%, rgba(79, 70, 229, .14), transparent 58%),
    radial-gradient(110% 150% at 0% 0%, rgba(2, 132, 199, .16), transparent 62%),
    linear-gradient(180deg, #ffffff, #f2f7fd);
  border-color: rgba(2, 132, 199, .22);
}
[data-theme="light"] .hero::after { opacity: .08; }
[data-theme="light"] .hero-sub { color: #334155; }
[data-theme="light"] .hero .auth-point {
  background: rgba(2, 132, 199, .07);
  border-color: rgba(2, 132, 199, .25);
  color: #075985;
}
[data-theme="light"] .hero .auth-point svg { color: var(--accent); }
[data-theme="light"] .stat::after { background: radial-gradient(circle, rgba(2, 132, 199, .18), transparent 68%); }
[data-theme="light"] .tile { background: rgba(255, 255, 255, .75); }
[data-theme="light"] .tile:hover { background: rgba(2, 132, 199, .07); border-color: rgba(2, 132, 199, .4); }
[data-theme="light"] .tile-icon { background: rgba(2, 132, 199, .1); border-color: rgba(2, 132, 199, .2); }
[data-theme="light"] .step { background: rgba(255, 255, 255, .7); }
[data-theme="light"] .step-no { background: rgba(2, 132, 199, .1); border-color: rgba(2, 132, 199, .22); }

[data-theme="light"] .input,
[data-theme="light"] .select,
[data-theme="light"] .textarea,
[data-theme="light"] .file { background-color: #ffffff; }
/* 浅色主题: 下拉框保留箭头图标并加深边框, 避免白底白框看不见 */
[data-theme="light"] .select {
  background-color: #ffffff;
  border-color: rgba(15, 23, 42, .28);
  color: #0f172a;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
[data-theme="light"] .select:hover { border-color: rgba(15, 23, 42, .42); }
[data-theme="light"] .input:focus,
[data-theme="light"] .select:focus,
[data-theme="light"] .textarea:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .14);
}
[data-theme="light"] .input[readonly] { background: rgba(15, 23, 42, .04); }
[data-theme="light"] .input[readonly]:focus { background: rgba(15, 23, 42, .04); }
[data-theme="light"] .select option { background: #ffffff; color: var(--text); }
[data-theme="light"] .file { border-color: rgba(15, 23, 42, .2); }

[data-theme="light"] .table-wrap { background: #ffffff; }
[data-theme="light"] .table th { background: #f4f7fb; color: #64748b; }
[data-theme="light"] .table td { border-bottom-color: rgba(15, 23, 42, .07); }
[data-theme="light"] .table tbody tr:hover td { background: rgba(2, 132, 199, .06); }

[data-theme="light"] .note { background: rgba(15, 23, 42, .04); }
[data-theme="light"] .badge { background: rgba(15, 23, 42, .05); }
[data-theme="light"] .badge-accent {
  border-color: rgba(2, 132, 199, .3);
  background: rgba(2, 132, 199, .1);
  color: #075985;
}
[data-theme="light"] .badge-ok {
  border-color: rgba(4, 120, 87, .3);
  background: rgba(4, 120, 87, .1);
  color: #047857;
}
[data-theme="light"] .badge-warn {
  border-color: rgba(180, 83, 9, .3);
  background: rgba(180, 83, 9, .1);
  color: #92400e;
}
[data-theme="light"] .alert { background: rgba(2, 132, 199, .08); color: #075985; }
[data-theme="light"] .alert-error { background: rgba(190, 18, 60, .07); color: #9f1239; }
[data-theme="light"] .alert-warn { background: rgba(180, 83, 9, .08); color: #92400e; }
[data-theme="light"] .alert-ok { background: rgba(4, 120, 87, .08); color: #065f46; }

[data-theme="light"] .auth-panel { background: var(--bg); }
[data-theme="light"] .auth-single .auth-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
[data-theme="light"] .auth-card h2 { color: var(--text); }
[data-theme="light"] .auth-card .btn-ghost { background: rgba(15, 23, 42, .05); }

[data-theme="light"] .download-row { background: rgba(2, 132, 199, .07); }
[data-theme="light"] .download-row .dl-icon { background: rgba(2, 132, 199, .12); }
[data-theme="light"] .toast { background: #ffffff; color: #334155; }
[data-theme="light"] .drawer-head { background: #ffffff; }

/* 登录页左侧图片区在两种主题下都保持浅色文字 */
.auth-visual { color: #e6edf7; }
.auth-visual .brand-text strong { color: #ffffff; }
.auth-visual .brand-text small { color: #a3b2c9; }

/* ---------- upload dropzone / file queue ---------- */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  background: rgba(148, 163, 184, .04);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone.is-disabled { opacity: .6; pointer-events: none; }
.dropzone-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, .25);
  background: var(--accent-soft);
  color: var(--accent);
}
.dropzone-icon svg { width: 22px; height: 22px; }
.dropzone-title { font-size: 14px; font-weight: 620; color: var(--text); }
.dropzone .hint { max-width: 52ch; }
.dropzone.has-file { border-style: solid; border-color: rgba(52, 211, 153, .55); background: rgba(52, 211, 153, .06); }
.dropzone.has-file .dropzone-icon { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .12); color: var(--ok); }
.dropzone-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

.file-queue {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 13, 24, .35);
  overflow: hidden;
}
.file-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.file-queue-head .link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.file-queue-head .link-btn:hover { text-decoration: underline; }

.progress {
  height: 4px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}

.file-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.file-item:first-child { border-top: 0; }
.file-item .file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.file-item .file-size { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-item .file-status { min-width: 64px; text-align: right; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.file-status.is-queued { color: var(--text-muted); }
.file-status.is-uploading { color: var(--accent); }
.file-status.is-ok { color: var(--ok); }
.file-status.is-fail { color: var(--danger); }
.file-status.is-skip { color: var(--warn); }
.file-remove {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.file-remove:hover { color: var(--danger); background: rgba(251, 113, 133, .1); }
.file-remove svg { width: 13px; height: 13px; }

[data-theme="light"] .file-queue { background: rgba(15, 23, 42, .025); }
[data-theme="light"] .dropzone { background: rgba(2, 132, 199, .03); }
[data-theme="light"] .dropzone-icon { border-color: rgba(2, 132, 199, .22); }
[data-theme="light"] .progress { background: rgba(15, 23, 42, .1); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 288px;
    transform: translateX(-102%);
    transition: transform .3s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 30px 0 80px -40px #000;
  }
  body.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .crumb { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { min-height: 300px; padding: 26px; }
  .auth-copy { margin-top: 34px; }
  .auth-copy h1 { font-size: 26px; }
  .auth-copy p { font-size: 13px; }
  .auth-legal { display: none; }
  .auth-panel { padding: 28px 20px 48px; }
  .auth-card { max-width: 440px; }
}

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .chip--opt { display: none; }
  .content { padding-top: 22px; }
  .card { padding: 18px; }
  .hero { padding: 22px; }
  .hero::after { opacity: .13; }
  .userbar { gap: 6px; }
  .topbar { gap: 10px; }
}

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .chip { padding: 4px 9px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body::before, body::after, .sidebar, .topbar, .nav-scrim, .form-actions { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; border-color: #ccc; background: #fff; color: #111; }
  .table th, .table td { color: #111; }
}

/* ------------------------------------------------------------ pagination */
.pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}
.pager-size,
.pager-pages {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.pager-label {
	color: var(--muted);
	font-size: 12px;
	margin-right: 2px;
}
.pager-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 30px;
	padding: 0 9px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface-2);
	color: var(--text);
	font-size: 12px;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pager-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.pager-btn.is-current {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
}
.pager-info {
	color: var(--muted);
	font-size: 12px;
}
html.lang-en .pager-zh,
html:not(.lang-en) .pager-en {
	display: none;
}
@media (max-width: 640px) {
	.pager {
		align-items: flex-start;
	}
	.pager-info {
		width: 100%;
	}
}

/* ------------------------------------------------------------ sortable table heads */
th.sortable a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: inherit;
	text-decoration: none;
}
th.sortable a::after {
	content: '↕';
	font-size: 10px;
	opacity: .35;
	font-weight: 400;
}
th.sortable a:hover {
	color: var(--accent);
}
th.sortable.is-asc a::after {
	content: '▲';
	opacity: .9;
	color: var(--accent);
}
th.sortable.is-desc a::after {
	content: '▼';
	opacity: .9;
	color: var(--accent);
}

/* ------------------------------------------------------------ inline copy */
.copy-btn {
	margin-left: 6px;
	padding: 1px 7px;
	font-size: 11px;
	line-height: 1.6;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-2);
	color: var(--muted);
	cursor: pointer;
}
.copy-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.copy-btn.is-copied {
	border-color: var(--accent);
	color: var(--accent);
}

/* 窄屏: 表单改为单列, 避免下拉框文字被截断 */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field.full { grid-column: 1 / -1; }
}
/* 表格内联操作表单 */
.inline-form { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; }
.input-xs { width: 74px; min-height: 30px; padding: 4px 6px; font-size: 12px; border-radius: 8px; }
.input-sm-txt { width: 130px; min-height: 30px; padding: 4px 6px; font-size: 12px; border-radius: 8px; }
.btn-sm { padding: 4px 10px; font-size: 12px; min-height: 30px; border-radius: 8px; }
.btn-danger { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .38); color: #f87171; }
.btn-danger:hover { background: rgba(239, 68, 68, .22); }
[data-theme="light"] .btn-danger { color: #b91c1c; background: rgba(239, 68, 68, .1); }
/* ===== 旧浏览器兜底: 不支持 CSS 变量时保证基本布局与图标尺寸 ===== */
.no-css-vars body { background: #0f172a; color: #e2e8f0; font-family: system-ui, "Microsoft YaHei", sans-serif; }
.no-css-vars .svg-sprite { display: none; }
.no-css-vars svg { max-width: 22px; max-height: 22px; }
.no-css-vars .nav-icon,
.no-css-vars .brand-mark svg,
.no-css-vars .card-title svg,
.no-css-vars .btn svg,
.no-css-vars .chip svg { width: 17px; height: 17px; }
.no-css-vars .side-nav { background: #0b1220; border-right: 1px solid #1e293b; }
.no-css-vars .nav-link { color: #cbd5e1; }
.no-css-vars .nav-link.is-active { background: rgba(56, 189, 248, .15); color: #e0f2fe; }
.no-css-vars .topbar,
.no-css-vars .card { background: #111827; border: 1px solid #1e293b; }
.no-css-vars .input,
.no-css-vars .select,
.no-css-vars .textarea { background: #0b1220; color: #e2e8f0; border: 1px solid #334155; }
.no-css-vars .btn-primary { background: #0ea5e9; color: #fff; }
.no-css-vars .btn-ghost { background: transparent; color: #cbd5e1; border: 1px solid #334155; }
.no-css-vars .table th { background: #111827; color: #94a3b8; }
.no-css-vars .table td { border-bottom: 1px solid #1e293b; }
.no-css-vars .badge { background: rgba(56, 189, 248, .15); color: #7dd3fc; }
.no-css-vars .hint,
.no-css-vars .card-sub { color: #94a3b8; }
/* 用户管理: 操作列紧凑 + 允许换行, 避免被裁切 */
.users-admin-table { min-width: 1280px; }
.users-admin-table td { white-space: normal; vertical-align: middle; }
.users-admin-table .inline-form { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 8px 2px 0; }
.users-admin-table .input-xs { width: 64px; }
.users-admin-table .input-sm-txt { width: 112px; }