/* 超星倍速 · 账号与授权服务 */
:root {
  --bg: #f4f6fb;
  --bg-deep: #eef2f9;
  --card: #ffffff;
  --ink: #172033;
  --ink-2: #354056;
  --muted: #7b8497;
  --muted-2: #9aa3b4;
  --line: #e6eaf2;
  --line-strong: #d7deea;
  --brand: #2f6bff;
  --brand-2: #6f5bff;
  --brand-soft: #eef3ff;
  --ok: #159a5b;
  --ok-soft: #e9f8f0;
  --warn: #c77919;
  --warn-soft: #fff6e7;
  --danger: #d64545;
  --danger-soft: #fff0f0;
  --violet: #7357e8;
  --violet-soft: #f1edff;
  --shadow: 0 20px 55px rgba(26, 39, 70, 0.09), 0 3px 10px rgba(26, 39, 70, 0.04);
  --shadow-sm: 0 8px 24px rgba(26, 39, 70, 0.07);
  --radius: 20px;
  --radius-sm: 13px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code, .mono { font-family: var(--mono); }

/* ---------- 背景 ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, #ffffff 0%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 45%, #f1f4fa 100%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .55;
}
.orb-a {
  width: 520px; height: 520px; left: -160px; top: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(47,107,255,.34), rgba(47,107,255,0) 68%);
}
.orb-b {
  width: 620px; height: 620px; right: -220px; top: 160px;
  background: radial-gradient(circle at 50% 50%, rgba(111,91,255,.26), rgba(111,91,255,0) 68%);
}
.grid-fade {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(47,107,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,107,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 62%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 62%);
}

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-ok { color: var(--ok); background: var(--ok-soft); border-color: #c9eeda; }
.badge-danger { color: var(--danger); background: var(--danger-soft); border-color: #f4cccc; }
.badge-warn { color: var(--warn); background: var(--warn-soft); border-color: #f3dfba; }
.badge-blue { color: var(--brand); background: var(--brand-soft); border-color: #d6e2ff; }
.badge-violet { color: var(--violet); background: var(--violet-soft); border-color: #ddd4ff; }
.badge-muted { color: var(--muted); background: #f4f6fa; border-color: var(--line); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #4b7dff 55%, var(--brand-2) 130%);
  box-shadow: 0 8px 20px rgba(47, 107, 255, .25);
}
.btn-primary:hover { box-shadow: 0 11px 26px rgba(47, 107, 255, .32); }
.btn-ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: #b9c9ea; background: #fafcff; }
.btn-danger { color: var(--danger); background: var(--danger-soft); border-color: #f3cccc; }
.btn-danger:hover { background: #ffe9e9; }
.btn-dark { color: #e8ecf7; background: #253048; border-color: #35415c; }
.btn-dark:hover { background: #2e3b57; }
.btn-block { width: 100%; }
.btn-sm { min-height: 31px; padding: 0 11px; font-size: 12px; border-radius: 9px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted-2); margin-left: 3px; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fbfcff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #aeb6c4; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #9db6ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, .10);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form { display: flex; flex-direction: column; gap: 15px; }
.form-head h2 { font-size: 20px; letter-spacing: -.02em; }
.form-head p { margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.form-foot { font-size: 12px; color: var(--muted-2); text-align: center; }
.form-message {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.form-error { color: var(--danger); background: var(--danger-soft); border-color: #f4d2d2; }
.form-success { color: var(--ok); background: var(--ok-soft); border-color: #ccecdc; }
.checkline { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 12.5px; }
.checkline input { width: 15px; height: 15px; accent-color: var(--brand); }
.link-subtle { color: var(--muted); font-size: 12px; }
.link-subtle:hover { color: var(--brand); }
.muted { color: var(--muted); }
.empty { padding: 26px 12px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.mono { font-size: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }

/* ---------- 门户 ---------- */
.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(47, 107, 255, .28);
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 15px; letter-spacing: .01em; }
.brand-text small { margin-top: 3px; color: var(--muted); font-size: 10.5px; letter-spacing: .12em; }
.header-actions { display: flex; align-items: center; gap: 16px; }

.portal-main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 40px; }
.hero { padding: 34px 0 30px; max-width: 760px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700;
  background: linear-gradient(115deg, #121a2b 12%, #2f4b8f 55%, #5b4bd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin-top: 16px; max-width: 640px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.announcement {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #f0dfb8;
  border-radius: 13px;
  background: var(--warn-soft);
  color: #8b5a15;
  font-size: 13px;
}

.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); gap: 24px; align-items: start; }
.auth-card { padding: 24px; }
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f3f5fa;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.tab {
  flex: 1;
  min-height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.tab:hover { color: var(--ink-2); }
.tab.is-active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(30, 46, 80, .08); }
.tab:disabled { opacity: .5; }
.auth-panels { padding-top: 22px; }
.auth-panel { animation: rise .22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.auth-side { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.side-item {
  display: flex;
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.side-num {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.side-item b { display: block; font-size: 13px; margin-bottom: 4px; }
.side-item p { color: var(--muted); font-size: 12px; line-height: 1.65; }

.dashboard { display: flex; flex-direction: column; gap: 20px; }
.account-card { padding: 24px; }
.account-top { display: flex; align-items: center; gap: 15px; }
.avatar {
  flex: none;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 9px 22px rgba(47, 107, 255, .25);
}
.account-id { flex: 1; min-width: 0; }
.account-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.account-line h2 { font-size: 20px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.account-sub { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.account-sub.account-ok { color: var(--ok); }
.account-sub.account-bad { color: var(--danger); }
.policy-banner {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 11px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f3cdcd;
  font-size: 12.5px;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.stat {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfcff, #f7f9fe);
}
.stat span { display: block; color: var(--muted); font-size: 11px; }
.stat b { display: block; margin-top: 5px; font-size: 18px; letter-spacing: -.02em; }
.stat small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10.5px; line-height: 1.4; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-card { padding: 21px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-head h3 { font-size: 15px; letter-spacing: -.01em; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcff;
}
.list-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-main b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { display: flex; align-items: center; gap: 7px; flex: none; }
.notice-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.notice-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; position: relative; }
.notice-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand);
}
.notice-list b { font-size: 12.5px; }
.notice-list span { color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.feature {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 11px;
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 14px;
}
.feature b { display: block; font-size: 13px; }
.feature p { margin-top: 4px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 11px;
  border-top: 1px solid rgba(215, 222, 234, .7);
}

/* ---------- 管理后台 ---------- */
.page-admin { background: #f2f5fa; }
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 28px; }
.login-card .brand { margin-bottom: 24px; }
.login-card h1 { font-size: 23px; letter-spacing: -.02em; }
.login-card .login-sub { margin: 5px 0 22px; color: var(--muted); font-size: 12.5px; }
.login-card .link-subtle { display: block; margin-top: 16px; text-align: center; }

.admin-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  background: #111a2c;
  color: #e8edf8;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; }
.admin-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.admin-brand b { display: block; font-size: 14px; }
.admin-brand small { display: block; margin-top: 2px; color: #8792a8; font-size: 10px; letter-spacing: .12em; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aab4c8;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
  transition: background .16s ease, color .16s ease;
}
.nav-item span { width: 18px; text-align: center; color: #6e7b93; }
.nav-item:hover { color: #fff; background: #1a253b; }
.nav-item.is-active { color: #fff; background: #233250; border-color: #2e4165; }
.nav-item.is-active span { color: #7fa6ff; }
.admin-side-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #23304a; display: flex; flex-direction: column; gap: 10px; }
.admin-who { color: #8792a8; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-main { padding: 26px 30px 40px; min-width: 0; }
.admin-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-topbar h1 { font-size: 24px; letter-spacing: -.03em; }
.admin-topbar p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.admin-view { display: flex; flex-direction: column; gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; }
.kpi {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.kpi span { display: block; color: var(--muted); font-size: 11px; }
.kpi b { display: block; margin-top: 6px; font-size: 23px; letter-spacing: -.03em; }
.kpi small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-actions .btn { justify-content: flex-start; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.select, .search-input {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  outline: none;
}
.search-input { min-width: 230px; flex: 1; max-width: 380px; }
.select:focus, .search-input:focus { border-color: #9db6ff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .09); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  padding: 10px 12px;
  color: var(--muted);
  background: #f8faff;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fbfcff; }
.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted-2); font-size: 10.5px; margin-top: 1px; }
.cell-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #d9e3ff;
  border-radius: 6px;
  color: var(--brand);
  background: #f4f8ff;
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.settings-form { display: flex; flex-direction: column; gap: 15px; }
.settings-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  font-size: 12px;
}
.check-card input { accent-color: var(--brand); }
.notice-line { padding: 10px 12px; border-radius: 10px; background: #f6f8fc; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.code-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow: auto; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcff; }
.code-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.code-mail { color: var(--muted); font-size: 11.5px; word-break: break-all; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 40, .48);
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(580px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(9, 16, 32, .3);
  animation: modal-in .18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; letter-spacing: -.02em; }
.modal-head p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.modal-close { width: 30px; height: 30px; border: none; border-radius: 8px; background: #f3f5fa; color: var(--muted); font-size: 17px; line-height: 1; }
.modal-close:hover { background: #e9edf6; color: var(--ink); }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; flex-wrap: wrap; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: #1e2a43;
  box-shadow: 0 12px 30px rgba(15, 23, 40, .22);
  font-size: 12.5px;
  animation: toast-in .2s ease;
  pointer-events: auto;
}
.toast-ok { background: #1d6e4b; }
.toast-error { background: #a93636; }
.toast.is-leaving { opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .auth-wrap, .dashboard .grid-2, .settings-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; height: auto; padding: 16px; }
  .admin-brand { padding-bottom: 14px; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .nav-item { width: auto; flex: none; padding: 0 12px; }
  .admin-side-foot { margin-top: 14px; flex-direction: row; align-items: center; justify-content: space-between; }
  .admin-main { padding: 20px 16px 32px; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-header { padding: 18px 16px 4px; }
  .header-actions .link-subtle { display: none; }
  .portal-main { padding: 18px 16px 30px; }
  .hero { padding: 22px 0; }
  .hero h1 { font-size: 30px; }
  .auth-card, .account-card, .panel-card { padding: 18px; }
  .field-row, .settings-form .form-grid, .modal-form .form-grid { grid-template-columns: 1fr; }
  .account-top { align-items: flex-start; flex-wrap: wrap; }
  .account-top .btn { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .list-item { align-items: flex-start; flex-direction: column; }
  .list-side { width: 100%; justify-content: flex-end; }
  .site-footer { padding: 18px 16px 28px; }
  .admin-main { padding: 16px 12px 30px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar h1 { font-size: 20px; }
  .search-input { min-width: 0; width: 100%; max-width: none; }
  .toolbar { align-items: stretch; }
  .toolbar .select { flex: 1; }
  .toolbar .btn { flex: 1; }
  .quick-actions { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .toast-root { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
