/* SHUN API 控制台样式。与首页共用一套视觉语言:深林绿 + 奶油色 + 宋体标题 + 胶囊导航。
   首页是「设计即产品」的品牌页面;控制台是工具页面,同一套颜色与字体,但标签、按钮和数据
   一律用无衬线,宋体只出现在页面级与区块级标题上。所有 id/class 名称保持不变,脚本与测试不感知。 */
:root {
    --bg: #f4efe3;                 /* 页面奶油底,比卡片略深,让卡片浮出来 */
    --surface: #fbf8f0;            /* 卡片、输入框、悬停行 */
    --surface-2: #ece5d6;          /* 轨道、骨架屏、按钮悬停 */
    --line: #ddd6c6;               /* 实线边框 */
    --hairline: rgba(32, 60, 54, 0.16);
    --hairline-strong: rgba(32, 60, 54, 0.32);
    --ink: #203c36;                /* 首页森林绿,同时是正文色 */
    --ink-deep: #17302b;
    --muted: #4f6259;              /* 5.7:1 于页面底色 */
    --cream: #faf4e8;
    --cream-muted: #cedbca;        /* 深色带上的次要文字 */
    --accent: #2f5e48;             /* 链接、强调、图表 */
    --sage: #dfe8d6;               /* 首页 muted 绿的浅底版本 */
    --sage-deep: #5f7c52;
    --gold: #e8d3a9;               /* 首页深色区域的焦点环与暖色强调 */
    --ok: #2b5a3d;   --ok-tint: #e2ecda;
    --warn: #7a5210; --warn-tint: #f5e7c8;
    --bad: #8f3325;  --bad-tint: #f6ddd6;
    --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'SimSun', Georgia, 'Times New Roman', serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    --radius: 12px;
    --width: 1240px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  .hidden { display: none !important; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    font-family: var(--sans);
    background: var(--bg); color: var(--ink);
    font-size: 14px; line-height: 1.55;
  }
  .wrap { min-height: 100svh; display: flex; flex-direction: column; }
  /* 深色带之外的每个区块共用同一内容宽度 */
  #consolePage > :not(.console-band) { position: relative; width: min(var(--width), 100% - 48px); margin-left: auto; margin-right: auto; }
  a, .linkbtn { color: var(--accent); }
  a:hover { text-decoration-thickness: 1px; text-underline-offset: 4px; }
  h1, h2, h3 { text-wrap: balance; }

  /* ---- 顶部深色带:与首页同款奶油胶囊导航 + 页面标题。底图沿用首页山湖照片,重叠深绿遮罩后
     只剩隐约的山形纹理,奶油文字在任何位置都保持 9:1 以上对比度。 ---- */
  .console-band { position: relative; isolation: isolate; flex-shrink: 0; background: #1b332e url('/assets/mountain-lake.webp') center 32% / cover no-repeat; color: var(--cream); padding: 28px 48px 76px; }
  .console-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(28, 52, 46, 0.84) 0%, rgba(24, 46, 41, 0.9) 55%, rgba(20, 40, 35, 0.96) 100%); }
  .console-band-inner { width: min(var(--width), 100%); margin: 0 auto; }
  header.console-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 10px 12px 10px 22px; border-radius: 64px;
    background: rgba(250, 247, 239, 0.97); color: var(--ink); box-shadow: 0 6px 32px rgba(7, 25, 21, 0.18);
  }
  .console-brand { display: flex; align-items: center; min-height: 44px; gap: 10px; font: 700 23px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: .05em; color: var(--ink); text-decoration: none; flex-shrink: 0; }
  .console-brand:hover { text-decoration: none; }
  .console-brand .home-brand-sub { display: block; margin-top: 5px; font: 600 8px/1.2 var(--sans); letter-spacing: .2em; }
  .console-brand .home-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); }
  .console-brand .home-symbol svg { width: 29px; height: 29px; fill: none; stroke: var(--cream); stroke-width: 1.5; stroke-linejoin: round; }
  .console-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
  .console-links a { display: flex; align-items: center; min-width: 44px; min-height: 44px; padding: 8px 4px; font-size: 13px; color: #36534a; text-decoration: none; white-space: nowrap; border-radius: 4px; }
  .console-links a:hover { color: #102d23; text-decoration: underline; text-underline-offset: 5px; }
  .console-links a.console-current { color: var(--ink); font-weight: 600; }
  .console-links a.console-current::before { content: ""; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #517357; }
  .hstat { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; justify-content: flex-end; font-size: 13px; color: var(--muted); }
  #who { color: var(--cream); font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .linkbtn { background: none; border: 0; padding: 8px 6px; min-height: 44px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; border-radius: 6px; }
  .linkbtn:hover { background: rgba(32, 60, 54, 0.07); }
  .console-service { display: inline-flex; align-items: center; gap: 7px; min-height: 52px; padding: 0 20px; border-radius: 40px; background: var(--ink); color: var(--cream); font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(250, 244, 232, 0.35); flex-shrink: 0; }
  .dot.ok { background: #a9d18e; } .dot.bad { background: #f0a090; }
  .console-masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding: 44px 8px 0; }
  .console-masthead h1 { font: 500 36px/1.2 var(--serif); letter-spacing: .07em; color: var(--cream); }
  .console-masthead h1:focus { outline: none; }
  .console-masthead p { font-size: 13px; letter-spacing: .05em; color: var(--cream-muted); }
  .console-intro { min-width: 0; }
  .console-intro p { margin-top: 12px; }
  .console-account { display: flex; align-items: center; gap: 14px; min-width: 0; }
  .console-account:has(#who.hidden):has(#forgetBtn.hidden) { display: none; }
  .console-account .linkbtn { color: var(--cream); border: 1px solid rgba(250, 244, 232, 0.42); padding: 8px 16px; }
  .console-account .linkbtn:hover { background: rgba(250, 244, 232, 0.1); border-color: var(--cream); box-shadow: none; }
  .console-band a:focus-visible, .console-band button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
  header.console-nav a:focus-visible, header.console-nav button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

  /* ---- 登录:米白卡片从深色带中浮出 ---- */
  .login { display: flex; justify-content: center; align-items: flex-start; }
  .login:not(.hidden) { flex: 1; margin-top: -44px; }
  .login-box {
    width: 100%; max-width: 540px; text-align: center;
    padding: 40px 40px 34px; border: 1px solid var(--line); border-radius: 20px;
    background: var(--surface); box-shadow: 0 18px 56px rgba(3, 21, 16, 0.1);
  }
  .login-symbol { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: var(--ink); }
  .login-symbol svg { width: 34px; height: 34px; fill: none; stroke: var(--cream); stroke-width: 1.5; stroke-linejoin: round; }
  .login-title { font: 500 32px/1.35 var(--serif); letter-spacing: .05em; margin-bottom: 10px; }
  .login-sub { color: var(--muted); margin-bottom: 26px; letter-spacing: .03em; }
  .login-purpose { text-align: left; padding: 12px 16px; margin-bottom: 20px; background: var(--sage); border: 1px solid rgba(95, 124, 82, 0.35); border-radius: 10px; font-size: 13px; color: var(--ink); }
  .console-key-label { display: block; text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; margin: 0 0 7px; }
  .login-row { display: flex; gap: 8px; }
  .login-row #goBtn { padding-left: 22px; padding-right: 22px; }
  .login-row #goBtn::after { content: "↗"; margin-left: 12px; font-size: 16px; }
  #consolePage #keyInput, #consolePage #goBtn { min-height: 44px; }
  .hint { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-top: 10px; }
  .login-box .hint { margin-top: 14px; }
  #loginCard:not(.hidden) ~ #err { max-width: 540px; }

  /* ---- 表单控件 ---- */
  input, select, textarea {
    font: inherit; color: var(--ink); background: var(--surface);
    border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 9px 12px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  }
  input:hover, select:hover, textarea:hover { border-color: rgba(32, 60, 54, 0.5); }
  input::placeholder, textarea::placeholder { color: #5d7066; }
  input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, [data-copy]:focus-visible, summary:focus-visible {
    outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px;
  }
  #keyInput { flex: 1; min-width: 0; }
  button {
    font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--ink); border-radius: 8px;
    padding: 9px 18px; background: var(--ink); color: var(--cream); touch-action: manipulation;
    transition: background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
  }
  button:hover { background: var(--ink-deep); border-color: var(--ink-deep); box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12); }
  button:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
  button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }
  button.ghost:hover:not(:disabled) { background: rgba(32, 60, 54, 0.07); border-color: var(--ink); box-shadow: none; }
  button.mini { padding: 4px 11px; font-size: 12.5px; font-weight: 500; border-radius: 7px; }
  button.danger { color: var(--bad); border-color: rgba(143, 51, 37, 0.4); }
  button.danger:hover:not(:disabled) { background: var(--bad-tint); border-color: var(--bad); }

  /* Shared action menus for channel and key management. */
  :is(#channelCard, #adminCard) .row-action-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 34px; padding: 6px 11px; white-space: nowrap; }
  .row-action-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
  :is(#channelCard, #adminCard) .row-action-trigger[aria-expanded="true"] { background: var(--sage); border-color: var(--ink); }
  .row-action-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
  .row-action-menu { position: fixed; inset: auto; margin: 0; width: 154px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 6px; border: 1px solid var(--hairline-strong); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 32px rgba(24, 46, 36, .16), 0 2px 6px rgba(24, 46, 36, .06); }
  .row-action-menu[hidden] { display: none !important; }
  :is(#channelCard, #adminCard) .row-action-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; margin: 0; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); box-shadow: none; text-align: left; white-space: nowrap; font: 400 13px/1.5 var(--sans); }
  :is(#channelCard, #adminCard) .row-action-item:hover, :is(#channelCard, #adminCard) .row-action-item:focus-visible { background: var(--sage); box-shadow: none; outline: none; }
  :is(#channelCard, #adminCard) .row-action-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  :is(#channelCard, #adminCard) .row-action-item.danger { color: var(--bad); }
  :is(#channelCard, #adminCard) .row-action-item.danger:hover, :is(#channelCard, #adminCard) .row-action-item.danger:focus-visible { background: #f6e9e4; }
  .row-action-item svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .row-action-separator { height: 1px; margin: 5px 3px; background: var(--hairline); }
  #adminCard .key-row-actions { min-width: 82px; }
  @media (max-width: 700px) {
    :is(#channelCard, #adminCard) .row-action-trigger, :is(#channelCard, #adminCard) .row-action-item { min-height: 44px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .row-action-trigger svg { transition: none; }
  }

  /* ---- 区块:第一个可见区块紧贴深色带,其余之间留 48px ---- */
  main { flex: 1; min-width: 0; }
  #adminCard { padding-top: 32px; }
  main > section:not(.hidden) { margin-top: 4px; }
  main > section:not(.hidden) ~ section:not(.hidden) { margin-top: 48px; }
  .sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
  .sec-head h2 { font: 500 22px/1.3 var(--serif); letter-spacing: .05em; }
  .sec-head h2 > span, .hl { background: none; padding: 0; }
  .sec-head .muted { font-size: 13px; letter-spacing: .02em; }
  .sec-head .spacer { flex: 1; }
  .muted { color: var(--muted); }
  #err { background: var(--bad-tint); color: var(--bad); border: 1px solid rgba(143, 51, 37, 0.28); border-radius: var(--radius); padding: 11px 16px; margin-top: 20px; font-size: 13.5px; }
  /* ---- 预警横幅(余额将尽 / key 临期 / 窗口吃紧),仅普通 key 页面 ---- */
  #warnBox { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
  #warnBox:not(.hidden) { margin-top: -44px; }
  #err:not(.hidden) ~ #warnBox { margin-top: 12px; }
  .warn-item { border-radius: var(--radius); padding: 11px 16px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; }
  .warn-item.warn { background: var(--warn-tint); color: var(--warn); border: 1px solid rgba(122, 82, 16, 0.28); }
  .warn-item.bad { background: var(--bad-tint); color: var(--bad); border: 1px solid rgba(143, 51, 37, 0.28); }
  .warn-item b { font-weight: 700; }

  /* ---- 余额面板:从深色带中浮出的奶油卡片(唯一的"卡片"待遇) ---- */
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 30px 28px; margin-top: -44px !important; box-shadow: 0 16px 48px rgba(3, 21, 16, 0.08); }
  #warnBox:not(.hidden) ~ main .panel, #err:not(.hidden) ~ main .panel { margin-top: 20px !important; box-shadow: 0 12px 40px rgba(3, 21, 16, 0.08); }
  .bal-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
  .bal-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: .02em; }
  .bal-big { font-size: 40px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px; }
  .bal-big small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: .08em; }
  .bal-pending { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  #budgetOpen { margin-top: 10px; align-self: flex-start; }
  .log-billing-note { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
  .budget-dialog { width: min(1050px, calc(100vw - 32px)); max-height: 90vh; margin: auto; padding: 24px; border: 1px solid var(--hairline); border-radius: 16px; color: var(--ink); background: var(--cream); overflow: auto; }
  .budget-dialog::backdrop { background: rgba(10, 25, 20, .5); }
  .budget-heading,.budget-toolbar,.budget-actions { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
  .budget-heading h2 { font-size: 23px; margin: 0; }
  .budget-toolbar { margin: 18px 0; flex-wrap: wrap; justify-content: flex-start; }
  .budget-dialog .hint { line-height: 1.6; }
  .budget-dialog label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
  .budget-dialog input,.budget-dialog select { max-width: 100%; padding: 8px 10px; color: var(--ink); background: var(--cream); border: 1px solid var(--hairline); border-radius: 7px; }
  .budget-table-wrap { overflow-x: auto; }
  .budget-table-wrap table { min-width: 700px; width: 100%; }
  .budget-table-wrap td { white-space: nowrap; }
  .budget-table-wrap small { display: block; color: var(--muted); font-size: 11px; }
  .budget-table-wrap .mono { max-width: 250px; white-space: normal; overflow-wrap: anywhere; }
  .budget-error,.budget-review-notice { color: #954227; line-height: 1.6; }
  .budget-review-alert { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 22px; margin:16px 0; border:1px solid #dec7ab; border-radius:12px; background:#faf0dd; color:#654b30; }
  .budget-review-alert[hidden] { display:none; }
  .budget-review-alert strong { font-size:15px; }.budget-review-alert p { margin:6px 0 0; font-size:13px; line-height:1.6; }
  .budget-review-alert button { flex-shrink:0; }
  .budget-review-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; border:1px solid var(--hairline); border-radius:9px; margin:10px 0; }
  .budget-review-notice strong,.budget-review-notice span,.budget-review-notice small { display:block; }.budget-review-notice small { color:var(--muted); }
  .budget-review-checks { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
  .budget-review-checks div { padding:10px; background:var(--cream); border:1px solid var(--hairline); border-radius:7px; }
  .budget-review-checks dt { font-size:12px; color:var(--muted); }.budget-review-checks dd { margin:6px 0 0; font-size:20px; }
  .budget-review-history { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; line-height:1.7; border-bottom:1px solid var(--hairline); padding-bottom:10px; }
  .budget-review-history code { font-size:11px; overflow-wrap:anywhere; }.budget-review-history span { font-size:12px; }
  @media(max-width:600px) { .budget-review-alert,.budget-review-notice { flex-direction:column; align-items:stretch; gap:12px; padding:14px; }.budget-review-checks { grid-template-columns:repeat(2,minmax(0,1fr)); } }
  .budget-resolve { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hairline); }
  .budget-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 15px 0; }
  .budget-fields[hidden],.budget-resolve[hidden] { display: none; }
  .budget-fields p { grid-column: 1 / -1; }
  .budget-dialog .budget-confirm,.quota-unlimited { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 12px 0; }
  .budget-confirm input,.quota-unlimited input { width: auto; }
  .issue .quota-unlimited input[type="checkbox"] { width: auto; min-height: 0; }
  .quota-policy-dialog { width: min(480px,calc(100vw - 32px)); }
  .budget-actions { justify-content: flex-end; margin-top: 16px; }
  @media(max-width:600px) { .budget-dialog { padding: 18px; } .budget-fields { grid-template-columns: 1fr 1fr; } .budget-heading h2 { font-size: 19px; } }
  @media(max-width:600px) {
    .budget-table-wrap table { min-width: 0; }
    .budget-table-wrap thead { display: none; }
    .budget-table-wrap tbody { display: block; }
    .budget-table-wrap tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
    .budget-table-wrap td { display: block; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .budget-table-wrap td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
    .budget-table-wrap .budget-model-cell,.budget-table-wrap .budget-action-cell { grid-column: 1 / -1; }
  }
  .bal-meta { display: flex; gap: 32px; flex-wrap: wrap; }
  .bal-meta dt { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
  .bal-meta dd { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
  .bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
  .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width 0.5s var(--ease); }
  .bar i.warn { background: #c48a2a; } .bar i.full { background: #b8453a; }
  .bar.quota { margin-top: 18px; }
  /* 窗口限额:环形仪表盘 */
  .gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 16px 20px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hairline); }
  .gauge { display: flex; align-items: center; gap: 13px; }
  .ring { width: 58px; height: 58px; flex: none; }
  .ring circle { fill: none; stroke-width: 5.5; }
  .ring .tr { stroke: var(--surface-2); }
  .ring .pr { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dasharray 0.7s var(--ease); }
  .ring .pr.warn { stroke: #c48a2a; } .ring .pr.full { stroke: #b8453a; }
  .ring text { fill: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .gtxt .gl { font-size: 13px; font-weight: 600; }
  .gtxt .gv { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }

  /* ---- 表格 ---- */
  .tbl { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; padding: 12px 12px 9px; border-bottom: 1px solid var(--hairline-strong); white-space: nowrap; }
  td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; vertical-align: middle; }
  tbody tr { transition: background 0.12s var(--ease); }
  tbody tr:hover { background: rgba(32, 60, 54, 0.045); }
  td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
  .mono { font-family: 'SFMono-Regular', ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
  .empty { color: var(--muted); padding: 28px 12px !important; text-align: center; white-space: normal; }

  /* ---- 可点编辑单元格 ---- */
  td.editable { cursor: pointer; text-decoration: underline dotted var(--hairline-strong); text-underline-offset: 3px; }
  td.editable:hover { background: var(--sage); text-decoration-color: var(--accent); }
  /* 渠道顺序号:圆底徽标,数字即优先级(1 最优先) */
  td.ord-cell { white-space: nowrap; }
  .ord { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px; margin-right: 6px; border-radius: 11px; background: var(--sage); color: var(--ink); font-weight: 600; font-size: 12px; text-align: center; }
  /* 渠道协议标志:OpenAI / Claude logo */
  .prov-wrap { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; vertical-align: middle; min-width: 16px; }
  .prov { display: inline-flex; align-items: center; }
  .prov svg { display: block; }
  .prov-slot { display: inline-block; width: 15px; height: 15px; }

  /* ---- 分页条 ---- */
  .pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
  .pager .pinfo { color: var(--muted); font-size: 12.5px; margin-right: auto; }
  .pager button { padding: 4px 10px; font-size: 12.5px; font-weight: 500; border-radius: 7px; background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); min-width: 32px; }
  .pager button:hover:not(:disabled) { background: rgba(32, 60, 54, 0.07); box-shadow: none; }
  .pager button:disabled { opacity: 0.4; cursor: default; }
  .pager button.cur { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  .pager .gap { color: var(--muted); padding: 0 2px; }

  /* ---- 使用记录:查询、缓存与逐次费用 ---- */
  .log-heading { flex-wrap: wrap; }
  .log-result-toggle { display: flex; align-items: center; gap: 9px; width: 100%; height: 42px; padding: 8px 12px; border: 1px solid var(--hairline-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; box-shadow: none; }
  .log-result-toggle:hover { background: var(--surface); border-color: var(--sage-deep); box-shadow: none; }
  .log-result-toggle[aria-expanded="true"], .log-result-toggle:focus-visible { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
  .log-result-toggle > svg { width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .15s; }
  .log-result-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
  .log-result-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--ok); opacity: .75; }
  [data-log-result="failure"] .log-result-dot, [data-result="failure"] .log-result-dot { background: var(--bad); }
  .log-result-menu { position: fixed; z-index: 1003; width: 180px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(24, 48, 40, .14), 0 2px 6px rgba(24, 48, 40, .04); }
  .log-result-option { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 10px; border-radius: 7px; font-size: 13px; line-height: 1.5; cursor: pointer; }
  .log-result-option + .log-result-option { margin-top: 3px; }
  .log-result-option.is-active, .log-result-option:hover { background: #edf0e6; }
  .log-result-option[aria-selected="true"] { background: var(--sage); color: var(--ink-deep); font-weight: 500; }
  .log-result-option svg { width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.8; visibility: hidden; }
  .log-result-option[aria-selected="true"] svg { visibility: visible; }
  #logResultPanel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .log-page-size-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
  .log-page-size-control .log-page-size-toggle { display: flex; align-items: center; justify-content: space-between; gap: 13px; min-width: 79px; min-height: 40px; padding: 7px 11px; border: 1px solid var(--hairline-strong); border-radius: 9px; background: var(--surface); color: var(--ink); box-shadow: none; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .log-page-size-toggle:hover:not(:disabled) { border-color: var(--sage-deep); background: var(--surface); }
  .log-page-size-toggle[aria-expanded="true"], .log-page-size-toggle:focus-visible { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
  .log-page-size-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .15s; }
  .log-page-size-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .log-page-size-panel { position: fixed; z-index: 1003; width: 136px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(24, 48, 40, .14), 0 2px 6px rgba(24, 48, 40, .04); }
  .log-page-size-heading { padding: 7px 9px 9px; margin-bottom: 3px; border-bottom: 1px solid var(--hairline); color: var(--muted); font-size: 11px; }
  .log-page-size-option { display: flex; align-items: center; gap: 7px; min-height: 39px; margin: 2px 0; padding: 8px 9px; border-radius: 7px; color: var(--ink); font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; cursor: pointer; }
  .log-page-size-option.is-active, .log-page-size-option:hover { background: #edf0e6; }
  .log-page-size-option[aria-selected="true"] { background: var(--sage); color: var(--ink-deep); font-weight: 600; }
  .log-page-size-option small { color: var(--muted); font-size: 11px; font-weight: 400; }
  .log-page-size-option svg { width: 15px; height: 15px; margin-left: auto; fill: none; stroke: var(--accent); stroke-width: 1.8; visibility: hidden; }
  .log-page-size-option[aria-selected="true"] svg { visibility: visible; }
  .log-filters { display: grid; grid-template-columns: minmax(210px, 1.2fr) minmax(190px, 1.2fr) minmax(140px, .8fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); }
  .log-filters.log-with-key { grid-template-columns: minmax(180px, 1.15fr) minmax(160px, 1.1fr) minmax(128px, .8fr) minmax(130px, .9fr) minmax(130px, .9fr) auto; }
  .log-filter-field { min-width: 0; }
  .log-filter-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .log-filter-field input, .log-filter-field select { width: 100%; min-width: 0; height: 42px; font-size: 13px; }
  #logChannel { padding: 8px 12px; border: 1px solid var(--hairline-strong); border-radius: 9px; background-color: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
  #logChannel:hover:not(:disabled) { border-color: var(--sage-deep); }
  #logChannel:focus-visible { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
  #logChannel:disabled { cursor: default; }
  /* Retain native selection, focus and keyboard behavior. Browsers that do not
     support customizable selects keep the same styled native control. */
  @supports (appearance: base-select) {
    #logChannel, #logChannel::picker(select) { appearance: base-select; }
    #logChannel { display: flex; align-items: center; gap: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #logChannel::picker-icon { content: ''; flex-shrink: 0; width: 7px; height: 7px; margin: -3px 3px 0 auto; border-right: 1.5px solid var(--sage-deep); border-bottom: 1.5px solid var(--sage-deep); transform: rotate(45deg); transition: transform .15s; }
    #logChannel:open { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
    #logChannel:open::picker-icon { transform: rotate(225deg); }
    #logChannel::picker(select) { position-area: block-end span-inline-end; position-try-order: normal; position-try-fallbacks: flip-inline; min-width: 210px; max-width: calc(100vw - 24px); max-height: min(360px, calc(100% - 12px)); margin-block: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(24, 48, 40, .14), 0 2px 6px rgba(24, 48, 40, .04); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c2cabb transparent; }
    #logChannel option { display: flex; align-items: center; gap: 10px; min-height: 42px; margin: 2px 0; padding: 9px 10px; border-radius: 7px; color: var(--ink); font-family: var(--sans); font-size: 13px; line-height: 1.5; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
    #logChannel option:first-child { margin-bottom: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); border-radius: 7px 7px 0 0; }
    #logChannel option:hover, #logChannel option:focus-visible { background: #edf0e6; outline: 0; }
    #logChannel option:checked { background: var(--sage); color: var(--ink-deep); font-weight: 600; }
    #logChannel option::checkmark { order: 1; margin-left: auto; color: var(--accent); font-size: 14px; }
  }
  .log-filter-actions { display: flex; gap: 8px; }
  .log-filter-actions button { height: 42px; padding-inline: 17px; white-space: nowrap; }
  .log-filter-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0 16px; font-size: 12px; }
  .log-model-control { display: flex; align-items: center; width: 100%; min-height: 42px; border: 1px solid var(--hairline-strong); border-radius: 9px; background: var(--surface); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
  .log-model-control:hover { border-color: var(--sage-deep); }
  .log-model-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
  .log-model-control .log-model-search-icon { width: 16px; height: 16px; margin-left: 12px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .log-model-control #logModel { flex: 1; width: 0; min-width: 0; height: 40px; padding: 8px 10px; border: 0; outline: 0; border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
  .log-model-control #logModel:focus-visible { outline: 0; }
  .log-model-control #logModelToggle { display: grid; place-items: center; flex-shrink: 0; width: 40px; min-width: 40px; min-height: 40px; align-self: stretch; padding: 0; border: 0; border-radius: 0 8px 8px 0; background: transparent; color: var(--muted); box-shadow: none; }
  .log-model-control #logModelToggle:hover { background: var(--sage); color: var(--ink); }
  #logModelToggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .15s; }
  #logModelToggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .log-model-panel, .log-date-panel { --log-menu-font-size: 13px; }
  .log-model-panel { position: fixed; z-index: 1002; display: flex; flex-direction: column; width: min(400px, calc(100vw - 24px)); max-height: 360px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(24, 48, 40, .14), 0 2px 6px rgba(24, 48, 40, .04); }
  .log-model-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 8px 10px 10px; color: var(--muted); font-size: 11px; letter-spacing: .03em; }
  #logModelCount { font-variant-numeric: tabular-nums; }
  .log-model-options { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c2cabb transparent; }
  .log-model-option { display: flex; align-items: center; gap: 10px; min-height: 43px; margin: 2px 0; padding: 9px 10px; border-radius: 7px; cursor: pointer; color: var(--ink); font-size: var(--log-menu-font-size); line-height: 1.5; }
  .log-model-option[data-log-model-index="0"] { margin-bottom: 7px; border-bottom: 1px solid var(--hairline); border-radius: 7px 7px 0 0; padding-bottom: 12px; }
  .log-model-option.is-active, .log-model-option:hover { background: #edf0e6; }
  .log-model-option[aria-selected="true"] { background: var(--sage); color: var(--ink-deep); }
  .log-model-option-icon { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border: 1px solid rgba(47, 94, 72, .11); border-radius: 6px; background: rgba(47, 94, 72, .045); color: var(--sage-deep); }
  .log-model-option-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
  .log-model-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
  .log-model-option-check { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.8; visibility: hidden; }
  .log-model-option[aria-selected="true"] .log-model-option-check { visibility: visible; }
  .log-model-panel-foot { display: flex; justify-content: space-between; gap: 10px; flex-shrink: 0; margin-top: 4px; padding: 9px 10px 5px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 10px; }
  .log-model-panel-foot span { white-space: nowrap; opacity: .8; }
  .log-model-empty { padding: 12px 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
  .log-date-toggle { display: flex; align-items: center; gap: 9px; width: 100%; height: 42px; padding: 8px 12px; border: 1px solid var(--hairline-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font: 500 13px/1.4 var(--sans); text-align: left; box-shadow: none; }
  .log-date-toggle:hover { background: var(--surface-2); box-shadow: none; }
  .log-date-toggle[aria-expanded="true"], .log-date-toggle:focus-visible { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(47, 94, 72, .1); }
  .log-date-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
  #logDateLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .log-date-chevron { margin-left: auto; font-size: 18px; line-height: 1; }
  .log-date-panel { position: fixed; z-index: 1001; width: min(456px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 12px 0 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(24, 48, 40, .14), 0 2px 6px rgba(24, 48, 40, .04); }
  .log-date-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; padding: 0 12px 12px; border-bottom: 1px solid var(--hairline); }
  .log-date-presets button { display: block; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: 500 var(--log-menu-font-size)/1.5 var(--sans); box-shadow: none; }
  .log-date-presets button:hover { background: #edf0e6; color: var(--ink); box-shadow: none; }
  .log-date-presets button[aria-pressed="true"] { border-color: rgba(47, 94, 72, .12); background: var(--sage); color: var(--ink-deep); }
  .log-date-panel button:focus-visible, .log-date-panel input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .log-date-custom { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 8px; align-items: end; padding: 16px 14px 0; }
  .log-date-custom > div { min-width: 0; }
  .log-date-custom label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
  .log-date-custom input { width: 100%; min-width: 0; height: 43px; border: 1px solid var(--hairline-strong); border-radius: 9px; padding: 9px 10px; background: var(--bg); color: var(--ink); font: 500 var(--log-menu-font-size)/1.3 var(--sans); font-variant-numeric: tabular-nums; color-scheme: light; accent-color: var(--accent); }
  .log-date-custom input:hover { border-color: var(--sage-deep); }
  .log-date-custom input::-webkit-calendar-picker-indicator { opacity: .62; cursor: pointer; }
  .log-date-arrow { display: grid; place-items: center; height: 43px; color: var(--sage-deep); font-size: 21px; }
  .log-date-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 14px 0; }
  .log-date-footer span { font-size: 10px; color: var(--muted); }
  .log-date-footer button { min-width: 80px; min-height: 40px; padding: 8px 20px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--cream); font-size: var(--log-menu-font-size); box-shadow: none; }
  .log-date-footer button:hover { background: var(--ink-deep); border-color: var(--ink-deep); }
  .log-date-error { margin: 10px 14px 0; color: var(--bad); font-size: 12px; }
  #logQueryStatus { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
  #logQueryStatus.log-query-error { color: var(--bad); }
  .log-table { width: 100%; }
  .log-table-wrap { position: relative; }
  .log-table .log-model { min-width: 155px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
  .log-table .log-key-name { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .log-table .log-key-id { display: block; font-size: 11px; color: var(--muted); }
  .log-table .log-token-cell { min-width: 165px; text-align: left; }
  .log-token-main, .log-token-cache { display: flex; align-items: center; justify-content: flex-start; gap: 13px; font-variant-numeric: tabular-nums; }
  .log-token-main { font-weight: 600; font-size: 14px; }
  .log-token-main span { display: inline-flex; align-items: center; gap: 5px; }
  .log-token-input { color: #12805c; font-size: 19px; font-weight: 400; }
  .log-token-output { color: #8656c0; font-size: 19px; font-weight: 400; }
  .log-token-cache { gap: 7px; margin-top: 3px; color: #067a9e; font-weight: 600; }
  .log-cache-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .log-table .log-token-info { display: inline-flex; justify-content: center; align-items: center; min-width: 27px; min-height: 27px; width: 27px; height: 27px; margin: -3px -5px -3px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #5b7177; font-size: 16px; font-weight: 500; }
  .log-table .log-token-info:hover, .log-table .log-token-info[aria-expanded="true"] { background: #dfeef0; color: #076c8a; box-shadow: none; }
  .log-table .log-token-info:focus-visible { outline: 2px solid #067a9e; outline-offset: 2px; }
  .log-cache-rate { color: #067a9e; font-weight: 650; font-variant-numeric: tabular-nums; }
  .log-cache-meter { display: block; width: 60px; height: 4px; margin: 7px 0 0 auto; border-radius: 5px; overflow: hidden; background: #dce7e5; }
  .log-cache-meter > span { display: block; height: 100%; background: #1592ad; border-radius: inherit; }
  .log-table .log-cost-cell { text-align: left; }
  .log-table .log-status-cell { min-width: 134px; }
  .log-table .log-success { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 7px; }
  .log-success svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .log-table .log-failure-card { display: grid; gap: 5px; min-width: 112px; width: max-content; margin: 0; padding: 8px 10px; border: 1px solid #e8d4c7; border-radius: 10px; background: #f9eee6; color: #82452f; font: 500 11px/1.5 var(--sans); box-shadow: none; text-align: left; white-space: nowrap; }
  .log-table button.log-failure-card:hover { border-color: #bf937c; background: #f3e4d7; box-shadow: 0 2px 8px rgba(96,56,32,.06); }
  .log-table button.log-failure-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .log-failure-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
  .log-failure-dot { width: 6px; height: 6px; border-radius: 50%; background: #b17450; flex-shrink: 0; }
  .log-failure-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #856b5d; font-size: 10px; font-variant-numeric: tabular-nums; }
  .log-failure-action { display: inline-flex; align-items: center; gap: 3px; color: #694839; }
  .log-failure-action svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .log-failure-card.is-static { cursor: default; }
  .log-cost { display: inline-block; padding: 4px 9px; border-radius: 7px; background: #ffecd7; color: #ad3b12; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: left; }
  .log-token-detail { position: fixed; z-index: 1000; width: min(292px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px 18px; border: 1px solid #35424b; border-radius: 12px; background: #14232d; color: #f1f5f8; box-shadow: 0 10px 28px rgba(8, 24, 30, .24); font: 13px/1.65 var(--sans); text-align: left; }
  .log-token-detail h3 { margin-bottom: 9px; color: #f1f5f8; font: 650 14px/1.4 var(--sans); }
  .log-token-detail dl > div { display: flex; justify-content: space-between; gap: 18px; }
  .log-token-detail dt { color: #b9c7d0; }
  .log-token-detail dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
  .log-token-detail .log-token-total { margin-top: 8px; padding-top: 8px; border-top: 1px solid #43505a; }
  .log-token-detail .log-token-total dd { color: #7fc9ff; }
  .log-token-detail p { margin-top: 10px; color: #b9c7d0; font-size: 11px; white-space: normal; }
  .log-help { margin-top: 14px; font-size: 12px; }
  @media (max-width: 1180px) {
    .log-filters, .log-filters.log-with-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .log-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
  }
  @media (max-width: 600px) {
    .log-filters, .log-filters.log-with-key { grid-template-columns: minmax(0, 1fr); padding: 13px; gap: 13px; }
    .log-filter-field input, .log-filter-field select { font-size: 16px; }
    #logChannel option { min-height: 46px; font-size: 14px; }
    .log-filter-actions button { flex: 1; }
    .log-filter-meta { gap: 10px; }
    .log-date-toggle { font-size: 15px; }
    .log-result-toggle { font-size: 15px; }
    .log-result-option { min-height: 46px; font-size: 14px; }
    .log-model-panel, .log-date-panel { --log-menu-font-size: 14px; }
    .log-model-option { min-height: 46px; }
    .log-model-panel-foot span { display: none; }
    .log-page-size-option { min-height: 44px; }
    #logQueryStatus { flex-basis: 100%; margin-left: 0; }
    .log-heading .spacer { display: none; }
    .log-heading { column-gap: 8px; align-items: center; }
    .log-heading h2 { flex: 1 0 auto; white-space: nowrap; }
    .log-table .log-token-info { min-width: 36px; min-height: 36px; }
  }
  @media (max-width: 380px) {
    .log-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
    .log-heading > .muted, .log-heading > #refreshBtn { justify-self: end; }
    .log-date-custom { grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 4px; padding-inline: 10px; }
    .log-date-custom input { padding-inline: 7px; }
    .log-date-custom input::-webkit-calendar-picker-indicator { width: 14px; margin: 0; padding: 0; }
  }

  /* ---- 标签 ---- */
  .chip { display: inline-block; padding: 1.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; background: rgba(32, 60, 54, 0.08); color: var(--ink); }
  .chip.ok { background: var(--ok-tint); color: var(--ok); }
  .chip.bad { background: var(--bad-tint); color: var(--bad); }
  .chip.off { background: transparent; color: var(--muted); border: 1px solid var(--hairline-strong); }
  .chip.warn { background: var(--warn-tint); color: var(--warn); }
  .chip.vip { background: transparent; color: var(--muted); border: 1px solid var(--hairline-strong); }
  .chip.svip { background: var(--sage); color: var(--ink); }
  .chip.ssvip { background: var(--ink); color: var(--cream); }
  .chip.sssvip { background: var(--gold); color: var(--ink); }
  .chip[data-act], .chip[data-cact] { cursor: pointer; }
  .chip[data-act]:hover, .chip[data-cact]:hover { box-shadow: 0 0 0 2px rgba(32, 60, 54, 0.14); }
  /* 可点元素必须能被键盘聚焦并有可见焦点环,否则整块渠道管理与分组切换是鼠标独占的 */
  [role="button"] { cursor: pointer; }
  [role="button"]:focus-visible, td.editable:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

  /* ---- 签发工具条 / 新 key ---- */
  .issue { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 14px; align-items: end; padding: 20px 0 16px; }
  .issue-field { grid-column: span 3; min-width: 0; }
  .issue-field label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
  .issue-field label span { margin-left: 6px; font-weight: 400; color: var(--muted); }
  .issue input, .issue select { width: 100%; min-width: 0; min-height: 44px; }
  .issue-key .issue-wide { grid-column: span 5; }
  .issue-channel .issue-url { grid-column: span 6; }
  .issue-channel .issue-wide { grid-column: span 4; }
  .issue-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; grid-column: span 2; }
  .issue-actions button { min-height: 44px; white-space: nowrap; }
  .issue-actions button > span { margin-left: 12px; }
  .issue-key .issue-actions button { width: 100%; }
  .issue-channel .issue-actions { grid-column: 1 / -1; }
  .newkey { background: var(--sage); border: 1px solid rgba(95, 124, 82, 0.4); color: var(--ink); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0 6px; font-size: 13px; word-break: break-all; }
  .newkey .mono { font-size: 12.5px; color: var(--ink); }

  /* ---- 图表 ---- */
  .chart { padding-top: 16px; }
  .chart svg { width: 100%; height: 150px; display: block; }
  .chart rect.v { fill: var(--accent); transition: fill 0.12s var(--ease); }
  .chart rect.v:hover { fill: var(--ink); }
  .chart rect.z { fill: rgba(32, 60, 54, 0.14); }
  .chart text { fill: var(--muted); font-size: 9.5px; font-family: inherit; }

  /* ---- 模型测试 ---- */
  .test-res { font-size: 12.5px; margin-left: 10px; font-variant-numeric: tabular-nums; }
  .test-res.ok { color: var(--ok); } .test-res.bad { color: var(--bad); }
  .model-test-widget { container: model-test / inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; max-width: 208px; min-height: 58px; padding: 9px 10px 9px 12px; border: 1px solid transparent; border-radius: 10px; }
  .model-test-result { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
  .model-test-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
  .model-test-detail { max-width: 100%; padding-left: 23px; font-size: 11.5px; line-height: 1.45; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .model-test-detail-link { display: inline-flex; align-items: center; flex-wrap: wrap; max-width: 100%; gap: 2px 6px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; }
  .model-test-detail-link span:last-child { text-decoration: underline; text-underline-offset: 3px; }
  .model-test-detail-link:hover:not(:disabled) { background: transparent; color: var(--bad); box-shadow: none; }
  .model-test-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
  .model-test-widget .model-test-action { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 7px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font-size: 11.5px; font-weight: 500; white-space: nowrap; box-shadow: none; }
  .model-test-widget .model-test-action[hidden] { display: none; }
  .model-test-widget .model-test-action:hover:not(:disabled) { background: rgba(255,255,255,.55); border-color: currentColor; box-shadow: none; }
  .model-test-widget .model-test-action:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
  .model-test-widget .model-test-action .model-test-icon { width: 14px; height: 14px; }
  .model-test-widget[data-test-state="idle"] { position: relative; padding: 0; }
  .model-test-widget[data-test-state="idle"] .model-test-result { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .model-test-widget[data-test-state="idle"] .model-test-action { min-height: 38px; gap: 8px; padding: 8px 12px; border-color: var(--hairline-strong); background: var(--surface); color: var(--ink); font-size: 12px; }
  .model-test-widget[data-test-state="idle"] .model-test-action:hover:not(:disabled) { background: var(--sage); border-color: var(--accent); }
  .model-test-limit { padding-left: 8px; border-left: 1px solid var(--hairline); color: var(--muted); font-size: 11px; }
  .model-test-widget[data-test-state="pending"] { background: #edf0e6; border-color: #dbe2d4; color: #39574b; }
  .model-test-widget[data-test-state="pending"] .model-test-detail { color: #5b6c61; }
  .model-test-widget[data-test-state="ok"] { background: #e9f0e3; border-color: #d5e3ce; color: #2b5a3d; }
  .model-test-widget[data-test-state="ok"] .model-test-detail { color: #506c55; }
  .model-test-widget[data-test-state="bad"] { background: #f8eae4; border-color: #ecd4ca; color: #8f4030; }
  .model-test-widget[data-test-state="bad"] .model-test-detail { color: #86594d; }
  .model-test-track { opacity: .2; }
  .model-test-spinner { animation: model-test-spin .9s linear infinite; }
  @container model-test (max-width: 150px) {
    .model-test-result { flex-basis: 100%; }
    .model-test-detail { padding-left: 0; white-space: normal; }
    .model-test-widget .model-test-action { margin-left: auto; }
    .model-test-widget[data-test-state="idle"] .model-test-action { margin-left: 0; flex-wrap: wrap; gap: 5px; padding: 7px 8px; }
  }
  @keyframes model-test-spin { to { transform: rotate(360deg); } }
  .log-cost.log-cost-pending { color: var(--warn); background: var(--warn-tint); font-size: 12px; font-weight: 600; }

  /* ---- 模型价格与筛选 ---- */
  #adminRows .key-name-cell { min-width: 244px; max-width: 300px; white-space: normal; }
  .key-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
  .key-display-name { max-width: 280px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
  .key-access-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 280px; }
  #adminCard .key-access-tag { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; min-height: 28px; height: 28px; margin: 0; padding: 3px 9px; border: 1px solid transparent; border-radius: 7px; box-shadow: none; font: 500 11px/1.5 var(--sans); text-align: left; white-space: nowrap; vertical-align: middle; }
  #adminCard .key-access-tag.all { color: #28573e; background: #e2ecda; }
  #adminCard .key-access-tag.shared { color: #416857; background: #eaf0e5; }
  #adminCard .key-access-tag.exclusive { color: #6e528e; background: #ede8f5; }
  #adminCard .key-access-tag.models { color: #806439; background: #f1eadb; }
  #adminCard .key-access-tag.invalid { color: var(--bad); background: var(--bad-tint); }
  .key-access-icon, .key-access-edit { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
  .key-access-edit { width: 11px; height: 11px; margin-left: 2px; opacity: .65; }
  .key-access-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  #adminCard .key-binding-trigger { cursor: pointer; transition: border-color .15s ease, filter .15s ease; }
  #adminCard .key-binding-trigger:hover:not(:disabled) { border-color: currentColor; filter: brightness(.98); box-shadow: none; }
  #adminCard .key-binding-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  #adminCard .key-binding-trigger:hover .key-access-edit, #adminCard .key-binding-trigger:focus-visible .key-access-edit { opacity: 1; }
  @media (max-width: 700px) {
    #adminCard .key-access-tag { min-height: 36px; height: 36px; }
  }
  @media (max-width: 640px) {
    #adminCard .key-access-tag { min-height: 44px; height: 44px; }
  }
  @media (prefers-reduced-motion: reduce) {
    #adminCard .key-binding-trigger { transition: none; }
  }
  .model-heading { flex-wrap: wrap; }
  .model-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 14px 0 4px; }
  .model-search { flex: 1 1 220px; }
  .model-family { flex: 0 1 160px; }
  .model-tools label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 5px; }
  .model-tools input, .model-tools select { width: 100%; min-width: 0; min-height: 44px; }
  #modelCount { font-size: 12.5px; margin-left: auto; padding-bottom: 11px; }
  .model-peak-note { padding: 10px 14px; border: 1px solid rgba(95, 124, 82, 0.35); background: var(--sage); border-radius: 10px; color: var(--ink); margin: 6px 0 10px; }
  .model-table { table-layout: fixed; }
  .model-table th:first-child { width: 27%; }
  .model-table th.num { width: 10%; }
  .model-table th:nth-child(5) { width: 19%; }
  .model-table th:last-child { width: 24%; }
  .model-table td { white-space: normal; }
  .model-id { overflow-wrap: anywhere; }
  .model-table .num, .model-table .image-price { text-align: left; font-variant-numeric: tabular-nums; }
  .model-table button { min-height: 34px; }
  .model-loading { padding: 12px 0; }
  .mobile-price-label { display: none; }
  .price-rule-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
  .model-table .price-details-trigger { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; padding: 5px 0; margin-top: 3px; color: var(--accent); background: transparent; border: 0; border-radius: 4px; box-shadow: none; font-size: 12px; font-weight: 500; text-align: left; }
  .model-table .price-details-trigger:hover { color: var(--ink-deep); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
  .price-details-trigger svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }
  .price-details-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .image-token-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }

  /* Price details stay above the table, including inside the overview drawer. */
  html.price-dialog-open { overflow: hidden; }
  .price-dialog { width: min(720px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; box-shadow: 0 24px 90px rgba(15, 38, 29, .28); text-align: left; }
  .price-dialog[open] { display: flex; flex-direction: column; }
  .price-dialog::backdrop { background: rgba(18, 37, 31, .38); backdrop-filter: blur(4px); }
  .price-dialog-heading { display: flex; flex-shrink: 0; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 25px 28px 20px; border-bottom: 1px solid var(--hairline); }
  .price-dialog-heading > div { min-width: 0; }
  .price-dialog-label { color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: .08em; margin-bottom: 9px; }
  .price-dialog-heading h2 { font: 600 22px/1.45 'SFMono-Regular', ui-monospace, Consolas, monospace; letter-spacing: -.04em; overflow-wrap: anywhere; text-wrap: initial; }
  .price-dialog-heading h2:focus { outline: none; }
  .price-dialog-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
  .price-dialog .price-dialog-close { display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; flex-shrink: 0; padding: 10px; color: var(--ink); background: transparent; border: 1px solid var(--hairline); border-radius: 50%; box-shadow: none; }
  .price-dialog .price-dialog-close:hover { background: var(--surface-2); }
  .price-dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
  .price-dialog-close:focus-visible, .price-extra-notes summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .price-dialog-unit { flex-shrink: 0; padding: 18px 28px 12px; font-size: 12px; color: var(--muted); }
  .price-dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 26px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
  .price-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .price-metrics-single { grid-template-columns: 1fr; }
  .price-metric { min-width: 0; padding: 17px 18px 15px; background: #f0f2e9; border: 1px solid rgba(32, 60, 54, .09); border-radius: 12px; }
  .price-metric dt { color: var(--muted); font-size: 12px; }
  .price-metric dd { margin: 8px 0 0; font: 650 26px/1.3 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
  .price-metric p { margin-top: 9px; color: var(--muted); font-size: 11px; }
  .price-metric-accent { color: var(--cream); background: var(--ink); border-color: var(--ink); }
  .price-metric-accent dt, .price-metric-accent p { color: #e0e8d9; }
  .price-summary-note { margin-top: 13px; color: var(--muted); font-size: 12px; }
  .price-section { margin-top: 23px; }
  .price-section h3 { margin-bottom: 10px; font: 650 13px/1.5 var(--sans); }
  .price-section-hint { color: var(--muted); font-size: 12px; margin: -2px 0 12px; }
  .price-extra-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
  .price-extra-rates > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
  .price-extra-rates dt { color: var(--muted); font-size: 12px; }
  .price-extra-rates dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
  .price-band { padding: 15px 17px; border: 1px solid var(--hairline); border-radius: 10px; }
  .price-band + .price-band { margin-top: 10px; }
  .price-band-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
  .price-band h4 { font: 600 12px/1.6 var(--sans); }
  .price-current { flex-shrink: 0; color: var(--accent); background: var(--sage); border-radius: 20px; padding: 2px 8px; font-size: 10px; }
  .price-band-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .price-band-values dt { color: var(--muted); font-size: 11px; }
  .price-band-values dd { margin-top: 3px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .price-band .price-extra-rates { margin-top: 12px; }
  .price-policy-note { margin-top: 18px; padding: 14px 16px; background: #f4ecd9; border-left: 3px solid #b89a5a; border-radius: 0 9px 9px 0; font-size: 12px; color: #5e4e31; }
  .price-policy-note strong { display: block; margin-bottom: 5px; font-weight: 650; }
  .price-rule-list { padding-left: 17px; color: var(--muted); font-size: 12px; }
  .price-rule-list li + li { margin-top: 6px; }
  .price-extra-notes { margin-top: 21px; border-top: 1px solid var(--hairline); }
  .price-extra-notes summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 11px 0 0; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 550; list-style: none; }
  .price-extra-notes summary::-webkit-details-marker { display: none; }
  .price-extra-notes summary span { font-size: 17px; font-weight: 400; }
  .price-extra-notes[open] summary span { transform: rotate(45deg); }
  .price-extra-notes ul { padding: 12px 0 0 17px; color: var(--muted); font-size: 12px; }
  .price-extra-notes li + li { margin-top: 10px; }
  @media (max-width: 600px) {
    .price-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
    .price-dialog-heading { padding: 20px 18px 16px; gap: 10px; }
    .price-dialog-heading h2 { font-size: 18px; }
    .price-dialog .price-dialog-close { width: 44px; min-width: 44px; height: 44px; }
    .price-dialog-unit { padding: 15px 18px 10px; }
    .price-dialog-body { padding: 0 18px 22px; }
    .price-metrics { gap: 8px; }
    .price-metric { padding: 13px 10px; }
    .price-metric dd { font-size: 20px; letter-spacing: -.05em; }
    .price-metric p { font-size: 10px; }
    .price-extra-rates { grid-template-columns: 1fr; }
  }
  @media (max-width: 370px) {
    .price-metrics { grid-template-columns: 1fr; }
    .price-metric { display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; gap: 4px 12px; }
    .price-metric dd { margin: 0; }
    .price-metric p { grid-column: 1 / -1; margin: 0; }
  }

  /* ---- 骨架屏 ---- */
  .skel { border-radius: 8px; background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface) 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
  .skel + .skel { margin-top: 10px; }
  @keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

  /* ---- 页脚:与首页页脚同一行文 ---- */
  footer { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 64px; padding: 22px 0 28px; border-top: 1px solid var(--hairline); font-size: 11px; color: var(--muted); letter-spacing: .09em; }
  footer > span:last-child { font-size: 9.5px; letter-spacing: .13em; }
  footer > span:last-child > span { margin-left: 14px; font-size: 16px; }

  @media (max-width: 800px) {
    .console-band { padding: 20px 24px 68px; }
    .console-links { gap: 14px; }
    .console-masthead { padding-top: 34px; }
    .console-masthead h1 { font-size: 30px; }
    .issue .issue-field { grid-column: span 6; }
    .issue .issue-actions { grid-column: 1 / -1; }
    .issue-key .issue-actions button { width: auto; min-width: 140px; }
  }
  @media (max-width: 640px) {
    #consolePage > :not(.console-band) { width: min(var(--width), 100% - 32px); }
    .console-band { padding: 16px 16px 64px; }
    header.console-nav { padding: 9px 11px 9px 14px; border-radius: 22px; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
    .console-brand { font-size: 21px; gap: 8px; }
    .console-brand .home-symbol { width: 34px; height: 34px; }
    .console-brand .home-brand-sub { font-size: 7px; }
    .hstat { margin-left: auto; }
    .console-service { min-height: 44px; padding: 0 14px; }
    .console-links { order: 3; flex-basis: 100%; justify-content: center; border-top: 1px solid #dedfd3; margin-top: 5px; gap: 4px 22px; }
    .console-links a { font-size: 12px; }
    .console-masthead { padding: 26px 4px 0; }
    .console-masthead h1 { font-size: 27px; }
    .console-masthead p { font-size: 12px; }
    .console-account { width: 100%; justify-content: space-between; }
    #who { max-width: calc(100% - 76px); font-size: 13px; }
    .login-box { padding: 28px 22px 26px; border-radius: 16px; }
    .login-title { font-size: 28px; }
    #consolePage input, #consolePage select { font-size: 16px; }
    .panel { padding: 22px 20px 24px; border-radius: 16px; }
    .bal-big { font-size: 32px; }
    .bal-meta { gap: 18px; }
    .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .gauge { gap: 8px; }
    .ring { width: 44px; height: 44px; }
    .gtxt .gl, .gtxt .gv { font-size: 12px; }
    main > section:not(.hidden) ~ section:not(.hidden) { margin-top: 40px; }
    .sec-head h2 { font-size: 20px; }
    .model-heading h2 { flex: 1 0 100%; }
    .model-heading .spacer { display: none; }
    #consolePage button, #consolePage [role="button"] { min-height: 44px; }
    #consolePage button.mini { min-width: 44px; }
    .issue .issue-wide, .issue .issue-url { grid-column: 1 / -1; }
    .issue { gap: 14px 12px; }
    .issue-actions button { flex: 1; }
    #adminCard { padding-top: 24px; }
    .model-search { flex-basis: 100%; }
    .model-family { flex: 1 1 150px; }
    .model-tools input, .model-tools select { font-size: 16px; }
    #modelCount { flex: 1 1 120px; text-align: right; }
    .model-table, .model-table tbody { display: block; }
    .model-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .model-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
    .model-table td { display: block; padding: 0; border: 0; min-width: 0; }
    .model-table .model-id { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
    .model-table .token-price, .model-table .image-price { padding: 8px 10px; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; }
    .mobile-price-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
    .model-tier, .model-availability, .model-table td[colspan] { grid-column: 1 / -1; }
    .model-availability { display: flex !important; align-items: center; gap: 10px; }
    .model-test-widget { max-width: none; min-height: 64px; }
    .model-test-widget .model-test-action, .model-test-widget[data-test-state="idle"] .model-test-action { min-height: 44px; min-width: 44px; padding: 10px 12px; }
    .model-tier { display: flex !important; align-items: center; gap: 12px; flex-wrap: wrap; }
    .model-table .price-details-trigger { min-height: 44px; margin-top: 0; }
    footer { justify-content: center; text-align: center; font-size: 10px; }
    footer > span:last-child { display: none; }
  }
  @media (max-width: 360px) {
    .gauges { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }

/* 渠道页的重试与切换统计 */
.routing-stats { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.routing-stats-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.routing-stats-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.routing-stats-head select { min-height: 36px; }
.routing-metrics { flex-wrap: wrap; justify-content: flex-start; gap: 18px 32px; margin: 14px 0 12px; }
