/* ════════════════════════════════════════════════════════════════
   DeepSeek Gateway · 流光 UI 设计系统（v2 · 紧凑 · 玻璃拟态）
   单一 token 体系 · 极光背景 · 渐变描边 · 按钮流光
   ════════════════════════════════════════════════════════════════ */

:root {
  /* 品牌色：蓝 → 靛 → 紫 流光渐变 */
  --c-blue:   #2563eb;
  --c-indigo: #6366f1;
  --c-violet: #8b5cf6;
  --c-purple: #7c3aed;
  --c-sky:    #0ea5e9;

  --grad-brand: linear-gradient(135deg, #2563eb 0%, #6366f1 52%, #7c3aed 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(37,99,235,.12), rgba(139,92,246,.16));
  --grad-border: linear-gradient(135deg, rgba(37,99,235,.34), rgba(255,255,255,.6) 42%, rgba(139,92,246,.34));
  --grad-text: linear-gradient(120deg, #2563eb, #7c3aed 68%, #6366f1);

  /* 中性色 */
  --bg: #eef2fb;
  --bg-2: #f4f6fc;
  --card: #ffffff;
  --text: #1e293b;
  --text-2: #5b6b86;
  --text-3: #6b7a99;
  --border: #e2e8f4;

  /* 语义色 */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* 形状与阴影 */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 6px 18px -10px rgba(16,24,40,.10);
  --shadow-md: 0 12px 40px -16px rgba(37,99,235,.20);
  --blur: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}
.hidden { display: none !important; }
a { color: var(--c-indigo); text-decoration: none; }
/* 键盘焦点可见性（无障碍） */
:focus-visible {
  outline: 2px solid var(--c-indigo);
  outline-offset: 2px;
  border-radius: 4px;
}
code {
  background: rgba(99,102,241,.12);
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  word-break: break-all;
}

/* ── 极光背景：多层柔光晕 + 缓慢漂移 ── */
body {
  background:
    radial-gradient(680px 440px at 8% 2%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(760px 480px at 94% 8%, rgba(139,92,246,.13), transparent 62%),
    radial-gradient(620px 420px at 76% 98%, rgba(14,165,233,.09), transparent 60%),
    radial-gradient(540px 360px at 26% 90%, rgba(124,58,237,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::after {
  content: "";
  position: fixed; inset: -12%;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(560px 380px at 24% 16%, rgba(99,102,241,.12), transparent 62%),
    radial-gradient(460px 340px at 82% 62%, rgba(37,99,235,.10), transparent 62%),
    radial-gradient(420px 320px at 54% 94%, rgba(139,92,246,.09), transparent 60%);
  filter: blur(38px);
  animation: auroraDrift 20s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(1.8%, -1.6%, 0) scale(1.08); }
}

/* ════════════ 登录 / 注册 / 找回 ════════════ */
.auth-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 420px; max-width: 100%;
  padding: 30px 28px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 28px 70px -26px rgba(37,99,235,.32), 0 4px 18px rgba(31,41,55,.06);
  animation: rise .35s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand-logo {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--grad-brand);
  color: #fff; font-size: 25px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -6px rgba(99,102,241,.55);
  flex-shrink: 0;
}
.brand-logo.small { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
.brand-text h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.brand-text p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

.auth-tabs {
  display: flex; background: rgba(99,102,241,.07);
  border-radius: 11px; padding: 4px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 9px 0; border: none; background: transparent;
  color: var(--text-2); font-size: 14px; font-weight: 600;
  border-radius: 9px; cursor: pointer; font-family: inherit;
  transition: all .18s;
}
.auth-tab.active {
  background: var(--card); color: var(--c-indigo);
  box-shadow: 0 2px 8px rgba(16,24,40,.10);
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

.auth-hint { margin-top: 15px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.auth-links { margin-top: 13px; text-align: center; }
.code-btn { white-space: nowrap; padding: 10px 14px; }
.auth-footer { margin-top: 18px; text-align: center; }
.link { color: var(--text-2); font-size: 13px; cursor: pointer; transition: color .15s; }
.link:hover { color: var(--c-indigo); }

/* ════════════ 按钮 ════════════ */
.btn {
  border: none; border-radius: 10px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; color: #fff;
  transition: background-position .5s ease, box-shadow .3s ease, transform .18s ease, opacity .2s ease, color .18s, border-color .18s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 主按钮：流光渐变 + 悬浮扫光 */
.btn-primary {
  background: var(--grad-brand);
  background-size: 200% 200%; background-position: 0% 0%;
  box-shadow: 0 4px 18px rgba(99,102,241,.32);
}
.btn-primary:hover:not(:disabled) {
  background-position: 100% 100%;
  box-shadow: 0 8px 28px rgba(99,102,241,.45);
  transform: translateY(-1px);
}
.btn-block { width: 100%; padding: 12px 0; font-size: 15px; }

/* 次按钮：玻璃描边 */
.btn-ghost {
  background: rgba(255,255,255,.6); color: var(--text-2);
  border: 1px solid rgba(148,163,184,.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover { color: var(--c-indigo); border-color: var(--c-indigo); background: #fff; }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.btn-warning:hover { background: var(--warning); color: #fff; }

/* ════════════ 顶栏 ════════════ */
#appView { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 54px; flex-shrink: 0;
  background: rgba(255,255,255,.66);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.66);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 11px; }
.topbar-title { font-size: 15px; font-weight: 800; letter-spacing: -.2px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.status-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--text-2);
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) padding-box,
    var(--grad-border) border-box;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status-pill.ok { color: #047857; background: linear-gradient(rgba(236,253,245,.9), rgba(236,253,245,.9)) padding-box, var(--grad-border) border-box; }
.status-pill.ok .dot { background: var(--success); box-shadow: 0 0 7px rgba(16,185,129,.6); }
.status-pill.waiting { color: #b45309; background: linear-gradient(rgba(255,251,235,.9), rgba(255,251,235,.9)) padding-box, var(--grad-border) border-box; }
.status-pill.waiting .dot { background: var(--warning); }

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 5px;
  border: 1px solid rgba(148,163,184,.4);
  border-radius: 999px; background: rgba(255,255,255,.7);
  cursor: pointer; transition: border-color .18s, box-shadow .2s;
}
.user-chip:hover { border-color: var(--c-indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13.5px; font-weight: 700; }
.role-badge {
  font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: rgba(99,102,241,.14); color: var(--c-indigo); font-weight: 700;
}
.role-badge.badge-admin { background: linear-gradient(135deg,#fff7ed,#ffedd5); color: #c2410c; border: 1px solid #fed7aa; }
.role-badge.badge-user { background: linear-gradient(135deg,#eef2ff,#e0e7ff); color: #4338ca; border: 1px solid #c7d2fe; }
.chevron { font-size: 11px; color: var(--text-3); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 13px; box-shadow: var(--shadow-md);
  min-width: 184px; padding: 6px; z-index: 60;
  animation: rise .15s ease;
}
.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px; font-size: 13.5px; cursor: pointer;
  transition: background .15s;
}
.dd-item:hover { background: rgba(99,102,241,.08); }

/* ════════════ 布局 ════════════ */
.layout { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.sidebar {
  width: 218px; flex-shrink: 0;
  padding: 12px 10px;
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255,255,255,.6);
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%; overflow-y: auto;
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-group {
  padding: 12px 14px 3px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; color: var(--text-3); user-select: none;
}
.nav-group:first-child { padding-top: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid transparent;
  background: transparent; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background .16s, color .16s, border-color .16s, box-shadow .2s;
}
.nav-item:hover { background: rgba(99,102,241,.07); color: var(--text); }
.nav-item .nav-ico { font-size: 15px; width: 20px; text-align: center; }
.nav-item.active {
  background: var(--grad-brand-soft);
  border-color: rgba(99,102,241,.28);
  box-shadow: inset 0 0 16px rgba(99,102,241,.10);
  color: #4f46e5;
}
.nav-item.active::before {
  content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px;
  background: var(--grad-brand); box-shadow: 0 0 8px rgba(99,102,241,.5);
}

.sidebar-footer { padding: 8px 10px 2px; }
.api-addr { font-size: 11.5px; color: var(--text-3); line-height: 1.7; word-break: break-all; }
.api-addr code { font-size: 11px; }

.content { flex: 1; padding: 18px 22px 44px; max-width: 1000px; height: 100%; overflow-y: auto; min-width: 0; }
/* 隐藏滚动条（保持可滚动，视觉干净无上下滚动条） */
.content, .sidebar, .table-wrap { scrollbar-width: none; -ms-overflow-style: none; }
.content::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { display: none; }
.view { display: none; animation: rise .25s ease; }
.view.active { display: block; }
.view-title {
  font-size: 18px; font-weight: 800; margin-bottom: 14px; letter-spacing: -.3px;
  display: flex; align-items: center; gap: 10px;
}
.view-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-brand);
}

/* ════════════ 卡片 ════════════ */
.card {
  background:
    linear-gradient(rgba(255,255,255,.84), rgba(255,255,255,.84)) padding-box,
    var(--grad-border) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 12px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 9px; }
.card-note { font-size: 12px; color: var(--text-2); margin: 5px 0 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.card-actions { display: flex; gap: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-bottom: 12px; }
.stat-card {
  background:
    linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)) padding-box,
    linear-gradient(135deg, rgba(37,99,235,.24), rgba(139,92,246,.20)) border-box;
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 13px 15px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-value {
  font-size: 22px; font-weight: 800; letter-spacing: -.5px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 3px; }

.kv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px dashed rgba(148,163,184,.4); gap: 10px;
}
.kv-row:last-of-type { border-bottom: none; }
.kv-row span { font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.copyable { cursor: pointer; transition: background .15s; }
.copyable:hover { background: rgba(99,102,241,.18); }

.code-block {
  background: linear-gradient(160deg, #0f172a, #1e1b4b);
  color: #e2e8f0; border-radius: 11px;
  padding: 14px 16px; font-size: 12px; line-height: 1.7;
  overflow-x: auto; font-family: "SFMono-Regular", Consolas, monospace;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

/* ════════════ 表单控件 ════════════ */
.input {
  width: 100%; padding: 8px 12px;
  border: 1.5px solid rgba(148,163,184,.4); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--text);
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  outline: none; margin-bottom: 8px;
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.input:hover { border-color: rgba(99,102,241,.45); }
.input:focus {
  border-color: transparent; background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18), 0 6px 22px rgba(99,102,241,.16);
}
.input.textarea { height: 96px; resize: vertical; font-family: monospace; font-size: 12px; }
.w90 { width: 96px; flex-shrink: 0; }
.flex1 { flex: 1; }
.form-row { display: flex; gap: 8px; }
.form-row .input { margin-bottom: 8px; }

/* 字段行：图标内嵌输入框 + 按钮同行（input-wrap pattern） */
.field-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.field-row .input-wrap { flex: 1; min-width: 0; }
.field-row .input-wrap .input { width: 100%; margin-bottom: 0; }
.field-row .btn { flex-shrink: 0; }
/* 仅手机号行保留外部图标（📱 同时代表区号 + 号码两个输入） */
.fld-ico { font-size: 14px; width: 18px; text-align: center; line-height: 1; align-self: center; opacity: .72; flex-shrink: 0; }

/* 输入框内嵌图标（icon-inside-input） */
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  z-index: 2; font-size: 15px; opacity: .85; pointer-events: none; line-height: 1;
}
.input-wrap input {
  width: 100%; padding: 8px 12px 8px 36px;
  border: 1.5px solid rgba(148,163,184,.4); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--text);
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  outline: none; margin-bottom: 0;
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.input-wrap input:hover { border-color: rgba(99,102,241,.45); }
.input-wrap input:focus {
  border-color: transparent; background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18), 0 6px 22px rgba(99,102,241,.16);
}

/* 邮箱绑定专属：渐变描边输入框 + 状态条 */
.bind-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2);
  background: rgba(241,245,249,.72);
  border: 1px solid rgba(148,163,184,.4);
  border-radius: 9px; padding: 6px 12px; margin-bottom: 10px;
  transition: all .2s ease;
}
.bind-status.ok { color: #047857; background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.32); }
.bind-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.bind-status.ok .bind-dot { background: var(--success); box-shadow: 0 0 7px rgba(16,185,129,.6); }
#bindEmail, #bindCode {
  background:
    linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)) padding-box,
    linear-gradient(135deg, #2563eb, #8b5cf6) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 12px rgba(37,99,235,.10);
}
#bindEmail:hover, #bindCode:hover { box-shadow: 0 4px 16px rgba(99,102,241,.18); }
#bindEmail:focus, #bindCode:focus {
  background: linear-gradient(rgba(255,255,255,.97), rgba(255,255,255,.97)) padding-box,
              linear-gradient(135deg, #2563eb, #8b5cf6) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18), 0 8px 28px rgba(99,102,241,.22);
}

.seg { display: flex; background: rgba(99,102,241,.07); border-radius: 11px; padding: 4px; margin-bottom: 8px; width: fit-content; }
.seg-btn {
  padding: 7px 18px; border: none; background: transparent;
  border-radius: 9px; font-size: 13px; color: var(--text-2); cursor: pointer;
  font-family: inherit; font-weight: 600; transition: all .15s;
}
.seg-btn.active { background: var(--card); color: var(--c-indigo); box-shadow: 0 2px 8px rgba(16,24,40,.10); }

.collapse { margin-bottom: 10px; }
.collapse summary { cursor: pointer; font-size: 13px; color: var(--c-indigo); margin-bottom: 8px; }
.steps { padding-left: 20px; font-size: 13px; color: var(--text-2); }
.steps li { margin-bottom: 4px; }

.switch-row { display: flex; align-items: center; gap: 14px; }
.switch-row span { font-size: 13.5px; color: var(--text-2); }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: rgba(148,163,184,.5);
  border-radius: 999px; transition: .25s;
}
.slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--grad-brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.section-sub {
  margin: 18px 2px 10px; font-size: 12.5px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.section-sub::after { content: ""; flex: 1; height: 1px; background: rgba(148,163,184,.4); }

/* ════════════ 表格 ════════════ */
.table-wrap {
  max-height: 52vh; overflow-y: auto; overflow-x: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid rgba(226,232,244,.8); }
.table th {
  color: var(--text-2); font-weight: 600; font-size: 11.5px; white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(250,251,254,.98), rgba(244,246,251,.96));
}
.table td { font-variant-numeric: tabular-nums; }
.table th.left, .table td.left { text-align: left; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(99,102,241,.05); }
.table tr:last-child td { border-bottom: none; }
.table .empty { text-align: center; color: var(--text-3); padding: 28px 0; }

.acc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.acc-status .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.acc-status.ok { color: #047857; } .acc-status.ok .dot { background: var(--success); }
.acc-status.no { color: var(--text-3); } .acc-status.no .dot { background: var(--text-3); }
.acc-status.er { color: var(--danger); } .acc-status.er .dot { background: var(--danger); }
.acc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini-btn {
  padding: 3px 9px; font-size: 11.5px; border-radius: 7px;
  border: 1px solid rgba(148,163,184,.45); background: rgba(255,255,255,.7);
  color: var(--text-2); cursor: pointer; font-family: inherit; transition: all .15s;
}
.mini-btn:hover { border-color: var(--c-indigo); color: var(--c-indigo); }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ════════════ 用量 ════════════ */
.periods { display: flex; gap: 8px; }
.period-btn {
  padding: 6px 14px; border: 1px solid rgba(148,163,184,.45);
  background: rgba(255,255,255,.7); border-radius: 9px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; font-family: inherit; transition: all .15s;
}
.period-btn:hover { border-color: var(--c-indigo); color: var(--c-indigo); }
.period-btn.active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 3px 12px rgba(99,102,241,.3); }

.usage-summary {
  display: flex; gap: 26px; flex-wrap: wrap;
  background: rgba(99,102,241,.06); border-radius: 11px;
  padding: 12px 16px; margin-bottom: 12px;
}
.usage-summary .us-item { font-size: 13px; color: var(--text-2); }
.usage-summary .us-item b { color: var(--text); font-size: 15px; margin-left: 4px; }
.inline-status { font-size: 12.5px; color: var(--success); margin-top: 8px; }
.inline-status.err { color: var(--danger); }
.auto-refresh { font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-left: 10px; }
.models-info { margin-top: 10px; font-size: 12.5px; color: var(--text-2); background: rgba(99,102,241,.06); border-radius: 11px; padding: 10px 14px; }

/* ════════════ Toast ════════════ */
.toast {
  position: fixed; top: 22px; right: 22px;
  padding: 12px 22px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; color: #fff;
  z-index: 999; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  background: var(--grad-brand);
  animation: slidein .25s ease;
}
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ════════════ 响应式 ════════════ */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  /* 移动端输入框 ≥16px，防止 iOS 聚焦自动缩放页面 */
  .input, .input-wrap input, .input-wrap input:focus { font-size: 16px; }
  .sidebar {
    width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.6);
    padding: 10px; height: auto; overflow: visible;
  }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .nav-item { flex: 1; justify-content: center; padding: 9px 6px; font-size: 13px; }
  .nav-ico { display: none; }
  .nav-item.active::before { display: none; }
  .nav-group, .sidebar-footer { display: none; }
  .content { padding: 14px 12px 40px; max-width: 100%; }
  .topbar { padding: 0 12px; }
  .topbar-title { display: none; }
  .table-wrap { max-height: 48vh; }
}

/* ════════════ 动效克制回退 ════════════ */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .btn, .nav-item, .stat-card, .card, .input, .input-wrap input,
  #bindEmail, #bindCode, .user-chip, .table tbody tr { transition: none !important; }
}
