/* ═══════════════════════════════════════════════════════════
   VOISS Continuity OS — 淺色企業級 SaaS 主題
   介面語言：Cofactr 資料表格 / Luminovo 匯入流 / Parspec 看板 / Fluxco 比價
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e3e6ec;
  --border-2: #eef0f4;
  --txt: #16202e;
  --txt-2: #5c6675;
  --txt-3: #9aa3b0;
  --brand: #3b5bfd;
  --brand-soft: #eef1ff;
  --green: #16a34a;  --green-bg: #e8f7ee;
  --blue: #2563eb;   --blue-bg: #e9f0fe;
  --yellow: #d97706; --yellow-bg: #fdf3e3;
  --red: #dc2626;    --red-bg: #fdecec;
  --purple: #7c3aed; --purple-bg: #f1eafe;
  --gray-bg: #f0f2f5;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, "Noto Sans TC", "PingFang TC", -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(22,32,46,.05), 0 4px 14px rgba(22,32,46,.05);
  --shadow-lg: 0 8px 34px rgba(22,32,46,.13);
  --r: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: var(--sans); font-size: 13px; color: var(--txt); background: var(--bg); overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #ccd2dc; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

#shell { display: flex; flex-direction: column; height: 100vh; }
#body-row { display: flex; flex: 1; min-height: 0; }

/* ═══ 頂欄 ═══ */
#topbar {
  height: 52px; min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 16px; z-index: 30;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.tb-logo {
  width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #3b5bfd, #7c3aed);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.tb-product { font-size: 13.5px; color: var(--txt-2); }
.tb-product b { color: var(--txt); font-weight: 700; }
.tb-program-switch {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; margin-left: 8px;
}
.tb-program-switch:hover { border-color: var(--brand); }
.tps-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--txt-3); }
.tps-name { font-size: 12px; font-weight: 600; }
.tps-caret { color: var(--txt-3); font-size: 10px; }
.tb-search {
  flex: 1; max-width: 420px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; color: var(--txt-3); font-size: 12px; cursor: text;
}
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-bell { position: relative; background: none; border: none; font-size: 16px; }
.tb-badge {
  position: absolute; top: -5px; right: -7px; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 10px; padding: 1px 5px;
}
.tb-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center;
}

/* ═══ 左導航 ═══ */
#rail {
  width: 208px; min-width: 208px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 12px 8px; overflow-y: auto;
}
.rail-group { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: var(--txt-3); padding: 14px 10px 6px; text-transform: uppercase; }
.rail-item {
  display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: none;
  padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--txt-2); text-align: left;
}
.rail-item:hover { background: var(--surface-2); color: var(--txt); }
.rail-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.ri-ico { width: 18px; text-align: center; }
.ri-src { margin-left: auto; font-size: 9px; color: var(--txt-3); background: var(--gray-bg); padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.rail-item.active .ri-src { background: #dfe6ff; color: var(--brand); }

/* ═══ 主區 ═══ */
#main { flex: 1; overflow-y: auto; min-width: 0; }
#view { padding: 20px 24px 80px; max-width: 1440px; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.page-sub { color: var(--txt-2); font-size: 12.5px; margin-top: 4px; line-height: 1.6; max-width: 900px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ref-tag { font-size: 10px; font-weight: 700; color: var(--purple); background: var(--purple-bg); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }

/* ═══ 元件 ═══ */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-2); }
.panel-title { font-size: 12.5px; font-weight: 700; }
.panel-sub { font-size: 11px; color: var(--txt-3); }
.panel-actions { margin-left: auto; display: flex; gap: 8px; }
.panel-body { padding: 14px 16px; }
.panel-body.flush { padding: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--txt);
  border: 1px solid var(--border); padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  transition: all .12s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #2f4be0; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2.5px 9px; border-radius: 20px; white-space: nowrap; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-yellow { background: var(--yellow-bg); color: var(--yellow); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-purple { background: var(--purple-bg); color: var(--purple); }
.pill-gray { background: var(--gray-bg); color: var(--txt-2); }
.pill-outline { background: var(--surface); border: 1px solid var(--border); color: var(--txt-2); }

/* ═══ Data Grid（Cofactr 式）═══ */
.grid-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border-2); flex-wrap: wrap; }
.gt-filter { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px; font-size: 11.5px; color: var(--txt-2); cursor: pointer; }
.gt-filter.on { background: var(--brand-soft); color: var(--brand); border-color: #c3cdfd; font-weight: 700; }
.gt-right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--txt-3); }

table.dg { width: 100%; border-collapse: collapse; font-size: 12px; }
.dg thead th {
  position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 10px;
  font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--txt-3);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; z-index: 2;
}
.dg thead th:hover { color: var(--brand); }
.dg tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.dg tbody tr { transition: background .1s; }
.dg tbody tr:hover { background: #f7f9ff; }
.dg tbody tr.selected { background: #edf9f0; }
.dg tbody tr.clickable { cursor: pointer; }
.dg .num { font-family: var(--mono); font-size: 11.5px; }
.mpn { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--txt); }

/* Cofactr 式四色庫存條 */
.avail-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; min-width: 130px; max-width: 190px; background: var(--gray-bg); }
.ab-seg { height: 100%; }
.ab-buyable { background: #34c26b; }
.ab-quotable { background: #4f8df7; }
.ab-maybe { background: #f2c14e; }
.ab-need { background: #ef5350; }
.avail-legend { display: flex; gap: 14px; font-size: 10.5px; color: var(--txt-2); flex-wrap: wrap; }
.al-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 生命週期 */
.lc { font-size: 10px; font-weight: 800; padding: 2.5px 8px; border-radius: 6px; white-space: nowrap; letter-spacing: .2px; }
.lc-active { background: var(--green-bg); color: var(--green); }
.lc-nrnd { background: var(--blue-bg); color: var(--blue); }
.lc-eos { background: var(--yellow-bg); color: var(--yellow); }
.lc-ltb { background: #ffe9d6; color: #ea7317; }
.lc-eol { background: var(--red-bg); color: var(--red); }
.lc-obs { background: #f3e0e0; color: #a13030; }
.lc-unknown { background: var(--gray-bg); color: var(--txt-3); }

/* Health 點 */
.risk-dots { display: flex; gap: 4px; }
.risk-dot { width: 10px; height: 10px; border-radius: 50%; }
.rd-ok { background: #34c26b; } .rd-warn { background: #f2c14e; } .rd-bad { background: #ef5350; } .rd-na { background: #d6dbe3; }

/* ═══ Kanban（Parspec Bid Board）═══ */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.kb-col { background: var(--gray-bg); border-radius: var(--r); padding: 10px; }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; font-size: 11.5px; font-weight: 800; }
.kb-count { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1px 8px; font-size: 10.5px; color: var(--txt-2); }
.kb-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px;
  margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; transition: all .12s;
}
.kb-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.kb-title { font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.kb-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.kb-due { font-size: 10.5px; font-weight: 700; }
.kb-due.late { color: var(--red); } .kb-due.soon { color: var(--yellow); } .kb-due.ok { color: var(--txt-3); }
.kb-val { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--txt-2); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi-l { font-size: 10.5px; color: var(--txt-3); font-weight: 700; letter-spacing: .3px; }
.kpi-v { font-size: 21px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi-d { font-size: 10.5px; margin-top: 2px; color: var(--txt-3); }
.kpi-d.up { color: var(--green); } .kpi-d.warn { color: var(--yellow); }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kanban { grid-template-columns: repeat(2, 1fr); } }

/* ═══ 版面：主 + 右側面板（Cofactr Suggested Next Steps）═══ */
.with-side { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.side-panel { position: sticky; top: 0; }
.next-step { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--border-2); align-items: flex-start; }
.ns-ico { width: 26px; height: 26px; min-width: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ns-t { font-size: 12px; font-weight: 700; line-height: 1.4; }
.ns-d { font-size: 11px; color: var(--txt-2); margin-top: 2px; line-height: 1.55; }

/* ═══ Stepper（Luminovo Importer）═══ */
.stepper { display: flex; gap: 0; margin-bottom: 18px; }
.step { flex: 1; display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-left: none; font-size: 12px; color: var(--txt-3); }
.step:first-child { border-left: 1px solid var(--border); border-radius: 9px 0 0 9px; }
.step:last-child { border-radius: 0 9px 9px 0; }
.step .st-n { width: 20px; height: 20px; min-width: 20px; border-radius: 50%; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; }
.step.active { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
.step.active .st-n { background: var(--brand); color: #fff; }
.step.done { color: var(--green); }
.step.done .st-n { background: var(--green-bg); color: var(--green); }

.dropzone {
  border: 2px dashed #c9d1de; border-radius: 12px; padding: 44px 20px; text-align: center;
  background: var(--surface); cursor: pointer; transition: all .15s;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 12px; font-family: var(--mono); }

.prog-track { height: 7px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--purple)); border-radius: 5px; transition: width .25s; }

.ai-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-check { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 13px; font-size: 11.5px; font-weight: 600; opacity: .32; transition: all .3s; }
.ai-check.on { opacity: 1; border-color: #bfe8cd; }
.ai-check .ck { color: var(--green); font-weight: 800; }

/* 欄位映射卡（Luminovo column mapping） */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.map-card { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.map-src { background: var(--surface-2); padding: 7px 11px; font-family: var(--mono); font-size: 11px; color: var(--txt-2); border-bottom: 1px solid var(--border-2); }
.map-body { padding: 9px 11px; }
.map-field { width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; font-size: 12px; font-weight: 600; background: var(--surface); }
.map-conf { font-size: 10px; margin-top: 6px; font-weight: 700; }
.map-sample { font-size: 10px; color: var(--txt-3); margin-top: 5px; font-family: var(--mono); line-height: 1.6; }

/* 思考/推理框（AI reasoning） */
.reason {
  border: 1px solid #e5dcc3; background: #fdfaf1; border-radius: 9px; padding: 11px 14px;
  font-size: 12px; color: #6b5d3a; line-height: 1.7; margin: 12px 0;
}
.reason .r-label { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; color: #b08a2e; text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.reason .r-label::before { content: "◍"; animation: rspin 2s linear infinite; display: inline-block; }
.reason.done .r-label::before { content: "✓"; animation: none; color: var(--green); }
@keyframes rspin { to { transform: rotate(360deg); } }
.cursor::after { content: "▌"; animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 判定橫幅 */
.verdict-banner { display: flex; align-items: center; gap: 14px; border-radius: var(--r); padding: 14px 18px; border: 1px solid; }
.vb-cond { background: var(--yellow-bg); border-color: #f0dcb2; }
.vb-icon { font-size: 22px; }
.vb-title { font-size: 14px; font-weight: 800; }
.vb-sub { font-size: 11.5px; color: var(--txt-2); margin-top: 2px; line-height: 1.5; }

/* Match score 環 */
.score-ring { position: relative; width: 44px; height: 44px; min-width: 44px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .sr-n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; font-family: var(--mono); }

/* Fluxco 里程碑 */
.milestones { display: flex; gap: 0; overflow-x: auto; padding: 6px 0; }
.ms { flex: 1; min-width: 118px; text-align: center; position: relative; padding-top: 26px; }
.ms::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 3px; background: var(--border); }
.ms::after {
  content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border);
}
.ms.done::before { background: var(--green); }
.ms.done::after { border-color: var(--green); background: var(--green); }
.ms.now::after { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.ms:first-child::before { left: 50%; } .ms:last-child::before { right: 50%; }
.ms-t { font-size: 10.5px; font-weight: 700; }
.ms-d { font-size: 9.5px; color: var(--txt-3); margin-top: 2px; }

/* 併排比價卡（Fluxco structured bids） */
.bid-cols { display: grid; grid-template-columns: 180px repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.bid-cols > div { padding: 9px 13px; border-bottom: 1px solid var(--border-2); border-right: 1px solid var(--border-2); font-size: 12px; display: flex; align-items: center; }
.bc-h { background: var(--surface-2); font-weight: 800; font-size: 11px; }
.bc-label { background: var(--surface-2); font-weight: 700; font-size: 11px; color: var(--txt-2); }
.bc-best { background: #f2fbf5; }
.bid-cols > div:nth-child(4n) { border-right: none; }

/* 風險語句 */
.risk-phrase { background: var(--red-bg); color: #b91c1c; padding: 1px 5px; border-radius: 4px; border-bottom: 1px dashed var(--red); cursor: help; font-weight: 600; }

/* Drawer（右滑詳情） */
#drawer-mask { position: fixed; inset: 0; background: rgba(22,32,46,.34); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
#drawer-mask.open { opacity: 1; pointer-events: auto; }
#drawer {
  position: fixed; top: 0; right: -560px; width: 560px; max-width: 94vw; height: 100vh; background: var(--surface);
  z-index: 91; box-shadow: var(--shadow-lg); transition: right .25s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
#drawer.open { right: 0; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-close { margin-left: auto; background: none; border: none; font-size: 18px; color: var(--txt-3); }
.drawer-close:hover { color: var(--txt); }

.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-2); font-size: 12px; }
.kv-row .k { color: var(--txt-3); font-weight: 600; }
.kv-row .v { font-weight: 600; text-align: right; }

/* 迷你 sparkline */
.spark { vertical-align: middle; }

/* misc */
.mono { font-family: var(--mono); }
.muted { color: var(--txt-3); }
.small { font-size: 11px; }
.sec-note { font-size: 11px; color: var(--txt-3); line-height: 1.7; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .g2, .g3 { grid-template-columns: 1fr; } .with-side { grid-template-columns: 1fr; } }
.empty { text-align: center; color: var(--txt-3); padding: 36px 16px; font-size: 12px; line-height: 1.8; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.attr-ok { color: var(--green); font-weight: 700; }
.attr-warn { color: var(--yellow); font-weight: 700; }
.attr-bad { color: var(--red); font-weight: 700; }
.hl { background: #fff3c9; padding: 0 3px; border-radius: 3px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══ 主線案件進度（側欄底部常駐）═══ */
#flow-rail { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 10px 8px; }
.fr-title { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; color: var(--txt-3); text-transform: uppercase; padding: 0 4px 8px; display: flex; justify-content: space-between; }
.fr-pct { color: var(--brand); }
.fr-step { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 6px; font-size: 11px; color: var(--txt-3); cursor: pointer; }
.fr-step:hover { background: var(--surface-2); }
.fr-dot { width: 14px; height: 14px; min-width: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 8px; color: #fff; }
.fr-step.done { color: var(--txt-2); }
.fr-step.done .fr-dot { background: var(--green); border-color: var(--green); }
.fr-step.done .fr-dot::after { content: "✓"; }
.fr-step.next { color: var(--brand); font-weight: 700; }
.fr-step.next .fr-dot { border-color: var(--brand); animation: frPulse 1.6s infinite; }
@keyframes frPulse { 50% { box-shadow: 0 0 0 4px var(--brand-soft); } }
#rail { display: flex; flex-direction: column; }

/* Toast */
#toast-box { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #16202e; color: #fff; border-radius: 10px; padding: 11px 16px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; max-width: 380px;
  animation: toastIn .25s cubic-bezier(.2,.8,.2,1); line-height: 1.5;
}
.toast .tt-ico { font-size: 15px; }
.toast b { color: #7de3a8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }

/* 遞進鎖定提示 */
.gate {
  display: flex; align-items: center; gap: 10px; border: 1px dashed #e4c988; background: #fdf8ec;
  border-radius: 9px; padding: 10px 14px; font-size: 12px; color: #8a6d1f;
}
.gate .g-ico { font-size: 15px; }
.gate.ok { border-color: #bfe3cb; background: #f0faf3; color: #1d7a3f; }

/* 報價包浮動列 */
.quote-bar {
  position: sticky; bottom: 0; background: #16202e; color: #fff; border-radius: 10px;
  padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); margin-top: 12px; z-index: 5;
}
.quote-bar .qb-n { background: var(--brand); border-radius: 20px; padding: 1px 9px; font-weight: 800; font-size: 11px; }
.quote-bar .qb-total { margin-left: auto; font-family: var(--mono); font-weight: 800; color: #7de3a8; }

/* 新卡片高亮 */
.kb-card.fresh { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pill-flash { animation: pillFlash 1.2s ease 2; }
@keyframes pillFlash { 50% { background: #fff3c9; } }

/* 發佈回覆動畫列 */
.pub-log { font-family: var(--mono); font-size: 11px; line-height: 2; color: var(--txt-2); }
.pub-log .ok { color: var(--green); font-weight: 700; }
.pub-log .no { color: var(--red); font-weight: 700; }
