:root {
    /* 核心调色板：纯净白蓝风格 (White & Sapphire Blue) · 低调奢华 · 极高对比 */
    --bg: #f8fafc;
    --bg-mesh: radial-gradient(at 50% 0%, #e8f1fd 0%, #f8fafc 70%);
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --surface-active: #e2e8f0;
    --surface-well: #f8fafc;
    --surface-sidebar: #ffffff;
    
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-subtle: #f1f5f9;
    --border-focus: rgba(37, 99, 235, 0.45);
    
    /* 极高对比文字体系 (深海岩黑 Slate-900，绝不发灰发飘) */
    --text-main: #0f172a;
    --text-dim: #334155;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    
    /* 经典科技蓝 / 皇家蓝宝石主色 */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.16);
    --accent-subtle: #eff6ff;
    --accent-light: #dbeafe;
    --cyan: #0284c7;
    --cyan-subtle: #f0f9ff;
    
    /* 语义色彩：翡翠绿（就绪）、暖琉璃赤橙（冷却/警告，绝对禁用黑黄）、红宝石（异常/停用） */
    --ok: #16a34a;
    --ok-subtle: #f0fdf4;
    --ok-border: #bbf7d0;
    
    --warn: #ea580c;
    --warn-subtle: #fff7ed;
    --warn-border: #fed7aa;
    
    --bad: #dc2626;
    --bad-subtle: #fef2f2;
    --bad-border: #fecaca;
    
    --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 10px 25px -5px rgba(37, 99, 235, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(37, 99, 235, 0.18);
    --shadow-pop: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.06);
  }

  * { box-sizing: border-box; }
  ::selection { background: #dbeafe; color: #1e40af; }
  
  body {
    margin: 0;
    background: var(--bg);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-main);
    font: 13.5px/1.55 var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
  input, select, textarea { font: inherit; color: inherit; }
  
  /* 优雅细滚动条 */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
  ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

  /* ---------- 登录页 (White & Blue Quiet Luxury Login) ---------- */
  #login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background: radial-gradient(circle at 50% 20%, #e0edfd 0%, #f8fafc 65%);
  }
  .login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-pop);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  }
  .login-card:hover {
    box-shadow: 0 25px 35px -5px rgba(37, 99, 235, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(37, 99, 235, 0.15);
  }
  .brand-emblem {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
  }
  .brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  }
  .brand-icon-box svg { width: 24px; height: 24px; }
  .brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-main);
  }
  .brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
  }
  
  .field { margin-bottom: 18px; }
  .field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 7px;
    letter-spacing: 0.1px;
  }
  .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s var(--ease-out);
  }
  .field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  }
  .input-eye-btn {
    position: absolute;
    right: 12px;
    color: var(--text-faint);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
  }
  .input-eye-btn:hover { color: var(--text-main); }
  
  .btn-primary {
    width: 100%;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  }
  .btn-primary:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.96);
  }
  .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
  
  .login-error {
    color: var(--bad);
    font-size: 12.5px;
    min-height: 18px;
    margin-top: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
  }

  /* ---------- 骨架导航与布局 (Console Shell) ---------- */
  #app { display: none; min-height: 100vh; }
  
  aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    background: var(--surface-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 20;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
  }
  .aside-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 4px 8px 22px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
  }
  .aside-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  }
  .aside-brand-icon svg { width: 18px; height: 18px; }
  .aside-brand b {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
  }
  .aside-brand span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    font-weight: 400;
  }
  
  nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    flex: 1;
  }
  nav .nav-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 14px 10px 6px;
  }
  nav a {
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: all 0.18s var(--ease-out);
  }
  nav a svg {
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    transition: color 0.18s;
    flex-shrink: 0;
  }
  nav a:hover {
    background: var(--surface-hover);
    color: var(--text-main);
  }
  nav a:hover svg { color: var(--accent); }
  
  nav a.on {
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 600;
  }
  nav a.on svg { color: var(--accent); }
  nav a.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3.5px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
  }
  
  .nav-count {
    font-family: var(--mono);
    font-size: 11px;
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 99px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
  }
  nav a.on .nav-count {
    background: #dbeafe;
    color: #1e40af;
  }
  
  .aside-foot {
    margin-top: auto;
    padding: 14px 10px 4px;
    border-top: 1px solid var(--border-subtle);
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .ver-badge {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    color: var(--text-dim);
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .logout-btn {
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .logout-btn:hover {
    color: var(--bad);
    background: var(--bad-subtle);
  }

  /* 主内容区 */
  main {
    margin-left: 236px;
    padding: 28px 40px 60px;
    min-height: 100vh;
    max-width: 1400px;
  }
  
  .topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
    flex-wrap: wrap;
  }
  .topbar-titles h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.4px;
    color: var(--text-main);
  }
  .topbar-titles .sub {
    color: var(--text-muted);
    font-size: 12.5px;
    margin-top: 3px;
  }
  .topbar-spacer { flex: 1; }
  
  /* 状态指示徽章 */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }
  .status-dot {
    width: 7.5px;
    height: 7.5px;
    border-radius: 50%;
    background: var(--ok);
    position: relative;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
  }
  .status-dot.pulse::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--ok);
    animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  }
  @keyframes radar-ping {
    0% { transform: scale(1); opacity: 0.8; }
    75%, 100% { transform: scale(2.4); opacity: 0; }
  }
  .status-badge.warn .status-dot { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
  .status-badge.warn .status-dot.pulse::after { border-color: var(--warn); }
  .status-badge.bad .status-dot { background: var(--bad); box-shadow: 0 0 6px var(--bad); }

  .btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s var(--ease-out);
  }
  .btn-refresh:hover {
    color: var(--accent);
    background: var(--surface-hover);
    border-color: var(--border-hover);
  }
  .btn-refresh svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease-out); }
  .btn-refresh:active svg { transform: rotate(180deg); }

  /* ---------- 数据指标卡片 (Metric Cards) ---------- */
  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
  }
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
  }
  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: #cbd5e1;
  }
  .stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .stat-value {
    font-size: 26px;
    font-weight: 750;
    font-family: var(--mono);
    letter-spacing: -0.6px;
    color: var(--text-main);
    line-height: 1.15;
  }
  .stat-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  /* ---------- 通用面板 (Pure White Panels) ---------- */
  .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-top: 20px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .panel:hover {
    border-color: #cbd5e1;
  }
  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .panel-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
  }
  .panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
  }

  /* 键值详情对 */
  .kv-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px 18px;
    font-size: 13px;
  }
  .kv-grid dt { color: var(--text-muted); font-weight: 500; }
  .kv-grid dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-all;
  }

  /* 终端日志视窗（高端深海暗蓝黑终端，与白底形成强大高级感对比） */
  .logbox {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.65;
    color: #e2e8f0;
    max-height: 340px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  /* ---------- 表格与列表 (Clean Tables) ---------- */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
  }
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
  }
  th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    white-space: nowrap;
  }
  td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dim);
    vertical-align: middle;
    transition: background 0.12s;
  }
  tr:hover td {
    background: #f8fafc;
    color: var(--text-main);
  }
  .mono { font-family: var(--mono); font-size: 12px; }
  .empty {
    color: var(--text-muted);
    font-size: 13px;
    padding: 38px 12px;
    text-align: center;
  }

  /* 状态标签徽章 (Status Tags) */
  .tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-dim);
  }
  /* Batch-liveness progress: a thin inline bar next to the search box. */
  .verify-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-left: auto;
  }
  .verify-track {
    width: 140px;
    height: 6px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
  }
  .verify-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--accent, #2563eb);
    transition: width 0.3s var(--ease-out);
  }
  /* Compact bar strip used inside the per-key usage modal. */
  .mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
    padding: 4px 0;
  }
  .mini-bar {
    flex: 1;
    min-width: 2px;
    border-radius: 2px 2px 0 0;
  }
  .tag.ok {
    color: var(--ok);
    background: var(--ok-subtle);
    border-color: var(--ok-border);
  }
  .tag.warn {
    color: var(--warn);
    background: var(--warn-subtle);
    border-color: var(--warn-border);
  }
  .tag.bad {
    color: var(--bad);
    background: var(--bad-subtle);
    border-color: var(--bad-border);
  }

  /* 微型交互按钮 */
  .row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }
  .btn-mini {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-dim);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.15s var(--ease-out);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .btn-mini:hover {
    color: var(--accent);
    border-color: #cbd5e1;
    background: var(--surface-hover);
  }
  .btn-mini.danger:hover {
    color: var(--bad);
    border-color: var(--bad-border);
    background: var(--bad-subtle);
  }
  .btn-mini.primary {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
  }
  .btn-mini.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
  .btn-mini.copied {
    color: var(--ok) !important;
    border-color: var(--ok-border) !important;
    background: var(--ok-subtle) !important;
  }

  /* 检索与操作工具栏 */
  .toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .search-input {
    min-width: 220px;
    max-width: 340px;
    padding: 7px 12px 7px 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: all 0.2s var(--ease-out);
  }
  .search-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .search-wrap svg {
    position: absolute;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
  }
  .search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }

  /* 额度用量进度条 (Quota Bar) */
  .quota-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .quota-progress-track {
    width: 100%;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
  }
  .quota-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.3s ease;
  }
  .quota-progress-bar.warn { background: var(--warn); }
  .quota-progress-bar.danger { background: var(--bad); }

  /* ---------- 24小时交互式图表 (Interactive SVG Chart) ---------- */
  .chart-container {
    position: relative;
    width: 100%;
    margin-top: 12px;
  }
  .chart-svg {
    display: block;
    overflow: visible;
  }
  .chart-bar-hover {
    transition: opacity 0.15s, fill 0.15s;
    cursor: pointer;
  }
  .chart-bar-hover:hover {
    filter: brightness(1.15);
  }
  .chart-tooltip {
    position: absolute;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #1e293b;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translate(-50%, -110%);
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
    z-index: 10;
  }
  .chart-tooltip.on {
    opacity: 1;
    transform: translate(-50%, -125%);
  }
  .chart-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 0 4px;
  }

  /* ---------- 弹窗与遮罩 (Modal) ---------- */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
  }
  .overlay.on {
    display: flex;
    opacity: 1;
  }
  .modal {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 30px;
    box-shadow: var(--shadow-pop);
    max-height: 88vh;
    overflow-y: auto;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s var(--ease-out);
  }
  .overlay.on .modal {
    transform: scale(1) translateY(0);
  }
  .modal h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
  }
  .modal .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
  }
  .modal .actions .btn {
    width: auto;
    padding: 9px 18px;
  }
  .secret-box {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 14px;
    font-family: var(--mono);
    font-size: 13px;
    word-break: break-all;
    color: #38bdf8;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
  }

  /* 提示通知 (Toast) */
  .toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(14px);
    transition: all 0.25s var(--ease-out);
    pointer-events: none;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .toast.on {
    opacity: 1;
    transform: translateY(0);
  }

  /* 批量操作浮动工具栏 */
  .batch-bar {
    position: sticky;
    bottom: 20px;
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
    z-index: 10;
  }

  /* 移动端响应式 */
  .playground-grid { display: grid; grid-template-columns: minmax(300px, .95fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
  .playground-panel { min-width: 0; margin-top: 0; }
  .playground-note { color: var(--text-muted); font-size: 12px; line-height: 1.7; margin: 0 0 18px; }
  .playground-limits { margin: 18px 0 0; }
  .playground-parameters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .playground-check { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; cursor: pointer; }
  .playground-check input { width: 16px; height: 16px; flex: 0 0 auto; }
  .playground-actions, .model-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: flex-end; }
  .playground-actions { margin-top: 16px; }
  .playground-actions .btn-primary { width: auto; padding: 10px 22px; }
  .playground-actions .logbox { width: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .playground-panel button { min-height: 40px; }
  .playground-panel .panel-header, .model-actions { flex-wrap: wrap; }
  .playground-output, .playground-raw { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; overflow: auto; font: 13px/1.75 var(--mono); border-radius: var(--radius-md); padding: 16px; margin: 16px 0; max-height: 480px; }
  .playground-output { min-height: 220px; color: var(--text-main); background: #f8fafc; border: 1px solid var(--border); }
  .playground-raw { max-height: 320px; background: #0f172a; color: #e2e8f0; }
  .playground-details { margin: 12px 0; }
  .playground-details summary { min-height: 36px; padding: 7px 0; cursor: pointer; font-size: 13px; font-weight: 600; }
  .playground-details .playground-output { min-height: 80px; }
  .playground-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .playground-metric { display: flex; flex-direction: column; gap: 5px; font-size: 12px; min-width: 0; }
  .playground-metric span { color: var(--text-muted); }
  .playground-metric strong { overflow-wrap: anywhere; font-family: var(--mono); font-weight: 500; }
  .playground-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px; border-radius: var(--radius-md); font-size: 13px; overflow-wrap: anywhere; }
  .playground-error[hidden], .playground-details[hidden] { display: none; }
  .playground-panel :focus-visible, .model-toolbar :focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
  .model-name { font-weight: 700; overflow-wrap: anywhere; }
  .model-toolbar { align-items: end; flex-wrap: wrap; gap: 14px; }
  .model-toolbar .field { flex: 1; min-width: 220px; margin-bottom: 0; }
  .catalog-warning { padding: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius-md); font-size: 12px; }
  @media (max-width: 1100px) { .playground-grid { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 640px) {
    .playground-panel { padding: 16px; }
    .playground-panel input, .playground-panel textarea { font-size: 16px; }
    .playground-parameters, .playground-meta { grid-template-columns: minmax(0, 1fr); }
    .playground-actions { justify-content: stretch; }
    .playground-actions button { flex: 1; }
    .topbar { flex-wrap: wrap; gap: 12px; }
    .topbar-titles { min-width: 0; flex: 1 1 200px; }
    .topbar-titles .sub { white-space: normal; }
  }
  @media (prefers-reduced-motion: reduce) { .playground-panel button { transition: none; } }
  @media (max-width: 840px) {
    aside {
      position: static;
      width: 100%;
      flex-direction: row;
      overflow-x: hidden;
      padding: 10px 14px;
      border-right: 0;
      border-bottom: 1px solid var(--border);
    }
    .aside-brand, nav .nav-group-title, .aside-foot { display: none; }
    nav { flex-direction: row; min-width: 0; overflow-x: auto; overflow-y: hidden; }
    nav a { flex: 0 0 auto; white-space: nowrap; min-height: 44px; }
    main { margin-left: 0; padding: 20px 16px 40px; }
    .kv-grid { grid-template-columns: 120px 1fr; }
  }
