/* ═══════════════════════════════════════════════════════════════════════════
   zcode2api · 樱云阁设计系统
   动漫清新可爱 × 国风优雅：宣纸底 / 祥云纹 / 樱瓣 / 朱印 / 竹青胭脂
   纯 CSS 绘制全部装饰，零外链图片，离线可用
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* 宣纸与墨色 */
  --paper: #fbf6ec;
  --paper-deep: #f6efe1;
  --ink: #3d342a;
  --ink-soft: #6f6353;
  --ink-faint: #a69681;

  /* 国风主色：胭脂樱 / 竹青 / 天青 / 鎏金 */
  --sakura: #d97a8e;
  --sakura-deep: #c25c74;
  --sakura-mist: #fbe9ec;
  --matcha: #6fa58e;
  --matcha-deep: #4f8871;
  --matcha-mist: #e9f4ee;
  --sky: #82a8c8;
  --sky-mist: #eaf2f8;
  --gold: #c9a05e;
  --gold-mist: #f8f0e2;

  /* 语义色 */
  --error: #c05a4e;
  --error-bg: #fbeeeb;
  --info: #6f6353;
  --info-bg: #f3eee4;

  --card: rgba(255, 253, 248, .86);
  --border: rgba(160, 118, 82, .16);
  --border-strong: rgba(160, 118, 82, .30);
  --radius: 14px;
  --radius-xl: 22px;

  --shadow-sm: 0 4px 14px rgba(122, 82, 54, .07);
  --shadow-md: 0 10px 30px rgba(122, 82, 54, .10);
  --shadow-lg: 0 26px 70px rgba(112, 70, 46, .16);

  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'STZhongsong', 'STSong', 'SimSun', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── 宣纸底 + 祥云氤氲 ─────────────────────────────────────────────────── */
body {
  background:
    radial-gradient(ellipse 60% 40% at 8% 6%, rgba(255, 197, 209, .38), transparent 60%),
    radial-gradient(ellipse 50% 36% at 94% 12%, rgba(176, 214, 197, .40), transparent 62%),
    radial-gradient(ellipse 46% 34% at 78% 96%, rgba(247, 219, 160, .32), transparent 60%),
    radial-gradient(ellipse 40% 30% at 14% 92%, rgba(203, 222, 240, .34), transparent 62%),
    linear-gradient(160deg, #fdf8ef 0%, #fbf3f1 42%, #f2f8f2 74%, #f6f1e6 100%);
  background-attachment: fixed;
}
/* 祥云暗纹（点阵 + 斜线织出的绢纹） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(circle at 22px 22px, rgba(217, 122, 142, .16) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 82px 62px, rgba(111, 165, 142, .15) 0 1.6px, transparent 2.6px),
    linear-gradient(45deg, transparent 48.6%, rgba(178, 138, 100, .06) 49.4%, rgba(178, 138, 100, .06) 50.6%, transparent 51.4%);
  background-size: 116px 116px, 138px 138px, 34px 34px;
}

a { color: inherit; text-decoration: none }
button, input, textarea, select { font: inherit; border: none; outline: none; background: none; color: inherit }
button { cursor: pointer }

/* ═══ 登录页 ═════════════════════════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* 远山（底部渐隐山影） */
.login-body::before {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: -12px;
  height: 34vh;
  pointer-events: none;
  background:
    radial-gradient(58% 120px at 18% 100%, rgba(111, 165, 142, .30), transparent 72%),
    radial-gradient(48% 96px at 52% 100%, rgba(130, 168, 200, .26), transparent 70%),
    radial-gradient(62% 130px at 86% 100%, rgba(217, 122, 142, .24), transparent 72%),
    linear-gradient(to top, rgba(111, 165, 142, .14), transparent 82%);
  filter: blur(2px);
}
/* 侧题字 */
.login-body::after {
  content: "樱云阁";
  position: fixed;
  right: 7vw;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: .34em;
  color: rgba(129, 88, 68, .10);
  pointer-events: none;
  user-select: none;
}
/* 飘落樱瓣 */
.petal {
  position: fixed;
  top: -6vh;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #ffd7de, #f5aec0);
  border-radius: 60% 4% 60% 60%;
  opacity: 0;
  pointer-events: none;
  animation: petalFall linear infinite;
}
.petal:nth-child(1) { left: 8%;  width: 11px; height: 11px; animation-duration: 13s; animation-delay: 0s }
.petal:nth-child(2) { left: 22%; animation-duration: 16s; animation-delay: 2.4s; background: linear-gradient(135deg, #ffe6ea, #f7c0cd) }
.petal:nth-child(3) { left: 38%; width: 9px;  height: 9px;  animation-duration: 11s; animation-delay: 5s }
.petal:nth-child(4) { left: 55%; width: 13px; height: 13px; animation-duration: 18s; animation-delay: 1.2s; background: linear-gradient(135deg, #fff0f2, #f8bccc) }
.petal:nth-child(5) { left: 70%; width: 10px; height: 10px; animation-duration: 14s; animation-delay: 6.6s }
.petal:nth-child(6) { left: 84%; width: 12px; height: 12px; animation-duration: 15s; animation-delay: 3.8s; background: linear-gradient(135deg, #ffe0e6, #f3a9bd) }
.petal:nth-child(7) { left: 94%; width: 9px;  height: 9px;  animation-duration: 12s; animation-delay: 8s }
@keyframes petalFall {
  0%   { transform: translateY(-4vh) rotate(0deg) translateX(0); opacity: 0 }
  8%   { opacity: .85 }
  50%  { transform: translateY(48vh) rotate(200deg) translateX(-26px) }
  92%  { opacity: .8 }
  100% { transform: translateY(106vh) rotate(380deg) translateX(18px); opacity: 0 }
}

.login-shell { position: relative; z-index: 1; width: min(430px, 92vw); padding: 24px }
.login-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px 30px 30px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(1.15);
  animation: cardIn .55s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(.97) } to { opacity: 1; transform: none } }
/* 卡片右上角樱花晕 */
.login-card::before {
  content: "";
  position: absolute;
  width: 190px; height: 190px;
  right: -84px; top: -86px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 171, 188, .40), rgba(255, 228, 205, .16) 56%, transparent 70%);
}
/* 卡片左下竹青晕 */
.login-card::after {
  content: "";
  position: absolute;
  width: 150px; height: 150px;
  left: -70px; bottom: -72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 182, 168, .28), transparent 68%);
}
.login-seal {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--sakura-deep), var(--sakura));
  box-shadow: 0 8px 20px rgba(194, 92, 116, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: #fff8f4;
  letter-spacing: .06em;
  text-indent: .06em;
  transform: rotate(-3deg);
}
.login-brand {
  font-size: 11px;
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.login-title {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .12em;
  text-indent: .12em;
  color: var(--ink);
}
.login-subtitle { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); text-align: center }
.login-form { margin-top: 22px; display: grid; gap: 12px }

/* ═══ 按钮体系 ═══════════════════════════════════════════════════════════ */
.btn, .dialog-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .16s, box-shadow .16s, filter .16s, background .16s;
  white-space: nowrap;
}
.btn:active, .dialog-btn:active { transform: scale(.97) }
.btn-primary, .dialog-btn-primary {
  background: linear-gradient(135deg, var(--sakura-deep) 0%, var(--sakura) 55%, #e79aa8 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(194, 92, 116, .28), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover, .dialog-btn-primary:hover {
  filter: brightness(1.05) saturate(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(194, 92, 116, .34);
}
.btn-ghost, .dialog-btn:not(.dialog-btn-primary):not(.dialog-btn-danger) {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .65);
  color: var(--ink-soft);
}
.btn-ghost:hover, .dialog-btn:not(.dialog-btn-primary):not(.dialog-btn-danger):hover {
  background: #fff;
  color: var(--ink);
}
.btn-danger, .dialog-btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(192, 90, 78, .22);
}
.btn-danger:hover, .dialog-btn-danger:hover { background: #f7dfd9 }
.w-full { width: 100% }

/* ═══ 输入框 ═════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .72);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:focus {
  border-color: rgba(217, 122, 142, .62);
  box-shadow: 0 0 0 4px rgba(217, 122, 142, .13);
  background: #fff;
}
.input::placeholder { color: var(--ink-faint) }
textarea.input { height: auto; padding: 11px 14px; resize: vertical; border-radius: var(--radius) }
select.input {
  cursor: pointer;
  padding-right: 30px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a69681' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ═══ Toast（圆润纸签风）═════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  align-items: center;
}
.toast {
  background: rgba(255, 253, 248, .95);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastIn .32s cubic-bezier(.22, 1, .36, 1) both;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}
.toast.out { animation: toastOut .2s ease forwards }
.toast-icon { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50% }
.toast-success .toast-icon { background: var(--matcha-mist); color: var(--matcha-deep) }
.toast-error .toast-icon { background: var(--error-bg); color: var(--error) }
.toast-info .toast-icon { background: var(--sky-mist); color: var(--sky) }
.toast-content { flex: 1; font-size: 12.5px; font-weight: 500 }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95) } to { opacity: 1; transform: none } }
@keyframes toastOut { from { opacity: 1 } to { opacity: 0; transform: translateY(8px) scale(.96) } }

/* ═══ 顶栏（卷轴玻璃）════════════════════════════════════════════════════ */
.admin-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251, 246, 236, .82);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}
.admin-header-inner {
  max-width: 1280px;
  width: 100%;
  height: 58px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0 }
.admin-brand {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
/* 朱印小徽 */
.admin-brand::before {
  content: "码";
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff8f4;
  background: linear-gradient(145deg, var(--sakura-deep), var(--sakura));
  box-shadow: 0 4px 10px rgba(194, 92, 116, .30);
  transform: rotate(-3deg);
}
.admin-brand svg { display: none }
.admin-nav { display: flex; align-items: center; gap: 4px }
.admin-nav-link {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 7px 16px;
  font-weight: 500;
  transition: color .16s, background .16s, transform .16s;
  border-radius: 999px;
}
.admin-nav-link:hover { color: var(--ink); background: rgba(255, 255, 255, .7) }
.admin-nav-link.active {
  color: var(--sakura-deep);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(217, 122, 142, .16), rgba(111, 165, 142, .14));
  box-shadow: inset 0 0 0 1px rgba(217, 122, 142, .18);
}
.admin-header-right { display: flex; align-items: center; gap: 8px }
.admin-header-version {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--gold-mist);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(201, 160, 94, .28);
}
.admin-header-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: background .16s, color .16s, transform .16s;
}
.admin-header-icon-btn:hover { background: var(--sakura-mist); color: var(--sakura-deep); transform: rotate(-8deg) }
.admin-header-icon-btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; fill: none }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 86px 28px 40px }

/* ═══ 页头 ════════════════════════════════════════════════════════════════ */
.page-hd { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap }
.page-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--ink);
}
.page-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sakura), var(--matcha));
}
.page-sub { font-size: 13px; color: var(--ink-soft); margin-top: 8px }
.page-actions { display: flex; gap: 8px; align-items: center }
.page-action-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .68);
  color: var(--ink-soft);
  transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.page-action-btn:hover { background: #fff; color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm) }
.page-action-btn:active { transform: scale(.97) }
.page-action-btn svg { stroke: currentColor; fill: none }
.page-action-btn-primary {
  background: linear-gradient(135deg, var(--sakura-deep) 0%, var(--sakura) 55%, #e79aa8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(194, 92, 116, .28);
}
.page-action-btn-primary:hover { color: #fff; filter: brightness(1.05) }

/* ═══ 分节标题 ════════════════════════════════════════════════════════════ */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 16px }
.section-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .05em;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sakura), var(--matcha));
}
.section-count-badge {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sakura-mist);
  color: var(--sakura-deep);
  font-size: 11px;
  font-weight: 700;
}
.section-meta { font-size: 12px; color: var(--ink-faint) }

/* ═══ 统计卡片（玉牌）═════════════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px }
.stat-cell {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
}
.stat-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-md) }
/* 卡片角晕（依序樱/竹/天/金） */
.stat-cell::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  opacity: .5;
}
.stat-cell:nth-child(1)::after { background: radial-gradient(circle, rgba(217, 122, 142, .16), transparent 68%) }
.stat-cell:nth-child(2)::after { background: radial-gradient(circle, rgba(111, 165, 142, .18), transparent 68%) }
.stat-cell:nth-child(3)::after { background: radial-gradient(circle, rgba(130, 168, 200, .18), transparent 68%) }
.stat-cell:nth-child(4)::after { background: radial-gradient(circle, rgba(201, 160, 94, .20), transparent 68%) }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.stat-label { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; letter-spacing: .06em }
.stat-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-faint) }
.stat-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.01em; margin-top: auto; font-variant-numeric: tabular-nums; color: var(--ink) }

/* ═══ 表格（绢纸卡）═══════════════════════════════════════════════════════ */
.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.table-card > table { width: max-content; min-width: 100%; border-collapse: collapse }
table { width: 100%; border-collapse: collapse }
th {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  padding: 13px 16px;
  text-align: left;
  letter-spacing: .08em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td { font-size: 13px; padding: 14px 16px; vertical-align: middle; color: var(--ink-soft); border-bottom: 1px solid rgba(160, 118, 82, .08) }
tr:last-child td { border-bottom: none }
tbody tr { transition: background .16s }
tr:hover td { background: rgba(217, 122, 142, .05) }
.table-center { text-align: center }
.tok { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; color: var(--ink) }
.empty-state { padding: 52px 16px; color: var(--ink-faint); font-size: 13px; text-align: center; letter-spacing: .04em }

/* ═══ 徽章（粉彩玉牌）═════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.badge-active { color: var(--matcha-deep); background: var(--matcha-mist) }
.badge-cooling { color: #4a7dab; background: var(--sky-mist) }
.badge-exhausted { color: #9a7bb5; background: #f4eefa }
.badge-invalid, .badge-expired { color: var(--error); background: var(--error-bg) }
.badge-disabled { color: var(--ink-faint); background: #f1ece2 }
.badge-jwt { color: var(--sakura-deep); background: var(--sakura-mist) }
.badge-apiKey { color: #6d7f8d; background: #eef2f5 }

/* ═══ 额度条（竹节进度）═══════════════════════════════════════════════════ */
.quota-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap }
.q-pill { height: 20px; font-size: 11px; font-weight: 600; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px }
.q-ok { background: var(--matcha-mist); color: var(--matcha-deep) }
.q-low { background: var(--gold-mist); color: #a87f3e }
.q-zero { background: #f1ece2; color: var(--ink-faint) }
.q-bar { height: 4px; border-radius: 999px; background: #ece5d8; overflow: hidden; min-width: 60px; flex: 1 }
.q-bar-fill { height: 100%; background: var(--matcha); border-radius: 999px }

.quota-rows { display: flex; flex-direction: column; gap: 7px; min-width: 220px; max-width: 300px }
.quota-row { display: grid; grid-template-columns: 58px minmax(60px, 1fr) auto; align-items: center; gap: 10px }
.quota-row-name { font-size: 11px; font-weight: 600; color: var(--ink-soft); white-space: nowrap }
.quota-row-track { height: 7px; border-radius: 999px; background: #ece5d8; overflow: hidden; box-shadow: inset 0 1px 2px rgba(122, 82, 54, .08) }
.quota-row-fill { height: 100%; border-radius: 999px; transition: width .3s }
.quota-row-val { font-size: 11px; color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums }
.quota-reset { font-size: 11px; color: var(--ink-faint); margin-top: 1px }
.quota-empty { font-size: 12px; color: var(--ink-faint) }

/* ═══ 行操作 ══════════════════════════════════════════════════════════════ */
.row-actions { display: flex; align-items: center; gap: 10px }
.row-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  transition: color .16s, background .16s, transform .16s;
}
.row-icon-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; fill: none }
.row-icon-btn:hover { color: var(--sakura-deep); background: var(--sakura-mist) }
.row-icon-btn:active { transform: scale(.9) }
.row-icon-btn.is-loading svg { animation: spin .85s linear infinite }
.row-icon-danger:hover { color: var(--error); background: var(--error-bg) }
@keyframes spin { to { transform: rotate(360deg) } }

/* ═══ 筛选（樱签）═════════════════════════════════════════════════════════ */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap }
.filter-chip {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .62);
  box-shadow: inset 0 0 0 1px var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .16s, color .16s, transform .16s, box-shadow .16s;
}
.filter-chip:hover { color: var(--ink); background: #fff; transform: translateY(-1px) }
.filter-chip.active {
  background: linear-gradient(135deg, var(--sakura-deep), var(--sakura));
  color: #fff;
  box-shadow: 0 6px 16px rgba(194, 92, 116, .26);
}
.filter-chip-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(160, 118, 82, .12);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-chip.active .filter-chip-count { background: rgba(255, 255, 255, .24) }

/* ═══ 实时呼吸灯 ══════════════════════════════════════════════════════════ */
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft) }
.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--matcha-deep);
  box-shadow: 0 0 0 0 rgba(111, 165, 142, .5);
  animation: pulse 1.9s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 165, 142, .42) }
  70% { box-shadow: 0 0 0 7px rgba(111, 165, 142, 0) }
  100% { box-shadow: 0 0 0 0 rgba(111, 165, 142, 0) }
}

/* ═══ 弹窗（绢帛卷轴）═════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 44, 32, .34);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto }
.modal {
  background: rgba(255, 253, 248, .97);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: min(470px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.96);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.modal-overlay.open .modal { transform: none }
.modal-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: .05em;
  color: var(--ink);
}
.dialog-body { display: grid; gap: 12px }
.dialog-help { font-size: 12px; color: var(--ink-soft); margin-bottom: 2px; line-height: 1.7 }
.dialog-field { display: flex; align-items: center; gap: 10px }
.dialog-label { width: 54px; font-size: 13px; color: var(--ink-soft); flex: 0 0 auto }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px }

/* ═══ 设置卡 ══════════════════════════════════════════════════════════════ */
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  padding: 24px;
  margin-bottom: 18px;
  max-width: 680px;
}
.settings-row { display: grid; gap: 6px; margin-bottom: 20px }
.settings-row:last-child { margin-bottom: 0 }
.settings-row label { font-size: 13px; font-weight: 700; color: var(--ink) }
.settings-row .hint, .hint { font-size: 12px; color: var(--ink-soft); line-height: 1.75 }
code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 11.5px;
  background: var(--gold-mist);
  color: #9a763c;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ═══ 页脚 ════════════════════════════════════════════════════════════════ */
.site-footer {
  position: fixed;
  right: 18px;
  bottom: 10px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(61, 52, 42, .30);
  font-size: 11px;
  font-weight: 500;
}
.cb { width: 14px; height: 14px; accent-color: var(--sakura-deep); cursor: pointer }

/* ═══ 响应式 ══════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .admin-header-inner { padding: 0 14px }
  .admin-main { padding: 80px 14px 28px }
  .admin-nav-link { padding: 6px 10px; font-size: 12.5px }
  .login-body::after { display: none }
  .page-actions { width: 100%; flex-wrap: wrap }
}
