/* ===================================================================
   NetViet Sales Hunter Pro — enterprise design system
   Palette from the NetViet logo: red #CE1F2C, orange #F7941E, blue #1B63C6
   =================================================================== */
:root {
  --nv-red: #CE1F2C;
  --nv-red-dark: #A4171F;
  --nv-orange: #F7941E;
  --nv-orange-dark: #D97706;
  --nv-blue: #1B63C6;
  --grad: linear-gradient(135deg, #CE1F2C 0%, #EE4623 55%, #F7941E 100%);

  --navy-950: #070C17;
  --navy-900: #0B1220;
  --navy-800: #111B2E;
  --navy-700: #1A2740;

  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #E4E8F0;
  --line-2: #EEF1F7;

  --green: #0E9F6E;
  --green-bg: #E7F7F0;
  --amber: #B45309;
  --amber-bg: #FEF3E2;
  --red-bg: #FDECEC;
  --blue-bg: #EAF1FD;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 4px 16px rgba(16, 24, 40, .07);
  --sh-3: 0 18px 44px rgba(16, 24, 40, .14);
  --sidebar-w: 258px;
  --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, Arial, 'Noto Sans', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--navy-900); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
:focus-visible { outline: 2px solid var(--nv-blue); outline-offset: 2px; }
::selection { background: #FFE1C4; }

/* ---------------- layout ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #0B1220 0%, #0D1729 60%, #101B30 100%);
  color: #C6D0E1;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .06);
  z-index: 40;
}
.brand { padding: 16px 16px 12px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand-mark {
  width: 96px; height: 30px; flex: 0 0 96px; border-radius: 7px; overflow: hidden;
  background: #fff; display: block; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; object-position: center 52%; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; }
.brand-text span { font-size: 10px; color: #7E8CA8; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; }

.nav { padding: 12px 10px 20px; overflow-y: auto; flex: 1; }
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  color: #61708C; padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  color: #B7C3D7; font-size: 13.5px; font-weight: 500; margin-bottom: 2px; position: relative;
  transition: background .15s, color .15s;
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(206, 31, 44, .95) 0%, rgba(238, 70, 35, .82) 100%); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(206, 31, 44, .28); }
.nav-item.active i { opacity: 1; }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  background: rgba(247, 148, 30, .18); color: var(--nv-orange); border-radius: 20px; padding: 1px 7px;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .25); color: #fff; }
.nav-badge:empty, .nav-badge[data-zero="1"] { display: none; }

.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 11.5px; }
.sf-row { display: flex; align-items: center; gap: 7px; color: #9FB0C9; margin-bottom: 4px; }
.sf-meta { color: #61708C; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.dot-ok { background: #21C08B; box-shadow: 0 0 0 3px rgba(33, 192, 139, .18); }
.dot-warn { background: var(--nv-orange); box-shadow: 0 0 0 3px rgba(247, 148, 30, .18); }
.dot-bad { background: #F0453A; box-shadow: 0 0 0 3px rgba(240, 69, 58, .18); }

.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.crumb { min-width: 0; flex: 1; }
.crumb-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 700; }
.crumb h1 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.engine-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  background: var(--blue-bg); color: var(--nv-blue); border: 1px solid #CFE0F9;
  border-radius: 20px; padding: 4px 10px; white-space: nowrap;
}
.engine-chip.warn { background: var(--amber-bg); color: var(--amber); border-color: #F5DDB8; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(206, 31, 44, .3);
}

.view { padding: 20px; max-width: 1500px; width: 100%; margin: 0 auto; }
.only-mobile { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(7, 12, 23, .55); z-index: 35; }

/* ---------------- primitives ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head .spacer { margin-left: auto; }

.grid { display: grid; gap: 14px; }
.g-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.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-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 6px; }
.spacer { margin-left: auto; }

.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.kpi .k-value { font-size: 24px; font-weight: 800; letter-spacing: -.9px; margin-top: 6px; line-height: 1.15; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.kpi .k-icon {
  position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px; background: var(--blue-bg); color: var(--nv-blue);
}
.kpi.accent { background: linear-gradient(135deg, #0B1220 0%, #16233B 100%); border-color: #1B2740; }
.kpi.accent .k-label { color: #8A9AB5; }
.kpi.accent .k-value { color: #fff; }
.kpi.accent .k-sub { color: #93A2BC; }
.kpi.accent .k-icon { background: rgba(247, 148, 30, .16); color: var(--nv-orange); }
.kpi.red .k-icon { background: var(--red-bg); color: var(--nv-red); }
.kpi.green .k-icon { background: var(--green-bg); color: var(--green); }
.kpi.amber .k-icon { background: var(--amber-bg); color: var(--amber); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer;
  transition: background .14s, border-color .14s, box-shadow .14s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: #F7F9FC; border-color: #D3DAE7; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 16px rgba(206, 31, 44, .24); }
.btn-primary:hover { background: linear-gradient(135deg, #B81824 0%, #DB3A1C 55%, #E88413 100%); }
.btn-dark { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-800); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #EFF2F8; border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: #F7F9FC; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #B9C7DF; box-shadow: 0 0 0 3px rgba(27, 99, 198, .1); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.hint { font-size: 11.5px; color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  border-radius: 20px; padding: 3px 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.tag-ok { background: var(--green-bg); color: #067A54; }
.tag-warn { background: var(--amber-bg); color: var(--amber); }
.tag-bad { background: var(--red-bg); color: var(--nv-red-dark); }
.tag-info { background: var(--blue-bg); color: var(--nv-blue); }
.tag-muted { background: #F0F2F7; color: var(--muted); }

/* table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); font-weight: 700; padding: 10px 14px; background: #FAFBFD;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #FAFBFD; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); }
.nowrap { white-space: nowrap; }

/* score */
.score { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; }
.score-bar { width: 44px; height: 5px; border-radius: 4px; background: #EDF0F6; overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 4px; }
.s-hi i { background: linear-gradient(90deg, #0E9F6E, #21C08B); }
.s-mid i { background: linear-gradient(90deg, #D97706, #F7941E); }
.s-low i { background: linear-gradient(90deg, #A4171F, #F0453A); }

.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.bar-track { height: 8px; border-radius: 6px; background: #EDF1F8; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--grad); }
.bar-fill.blue { background: linear-gradient(90deg, #1B63C6, #4F91EA); }
.bar-label { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; margin-bottom: 4px; }

.agent-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.agent-top { display: flex; align-items: flex-start; gap: 10px; }
.avatar-plat {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font-size: 15px; flex: 0 0 36px; color: #fff;
}
.p-facebook { background: linear-gradient(135deg, #1877F2, #3B8CF8); }
.p-zalo { background: linear-gradient(135deg, #0068FF, #2F8CFF); }
.p-telegram { background: linear-gradient(135deg, #1F92C9, #35B0E8); }
.p-google { background: linear-gradient(135deg, #EA4335, #FBBC05); }
.p-openai { background: linear-gradient(135deg, #0E9F6E, #10A37F); }
.agent-name { font-weight: 700; font-size: 13.5px; letter-spacing: -.2px; }
.agent-meta { font-size: 11px; color: var(--muted); }

.pill-switch { display: inline-flex; background: #F1F4F9; border-radius: 8px; padding: 2px; gap: 2px; }
.pill-switch button {
  border: none; background: transparent; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 4px 9px; border-radius: 6px; cursor: pointer;
}
.pill-switch button.active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #EFF2F8; border-radius: var(--r-lg); padding: 10px; min-height: 220px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.kcol-head h4 { font-size: 12.5px; font-weight: 700; }
.kcol-head .cnt { font-size: 11px; font-weight: 700; color: var(--muted); background: #fff; border-radius: 20px; padding: 1px 7px; }
.kcol-head .val { font-size: 11px; color: var(--muted); margin-left: auto; }
.kcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px;
  margin-bottom: 8px; cursor: pointer; box-shadow: var(--sh-1); transition: box-shadow .15s, transform .1s, border-color .15s;
}
.kcard:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: #D7DFEC; }
.kcard .kc-name { font-weight: 700; font-size: 12.5px; margin-bottom: 3px; }
.kcard .kc-intent { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .kc-foot { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.kc-amt { font-weight: 700; color: var(--ink-2); font-size: 11.5px; }

/* drawer / modal */
.drawer-back { position: fixed; inset: 0; background: rgba(7, 12, 23, .5); z-index: 900; display: flex; justify-content: flex-end; animation: fade .18s ease; }
.drawer {
  width: min(560px, 100%); background: var(--bg); height: 100%; overflow-y: auto;
  box-shadow: var(--sh-3); animation: slidein .22s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
.drawer-head { padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.drawer-body { padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 8px; position: sticky; bottom: 0; }
@keyframes slidein { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-back { position: fixed; inset: 0; background: rgba(7, 12, 23, .5); z-index: 1000; display: grid; place-items: center; padding: 16px; animation: fade .16s ease; }
.modal {
  background: #fff; border-radius: var(--r-xl); width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: var(--sh-3); animation: pop .18s cubic-bezier(.2, .8, .2, 1);
}
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }

/* toast */
.toast-root { position: fixed; bottom: 18px; right: 18px; z-index: 1100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--navy-900); color: #fff; border-radius: 10px; padding: 11px 15px; font-size: 13px;
  box-shadow: var(--sh-3); display: flex; align-items: center; gap: 9px; max-width: 380px;
  animation: pop .18s ease;
}
.toast.ok { background: #067A54; }
.toast.err { background: #A4171F; }
.toast.warn { background: #92400E; }

/* misc */
.inbox-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1023px) { .inbox-grid { grid-template-columns: 1fr; } }
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r);
  border: 1px solid #F5DDB8; background: var(--amber-bg); color: #7C4A03; font-size: 12.5px;
}
.alert.bad { border-color: #F8C9C9; background: var(--red-bg); color: var(--nv-red-dark); }
.alert.info { border-color: #CFE0F9; background: var(--blue-bg); color: #14498F; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty i { font-size: 26px; color: #C3CCDC; margin-bottom: 10px; display: block; }
.empty p { font-size: 13px; }
.empty .eh { font-weight: 700; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.boot { display: grid; place-items: center; padding: 60px 0; color: var(--muted); gap: 12px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid #E1E6F0; border-top-color: var(--nv-red);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skl { background: linear-gradient(90deg, #EEF1F7 25%, #F7F9FC 50%, #EEF1F7 75%); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 8px; }
@keyframes sh { to { background-position: -200% 0; } }
.msg { padding: 9px 12px; border-radius: 11px; font-size: 13px; max-width: 88%; line-height: 1.5; }
.msg.in { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
.msg.out { background: linear-gradient(135deg, #0B1220, #17253D); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.msg-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.gauge { display: flex; align-items: center; gap: 12px; }
.gauge-ring {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 66px;
  font-weight: 800; font-size: 17px; color: var(--ink);
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 10px; padding: 8px 0; border-left: 2px solid var(--line); margin-left: 5px; padding-left: 13px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #C9D3E3; }
.tl-item.hot::before { background: var(--nv-orange); }
.tl-act { font-size: 12.5px; font-weight: 600; }
.tl-meta { font-size: 11px; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.divider { height: 1px; background: var(--line-2); margin: 4px 0; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1279px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 276px; height: 100vh;
    transform: translateX(-102%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
    box-shadow: var(--sh-3);
  }
  .app.nav-open .sidebar { transform: none; }
  .only-mobile { display: grid; }
  .g-main { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view { padding: 16px; }
}
@media (max-width: 719px) {
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .view { padding: 12px; }
  .topbar { padding: 0 12px; height: 58px; }
  .crumb h1 { font-size: 15px; }
  .hide-sm { display: none; }
  .kpi .k-value { font-size: 20px; }
  .kanban { grid-auto-columns: 84%; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .toast-root { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
}
