/* Dashboard canh bao som SXH Dong Nai. Bang mau theo palette du lieu da kiem dinh (sang/toi), khung ben trai cung tong navy voi trang DT-COSMOS. */
:root {
  --page: #f1f1ee; --surface: #fcfcfb; --surface-2: #f5f5f2;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11, 11, 11, .12); --border-strong: rgba(11, 11, 11, .28);
  --blue: #2a78d6; --primary: #256abf; --primary-ink: #ffffff; --focus: #2a78d6; --hover: rgba(11, 11, 11, .05);
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --critical: #d03b3b; --good-text: #006300; --critical-text: #a52a2a;
  --side: #0b1018; --side-ink: #e6edf3; --side-muted: #9fb0c3; --side-line: #1d2735; --side-active: #131b28; --brand: #22c55e; --brand-bg: #0b1018;
  --radius: 10px; --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #222221;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, .10); --border-strong: rgba(255, 255, 255, .26);
  --primary: #2a78d6; --focus: #5598e7; --hover: rgba(255, 255, 255, .06);
  --good-text: #0ca30c; --critical-text: #ec7373;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ khung ung dung */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand svg { flex: none; }
.brand b { display: block; font-size: 15px; font-weight: 650; line-height: 1.2; }
.brand span { display: block; font-size: 12px; color: var(--side-muted); line-height: 1.3; margin-top: 2px; }
.nav { padding: 6px 10px 12px; flex: 1; }
.nav h3 { font-size: 12px; font-weight: 600; color: var(--side-muted); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; border-radius: 6px; color: var(--side-ink); text-decoration: none; position: relative; }
.nav a svg { flex: none; opacity: .75; }
.nav a:hover { background: var(--side-active); }
.nav a[aria-current="page"] { background: var(--side-active); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav a[aria-current="page"] svg { opacity: 1; color: var(--brand); }
.side-foot { padding: 14px 18px 18px; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-muted); line-height: 1.45; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 58px; background: var(--page); border-bottom: 1px solid var(--border); }
.top h1 { font-size: 19px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .tools { display: flex; align-items: center; gap: 8px; }
.btn.menu-btn { display: none; }
.view { padding: 20px 24px 48px; width: 100%; max-width: 1480px; }
.view:focus { outline: none; }

/* ------------------------------------------------------------------ the, luoi, bo loc */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; }
.card > header { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 0; }
.card > header .t { flex: 1; min-width: 0; }
.card h2 { font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.card .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.card .body { padding: 12px 16px 16px; flex: 1; min-width: 0; transition: opacity .15s; }
.card.stale .body { opacity: .5; }
.card .body > :first-child { margin-top: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field > .lbl { font-size: 12.5px; color: var(--ink-2); }
.field.grow { flex: 1 1 260px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ dieu khien */
select, input[type="text"], input[type="password"] { height: 34px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); min-width: 0; max-width: 100%; }
select { padding-right: 26px; }
select:disabled, input:disabled { opacity: .55; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn.icon { width: 34px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button { height: 32px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }
.slider { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.slider input[type="range"] { flex: 1; accent-color: var(--primary); min-width: 90px; }
.slider output { min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.msel { display: flex; flex-wrap: wrap; gap: 6px; }
.msel label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: 12.5px; user-select: none; }
.msel label:has(input:checked) { background: var(--hover); border-color: var(--ink-2); }
.msel i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.msel input { position: absolute; opacity: 0; pointer-events: none; }
.msel label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ chi so (KPI), trang thai */
.kpi { padding: 14px 16px 16px; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 28px; font-weight: 650; line-height: 1.15; margin-top: 4px; letter-spacing: -.01em; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.kpi .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.kpi.hero .value { font-size: 52px; line-height: 1.05; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border-strong); background: var(--surface-2); }
.chip svg { flex: none; }
.chip.good svg { color: var(--good); } .chip.warn svg { color: var(--warn); }
.chip.serious svg { color: var(--serious); } .chip.critical svg { color: var(--critical); }
.meter { position: relative; height: 8px; background: var(--grid); border-radius: 4px; margin-top: 12px; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); max-width: 100%; }
.meter > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.meter-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.note, .warnbox { border-left: 3px solid var(--axis); padding: 8px 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); line-height: 1.5; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.warnbox { border-left-color: var(--serious); color: var(--ink); }
.okbox { border-left-color: var(--good); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 0; border-top: 3px solid; display: inline-block; border-radius: 2px; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-2); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--axis); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink-2); padding: 18px 4px; }
.err { color: var(--critical-text); }

/* ------------------------------------------------------------------ bang */
.tbl-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--ink-2); z-index: 1; }
.tbl th button:not(.help) { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tbl th button:not(.help):focus-visible { outline: 2px solid var(--focus); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr:last-child td { border-bottom: 0; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ bieu do va ban do */
.plot { width: 100%; }
.plot .js-plotly-plot, .plot .plotly { width: 100%; }
.map { height: 470px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.map.tall { height: 560px; }
.leaflet-container { font: inherit; background: var(--surface); }
.leaflet-tooltip { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); box-shadow: none; padding: 6px 9px; font-size: 12.5px; }
.leaflet-tooltip::before { display: none; }
.leaflet-tooltip b { display: block; font-weight: 650; margin-bottom: 2px; }
.leaflet-tooltip .tv { display: flex; justify-content: space-between; gap: 14px; }
.leaflet-tooltip .tv span:first-child { color: var(--ink-2); }
.leaflet-control-zoom a { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-2) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.map-legend { background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; min-width: 150px; color: var(--ink); }
.map-legend .bar { height: 10px; border-radius: 2px; margin: 6px 0 3px; border: 1px solid var(--border); }
.map-legend .lo-hi { display: flex; justify-content: space-between; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.map-legend .ttl { font-weight: 600; }

/* ------------------------------------------------------------------ dang nhap */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--page); }
.login-art { background: var(--side); color: var(--side-ink); position: relative; overflow: hidden; padding: 48px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art svg.curve { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; opacity: .95; }
.login-art h2 { font-size: 30px; line-height: 1.2; font-weight: 650; max-width: 18em; position: relative; }
.login-art p { color: var(--side-muted); max-width: 34em; margin-top: 12px; position: relative; line-height: 1.55; }
.login-art .brand { padding: 0; position: relative; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; }
.login-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-form h1 { font-size: 24px; font-weight: 650; }
.login-form input { height: 40px; width: 100%; }
.login-form .btn { height: 40px; width: 100%; }
.login-tools { position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; }

/* ------------------------------------------------------------------ man hinh nho */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 30; }
  .btn.menu-btn { display: inline-flex; }
  .top { padding: 0 14px; }
  .view { padding: 16px 14px 40px; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
}
@media (max-width: 560px) {
  .top { gap: 8px; }
  .top h1 { font-size: 15px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .top .btn .lbl { display: none; }
  .card > header { flex-wrap: wrap; }
  .card > header .t { flex: 1 1 100%; }
  .g-4, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .kpi.hero .value { font-size: 44px; }
  .map { height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------ bo sung */
.g-1 { grid-template-columns: minmax(0, 1fr); }
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 100; padding: 8px 12px; background: var(--surface); border: 2px solid var(--focus); border-radius: var(--radius-sm); }
.boot { min-height: 60vh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 24px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
:root[data-theme="dark"] .linkbtn { color: var(--focus); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.scroll-y { max-height: 620px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sub-title { font-size: 13px; font-weight: 650; margin: 2px 0 8px; }
.card.pad { padding: 14px 16px; }
.params .stack { gap: 14px; }
.cal-out { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; color: var(--ink-2); min-width: 0; flex: 1 1 320px; }
.filters.flat { margin-bottom: 0; }
.notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.card > header > .msel { margin-top: 2px; }
.view > div > .card, .view > div > .note, .view > div > .warnbox, .view > .card, .view > .note { margin-bottom: 16px; }
.view > div > .note:last-child, .view > .note:last-child { margin-bottom: 0; }
.kpi .chip { align-self: flex-start; margin-top: 8px; }
.card > .body > .stack > .row .sub { color: var(--ink-2); font-size: 12.5px; }
.tbl-wrap.compact .tbl { font-size: 12.5px; }
.tbl-wrap.compact .tbl th, .tbl-wrap.compact .tbl td { padding: 6px 6px; }

/* ------------------------------------------------------------------ tro ly AI */
.aibar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.aibar .btn { height: 30px; padding: 0 12px; font-size: 13px; }
.ai-drawer { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: -10px 0 28px rgba(0, 0, 0, .14); }
.ai-drawer:not([hidden]) { animation: ai-in .18s ease-out; }
@keyframes ai-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.ai-drawer > header { padding: 12px 16px 0; border-bottom: 1px solid var(--border); }
.ai-head { display: flex; align-items: center; gap: 8px; }
.ai-head h2 { flex: 1; font-size: 15px; font-weight: 650; }
.ai-head svg { color: var(--primary); }
:root[data-theme="dark"] .ai-head svg { color: var(--focus); }
.ai-sub { font-size: 12.5px; color: var(--ink-2); margin: 2px 0 10px; }
.ai-tabs { display: flex; gap: 2px; margin-bottom: -1px; }
.ai-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 12px; cursor: pointer; color: var(--ink-2); }
.ai-tabs button:hover { color: var(--ink); }
.ai-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.ai-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-foot { padding: 8px 16px 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.ai-intro { color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ai-input { font: inherit; color: inherit; width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; resize: vertical; line-height: 1.45; }
.ai-compose { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: -14px; margin-bottom: -14px; padding: 8px 0 14px; background: var(--surface); }
.ai-compose .ai-input { resize: none; flex: 1; min-height: 36px; max-height: 140px; }
.ai-clear { display: flex; justify-content: flex-end; }
.ai-chat { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ai-sugg { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ai-sugg .btn { height: auto; min-height: 32px; padding: 6px 12px; white-space: normal; text-align: left; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg.user .txt { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .tool { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 4px; }
.msg .tool svg { flex: none; color: var(--muted); }
.md { font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .65em; }
.md ul, .md ol { margin: 0 0 .65em; padding-left: 20px; }
.md li { margin: 0 0 .25em; }
.md h4 { font-size: 13.5px; margin: .9em 0 .35em; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
.md .tbl-wrap { margin: 0 0 .65em; }
.ai-out .tbl td, .ai-out .tbl th { white-space: normal; vertical-align: top; }
.ai-out .tbl td .btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.ai-out tr.rec td { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tag { font-size: 11.5px; line-height: 1.5; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-2); }
.tag.rec { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.note.okbox { border-left-color: var(--good); }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 16px; }
.modal { width: min(580px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.modal > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal > header h2 { flex: 1; font-size: 16px; font-weight: 650; }
.modal-body { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.ai-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.row-links { display: flex; gap: 14px; }
.ai-ready { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--surface-2); }
@media (max-width: 900px) { .ai-drawer { width: 100vw; border-left: 0; } .ai-pages { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .aibar { justify-content: flex-start; } }

a.btn { text-decoration: none; color: var(--ink); }
a.btn.primary { color: var(--primary-ink); }
.tags { align-items: center; margin-top: 5px; }
.ai-out .tbl td .btn { height: 26px; padding: 0 10px; }

/* ------------------------------------------------------------------ dau "?" giai thich thuat ngu */
button.help { display: inline-grid; place-items: center; width: 16px; height: 16px; margin: 0 0 0 4px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink-2); font: 700 10.5px/1 var(--font); vertical-align: 1px; cursor: help; flex: none; }
button.help:hover, button.help[aria-expanded="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
button.help:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.help-pop { position: fixed; z-index: 200; padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 13px; line-height: 1.5; font-weight: 400; text-align: left; letter-spacing: 0; text-transform: none; }
.help-pop[hidden] { display: none; }
.help-pop b { display: block; margin-bottom: 3px; font-weight: 650; }
.help-pop p { margin: 0; color: var(--ink-2); }
