/* 盯辦 DingBot 試用版樣式 v2：淺色工作區、高密度清單、狀態色彩 */
:root {
  color-scheme: light;
  --app: #f7f7f9;
  --content: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f6f6f9;
  --hover: #f3f3f7;
  --ink: #1e2230;
  --ink-2: #434a5b;
  --muted: #747b8d;
  --line: #ebebf0;
  --line-2: #dcdde5;
  --brand: #1f4e79;
  --brand-2: #173d61;
  --brand-ink: #163a5c;
  --brand-soft: #eaf0f7;
  --brand-ring: rgba(31, 78, 121, .2);
  --accent: #e8890c;
  --danger: #d9363e;
  --danger-soft: #fdeeee;
  --ok: #17855a;
  --ok-soft: #e6f5ee;
  --info: #2f6fe0;
  --info-soft: #ebf2ff;
  --warn: #a96300;
  --warn-soft: #fff4e0;
  --sim: #6d48c7;
  --sim-soft: #f4effd;
  --st-todo: #8b93a1;
  --st-doing: #3e7bfa;
  --st-review: #e8890c;
  --st-done: #1f9d63;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(25, 25, 50, .05);
  --shadow: 0 2px 8px rgba(25, 25, 50, .06), 0 1px 2px rgba(25, 25, 50, .04);
  --shadow-lg: 0 18px 48px rgba(25, 25, 60, .18);
  --font: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--app); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.005em; }
h1 { font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 17px; font-weight: 700; } h3 { font-size: 15px; font-weight: 650; } h4 { font-size: 13.5px; font-weight: 650; }
p { margin: 0 0 8px; }
.ico { flex: none; vertical-align: -2px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.mobile-only { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 外框 ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: #f8f8fa; border-right: 1px solid var(--line); padding: 12px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ws { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ws-text { min-width: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #f4a62a, #e8740c); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; flex: none; box-shadow: 0 2px 6px rgba(232, 116, 12, .3); }
.brand-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.ws-company, .brand-tag { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-sec { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 12px 10px 4px; letter-spacing: .02em; }
.nav-item { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 10px; border-radius: 7px; color: var(--ink-2); font-size: 14px; cursor: pointer; text-decoration: none !important; }
.nav-item:hover { background: #eeeef3; color: var(--ink); }
.nav-item .nav-ico { color: #8a90a0; }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item.active .nav-ico { color: var(--brand); }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; font-weight: 700; }
.space-ico { width: 20px; height: 20px; border-radius: 6px; background: var(--c, var(--st-todo)); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.space-ico.lg { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 4px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dotsim { width: 7px; height: 7px; border-radius: 50%; background: var(--sim); display: inline-block; }
.main { min-width: 0; display: flex; flex-direction: column; background: var(--content); }
.topbar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); min-width: 0; white-space: nowrap; }
.crumbs b { color: var(--ink); font-weight: 600; }
.topsearch { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid transparent; border-radius: 8px; height: 34px; padding: 0 10px; width: 280px; color: var(--muted); margin-left: 8px; }
.topsearch:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-ring); }
.topsearch input { border: none; background: transparent; outline: none; flex: 1; min-width: 0; color: var(--ink); font-size: 13.5px; }
.inbox-btn { position: relative; display: inline-grid; place-items: center; }
.dot-count { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0 4px; border: 2px solid #fff; box-sizing: content-box; }
.icon-btn.menu-btn { display: none; }
.trial-strip { background: #f7f5ff; color: #4a3d9e; font-size: 12.5px; padding: 6px 22px; border-bottom: 1px solid #ebe5fb; display: flex; gap: 8px; align-items: center; }
.trial-strip .short { display: none; }
.pill-sim { background: #fff; border: 1px solid #ddd3f6; color: var(--sim); font-weight: 700; border-radius: 999px; padding: 0 8px; font-size: 11.5px; line-height: 18px; flex: none; }
.content { padding: 22px 28px 56px; max-width: 1340px; width: 100%; margin: 0 auto; }
.userchip { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.userchip .meta { display: flex; flex-direction: column; line-height: 1.25; }

/* ---------- 共用 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { flex: 1 1 auto; white-space: nowrap; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-top { margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb6 { margin-bottom: 6px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.gap4 { gap: 4px; } .grow { flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 0 13px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 550; white-space: nowrap; min-height: 34px; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--hover); border-color: #cfd1db; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 1px 2px rgba(22, 58, 92, .28); }
.btn.primary:hover { background: var(--brand-2); }
.btn.cta { background: #f2a54a; color: #1b2a3f; border-color: #f2a54a; font-weight: 700; box-shadow: 0 1px 2px rgba(180, 100, 20, .25); }
.btn.cta:hover { background: #e8963a; border-color: #e8963a; }
.btn.danger { color: var(--danger); border-color: #f0c5c7; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ok:hover { background: #126f4b; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { padding: 0 9px; font-size: 13px; min-height: 30px; }
.btn.block { width: 100%; min-height: 40px; }
.icon-btn { border: none; background: transparent; cursor: pointer; padding: 6px; border-radius: 7px; line-height: 0; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.icon-btn.sm { padding: 3px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; line-height: 20px; }
.b-gray { background: #f0f1f4; color: #545c6e; }
.b-blue { background: var(--info-soft); color: #2459c2; }
.b-amber { background: var(--warn-soft); color: var(--warn); }
.b-green { background: var(--ok-soft); color: var(--ok); }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-orange { background: #fff0e2; color: #b4530b; }
.b-sim { background: var(--sim-soft); color: var(--sim); border-color: #e4d9f8; }
.b-off { background: #fff; color: #8a6a1d; border: 1px dashed #d6b768; }
.b-outline { background: #fff; color: var(--ink-2); border-color: var(--line-2); }

/* 狀態 */
.s-todo { --sc: var(--st-todo); } .s-doing { --sc: var(--st-doing); } .s-review { --sc: var(--st-review); } .s-done { --sc: var(--st-done); }
.badge.status { background: color-mix(in srgb, var(--sc) 12%, white); color: color-mix(in srgb, var(--sc) 82%, black); }
.badge.status.solid { background: var(--sc); color: #fff; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.badge.status:not(.solid) .sdot { background: var(--sc); }
.sring { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--sc); flex: none; display: inline-grid; place-items: center; font-size: 9px; font-weight: 900; color: #fff; line-height: 1; }
.sring.s-todo { border-color: #b7bcc7; }
.sring.s-doing { background: conic-gradient(var(--sc) 0 50%, transparent 0); }
.sring.s-review { background: conic-gradient(var(--sc) 0 75%, transparent 0); }
.sring.s-done { background: var(--sc); }
/* 優先 */
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.prio.p-P0 .ico { color: #e5484d; } .prio.p-P1 .ico { color: #f0a30a; } .prio.p-P2 .ico { color: #3e7bfa; } .prio.p-P3 .ico { color: #a7adb9; }
.prio.p-P0 { color: #c12e33; font-weight: 600; }
/* 門市標籤、人員 */
.stag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 0 8px; border-radius: 6px; line-height: 20px; white-space: nowrap; background: color-mix(in srgb, var(--c) 11%, white); color: color-mix(in srgb, var(--c) 78%, black); }
.stag::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.person { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; white-space: nowrap; min-width: 0; }
.person + .person { margin-left: 10px; }
.av-empty { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed #c3c7d1; color: #a3a9b6; display: inline-grid; place-items: center; flex: none; }
.due { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.overdue { color: var(--danger) !important; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; background: #fff; min-height: 36px; font-size: 14px; transition: border-color .12s, box-shadow .12s; }
.input:hover { border-color: #c9ccd7; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.btn:focus-visible, .nav-item:focus-visible, .task-row:focus-visible, .vtab:focus-visible, .icon-btn:focus-visible, .stat:focus-visible, .store-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.input:disabled { background: var(--surface-2); color: var(--ink-2); }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.55; }
.input.missing { border-color: #eaa94b; background: #fffaf1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 13px; background: #fff; }
.check:hover { border-color: #c9ccd7; }
.check.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.check input { margin: 0; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }

.tabs, .viewbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 9px 12px; border: none; background: none; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.viewbar { margin: 14px 0 0; gap: 18px; }
.vtab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 2px; border: none; background: none; cursor: pointer; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13.5px; text-decoration: none !important; white-space: nowrap; }
.vtab:hover { color: var(--ink); }
.vtab.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 650; }
.vtab.on .ico { color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--brand); color: #fff; }

/* 工具列（篩選） */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 16px; }
.tfilters { display: contents; }
.tsearch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 8px; height: 32px; padding: 0 10px; background: #fff; color: var(--muted); }
.tsearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.tsearch input { border: none; outline: none; background: transparent; width: 150px; font-size: 13px; color: var(--ink); }
.pill-select { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13px; color: var(--muted); cursor: pointer; }
.pill-select:hover { border-color: #c9ccd7; }
.pill-select select, .pill-select input { border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink); outline: none; padding: 4px 2px; cursor: pointer; max-width: 150px; }
.pill-select input[type=date] { width: 128px; font-weight: 500; }
.pill-select.on { border-color: #bfcfe2; background: var(--brand-soft); color: var(--brand-ink); }
.pill-toggle { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.pill-toggle:hover { border-color: #c9ccd7; }
.pill-toggle.on.red { border-color: #f2b9bb; background: var(--danger-soft); color: var(--danger); font-weight: 650; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 130px; flex: 1 1 140px; max-width: 220px; }

.notice { border-radius: 9px; padding: 10px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.notice.sim { background: var(--sim-soft); color: #4b2f86; border: 1px solid #e6dcf8; }
.notice.warn { background: var(--warn-soft); color: #6f4300; border: 1px solid #f3dfb6; }
.notice.info { background: var(--info-soft); color: #1d4b8f; border: 1px solid #d4e1f8; }
.notice.danger { background: var(--danger-soft); color: #8d2323; border: 1px solid #f3cdcd; }
.notice.ok { background: var(--ok-soft); color: #105c3f; border: 1px solid #c7e7d8; }

.state { padding: 38px 16px; text-align: center; color: var(--muted); }
.state .ico { font-size: 26px; margin-bottom: 6px; }
.state h4 { color: var(--ink-2); margin-bottom: 4px; }
.spinner { width: 22px; height: 22px; border: 3px solid #d7e2ee; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #efeff4, #f7f7fa, #efeff4); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- 儀表板 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s, transform .12s; }
.stat:hover { border-color: #c4d3e5; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; font-weight: 550; }
.stat .value { font-size: 27px; font-weight: 750; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat.red .value { color: var(--danger); } .stat.amber .value { color: var(--warn); }
.wico { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; }
.w-red { background: #fdeceb; color: #d13b40; } .w-amber { background: #fff2dd; color: #b26a00; } .w-blue { background: #eaf1ff; color: #2f63d6; }
.w-green { background: #e5f5ee; color: #16804f; } .w-violet { background: var(--brand-soft); color: var(--brand); } .w-gray { background: #f0f1f4; color: #5d6475; }
.widget .card-head h3 { flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.store-rows { display: flex; flex-direction: column; }
.store-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 190px; gap: 16px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.store-row:last-child { border-bottom: none; }
.store-row.click { cursor: pointer; }
.store-row.click:hover { background: #f5f8fc; }
.sr-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.stack-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: #f0f1f4; gap: 2px; }
.stack-bar > span { background: var(--sc); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; min-width: 22px; }
.stack-bar .empty-bar { background: transparent; color: var(--muted); font-weight: 500; justify-items: start; padding-left: 8px; }
.sr-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.sr-meta .pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 10px; border-radius: 3px; display: inline-block; background: var(--sc, #ccc); }
.progress { height: 8px; background: #eceef4; border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--ok); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafafb; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td, .tbl tbody tr:hover td { background: #fbfbfe; }
.tbl-wrap { overflow-x: auto; }

/* ---------- 任務清單（分組） ---------- */
.groups { display: flex; flex-direction: column; gap: 20px; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; }
.gpill { display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; background: var(--c, var(--st-todo)); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 22px; }
.group-head .badge.status.solid { line-height: 22px; font-size: 12.5px; padding: 0 10px; }
.gcount { color: var(--muted); font-size: 13px; font-weight: 600; }
.gadd { opacity: 0; transition: opacity .12s; }
.group-head:hover .gadd, .gadd:focus-visible { opacity: 1; }
.task-list { display: flex; flex-direction: column; }
.tgroup .task-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.task-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 140px 104px 110px; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.task-row:hover { background: #f5f8fc; }
.task-row:last-child { border-bottom: none; }
.task-row.head { cursor: default; font-size: 12px; color: var(--muted); font-weight: 600; background: #fafafb; padding-top: 7px; padding-bottom: 7px; }
.task-row.head:hover { background: #fafafb; }
.task-row.mini { grid-template-columns: minmax(0, 1fr) auto; }
.mini-right { display: flex; gap: 12px; align-items: center; justify-content: flex-end; font-size: 13px; }
.tname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-title { font-weight: 550; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tid { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ttext { color: var(--ink); }
.task-row.is-done .ttext { color: var(--muted); }
.task-sub { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
.task-sub > span { display: inline-flex; align-items: center; gap: 4px; }
.cell-label { display: none; }
.add-row { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 8px 14px 8px 39px; color: var(--muted); background: transparent; border: none; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.add-row:hover { color: var(--brand); background: #f5f8fc; }

/* 看板 */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: #f3f3f6; border-radius: 12px; padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--sc, var(--st-todo)); }
.col-todo { --sc: var(--st-todo); } .col-doing { --sc: var(--st-doing); } .col-review { --sc: var(--st-review); } .col-done { --sc: var(--st-done); }
.col.drop { outline: 2px dashed var(--brand); background: var(--brand-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 4px; }
.col-head .n { color: var(--muted); font-weight: 650; font-size: 13px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow .12s, border-color .12s, transform .12s; }
.kcard:hover { box-shadow: 0 6px 18px rgba(30, 30, 70, .09); border-color: var(--line-2); }
.kcard:active { cursor: grabbing; }
.kcard .t { font-weight: 600; font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.kcard .m { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.kcard .mselect { display: none; margin-top: 8px; }
.kcard .mselect select { min-height: 30px; padding: 3px 6px; font-size: 12.5px; }
.col-empty { border: 1.5px dashed #d8d9e2; border-radius: 9px; padding: 16px 10px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 抽屜與彈窗 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(18, 18, 40, .34); z-index: 50; display: flex; backdrop-filter: blur(1.5px); }
.drawer { margin-left: auto; width: min(680px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer-head, .modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2, .modal-head h2 { flex: 1; font-size: 15px; color: var(--muted); font-weight: 600; }
.modal-head h2 { color: var(--ink); font-size: 16px; }
.drawer-body { padding: 18px 22px 44px; overflow-y: auto; flex: 1; }
.drawer-title { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.drawer-title h2 { font-size: 21px; color: var(--ink); }
.drawer-title .sring { width: 18px; height: 18px; }
.props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; padding: 6px 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; min-height: 36px; gap: 8px; }
.prop.wide { grid-column: 1 / -1; }
.pk { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.pv { font-size: 13.5px; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.modal { margin: auto; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 40px); background: var(--surface); border-radius: 14px; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(820px, calc(100% - 32px)); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; background: #fcfcfd; border-radius: 0 0 14px 14px; }
.section-title { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv > dt { color: var(--muted); }
.kv > dd { margin: 0; }
.quote { border-left: 3px solid var(--accent); background: #fff8ec; padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; white-space: pre-wrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #abc0d8; }
.timeline .who { font-weight: 650; }
.subtask { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.subtask input { accent-color: var(--brand); }
.subtask.done span { text-decoration: line-through; color: var(--muted); }

.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100% - 36px)); }
.toast { background: #22253a; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); white-space: pre-wrap; }
.toast.err { background: #a02a2a; } .toast.ok { background: #136a49; }

/* 候選任務卡 */
.cand { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.cand-head { display: flex; gap: 8px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cand-body { padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.cand-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); background: #fbfbfd; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.evidence { font-size: 12px; color: var(--muted); }
.evidence.warn { color: var(--warn); font-weight: 600; }

.tbl td .row b { white-space: nowrap; }
.invoice-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.invoice-sum > div { display: flex; gap: 24px; justify-content: flex-end; min-width: 240px; }
.invoice-sum > div span { color: var(--muted); flex: 1; text-align: right; }
.invoice-sum b { font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.invoice-sum .total { font-size: 15px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.invoice-sum .total span { color: var(--ink); font-weight: 600; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.plan-price b { font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); font-size: 13px; margin-left: 4px; }
.plan-feats { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; flex: 1; }
.plan-feats li { display: flex; align-items: center; gap: 7px; }
.plan-feats li.on .ico, .plan-feats li.core .ico { color: var(--ok); }
.plan-feats li.off { color: #a3a9b6; }
.nav-item.locked .nav-label { color: #8f95a3; }
.nav-lock { margin-left: auto; color: #a3a9b6; display: inline-flex; }
.locked-page { max-width: 560px; margin: 40px auto; padding: 32px 28px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.lock-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }

.hint-line { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.more { margin-top: 4px; }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 0; }
details.more > summary:hover { color: var(--ink); }

.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.sso { justify-content: center; gap: 10px; min-height: 40px; font-weight: 600; color: var(--ink); }
.sso-g, .sso-line { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.sso-g { background: #4c8bf5; }
.sso-line { background: #2bb24c; }
.login-code { font-size: 26px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; padding: 10px 14px; border: 1.5px dashed #bfcfe2; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); text-align: center; }
.sim-line { border: 1px dashed #ddd0f3; background: #fcfaff; border-radius: 12px; padding: 12px; }
.mail-item { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; align-items: flex-start; }
.sec-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sec-row:last-child { border-bottom: none; }
.sec-row .row b { font-size: 14px; }
.bind-box { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.totp-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.totp-box img { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 8px; border-radius: 8px; text-align: center; font-size: 14px; }
.userlink { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none !important; border-radius: 8px; padding: 2px 6px 2px 2px; }
.userlink:hover { background: var(--hover); }

/* 行事曆 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-h { padding: 7px 8px; font-size: 12px; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafafb; }
.cal-h:nth-child(7n) { border-right: none; }
.cal-d { min-height: 110px; padding: 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.cal-d:nth-child(7n) { border-right: none; }
.cal-d:hover { background: #f8f9fc; }
.cal-d.other { background: #fafafb; color: #a7acb8; }
.cal-d.today .num { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal-d .num { font-size: 12.5px; font-weight: 650; align-self: flex-start; }
.cal-wrap { overflow: hidden; }
.chip { font-size: 12px; border-radius: 5px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; border: none; text-align: left; cursor: pointer; width: 100%; line-height: 1.6; }
.chip.event { background: #ebf2ff; color: #2350a8; border-left: 3px solid #3e7bfa; }
.chip.meeting { background: #e7f6ef; color: #116645; border-left: 3px solid #1f9d63; }
.chip.google { background: #f0f1f4; color: #4d566a; border-left: 3px solid #8a94a8; }
.chip.busy { background: repeating-linear-gradient(45deg, #f2f2f5, #f2f2f5 4px, #e8e9ee 4px, #e8e9ee 8px); color: #646c7d; }
.chip.deadline { background: #fff; color: var(--warn); border: 1px dashed #e6b866; }
.chip.deadline.od { color: var(--danger); border-color: #eba7a9; }
.chip.deadline.done { color: var(--muted); text-decoration: line-through; border-color: var(--line-2); }
.agenda { display: none; }
.agenda-day { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.agenda-day h4 { margin-bottom: 6px; }

/* 模擬測試台 */
.sim-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; }
.sim-thread { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: 62vh; overflow-y: auto; background: #f7f7fa; }
.ev-in, .ev-out { border-radius: 12px; padding: 9px 12px; max-width: 86%; font-size: 13.5px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.ev-in { align-self: flex-start; }
.ev-out { align-self: flex-end; border-color: #c8d6e6; background: #f5f8fc; }
.ev-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.ev-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ev-result { font-size: 11.5px; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 4px; }
.sim-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; flex-wrap: wrap; }
.preset { font-size: 12.5px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; text-align: left; }
.preset:hover { border-color: #bfcfe2; background: var(--brand-soft); }

/* 登入 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: #fff; }
.login-side { background: linear-gradient(160deg, #12233a 0%, #1a3656 55%, #22496f 100%); color: #dde6f1; padding: 52px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.login-side h1 { color: #fff; font-size: 46px; display: block; line-height: 1.2; margin: 14px 0 0; letter-spacing: .5px; }
.login-tagline { color: #c0cfe2; font-size: 17px; line-height: 1.75; }
.login-side .brand-name { color: #fff; }
.login-side .brand-tag { color: #b9c9dd; }
.brand { display: flex; align-items: center; gap: 10px; }
.login-main { padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.login-box { width: min(440px, 100%); }
.demo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 280px; overflow-y: auto; }
.demo-acc { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 12.5px; }
.demo-acc:hover { border-color: #bfcfe2; background: var(--brand-soft); }
.demo-acc b { display: block; font-size: 13.5px; }

.cap-table td:first-child { width: 170px; }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.bar { height: 12px; background: #eceef4; border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 11px; border-radius: 999px; background: #f0f1f4; color: var(--muted); font-weight: 550; }
.step.on { background: var(--brand); color: #fff; }
.step.done { background: var(--ok-soft); color: var(--ok); }

/* ---------- 平板／手機 ---------- */
/* 方案與價格（公開頁面）與登入頁頁尾 */
.site-foot { width: min(440px, 100%); margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.site-foot a { color: var(--brand); font-weight: 600; }
.pricing { min-height: 100vh; background: var(--content); }
.pricing-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.pricing-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.pricing-brand .brand-mark { width: 38px; height: 38px; }
.pricing-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.pricing-brand small { color: var(--muted); font-size: 12px; }
.pricing-main { width: min(1040px, 100%); margin: 0 auto; padding: 32px 24px 56px; }
.pricing-main h1 { font-size: 30px; margin: 0 0 8px; }
.pricing-lead { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; margin: 0 0 20px; max-width: 46em; }
.pricing-plans { padding: 0; margin-bottom: 28px; }
.pricing-plans h2 { font-size: 18px; margin: 0; }
.pricing-block { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.pricing-block h2 { font-size: 17px; margin: 0 0 10px; }
.pricing-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.pricing-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14.5px; }
.pricing-dl dt { color: var(--muted); }
.pricing-dl dd { margin: 0; overflow-wrap: anywhere; }
.pricing-dl a { color: var(--brand); }

@media (max-width: 1100px) {
  .topsearch { width: 200px; }
  .task-row { grid-template-columns: minmax(0, 1fr) 140px 130px 96px; }
  .task-row > :nth-child(5) { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .icon-btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; gap: 8px; }
  .crumb-ws, .crumbs > .ico:first-of-type { display: none; }
  .trial-strip { padding: 6px 16px; }
  .content { padding: 16px 16px 44px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .cand-body { grid-template-columns: 1fr; }
  .sim-layout { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 28px 20px; }
  .login-side h1 { font-size: 34px; margin-top: 6px; }
  .login-tagline { font-size: 15px; }
  .userchip .meta { display: none; }
  .store-row { grid-template-columns: 130px minmax(0, 1fr); }
  .sr-meta { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  h1 { font-size: 19px; }
  .topsearch { display: none; }
  .userchip .btn { padding: 0 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .task-row, .task-row.mini { grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 11px 14px; }
  .task-row > :first-child { grid-column: 1 / -1; }
  .task-row > :nth-child(5) { display: block; }
  .task-row.head { display: none; }
  .task-row.mini .mini-right { grid-column: 1 / -1; justify-content: flex-start; }
  .cell-label { display: inline; color: var(--muted); font-size: 11.5px; margin-right: 4px; }
  .add-row { padding-left: 14px; }
  .gadd { opacity: 1; }
  .cal-wrap { display: none; }
  .agenda { display: block; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 9px 10px; }
  .stat .label { font-size: 12px; gap: 6px; }
  .stat .label .wico { width: 22px; height: 22px; }
  .stat .value { font-size: 21px; margin-top: 4px; }
  .mobile-only { display: inline-flex !important; }
  .filters.hide-m, .tfilters.hide-m { display: none; }
  .tfilters { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
  .tsearch { flex: 1; }
  .tsearch input { width: 100%; }
  .trial-strip .long { display: none; }
  .trial-strip .short { display: inline; }
  .filters .field { max-width: none; flex-basis: calc(50% - 8px); }
  .demo-list { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 84px 1fr; }
  .props { grid-template-columns: 1fr; }
  .tbl.responsive thead { display: none; }
  .tbl.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.responsive td { display: flex; gap: 8px; border: none; padding: 4px 12px; }
  .tbl.responsive td::before { content: attr(data-l); color: var(--muted); font-size: 12px; min-width: 76px; flex: none; }
  .ev-in, .ev-out { max-width: 96%; }
  .page-head .actions { width: 100%; }
  .kcard .mselect { display: block; }
  .board { grid-template-columns: repeat(4, minmax(240px, 82vw)); }
  .store-row { grid-template-columns: 1fr; gap: 8px; }
  .viewbar { gap: 14px; }
  .card-head .legend { flex-basis: 100%; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* 金流：付款方式、發票資訊、帳單 */
.kvl { display: grid; gap: 6px; font-size: 13.5px; }
.kvl > div { display: flex; gap: 12px; align-items: baseline; }
.kvl > div > span { color: var(--muted); width: 84px; flex: none; }
.kvl > div > b { font-weight: 600; word-break: break-all; }
.pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.paycard { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(135deg, #f5f8fc, #eaf0f7); }
.paycard .brand { font-weight: 800; color: var(--brand-ink); letter-spacing: .04em; font-size: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.test-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chip-btn { text-align: left; border: 1px dashed var(--line-2); background: #fff; border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.chip-btn span { color: var(--muted); font-size: 11.5px; }
.chip-btn:hover { border-color: var(--brand); }
.danger-text { color: #b42318; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.mbars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; padding: 8px 4px 0; }
.mbars .mbar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.mbars .mbar i { display: block; width: 100%; max-width: 42px; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.mbars .mbar b { color: var(--ink); font-size: 11.5px; font-weight: 600; }
@media (max-width: 760px) {
  .pay-grid { grid-template-columns: 1fr; }
  .test-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pricing-top { padding: 10px 16px; }
  .pricing-brand small { display: none; }
  .pricing-main { padding: 20px 16px 40px; }
  .pricing-main h1 { font-size: 24px; }
  .pricing-block { padding: 16px; }
}
@media print {
  body * { visibility: hidden; }
  .modal, .modal * { visibility: visible; }
  .modal { position: absolute; inset: 0 auto auto 0; width: 100%; box-shadow: none; border: none; }
  .modal-foot, .modal-head .icon-btn { display: none; }
}
.attn { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.attn:hover { background: #f8f9fc; }
.shell.ops .brand-mark { background: linear-gradient(135deg, #1f4e79, #173d61); }
