/* ============================================================
   物资管理系统 · 液态玻璃视觉系统（FU-Liquiglass）
   玻璃用于界面层级，实色用于表格与密集数据，保证可读性。
   ============================================================ */

:root {
  --bg-0: #eef4fb;
  --bg-1: #e4eefb;
  --bg-2: #f6f9fe;
  --ink: #17233b;
  --ink-2: #4c5a76;
  --ink-3: #7c89a3;
  --accent: #2f6fed;
  --accent-strong: #1d5adf;
  --accent-soft: rgba(47, 111, 237, 0.12);
  --green: #18a07a;
  --green-soft: rgba(24, 160, 122, 0.14);
  --amber: #c47a16;
  --amber-soft: rgba(232, 156, 46, 0.16);
  --red: #d64550;
  --red-soft: rgba(214, 69, 80, 0.13);
  --gray-soft: rgba(124, 137, 163, 0.14);

  --lg-tint: rgba(255, 255, 255, 0.58);
  --lg-tint-strong: rgba(255, 255, 255, 0.74);
  --lg-border: rgba(255, 255, 255, 0.72);
  --lg-highlight: rgba(255, 255, 255, 0.9);
  --lg-shadow: 0 18px 50px rgba(23, 35, 59, 0.12);
  --lg-blur: 22px;
  --lg-saturation: 145%;
  --lg-radius: 20px;
  --radius-s: 12px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 88% -10%, #dbe9ff 0%, rgba(219, 233, 255, 0) 62%),
    radial-gradient(1000px 620px at -8% 12%, #e6f0ff 0%, rgba(230, 240, 255, 0) 58%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 300px at 78% 18%, rgba(120, 168, 255, 0.20), transparent 70%),
    radial-gradient(520px 340px at 10% 62%, rgba(94, 196, 224, 0.12), transparent 70%),
    radial-gradient(420px 260px at 52% 96%, rgba(147, 130, 255, 0.10), transparent 72%);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* ---------- 液态玻璃表面 ---------- */
.liquid-glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  background: var(--lg-tint);
  box-shadow: var(--lg-shadow), inset 0 1px 0 var(--lg-highlight);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturation));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturation));
}

.liquid-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.30),
    transparent 40%,
    rgba(255, 255, 255, 0.06)
  );
  pointer-events: none;
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin: 12px auto 0;
  width: min(1560px, calc(100% - 28px));
  border-radius: 18px;
  --lg-tint: rgba(255, 255, 255, 0.66);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 18px;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  font-size: 17px;
  white-space: nowrap;
}

.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-desktop::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover { background: rgba(47, 111, 237, 0.08); color: var(--ink); }

.nav-link.active {
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.16), rgba(47, 111, 237, 0.09));
  color: var(--accent-strong);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.user-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c86ff, #7a5cff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.user-name { font-size: 13.5px; font-weight: 550; color: var(--ink); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 22px 48px rgba(23, 35, 59, 0.18);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 60;
}

.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }

.dropdown-label {
  padding: 7px 10px;
  color: var(--ink-3);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(23, 35, 59, 0.07);
  margin-bottom: 4px;
}

.dropdown a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13.5px;
}

.dropdown a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
}

.hamburger span {
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

/* 移动端抽屉 */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 24, 43, 0.36);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.backdrop.show { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  top: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 80;
  width: min(320px, 82vw);
  border-radius: 22px;
  background: rgba(250, 252, 255, 0.88);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: -24px 0 60px rgba(23, 35, 59, 0.28);
  transform: translateX(108%);
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow-y: auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 14px;
  border-bottom: 1px solid rgba(23, 35, 59, 0.08);
}

.sheet-name { font-size: 17px; font-weight: 700; }
.sheet-role { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.sheet-nav { display: flex; flex-direction: column; padding: 10px 0; }

.sheet-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 10px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 15px;
  min-height: 44px;
}

.sheet-nav a:active { background: var(--accent-soft); }
.sheet-section {
  padding: 14px 10px 4px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* 页面容器 */
.page {
  width: min(1560px, calc(100% - 28px));
  margin: 22px auto 0;
  padding-bottom: 8px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}

.page-title { margin: 0; font-size: 24px; font-weight: 720; letter-spacing: -0.01em; }
.page-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* 卡片 */
.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--lg-radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--lg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturation));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturation));
  padding: 22px;
  margin-bottom: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 680;
}

.card-sub { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; }

/* 统计卡 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 34px rgba(23, 35, 59, 0.09);
  cursor: default;
}

.stat-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 560;
}

.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-foot { margin-top: 6px; color: var(--ink-3); font-size: 12px; }

.stat .stat-glow {
  position: absolute;
  right: -30px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(6px);
  pointer-events: none;
}

.stat-blue .stat-glow { background: radial-gradient(circle, rgba(74, 134, 255, 0.5), transparent 68%); }
.stat-green .stat-glow { background: radial-gradient(circle, rgba(36, 190, 146, 0.45), transparent 68%); }
.stat-amber .stat-glow { background: radial-gradient(circle, rgba(238, 168, 54, 0.45), transparent 68%); }
.stat-red .stat-glow { background: radial-gradient(circle, rgba(226, 93, 106, 0.42), transparent 68%); }
.stat-violet .stat-glow { background: radial-gradient(circle, rgba(138, 108, 255, 0.42), transparent 68%); }

/* 快捷操作 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 30px rgba(23, 35, 59, 0.08);
  color: var(--ink);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(23, 35, 59, 0.14);
  color: var(--ink);
}

.quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  flex-shrink: 0;
}

.quick-icon svg { width: 23px; height: 23px; }
.quick-title { font-size: 15.5px; font-weight: 680; }
.quick-desc { margin-top: 3px; color: var(--ink-3); font-size: 12.5px; line-break: loose; word-break: keep-all; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.975); }
.btn-primary {
  background: linear-gradient(180deg, #3f7bf7, var(--accent));
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(47, 111, 237, 0.36); }
.btn-success {
  background: linear-gradient(180deg, #22b48d, var(--green));
  color: #fff;
  box-shadow: 0 8px 20px rgba(24, 160, 122, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-success:hover { color: #fff; }
.btn-danger {
  background: #fff;
  border-color: rgba(214, 69, 80, 0.35);
  color: var(--red);
}
.btn-danger:hover { background: var(--red-soft); color: #b93440; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(124, 137, 163, 0.22);
  color: var(--ink-2);
}
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* 表单 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .req::after { content: " *"; color: var(--red); }

input[type="text"], input[type="password"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(124, 137, 163, 0.26);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(124, 137, 163, 0.12);
}

.segmented label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 560;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; }

.segmented label:has(input:checked) {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 3px 10px rgba(23, 35, 59, 0.12);
}

.hint {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  word-break: normal;
  overflow-wrap: break-word;
}

.hint-strong { color: var(--accent-strong); font-weight: 650; }
.hint-strong { white-space: nowrap; }

/* 明细编辑 */
.items-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 110px minmax(150px, 1.4fr) minmax(130px, 1.2fr) 72px 84px 100px minmax(88px, 1fr) 92px 34px;
  gap: 8px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(124, 137, 163, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.item-row input, .item-row select { min-height: 38px; font-size: 13px; }
.item-amount {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 4px;
  justify-content: flex-end;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.item-remove {
  width: 34px;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: rgba(214, 69, 80, 0.1);
  color: var(--red);
  font-size: 18px;
  line-height: 1;
}

.item-remove:hover { background: var(--red-soft); }

.items-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

.items-total strong {
  font-size: 20px;
  font-weight: 750;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

/* 维修项目选择 */
.repair-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.repair-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgba(124, 137, 163, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-2);
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.repair-chip input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.repair-chip:has(input:checked) {
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.14), rgba(47, 111, 237, 0.07));
  border-color: rgba(47, 111, 237, 0.45);
  color: var(--accent-strong);
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(124, 137, 163, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 760px;
}

.table th, .table td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(124, 137, 163, 0.14);
  vertical-align: middle;
}

.table th {
  position: sticky;
  top: 0;
  background: #f2f6fc;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  z-index: 1;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color 0.12s ease; }
.table tbody tr:hover { background: rgba(47, 111, 237, 0.045); }

.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); }
.mono { font-variant-numeric: tabular-nums; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.st-pending { background: var(--amber-soft); color: var(--amber); }
.st-approved { background: var(--green-soft); color: var(--green); }
.st-rejected { background: var(--red-soft); color: var(--red); }
.st-cancelled { background: var(--gray-soft); color: var(--ink-3); }
.st-in_use { background: var(--green-soft); color: var(--green); }
.st-idle { background: var(--amber-soft); color: var(--amber); }
.st-scrapped { background: var(--gray-soft); color: var(--ink-3); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(124, 137, 163, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 560;
  transition: all 0.16s ease;
}

.chip:hover { color: var(--ink); border-color: rgba(47, 111, 237, 0.4); }
.chip.active {
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.18), rgba(47, 111, 237, 0.1));
  border-color: rgba(47, 111, 237, 0.42);
  color: var(--accent-strong);
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  flex: 1;
  max-width: 420px;
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

.empty-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fa4c6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5 12 3l8.5 4.5v9L12 21l-8.5-4.5z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M8 9.4V14a4 4 0 0 0 8 0V9.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 列表（移动端卡片 / 桌面表格统一渲染于 table） */
.list-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 24, 43, 0.42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.modal-backdrop.show { opacity: 1; visibility: visible; }

.modal {
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  border-radius: 22px;
  background: rgba(250, 252, 255, 0.94);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 80px rgba(23, 35, 59, 0.3);
  padding: 22px;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
}

.modal-backdrop.show .modal { opacity: 1; transform: none; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title { margin: 0; font-size: 18px; font-weight: 700; }
.modal-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(124, 137, 163, 0.12);
  color: var(--ink-2);
  font-size: 17px;
}
.modal-close:hover { background: rgba(124, 137, 163, 0.2); color: var(--ink); }

/* 签名画板 */
.sig-canvas-wrap {
  border: 1.5px dashed rgba(47, 111, 237, 0.4);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, rgba(47, 111, 237, 0.035) 25%, transparent 25%),
    #fff;
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  overflow: hidden;
  touch-action: none;
}

.sig-canvas-wrap canvas { display: block; width: 100%; height: 190px; cursor: crosshair; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.sig-tools .muted { font-size: 12px; }

/* 提示 */
.toasts {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(24, 34, 54, 0.9);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 14px 34px rgba(15, 24, 43, 0.3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  max-width: min(90vw, 560px);
}

.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.toast-success .toast-dot { background: #38d6a8; }
.toast-danger .toast-dot { background: #ff7a85; }
.toast-warning .toast-dot { background: #ffc35c; }

/* 详情 */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.kv { display: flex; flex-direction: column; gap: 4px; }
.kv-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kv-value { font-size: 14px; font-weight: 560; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(47, 111, 237, 0.22);
}

.timeline-item { position: relative; padding: 0 0 18px 14px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}

.timeline-item.passed::before { border-color: var(--green); }
.timeline-item.current::before { box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-title { font-size: 14px; font-weight: 650; }
.timeline-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.timeline-comment { font-size: 13px; color: var(--ink-2); margin-top: 5px; }

.sig-img {
  max-width: 150px;
  max-height: 54px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(124, 137, 163, 0.2);
  padding: 4px;
}

/* 页脚 */
.footer {
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 22px 12px 34px;
}

/* 登录页 */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  padding: 34px 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
  backdrop-filter: blur(26px) saturate(155%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 30px 80px rgba(23, 35, 59, 0.2);
}

.login-logo { width: 56px; height: 56px; border-radius: 15px; margin-bottom: 14px; }
.login-title { margin: 0; font-size: 21px; font-weight: 720; }
.login-sub { margin: 5px 0 24px; color: var(--ink-3); font-size: 13px; }
.login-card .field { margin-bottom: 14px; }

/* 响应式 */
@media (max-width: 1080px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page { width: calc(100% - 18px); margin-top: 16px; }
  .topbar { width: calc(100% - 18px); }
  .topbar-inner { padding: 7px 12px; }
  .brand-name { font-size: 15.5px; }
  .user-name { display: none; }
  .card { padding: 16px; border-radius: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 15px; }
  .stat-value { font-size: 23px; }
  .stat-foot { display: none; }
  .kv-grid { grid-template-columns: 1fr; }
  .toasts { top: 76px; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .item-category,
  .item-row .item-name,
  .item-row .item-remark { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .modal { padding: 17px; }
  .btn { min-height: 44px; }
  .sig-canvas-wrap canvas { height: 160px; }
}

/* 动效与可访问性 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

@media (forced-colors: active) {
  .liquid-glass, .card, .stat, .modal, .sheet, .topbar {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-glass { background: rgba(246, 249, 254, 0.97); }
  .card { background: rgba(255, 255, 255, 0.96); }
  .sheet, .modal { background: #fbfdff; }
}
