:root {
  --ink: #14332e;
  --ink-2: #1d453e;
  --brand: #0f7a63;
  --brand-2: #17a184;
  --brand-soft: #e6f2ee;
  --accent: #e8a15c;
  --accent-soft: #fdf1e4;
  --danger: #c25440;
  --danger-soft: #fbe9e5;
  --warn: #b7791f;
  --warn-soft: #fdf3e2;
  --paper: #f4f2ec;
  --surface: #ffffff;
  --line: #e2e0d8;
  --line-2: #efece5;
  --text: #1b2926;
  --muted: #6c7d78;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 51, 46, 0.05), 0 10px 30px -18px rgba(20, 51, 46, 0.28);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6d2; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- 登录 ------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--paper);
}
.login-hero {
  position: relative;
  background:
    radial-gradient(circle at 18% 12%, rgba(232, 161, 92, 0.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(23, 161, 132, 0.28), transparent 50%),
    linear-gradient(145deg, #102f2a 0%, #17453c 55%, #0f5c4c 100%);
  color: #f4f8f5;
  padding: 54px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.03), 0 0 0 130px rgba(255, 255, 255, 0.02);
}
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 2px; font-size: 15px; }
.login-title { font-size: 40px; line-height: 1.24; font-weight: 700; margin: 34px 0 16px; letter-spacing: 1px; }
.login-title em { font-style: normal; color: #f0b878; }
.login-desc { color: rgba(244, 248, 245, 0.72); max-width: 420px; line-height: 1.9; font-size: 14px; }
.login-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; position: relative; z-index: 2; }
.login-points span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.86);
}
.login-foot { font-size: 12px; color: rgba(255, 255, 255, 0.45); letter-spacing: 0.5px; position: relative; z-index: 2; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: 1px; }
.login-card p.sub { color: var(--muted); margin: 0 0 30px; font-size: 13px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; letter-spacing: 0.6px; }
.login-field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.login-field input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(23, 161, 132, 0.12); }
.login-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  letter-spacing: 3px;
  margin-top: 8px;
  transition: transform 0.15s, background 0.2s;
}
.login-submit:hover { background: var(--brand); }
.login-submit:active { transform: translateY(1px); }
.login-hint { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.9; background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 10px; }

/* ------------------------------- 框架 ------------------------------- */
.app-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #11302b 0%, #0d2723 100%);
  color: #dfeae6;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px 18px;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(140deg, var(--brand-2), #0b5d4c);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}
.brand-mark svg { width: 19px; height: 19px; stroke: #eafaf4; }
.brand-text strong { display: block; font-size: 15px; letter-spacing: 2px; color: #f1f7f4; }
.brand-text small { font-size: 10.5px; letter-spacing: 1.6px; color: rgba(223, 234, 230, 0.48); text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10.5px; letter-spacing: 2px; color: rgba(223, 234, 230, 0.36); padding: 18px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(223, 234, 230, 0.72);
  font-size: 13.5px;
  border: none; background: transparent; text-align: left;
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; opacity: 0.9; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: rgba(23, 161, 132, 0.22); color: #eafff8; box-shadow: inset 2px 0 0 var(--brand-2); }
.nav-item .dot { margin-left: auto; background: var(--accent); color: #2c1c06; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 6px; }
.sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 8px 4px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid; place-items: center; font-size: 13px; color: #f1f7f4; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .who b { display: block; font-size: 13px; font-weight: 600; color: #f1f7f4; }
.sidebar-user .who span { font-size: 11px; color: rgba(223, 234, 230, 0.5); }
.icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent; color: rgba(223, 234, 230, 0.75);
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 30px;
  background: rgba(244, 242, 236, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-size: 17px; font-weight: 650; letter-spacing: 0.6px; }
.topbar-title small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 10px; letter-spacing: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mobile-toggle { display: none; }

.page { padding: 22px 30px 44px; flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0 0 5px; letter-spacing: 0.8px; }
.page-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* ------------------------------- 基础元素 ------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 17px 22px 13px; }
.card-head h3 { margin: 0; font-size: 14.5px; letter-spacing: 0.5px; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff; color: var(--text);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; }
.btn:hover { border-color: #cfd6d2; background: #fbfaf7; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #3a2408; font-weight: 600; }
.btn-accent:hover { background: #f0b070; }
.btn-danger { color: var(--danger); border-color: #eccfc8; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.chip, .badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; line-height: 1.6; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid transparent;
}
.badge-paid { background: #e9f5ee; color: #227a4c; }
.badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-unpaid { background: var(--danger-soft); color: var(--danger); }
.badge-grey { background: #f0f0ec; color: #6d7a76; }
.badge-accent { background: var(--accent-soft); color: #96601f; }
.badge-ink { background: rgba(20, 51, 46, 0.08); color: var(--ink); }

.tag { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #f4f3ee; color: var(--muted); font-size: 11px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; }
.field > label b { color: var(--danger); font-weight: 500; }
.field input, .field select, .field textarea {
  height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 0 12px; outline: none; width: 100%;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(23, 161, 132, 0.1);
}
.field input.invalid { border-color: #e0a499; box-shadow: 0 0 0 3px rgba(194, 84, 64, 0.08); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; min-height: 16px; }
.field .hint.err { color: var(--danger); }
.field .hint.ok { color: var(--brand); }

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }

.seg { display: inline-flex; background: #f4f3ee; border-radius: 9px; padding: 3px; gap: 3px; border: 1px solid var(--line-2); }
.seg button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 7px;
  font-size: 12.5px; color: var(--muted);
}
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; stroke: #9aa8a4; }
.search input {
  height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 12px 0 32px; background: #fff; outline: none; min-width: 190px;
}
.search input:focus { border-color: var(--brand-2); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select {
  height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 0 30px 0 11px; outline: none; max-width: 230px;
}

/* ------------------------------- 表格 ------------------------------- */
.import-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  text-align: left; font-weight: 500; color: var(--muted);
  font-size: 11.5px; letter-spacing: 0.8px; text-transform: uppercase;
  background: #faf9f5; border-bottom: 1px solid var(--line);
  padding: 11px 14px; white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: #fbfaf6; }
table.data tbody tr.clickable { cursor: pointer; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.muted { color: var(--muted); }
table.data .name { font-weight: 600; }
table.data .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
table.data .mono { font-variant-numeric: tabular-nums; letter-spacing: 0.4px; }
.ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 18px; color: var(--muted); font-size: 12.5px; }
.pager button { height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; }
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }

.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; stroke: #c8d2cd; margin-bottom: 12px; }
.empty p { margin: 0 0 4px; font-size: 13.5px; color: #4a5c56; }
.empty small { font-size: 12px; }

/* ------------------------------- 工作台 ------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 19px 15px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand-2); }
.stat.alt::after { background: var(--accent); }
.stat.warn::after { background: var(--warn); }
.stat.danger::after { background: var(--danger); }
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: 0.8px; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 27px; font-weight: 700; margin-top: 9px; letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stat .foot b { color: var(--brand); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 16px; align-items: start; }
.task-list { display: flex; flex-direction: column; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 22px; border-top: 1px solid var(--line-2);
}
.task:first-child { border-top: none; }
.task .who { min-width: 0; flex: 1; }
.task .who b { font-size: 13.5px; font-weight: 600; }
.task .who .line { color: var(--muted); font-size: 11.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .when { text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.task .when .od { color: var(--danger); font-weight: 600; display: block; }
.tour-mini { display: flex; flex-direction: column; gap: 12px; padding: 6px 22px 20px; }
.tour-mini .row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.tour-mini .row .t { flex: 1; min-width: 0; }
.tour-mini .row .t b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-mini .row .t span { color: var(--muted); font-size: 11.5px; }
.progress { height: 6px; border-radius: 5px; background: #eef1ee; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); border-radius: 5px; }
.progress.low i { background: linear-gradient(90deg, #f0b070, #e08a3c); }

/* ------------------------------- 报名录入 ------------------------------- */
.entry-grid { display: grid; grid-template-columns: 1.55fr 0.95fr; gap: 16px; align-items: start; }
.form-card { padding: 6px 22px 22px; }
.form-section { padding: 16px 0 2px; }
.form-section h4 { margin: 0 0 14px; font-size: 12px; letter-spacing: 1.4px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.form-section h4::after { content: ""; height: 1px; flex: 1; background: var(--line-2); }
.lookup-slot { min-height: 0; }
.lookup-banner {
  margin: 10px 0 0; border: 1px solid #cfe4dd; background: #f2faf7;
  border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  animation: rise 0.22s ease;
}
.lookup-banner.locked { border-color: #ecdcc6; background: var(--warn-soft); }
.lookup-banner .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-soft); display: grid; place-items: center; flex: none; }
.lookup-banner .ic svg { width: 17px; height: 17px; stroke: var(--brand); }
.lookup-banner .tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.7; }
.lookup-banner .tx b { font-size: 13px; }
.lookup-banner .tx .sub { color: var(--muted); font-size: 11.5px; }
.lookup-banner .acts { display: flex; gap: 7px; flex: none; }
.imported-note { font-size: 11.5px; color: var(--brand); display: flex; align-items: center; gap: 5px; }

.side-card { padding: 18px 20px; }
.summary-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.summary-line:last-of-type { border-bottom: none; }
.summary-line span { color: var(--muted); }
.summary-line b { font-variant-numeric: tabular-nums; }
.summary-total { margin-top: 10px; padding: 13px 15px; border-radius: 10px; background: #f6faf8; border: 1px solid #dfeee9; display: flex; justify-content: space-between; align-items: center; }
.summary-total span { font-size: 12px; color: var(--muted); }
.summary-total b { font-size: 21px; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-total b.due { color: var(--danger); }
.summary-total b.ok { color: var(--brand); }

.pay-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pay-chips button {
  height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; color: var(--muted);
}
.pay-chips button.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.identity-info { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.identity-info .chip { background: #f5f6f2; color: #52645f; }
.identity-info .chip.ok { background: var(--brand-soft); color: var(--brand); }

.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fbf8f2; border: 1px solid #eee2cd; font-size: 12px; color: #7a5a26; line-height: 1.8; margin-bottom: 14px; }
.callout svg { width: 15px; height: 15px; stroke: currentColor; flex: none; margin-top: 2px; }

/* ------------------------------- 团期 ------------------------------- */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.tour-card { padding: 18px 20px; position: relative; }
.tour-card .badge { position: absolute; right: 16px; top: 16px; }
.tour-card h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: 0.4px; padding-right: 60px; }
.tour-card .dest { color: var(--muted); font-size: 12px; }
.tour-card .dates { margin: 14px 0 12px; font-size: 12.5px; color: #465851; display: flex; align-items: center; gap: 7px; }
.tour-card .dates svg { width: 14px; height: 14px; stroke: #92a39d; }
.tour-card .prices { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.tour-card .prices b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.tour-card .prices .child { color: #8a6a3c; }
.tour-card .quota { margin-top: 14px; }
.tour-card .quota .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.tour-card .quota .lbl b { color: var(--ink); }
.tour-card .actions { display: flex; gap: 8px; margin-top: 15px; border-top: 1px solid var(--line-2); padding-top: 13px; }
.tour-card .note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ------------------------------- 抽屉 / 弹窗 ------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 32, 28, 0.42); backdrop-filter: blur(2px); z-index: 100; animation: fade 0.18s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--paper); z-index: 101; display: flex; flex-direction: column;
  animation: slide 0.24s cubic-bezier(0.2, 0.7, 0.3, 1); box-shadow: -20px 0 60px -30px rgba(0, 0, 0, 0.5);
}
.drawer-head { padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .close { margin-left: auto; border: none; background: transparent; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.drawer-head .close:hover { background: #f3f2ec; }
.drawer-head h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: 0.5px; }
.drawer-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.drawer-body { overflow-y: auto; padding: 18px 22px 30px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 13px 22px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }
.drawer-body .card { box-shadow: none; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; padding: 18px 22px 20px; }
.info-grid .item label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: 0.3px; }
.info-grid .item .val { font-size: 13.5px; word-break: break-all; }
.info-grid .item .val.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.info-grid .span-2 { grid-column: span 2; }
.timeline { padding: 6px 22px 20px; display: flex; flex-direction: column; gap: 0; }
.tl-item { position: relative; padding: 10px 0 14px 22px; border-left: 1px solid var(--line); margin-left: 4px; }
.tl-item::before { content: ""; position: absolute; left: -4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }
.tl-item:last-child { border-left-color: transparent; }
.tl-item .top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tl-item .content { font-size: 12.5px; line-height: 1.8; margin-top: 4px; color: #33443f; }
.tl-item .next { margin-top: 5px; font-size: 11.5px; color: var(--brand); }
.follow-form { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; }

.modal { position: fixed; z-index: 120; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 90vh; background: #fff; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.5); animation: pop 0.2s ease; overflow: hidden; }
.modal.lg { width: min(760px, 96vw); }
.modal-head { padding: 18px 22px 14px; display: flex; align-items: center; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 16.5px; letter-spacing: 0.5px; }
.modal-head .close { margin-left: auto; border: none; background: transparent; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.modal-head .close:hover { background: #f3f2ec; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 13px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 9px; background: #fcfbf8; }
.modal-body .form-grid { grid-template-columns: repeat(2, 1fr); }
.confirm-text { font-size: 13.5px; line-height: 1.9; color: #33443f; }
.confirm-text b { color: var(--danger); }

/* ------------------------------- 提示 ------------------------------- */
#toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(20, 51, 46, 0.94); color: #f2faf6; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.5); animation: rise 0.2s ease;
  max-width: 84vw; text-align: center;
}
.toast.err { background: rgba(160, 58, 40, 0.95); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0.5; } to { transform: translateX(0); opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(0.98); opacity: 0.6; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .entry-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 250px;
    transform: translateX(-100%); transition: transform 0.24s ease; height: 100vh;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px -30px rgba(0, 0, 0, 0.5); }
  .mobile-toggle { display: grid; }
  .topbar { padding: 12px 16px; }
  .page { padding: 16px 15px 40px; }
  .page-head h1 { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 34px 26px; min-height: 300px; }
  .login-title { font-size: 29px; margin: 20px 0 10px; }
  .login-panel { padding: 26px 22px 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 15px; }
  .stat .v { font-size: 23px; }
  .tour-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .table-wrap table.data { min-width: 680px; }
  .filters select { max-width: 100%; flex: 1; }
  .search { flex: 1; }
  .search input { width: 100%; min-width: 0; }
  .page-head .head-actions { margin-left: 0; width: 100%; }
  .page-head .head-actions .btn { flex: 1; }
}
