/* S03 — Điểm nóng / Hộp thư · Vấn đề / Phạm vi / Quét AI / Phân tích hội thoại.
   Nguồn: IT-015 (01-artboards/s02.css + s03.css). Chỉ token --ux-* (V3.3.2 / S01); không đụng vùng chat FROZEN. */

.s3, .s3-layer {
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ux-text);
}
:where(.s3, .s3-layer) * { box-sizing: border-box; }
:where(.s3, .s3-layer) :where(h1, h2, h3, p) { margin: 0; padding: 0; }
:where(.s3, .s3-layer) button { font: inherit; color: inherit; cursor: pointer; }
.s3 svg.s3-i, .s3-layer svg.s3-i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.s3 svg.s3-i.s, .s3-layer svg.s3-i.s { width: 14px; height: 14px; }
.s3 :focus-visible, .s3-layer :focus-visible { outline: 2px solid var(--ux-primary); outline-offset: 2px; }

/* utilities (artboard .fx/.col/.mu…) */
.s3-fx { display: flex; } .s3-col { display: flex; flex-direction: column; }
.s3-ac { align-items: center; } .s3-jb { justify-content: space-between; } .s3-wr { flex-wrap: wrap; }
.s3-sp { flex: 1; min-width: 0; }
.s3-g2 { gap: 2px; } .s3-g4 { gap: 4px; } .s3-g6 { gap: 6px; } .s3-g8 { gap: 8px; } .s3-g12 { gap: 12px; }
.s3-mu { color: var(--ux-muted); } .s3-t2 { color: var(--ux-text-2); } .s3-b { font-weight: 650; }
.s3-sm { font-size: 12px; } .s3-xs { font-size: 11px; }
.s3-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.s3-cl2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* page frame inside #workspace */
#app-screen:is([data-view="overview"], [data-view="issues"]) .workspace:has(> .s3-page) { padding: 0; background: var(--ux-bg); overflow: hidden; display: flex; flex-direction: column; }
.s3-page { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ux-bg); }
.s3-ph { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 24px; flex: none; }
.s3-ph h1 { font-size: 18px; font-weight: 700; line-height: 24px; color: var(--ux-text); }
.s3-body { flex: 1; min-height: 0; overflow: auto; padding: 0 24px 24px; display: flex; flex-direction: column; gap: 12px; }

/* buttons, links, chips */
.s3-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ux-border-strong); background: var(--ux-surface); color: var(--ux-text); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.s3-btn:hover { background: var(--ux-hover); }
.s3-btn.p { background: var(--ux-primary); border-color: var(--ux-primary); color: var(--ux-on-primary); }
.s3-btn.p:hover { background: var(--ux-primary-hover); }
.s3-btn[disabled] { background: var(--ux-disabled-bg); color: var(--ux-muted); border-color: var(--ux-border); cursor: not-allowed; }
.s3-lnk { color: var(--ux-link); background: none; border: 0; padding: 0; font-size: 12px; font-weight: 600; text-align: left; }
.s3-lnk:hover { text-decoration: underline; }
.s3-lnk[disabled] { color: var(--ux-muted); cursor: default; text-decoration: none; }
.s3-src { font-size: 11px; color: var(--ux-muted); border: 1px solid var(--ux-border); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.s3-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--ux-hover); color: var(--ux-text-2); white-space: nowrap; border: 0; max-width: 100%; }
.s3-chip.ai { background: var(--ux-ai-soft); color: var(--ux-ai); }
.s3-chip.wn { background: var(--ux-warn-soft); color: var(--ux-warn); }
.s3-chip.ok { background: var(--ux-ok-soft); color: var(--ux-ok); }
.s3-chip.hi { background: var(--ux-danger-soft); color: var(--ux-danger); }
button.s3-chip:hover { filter: brightness(.97); }
.s3-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ux-ok); flex: none; display: inline-block; }
.s3-dot.w { background: var(--ux-attn); } .s3-dot.d { background: var(--ux-danger); } .s3-dot.n { background: var(--ux-disabled); } .s3-dot.ai { background: var(--ux-ai); }
.s3-pill { display: inline-block; border: 1px solid var(--ux-border); border-radius: 6px; padding: 0 6px; font-size: 11px; color: var(--ux-muted); background: transparent; line-height: 16px; font-weight: 400; }
.s3-pill:hover { border-color: var(--ux-border-strong); color: var(--ux-text-2); }
.s3-lbl { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ux-muted); font-weight: 700; }

/* severity / trend — luôn có chữ + ký hiệu (K1/Q1) */
.s3-sev { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.s3-sev .sy { font-size: 9px; letter-spacing: -1px; }
.s3-sev.c, .s3-sev.h { background: var(--ux-danger-soft); color: var(--ux-danger); }
.s3-sev.c .sy { font-size: 8px; }
.s3-sev.m { background: var(--ux-warn-soft); color: var(--ux-warn); }
.s3-tr { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.s3-tr.up { color: var(--ux-danger); } .s3-tr.dn { color: var(--ux-ok); } .s3-tr.fl, .s3-tr.nw { color: var(--ux-muted); }

/* freshness pill (N1.2) */
.s3-fresh { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--ux-border); border-radius: 14px; background: var(--ux-surface); font-size: 12px; color: var(--ux-text-2); white-space: nowrap; max-width: 100%; overflow: hidden; }
.s3-fresh.run { border-color: var(--ux-ai); color: var(--ux-ai); background: var(--ux-ai-soft); }
.s3-fresh.bad { border-color: var(--ux-attn); color: var(--ux-warn); background: var(--ux-warn-soft); }
.s3-pb { height: 8px; border-radius: 4px; background: var(--ux-hover); overflow: hidden; }
.s3-pb i { display: block; height: 100%; background: var(--ux-ai); }
.s3-note { border: 1px dashed var(--ux-border-strong); border-radius: 10px; padding: 10px 12px; color: var(--ux-text-2); background: var(--ux-surface-2); }

/* filter controls */
.s3-fc { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--ux-border-strong); border-radius: 8px; background: var(--ux-surface); min-width: 0; color: var(--ux-text); }
.s3-fc .k { font-size: 11px; color: var(--ux-muted); white-space: nowrap; }
.s3-fc .v { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.s3-fc.on { border-color: var(--ux-primary); background: var(--ux-sel); }
.s3-fc select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ux-text); padding: 0; min-width: 0; cursor: pointer; }
.s3-seg { display: inline-flex; border: 1px solid var(--ux-border-strong); border-radius: 9px; padding: 2px; background: var(--ux-surface-2); gap: 2px; flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.s3-seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px; font-weight: 600; color: var(--ux-text-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.s3-seg button.on { background: var(--ux-surface); color: var(--ux-text); box-shadow: 0 1px 3px rgba(15, 23, 42, .18); }
.s3-seg .n { font-size: 11px; background: var(--ux-hover); border-radius: 9px; padding: 0 6px; color: var(--ux-text-2); }
.s3-in { height: 34px; border: 1px solid var(--ux-border-strong); background: var(--ux-input); border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--ux-muted); min-width: 0; }
/* same :not() chain as base.css input rules so this wins without !important */
.s3-in input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
.s3-in input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):focus { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12px; color: var(--ux-text); flex: 1; min-width: 0; height: 100%; padding: 0; box-shadow: none; border-radius: 0; }
.s3-in:focus-within { border-color: var(--ux-primary); }

/* cards */
.s3-card { background: var(--ux-surface); border: 1px solid var(--ux-border); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.s3-ch { display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px; min-width: 0; }
.s3-ch h3 { font-size: 14px; font-weight: 650; color: var(--ux-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3-cb { padding: 4px 16px 14px; }
.s3-rw { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--ux-border); min-width: 0; }
.s3-rw:first-child { border-top: 0; }
button.s3-rw { background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; color: var(--ux-text); }
button.s3-rw:first-child { border-top: 0; }
button.s3-rw:hover { background: var(--ux-hover); }
.s3-mini { height: 6px; border-radius: 3px; background: var(--ux-hover); overflow: hidden; flex: none; }
.s3-mini i { display: block; height: 100%; background: var(--ux-danger); }
.s3-av { width: 24px; height: 24px; border-radius: 50%; background: var(--ux-ai-soft); color: var(--ux-ai); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }

/* A1 hero + KPI */
.s3-hero { border: 1px solid var(--ux-border); border-left: 4px solid var(--ux-danger); border-radius: 12px; background: var(--ux-surface); padding: 14px 16px; display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.s3-hero .ttl { font-size: 16px; line-height: 22px; font-weight: 700; overflow-wrap: anywhere; border: 0; background: none; padding: 0; text-align: left; color: var(--ux-text); }
.s3-hero .ttl:hover { text-decoration: underline; }
.s3-hero .s3-hero-short { display: none; }
.s3-fresh .sh { display: none; }
button.s3-fresh:hover { border-color: var(--ux-border-strong); }
.s3-kd { background: var(--ux-surface); border: 1px solid var(--ux-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; color: var(--ux-text); position: relative; }
.s3-kd:hover { border-color: var(--ux-border-strong); }
.s3-kd .l { font-size: 12px; font-weight: 650; color: var(--ux-text-2); display: flex; align-items: center; gap: 6px; }
.s3-kd .n { font-size: 30px; line-height: 36px; font-weight: 700; }
.s3-kd .a { font-size: 12px; color: var(--ux-link); font-weight: 650; }
.s3-kd .s { font-size: 11.5px; color: var(--ux-muted); }
.s3-kd.on { border-color: var(--ux-primary); background: var(--ux-sel); }
/* whole card opens the list; the "?" pill stays a separate button above the stretched hit area */
.s3-kd-hit { all: unset; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.s3-kd-hit::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.s3-kd-hit:focus-visible::after { outline: 2px solid var(--ux-primary); outline-offset: 2px; }
.s3-kd-hit[disabled] { cursor: default; }
.s3-kd-hit[disabled] .a { color: var(--ux-muted); }
.s3-kd .l .s3-pill { position: relative; z-index: 1; }

/* issue row (.hot) */
.s3-hot { display: grid; grid-template-columns: 116px minmax(0, 1fr) 120px 16px; gap: 12px; align-items: center; padding: 10px 14px; border: 0; border-top: 1px solid var(--ux-border); text-align: left; width: 100%; background: transparent; color: var(--ux-text); min-height: 44px; }
.s3-hot:first-child { border-top: 0; }
.s3-hot:hover { background: var(--ux-hover); }
.s3-hot.sel { background: var(--ux-sel); }
.s3-hot .t { font-weight: 650; }
.s3-hot .w { font-size: 11.5px; color: var(--ux-muted); }
.s3-hot > .s3-sev { justify-self: start; }

/* timeline + quote (H1/C1) */
.s3-tl { display: flex; flex-direction: column; padding-left: 6px; }
.s3-tl .e { display: flex; gap: 10px; position: relative; padding: 0 0 10px 14px; border-left: 2px solid var(--ux-border); }
.s3-tl .e:last-child { border-left-color: transparent; }
.s3-tl .e::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ux-surface); border: 2px solid var(--ux-primary); }
.s3-tl .e.ai::before { border-color: var(--ux-ai); } .s3-tl .e.ok::before { border-color: var(--ux-ok); } .s3-tl .e.up::before { border-color: var(--ux-danger); }
.s3-q { border-left: 3px solid var(--ux-ai); background: var(--ux-ai-soft); padding: 8px 10px; border-radius: 0 8px 8px 0; font-size: 12px; color: var(--ux-text); overflow-wrap: anywhere; }
.s3-q.co { border-left-color: var(--ux-border-strong); background: var(--ux-surface-2); }

/* state blocks (S1) */
.s3-state { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--ux-surface-2); border: 1px solid var(--ux-border); }
.s3-state b { font-size: 13px; }
.s3-state.err { background: var(--ux-danger-soft); border-color: transparent; }
.s3-state.err b { color: var(--ux-danger); }
.s3-sk { background: linear-gradient(90deg, var(--ux-hover), var(--ux-surface-2), var(--ux-hover)); border-radius: 6px; height: 12px; }
.s3-busy { opacity: .55; pointer-events: none; }

/* A1/A2 layout */
.s3-filters { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.s3-filters > .s3-fc.scope { height: 40px; min-width: 330px; max-width: 520px; }
.s3-fc .v.sh { display: none; }
.s3-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, .62fr)); gap: 12px; align-items: stretch; }
.s3-top.mgr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.s3-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; }
.s3-main.mgr { grid-template-columns: minmax(0, 1fr) 340px; }
.s3-list-foot { padding: 10px 14px; border-top: 1px solid var(--ux-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* overlays: popover, menu, tooltip, sheet */
.s3-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1200; }
.s3-scrim.clear { background: transparent; }
.s3-pop { position: fixed; background: var(--ux-surface); border: 1px solid var(--ux-border-strong); border-radius: 12px; box-shadow: var(--ux-shadow); z-index: 1201; display: flex; flex-direction: column; color: var(--ux-text); max-height: calc(100dvh - 24px); overflow: hidden; }
.s3-tip { position: fixed; z-index: 1300; width: 420px; max-width: calc(100vw - 24px); padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--ux-surface); border: 1px solid var(--ux-border-strong); border-radius: 12px; box-shadow: var(--ux-shadow); color: var(--ux-text); }
.s3-opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--ux-border); min-width: 0; background: transparent; text-align: left; width: 100%; color: var(--ux-text); }
.s3-opt:hover, .s3-opt.act { background: var(--ux-hover); }
.s3-opt.sel, .s3-opt.on { background: var(--ux-sel); }
.s3-menu { width: 300px; padding: 4px 0; overflow: auto; }
.s3-menu .s3-opt:last-child { border-bottom: 0; }
.s3-chip-l { border: 0; background: none; padding: 0; color: inherit; font: inherit; }
.s3-chip-l:hover { text-decoration: underline; }
.s3-chip-x { border: 0; background: transparent; color: inherit; padding: 0; margin-right: -4px; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; }
.s3-chip-x:hover { background: var(--ux-hover); }
.s3-chip-x svg.s3-i.s { width: 12px; height: 12px; }
.s3-opt[disabled] { cursor: default; }
.s3-kbd { border: 1px solid var(--ux-border-strong); border-radius: 5px; padding: 0 5px; font-size: 11px; color: var(--ux-muted); background: transparent; }

/* scan menu (N1.1) */
.s3-scan { width: 420px; padding: 12px; gap: 8px; overflow: auto; }
.s3-scan .it { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--ux-border); border-radius: 10px; background: var(--ux-surface); text-align: left; width: 100%; color: var(--ux-text); }
.s3-scan .it:hover:not([disabled]) { border-color: var(--ux-border-strong); background: var(--ux-hover); }
.s3-scan .it.on { border-color: var(--ux-primary); background: var(--ux-sel); }
.s3-scan .it[disabled] { cursor: default; }
.s3-confirm { width: 440px; }

/* notifications (N1.3) */
.s3-ntp { width: 460px; max-height: min(620px, calc(100dvh - 24px)); }
.s3-ntp .list { overflow: auto; min-height: 0; flex: 1; }
.s3-nt { display: flex; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--ux-border); align-items: flex-start; background: transparent; text-align: left; width: 100%; color: var(--ux-text); }
.s3-nt:hover { background: var(--ux-hover); }
.s3-nt.read { opacity: .72; }
.s3-nt .k { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.s3-k.al { background: var(--ux-danger-soft); color: var(--ux-danger); }
.s3-k.wa { background: var(--ux-ai-soft); color: var(--ux-ai); }
.s3-k.lo { background: var(--ux-hover); color: var(--ux-text-2); }
.s3-k.st { background: var(--ux-ok-soft); color: var(--ux-ok); }

/* P1 scope picker */
.s3-picker { width: 760px; height: 620px; max-width: calc(100vw - 24px); }
.s3-picker .top { padding: 12px; border-bottom: 1px solid var(--ux-border); display: flex; gap: 8px; align-items: center; }
.s3-picker .mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.s3-picker .tabs { border-right: 1px solid var(--ux-border); padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.s3-picker .tabs button { border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 8px; font-weight: 500; color: var(--ux-text-2); }
.s3-picker .tabs button.on { background: var(--ux-sel); color: var(--ux-text); font-weight: 650; }
.s3-picker .res { overflow: auto; min-height: 0; }
.s3-picker .grp { padding: 10px 12px 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ux-muted); font-weight: 700; background: var(--ux-surface-2); border-bottom: 1px solid var(--ux-border); }
.s3-picker .foot { border-top: 1px solid var(--ux-border); padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.s3-cbx { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ux-border-strong); display: grid; place-items: center; flex: none; background: var(--ux-surface); color: var(--ux-on-primary); font-size: 11px; line-height: 1; }
.s3-cbx.on { background: var(--ux-primary); border-color: var(--ux-primary); }

/* H1 inbox */
.s3-h1 { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--ux-border); }
.s3-h1 .lp { width: 560px; flex: none; background: var(--ux-surface); border-right: 1px solid var(--ux-border); display: flex; flex-direction: column; min-height: 0; }
.s3-h1 .lp .hd { padding: 12px 16px; border-bottom: 1px solid var(--ux-border); display: flex; flex-direction: column; gap: 8px; }
.s3-h1 .lp .ls { flex: 1; min-height: 0; overflow: auto; }
.s3-h1 .lp .ls .s3-hot { grid-template-columns: 104px minmax(0, 1fr) 70px; }
.s3-h1 .lp .ft { padding: 10px 16px; border-top: 1px solid var(--ux-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s3-h1 .dp { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ux-bg); }
.s3-h1 .dp .dh { padding: 16px 20px 12px; background: var(--ux-surface); border-bottom: 1px solid var(--ux-border); display: flex; flex-direction: column; gap: 8px; }
.s3-h1 .dp .dh .ttl { font-size: 17px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; }
.s3-h1 .dp .db { flex: 1; min-height: 0; display: flex; overflow: auto; }
.s3-h1 .dp .dl { flex: 1; min-width: 0; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.s3-h1 .dp .dr { width: 340px; flex: none; padding: 16px 20px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.s3-h1 .dp .mh { display: none; }
.s3-h1 .empty { margin: auto; max-width: 360px; text-align: center; color: var(--ux-muted); padding: 24px; }

/* C1 conversation panel (thay nội dung cột phải; vùng chat không đổi) */
/* same width as the right pane it replaces, so the FROZEN chat column keeps its width */
.s3-conv { display: none; width: var(--conversation-insights-width, 340px); flex: none; background: var(--ux-surface); border-left: 1px solid var(--ux-border); flex-direction: column; min-height: 0; }
@media (min-width: 1101px) {
  body.s3-c1 #app-screen[data-view="conversations"]:has(#chat-active:not(.hidden)) #work-insights { display: none; }
  body.s3-c1 #app-screen[data-view="conversations"]:has(#chat-active:not(.hidden)) .s3-conv { display: flex; }
  body.s3-c1 #app-screen[data-view="conversations"]:has(#info-panel:not(.hidden)) .s3-conv { display: none; }
}
.s3-conv .sec { padding: 12px 16px; border-bottom: 1px solid var(--ux-border); display: flex; flex-direction: column; gap: 8px; }
.s3-conv .wc { border: 1px solid var(--ux-border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--ux-surface); }
.s3-conv .wc.u { border-left: 3px solid var(--ux-danger); }
.s3-conv .ev { padding: 8px 14px; background: var(--ux-ai-soft); color: var(--ux-ai); border-bottom: 1px solid var(--ux-border); display: flex; align-items: center; gap: 8px; }

/* responsive */
@media (max-width: 1280px) {
  .s3-main { grid-template-columns: minmax(0, 1fr) 320px; }
  .s3-h1 .lp { width: 440px; }
  .s3-h1 .dp .dr { width: 300px; }
}
@media (max-width: 1100px) {
  .s3-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s3-top > .s3-hero { grid-column: 1 / -1; }
  .s3-main, .s3-main.mgr { grid-template-columns: minmax(0, 1fr); }
  .s3-h1 .dp .db { flex-direction: column; }
  .s3-h1 .dp .dr { width: auto; padding: 0 20px 16px; }
}
@media (max-width: 900px) {
  .s3-h1 .lp { width: 100%; border-right: 0; }
  .s3-h1:not(.has-detail) .dp { display: none; }
  .s3-h1.has-detail .lp { display: none; }
  .s3-h1 .dp .mh { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; border-bottom: 1px solid var(--ux-border); background: var(--ux-surface); flex: none; }
}
@media (max-width: 600px) {
  .s3-ph { height: 48px; padding: 0 16px; }
  .s3-ph h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .s3-ph .s3-sp { flex: 1 0 0; min-width: 0; }
  .s3-ph button.s3-btn[data-s3-scan] { display: none; }
  .s3-ph .s3-fresh { height: 24px; padding: 0 8px; font-size: 11px; flex: none; }
  .s3-ph .s3-fresh .lg { display: none; }
  .s3-ph .s3-fresh .sh { display: inline; }
  .s3-body { padding: 0 16px 16px; gap: 8px; }
  .s3-filters > .s3-fc.scope { width: 100%; min-width: 0; max-width: none; }
  .s3-filters > .s3-fc.scope .v { flex: 1; text-align: center; }
  .s3-filters > .s3-fc.scope .v.lg { display: none; }
  .s3-filters > .s3-fc.scope .v.sh { display: block; }
  .s3-filters .s3-hint { display: none; }
  /* M1.1: chỉ giữ phạm vi trên mobile; mức độ / thời gian vẫn đọc từ URL */
  .s3-dash .s3-filters > .s3-seg { display: none; }
  .s3-top, .s3-top.mgr { grid-template-columns: 1fr 1fr; gap: 8px; }
  .s3-hero { padding: 10px 12px; flex-direction: column; gap: 4px; }
  .s3-hero .s3-lbl, .s3-hero .s3-hero-meta, .s3-hero .s3-hero-acts { display: none; }
  .s3-hero .s3-hero-short { display: block; }
  .s3-hero .ttl { font-size: 13px; line-height: 18px; }
  .s3-dash .s3-card > .s3-ch .s3-lnk { display: none; }
  .s3-kd { padding: 8px 12px; }
  .s3-kd .n { font-size: 24px; line-height: 28px; }
  .s3-kd .s { display: none; }
  .s3-hot { grid-template-columns: auto minmax(0, 1fr); padding: 8px 12px; }
  .s3-hot > .s3-tr, .s3-hot > .s3-chip, .s3-hot > .chev { display: none; }
  .s3-card .s3-ch .s3-src { display: none; }
  .s3-pop.sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-width: none; height: auto; max-height: 85dvh; border-radius: 16px 16px 0 0; }
  .s3-picker.sheet { height: 85dvh; }
  .s3-picker .mid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .s3-picker .tabs { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--ux-border); overflow-x: auto; }
  .s3-picker .tabs .s3-hint { display: none; }
  .s3-h1 .lp .ls .s3-hot { grid-template-columns: auto minmax(0, 1fr); }
  .s3-h1 .lp .hd .s3-fc .k { display: none; }
  .s3-h1 .dp .dh, .s3-h1 .dp .dl { padding: 12px 16px; }
  .s3-h1 .dp .dr { padding: 0 16px 16px; }
  .s3-h1 .dp .mfoot { display: flex; }
}
.s3-h1 .dp .mfoot { display: none; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--ux-border); background: var(--ux-surface); flex: none; }

/* mobile shell for S03 pages (M1.1): rail thành thanh mục ngang có chữ */
@media (max-width: 600px) {
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) { flex-direction: column; height: 100dvh; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) > .sidebar { width: 100%; min-width: 0; height: auto; flex: none; border: 0; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) .sidebar-hero { padding: 0; background: var(--ux-surface); }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) .sidebar-hero > :not(#shell-nav) { display: none; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav { display: flex; flex-flow: row nowrap; align-items: center; gap: 12px; height: 44px; padding: 0 14px; margin: 0; overflow-x: auto; scrollbar-width: none; background: var(--ux-surface); border-bottom: 1px solid var(--ux-border); }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav > :not(button[data-view], #rail-utils) { display: none; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #rail-utils { display: contents; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #rail-utils > button { width: 34px; height: 34px; padding: 7px; flex: none; display: grid; place-items: center; position: relative; background: transparent; color: var(--ux-text-2); border: 0; box-shadow: none; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav button[data-view] { width: auto; height: 44px; padding: 0 2px; flex: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--ux-text-2); font-size: 12px; font-weight: 500; border-bottom: 2px solid transparent; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav button[data-view] .nav-icon { display: none; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav button[data-view] span { position: static; width: auto; height: auto; clip-path: none; overflow: visible; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) #shell-nav button[data-view].active { color: var(--ux-primary); font-weight: 650; border-bottom-color: var(--ux-primary); background: transparent; }
  #app-screen:is([data-view="overview"], [data-view="issues"]):has(.s3-page) .workspace { flex: 1; min-height: 0; }
}
