/* console.css — 營養食證所管理後台（admin.nutriclove.com）唯一樣式檔。
 * 2026-10-05 全面改版：依 Dean-Universe DESIGN-B（Family B）版面與空間感＝「灰紙上浮一張白紙、全站只有一滴墨水」
 * ＋Medium 式全 sans＋行內緊卡間鬆＋150ms 安靜動效；墨水換成本站橘（#CA7940）與其暖色漸層，徹底去 emoji。
 * 佈局＝紙底（paper）上：左側淺色導覽欄（248px，<1024px 收成抽屜）＋白畫布內容區（ring 1px 浮起）。
 * CSP style-src 'self' 'unsafe-inline'：不可外連字體，系統字（PingFang／Noto Sans TC）。
 * 結構：①token ②base ③殼層（sidebar／mobilebar／topbar） ④kit 元件 ⑤view 專屬 ⑥行銷成長。class 名與改版前相同，views 零改動。 */

/* ═══════════ ① 設計 token（DESIGN-B 名稱 → 本站暖色值） ═══════════ */
:root {
  --paper: #F6F3EE;        /* 紙底（zinc-50 → 暖灰紙） */
  --card: #FFFFFF;         /* 白畫布 */
  --ink: #2B2522;          /* 標題（zinc-800 暖版） */
  --body: #5A524C;         /* 內文（zinc-600） */
  --mist: #9A9087;         /* meta／時間／計數（zinc-400） */
  --line: #EDE8E0;         /* 分隔／ring（zinc-100） */
  --line-2: #DED7CC;       /* 表頭底線／引用線（zinc-200） */
  --accent: #CA7940;       /* 墨水：連結／hover／進度（teal-600 → 本站橘） */
  --accent-soft: #FBF1E6;  /* 墨水 .1 底（teal-50） */
  --accent-ring: rgba(202, 121, 64, .28);
  --seal: #A8602C;         /* CTA 實心（teal-800：與 accent 拉開兩階） */
  --seal-2: #8F4E22;       /* CTA hover */
  --seal-ink: #FFFFFF;
  --grad-seal: linear-gradient(135deg, #CA7940 0%, #A8602C 100%);
  --grad-warm: linear-gradient(180deg, #FBF6EE 0%, #FFFFFF 100%);
  --grad-nav: linear-gradient(to right, rgba(202, 121, 64, 0), rgba(202, 121, 64, .45), rgba(202, 121, 64, 0));
  --grad-mark: linear-gradient(135deg, #E0A96E 0%, #CA7940 55%, #A8602C 100%);
  /* 語義四件套（DESIGN-B §2.3；狀態色不走品牌色） */
  --ok-bg: #F0FDF4; --ok: #16A34A; --ok-ink: #166534;
  --warn-bg: #FEF3C7; --warn: #F59E0B; --warn-ink: #92400E;
  --err-bg: #FEF2F2; --err: #DC2626; --err-ink: #991B1B;
  --info-bg: #EFF6FF; --info: #3B82F6; --info-ink: #1E40AF;
  /* 圓角階梯 6/12/16/24/full；簽名陰影極輕 */
  --r-md: 6px; --r-lg: 10px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;
  --ring: 0 0 0 1px rgba(43, 37, 34, .06);
  --sh-pill: 0 10px 15px -3px rgba(43, 37, 34, .05), 0 4px 6px -4px rgba(43, 37, 34, .05), 0 0 0 1px rgba(43, 37, 34, .05);
  --sh-ios: 0 2px 8px rgba(0, 0, 0, .06);
  --t: 150ms ease-in-out;
  --side-w: 248px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Helvetica Neue", "Segoe UI", Roboto, "Microsoft JhengHei", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* 舊 token 別名（views 內嵌 style 仍引用） */
  --bg: var(--paper); --surface: var(--card); --muted: var(--mist); --accent1: var(--accent); --accent2: #94AF9E;
  --good: var(--ok-ink); --bad: var(--err-ink); --deep: #573029; --butter: #F6E7C6; --gold: #E0A41C;
  --primary: var(--seal); --primary-soft: var(--accent);
}

/* ═══════════ ② base ═══════════ */
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--paper); color: var(--body); font-family: var(--sans); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--seal); }
b, strong { color: var(--ink); font-weight: 600; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; }
.c-mobile-note { display: none; background: var(--warn-bg); color: var(--warn-ink); font-size: 12.5px; padding: 8px 16px; text-align: center; line-height: 1.6; }
@media (max-width: 1023px) { .c-mobile-note { display: block; } }
/* 線條 icon（K.icon）：1em 隨字級、currentColor 隨文字色 */
.k-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-btn .k-ico { margin-right: 6px; font-size: 1.05em; }

/* ═══════════ ③ 殼層：紙底上的淺色導覽欄 ＋ 白畫布內容區 ═══════════ */
.k-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* --- 左側導覽欄：紙底同色、右側 1px line；A／B 端只差品牌印記色 --- */
.k-side { width: var(--side-w); flex: 0 0 var(--side-w); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); color: var(--body); }
.k-side-brand { padding: 22px 18px 16px; position: relative; }
.k-side-brand::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px; background: var(--grad-nav); }
.k-side-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.k-side-title::before { content: ''; width: 30px; height: 30px; border-radius: 9px; background: var(--grad-mark); box-shadow: var(--sh-ios); flex: none; }
.k-side--b .k-side-title::before { background: linear-gradient(135deg, #8B5A47 0%, #573029 100%); }
.k-side-console { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--mist); letter-spacing: .08em; text-transform: uppercase; margin-left: auto; }
.k-side-sub { margin-top: 10px; font-size: 12px; color: var(--mist); display: flex; align-items: center; gap: 8px; padding-left: 40px; }
.c-badge { font-size: 10px; font-weight: 600; letter-spacing: .08em; background: var(--accent-soft); color: var(--seal); border: 1px solid rgba(202, 121, 64, .25); border-radius: var(--r-full); padding: 1px 7px; white-space: nowrap; }

/* --- 導覽：分組小標（sec-n 式 11px 大寫追蹤）＋項目（active＝白卡浮起＋橘字） --- */
.k-nav { flex: 1; overflow-y: auto; padding: 10px 12px 16px; }
.k-nav-group { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); padding: 18px 8px 6px; }
.k-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; margin: 2px 0; border-radius: var(--r-lg); color: var(--body); font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid transparent; transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t); }
.k-nav-item:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.k-nav-item.is-on { background: var(--card); color: var(--seal); border-color: var(--line); box-shadow: var(--sh-ios); font-weight: 600; }
.k-nav-item.is-on .k-nav-label::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 9px; vertical-align: 1px; }
.k-nav-badge { min-width: 20px; text-align: center; font-size: 11px; font-weight: 600; background: var(--accent); color: #fff; border-radius: var(--r-full); padding: 1px 6px; line-height: 1.5; }

/* --- 底部使用者塊 --- */
.k-side-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.c-who-ava { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--grad-mark); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: 0 0 auto; }
.k-side--b .c-who-ava { background: linear-gradient(135deg, #8B5A47, #573029); }
.k-side-user-meta { min-width: 0; flex: 1; }
.k-side-user-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-side-user-role { font-size: 11px; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.c-logout { background: var(--card); border: 1px solid var(--line); color: var(--body); border-radius: var(--r-full); padding: 5px 11px; font-size: 12px; cursor: pointer; transition: border-color var(--t), color var(--t); white-space: nowrap; flex: 0 0 auto; }
.c-logout:hover { border-color: var(--accent); color: var(--seal); }

/* --- 內容區＝白畫布（ring 浮起）；topbar 細線＋大標 --- */
.k-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card); box-shadow: var(--ring); }
.k-content { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 44px 72px; }
.k-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.k-title { font-weight: 600; font-size: 24px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.k-crumb { font-size: 13px; color: var(--mist); margin-top: 6px; }
.k-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.k-link { color: var(--accent); text-decoration: none; }
.k-link:hover { color: var(--seal); text-decoration: underline; }

/* --- 行動版（<1024px）：浮動頂列＋抽屜導覽＋遮罩 --- */
.k-mobilebar { display: none; position: sticky; top: 0; z-index: 40; align-items: center; gap: 10px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding: 10px 14px; }
.k-burger { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r-lg); width: 38px; height: 38px; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.k-mobilebar-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.k-scrim { display: none; }
@media (max-width: 1023px) {
  .k-mobilebar { display: flex; }
  .k-side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); background: var(--card); }
  body.nav-open .k-side { transform: none; }
  .k-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(43, 37, 34, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .k-scrim { opacity: 1; pointer-events: auto; }
  .k-main { box-shadow: none; }
  .k-content { padding: 18px 16px 56px; }
  .k-title { font-size: 20px; }
}

/* ═══════════ ④ kit 元件 ═══════════ */
/* --- 卡片（K.card）：白＋1px line＋r-16；行內緊、卡間鬆 --- */
.c-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 20px 22px; }
.c-panel + .c-panel { margin-top: 20px; }
.c-panel-title { font-weight: 600; font-size: 15px; color: var(--ink); margin: 0 0 14px; letter-spacing: -.005em; }

/* --- 數字卡（K.stat／KPI） --- */
.c-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .c-cards { grid-template-columns: repeat(5, 1fr); } }
.c-cards--2 { grid-template-columns: repeat(2, 1fr); }
.c-cards--3 { grid-template-columns: repeat(3, 1fr); }
.c-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 18px 20px; transition: border-color var(--t), box-shadow var(--t); }
.c-card:hover { border-color: var(--line-2); box-shadow: var(--sh-ios); }
.c-card-ic { font-size: 18px; color: var(--mist); line-height: 1; }
.c-card-num { font-weight: 600; font-size: 28px; color: var(--ink); line-height: 1.1; margin-top: 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.c-card-label { color: var(--mist); font-size: 12.5px; margin-top: 4px; }

/* --- 表格（K.table）：表頭 ink 600 底線 line-2；列 line；hover 紙色 --- */
.c-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--card); }
.c-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.c-table th, .c-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.c-table th { color: var(--ink); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line-2); background: var(--card); }
.c-table tbody tr { transition: background var(--t); }
.c-table tbody tr:hover { background: var(--paper); }
.c-table tbody tr:last-child td { border-bottom: none; }
.c-table td .c-wrapcell { white-space: normal; line-height: 1.5; min-width: 180px; }
.c-row-click { cursor: pointer; }
.c-detail-row td { background: var(--paper); white-space: normal; }

/* --- 徽章 pill（K.badge）：語義四件套 --- */
.c-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: var(--r-full); padding: 3px 9px; white-space: nowrap; line-height: 1.4; }
.c-tag--ok { background: var(--ok-bg); color: var(--ok-ink); }
.c-tag--pending { background: var(--accent-soft); color: var(--seal); }
.c-tag--info { background: var(--info-bg); color: var(--info-ink); }
.c-tag--bad { background: var(--err-bg); color: var(--err-ink); }
.c-tag--muted { background: var(--paper); color: var(--mist); border: 1px solid var(--line); }

/* --- 表單（K.field）＋輸入＋按鈕 --- */
.c-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .c-form-grid { grid-template-columns: 1fr; } }
.c-field { margin-bottom: 14px; }
.c-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--body); margin-bottom: 6px; }
.c-input { width: 100%; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 9px 12px; font-size: 14px; color: var(--ink); transition: box-shadow var(--t), border-color var(--t); }
.c-input::placeholder { color: var(--mist); }
.c-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
select.c-input { cursor: pointer; }
.c-input--sm { padding: 7px 10px; font-size: 13px; }
.c-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-full); padding: 9px 18px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t); text-decoration: none; line-height: 1.3; }
.c-btn--primary { background: var(--grad-seal); color: var(--seal-ink); box-shadow: var(--sh-ios); }
.c-btn--primary:hover { background: linear-gradient(135deg, #B86A33 0%, #8F4E22 100%); color: #fff; }
.c-btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.c-btn--ghost:hover { border-color: var(--accent); color: var(--seal); }
.c-btn--block { width: 100%; }
.c-btn--mini { font-size: 12.5px; padding: 6px 12px; }
.c-btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- 空狀態／提示／錯誤／callout（DESIGN-B 左線 3px） --- */
.c-empty { padding: 28px 20px; color: var(--mist); text-align: center; line-height: 1.7; font-size: 13.5px; }
.k-empty-cta { margin-top: 12px; }
.c-hint { font-size: 12.5px; color: var(--mist); line-height: 1.7; margin-top: 10px; }
.c-error { font-size: 13px; color: var(--err-ink); background: var(--err-bg); border-left: 3px solid var(--err); border-radius: var(--r-xl); padding: 10px 14px; margin-top: 10px; line-height: 1.6; }
.c-note { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r-xl); padding: 11px 14px; font-size: 13px; color: #6B4A2E; line-height: 1.7; }
.c-note--warn { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn-ink); }
.c-sub { font-size: 13px; color: var(--mist); }
.c-id { font-family: var(--mono); font-size: 12px; color: var(--mist); }

/* --- 工具列／分頁器 --- */
.c-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.c-toolbar .c-input { width: auto; }
.c-toolbar .c-search { flex: 1; min-width: 200px; }
.c-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--mist); }
.c-pager button { min-width: 36px; height: 34px; padding: 0 12px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; font-size: 13px; transition: border-color var(--t), color var(--t); }
.c-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--seal); }
.c-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* --- Toast／footer --- */
.c-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: var(--r-full); box-shadow: var(--sh-pill); opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t); z-index: 80; max-width: min(90vw, 560px); text-align: center; }
.c-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.c-footer { border-top: 1px solid var(--line); padding: 18px 20px 24px; text-align: center; font-size: 12px; color: var(--mist); }

/* ═══════════ ⑤ view 專屬 ═══════════ */
/* --- 登入閘：紙底上的浮動白卡（float-pill 配方） --- */
.c-gate { max-width: 420px; margin: 72px auto; background: rgba(255, 255, 255, .92); backdrop-filter: blur(4px); border-radius: var(--r-3xl); padding: 34px 32px 28px; box-shadow: var(--sh-pill); align-self: flex-start; }
.c-gate-ic { width: 56px; height: 56px; border-radius: var(--r-2xl); color: #fff; display: grid; place-items: center; font-size: 26px; margin: 0 auto 18px; box-shadow: var(--sh-ios); }
.c-gate-ic--a { background: var(--grad-mark); }
.c-gate-ic--b { background: linear-gradient(135deg, #8B5A47, #573029); }
.c-gate h1 { font-weight: 600; font-size: 21px; letter-spacing: -.01em; margin: 0 0 8px; color: var(--ink); text-align: center; }
.c-gate .c-gate-sub { font-size: 13.5px; color: var(--mist); line-height: 1.75; margin: 0 0 22px; text-align: center; }

/* --- 商品縮圖（a-products） --- */
.c-thumb { width: 44px; height: 44px; border-radius: var(--r-lg); object-fit: cover; background: var(--paper); border: 1px solid var(--line); display: block; }
.c-thumb--ph { display: grid; place-items: center; font-size: 18px; color: var(--mist); }

/* --- 星等（HSR；半星寬度裁切） --- */
.c-stars { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.c-stars-track { position: relative; display: inline-block; font-size: 15px; line-height: 1; color: var(--line-2); letter-spacing: 1px; }
.c-stars-fill { position: absolute; inset: 0; overflow: hidden; color: #E0A41C; white-space: nowrap; }
.c-stars-num { font-weight: 600; font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.c-stars-pending { display: inline-flex; align-items: center; border-radius: var(--r-full); background: var(--paper); border: 1px solid var(--line); color: var(--mist); font-weight: 600; font-size: 11.5px; padding: 3px 9px; white-space: nowrap; }

/* --- 長條（星等分布／管道／熱門頁） --- */
.c-bars { display: flex; flex-direction: column; gap: 9px; }
.c-bar { display: grid; grid-template-columns: 72px 1fr 48px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); }
.c-bar-label { color: var(--body); white-space: nowrap; text-align: right; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.c-bar-track { height: 8px; background: var(--paper); border-radius: var(--r-full); overflow: hidden; }
.c-bar-fill { display: block; height: 100%; border-radius: var(--r-full); background: var(--grad-seal); }
.c-bar--muted .c-bar-fill { background: var(--line-2); }
.c-bar-val { text-align: right; color: var(--mist); font-variant-numeric: tabular-nums; }

/* --- 優惠碼：位置 chips／checkbox 群／位置總覽卡 --- */
.c-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.c-chip { font-size: 11px; font-weight: 600; background: var(--info-bg); color: var(--info-ink); border-radius: var(--r-full); padding: 2px 8px; white-space: nowrap; }
.c-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.c-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.c-check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.c-place-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .c-place-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1240px) { .c-place-grid { grid-template-columns: repeat(3, 1fr); } }
.c-place-card { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--card); padding: 14px 16px; }
.c-place-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.c-place-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.c-place-item:last-child { border-bottom: none; }

/* --- 同步差異 before→after --- */
.c-diff { font-size: 12.5px; line-height: 1.7; white-space: normal; }
.c-diff b { color: var(--ink); font-weight: 600; }
.c-diff-del { color: var(--err-ink); text-decoration: line-through; word-break: break-all; }
.c-diff-add { color: var(--ok-ink); word-break: break-all; }

/* ═══════════ ⑥ 行銷成長：KPI 面板／短連結 QR／CTA 設定 ═══════════ */
.c-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(4px); box-shadow: var(--sh-pill); border-radius: var(--r-full); padding: 4px; }
.c-tab { appearance: none; border: 0; background: transparent; color: var(--body); border-radius: var(--r-full); padding: 6px 13px; font-size: 13px; cursor: pointer; transition: background var(--t), color var(--t); }
.c-tab:hover { color: var(--seal); }
.c-tab.is-on { background: var(--accent-soft); color: var(--seal); font-weight: 600; }
.c-cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1280px) { .c-cards--4 { grid-template-columns: repeat(2, 1fr); } }
/* 手機：三欄／四欄卡片收成單欄或雙欄；格子允許縮到比內容窄，不把畫布撐出視窗 */
.c-cards > * , .c-panel { min-width: 0; }
@media (max-width: 700px) { .c-cards--2, .c-cards--3 { grid-template-columns: 1fr; } .c-cards--4 { grid-template-columns: 1fr 1fr; } .c-cards--4 .c-card-num { font-size: 24px; } }
.c-kpi .c-card-label { display: flex; align-items: center; gap: 7px; }
.c-kpi .c-card-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); flex: none; }
.c-kpi--a .c-card-label::before { background: var(--ink); } .c-kpi--b .c-card-label::before { background: var(--accent); } .c-kpi--c .c-card-label::before { background: var(--info); } .c-kpi--d .c-card-label::before { background: var(--warn); }
.c-card-sub { margin-top: 6px; font-size: 12px; color: var(--mist); }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mist); margin-bottom: 8px; }
.ch-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-svg { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ylab { font-size: 11px; fill: var(--mist); text-anchor: end; }
.ch-xlab { font-size: 11px; fill: var(--mist); text-anchor: middle; }
.c-qr { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.c-qr-img { flex: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 10px; }
.c-qr-img svg { width: 220px; height: 220px; display: block; }
.c-qr-meta { flex: 1; min-width: 260px; }
tr.is-overridden td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

@media (prefers-reduced-motion: reduce) { .c-toast, .k-side, .k-scrim, .c-btn, .k-nav-item { transition: none; } }
