/* ===== Design tokens (phong cách dashboard: nền xám xanh, khung trắng bo tròn, gradient chàm) ===== */
:root {
  --page: #e2e8f0;
  --page-2: #eef2f7;
  --frame: #ffffff;
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --text: #111827;
  --muted: #5b6474;
  --border: #e6e9f0;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --on-primary: #ffffff;
  --accent: #0284c7;
  --warn: #d97706;
  --danger-dot: #ef4444;

  --g-indigo: linear-gradient(180deg, #818cf8 0%, #4338ca 100%);
  --g-indigo-h: linear-gradient(90deg, #818cf8 0%, #4338ca 100%);
  --g-sky-h: linear-gradient(90deg, #7dd3fc 0%, #0284c7 100%);
  --g-purple-h: linear-gradient(90deg, #c084fc 0%, #6d28d9 100%);
  --g-pink-h: linear-gradient(90deg, #f9a8d4 0%, #ec4899 100%);
  --g-orange-h: linear-gradient(90deg, #fdba74 0%, #f97316 100%);
  --ghost: linear-gradient(180deg, #f6f7fb 0%, #e9ecf4 100%);
  --ghost-border: #e1e5ee;
  --seg-1: #6366f1; --seg-2: #38bdf8; --seg-3: #9333ea; --seg-4: #f472b6;

  --shadow: 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-frame: 0 20px 60px rgba(30, 41, 59, .14);
  --radius: 20px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0a0e17;
    --page-2: #0d1220;
    --frame: #111726;
    --bg: #0e1422;
    --surface: #151c2e;
    --surface-2: #1b243a;
    --text: #e9eefb;
    --muted: #9aa6c0;
    --border: #232d45;
    --primary: #818cf8;
    --primary-strong: #a5b4fc;
    --on-primary: #0b1020;
    --accent: #38bdf8;
    --warn: #fbbf24;
    --ghost: linear-gradient(180deg, #1d2740 0%, #172038 100%);
    --ghost-border: #26314d;
    --shadow: none;
    --shadow-frame: 0 20px 60px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --page: #0a0e17;
  --page-2: #0d1220;
  --frame: #111726;
  --bg: #0e1422;
  --surface: #151c2e;
  --surface-2: #1b243a;
  --text: #e9eefb;
  --muted: #9aa6c0;
  --border: #232d45;
  --primary: #818cf8;
  --primary-strong: #a5b4fc;
  --on-primary: #0b1020;
  --accent: #38bdf8;
  --warn: #fbbf24;
  --ghost: linear-gradient(180deg, #1d2740 0%, #172038 100%);
  --ghost-border: #26314d;
  --shadow: none;
  --shadow-frame: 0 20px 60px rgba(0, 0, 0, .5);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  padding: 28px;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(160deg, var(--page-2), var(--page));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; }
h2.page-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.gap-top { margin-top: 20px; }

/* ===== App frame ===== */
.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  background: var(--frame);
  border-radius: 32px;
  box-shadow: var(--shadow-frame);
  overflow: clip;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky; top: 28px;
  align-self: start;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column;
  padding: 28px 18px 22px;
  background: var(--frame);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; margin-bottom: 36px; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand b { color: var(--primary); }
.side-label { margin: 0 0 8px; padding: 0 12px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-nav { display: grid; gap: 4px; margin-bottom: 8px; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px;
  border: 0; border-radius: 12px; background: transparent;
  font: inherit; font-size: .95rem; font-weight: 500; text-align: left;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.side-link svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.side-link:hover { background: var(--surface-2); }
.side-link.is-active { background: var(--surface-2); font-weight: 600; }
.side-link.is-active svg { color: var(--primary); }
.side-rule { border: 0; border-top: 1px solid var(--border); margin: 18px 4px 20px; }
.side-foot { margin: auto 0 0; padding: 0 12px; font-size: .78rem; color: var(--muted); }

.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; }
.scrim[hidden] { display: none; }

/* ===== Content / topbar ===== */
.content { min-width: 0; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  min-height: 72px; padding: 0 32px;
  background: color-mix(in srgb, var(--frame) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { margin: 0; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.crumb strong { color: var(--text); font-weight: 500; }
.crumb i { font-style: normal; margin: 0 2px; }
.search { position: relative; flex: 1; max-width: 300px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 9px 12px 9px 38px;
  border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: var(--text); font: inherit; font-size: .9rem;
}
.search input:hover, .search input:focus { background: var(--surface); border-color: var(--border); outline: none; }
.search input:focus-visible { outline: 2px solid var(--accent); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--text);
  border-radius: 12px; cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); }
.has-dot::after { content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger-dot); border: 2px solid var(--frame); }
.avatar-me { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f472b6, #6366f1); }
.menu-btn { display: none; }

main { padding: 32px 32px 8px; }
.page-section { margin-bottom: 56px; }
.page-head { margin-bottom: 20px; }
.page-head p { margin: 0; font-size: .9rem; }

/* ===== Cards & buttons ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 0; }
.card-accent { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 12px; font: inherit; font-size: .95rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; color: var(--primary); margin-bottom: .7em; }
.lead { font-size: 1.05rem; color: var(--muted); }
.notice { margin: 24px 0 0; padding: 12px 16px; border-left: 4px solid var(--warn); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: 12px; color: var(--muted); font-size: .88rem; }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding: clamp(24px, 4vw, 44px); background:
  radial-gradient(600px 280px at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
  var(--surface); }
.accent { background: linear-gradient(90deg, #6366f1, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.mock { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 16px; display: grid; gap: 12px; }
.mock-msg { padding: 12px 14px; border-radius: 16px; font-size: .9rem; max-width: 92%; }
.mock-user { background: var(--surface); border: 1px solid var(--border); justify-self: end; border-bottom-right-radius: 4px; }
.mock-bot { background: var(--g-indigo); color: #fff; border-bottom-left-radius: 4px; }
.mock-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mock-chips span { font-size: .78rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }

/* ===== Grids ===== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 26px; color: var(--muted); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--g-indigo); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; }
.feature-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; color: #fff; }
.feature-icon svg { width: 22px; height: 22px; }
.fi-1 { background: var(--g-indigo); }
.fi-2 { background: linear-gradient(180deg, #7dd3fc, #0284c7); }
.fi-3 { background: linear-gradient(180deg, #c084fc, #6d28d9); }
.fi-4 { background: linear-gradient(180deg, #f9a8d4, #db2777); }

/* ===== KPIs ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.kpi-label { color: var(--muted); font-size: .88rem; line-height: 1.4; min-height: 2.5em; }
.kpi-value { margin-top: 8px; font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* ===== Charts ===== */
.dash { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 20px; }
.dash-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.chart h3 { margin-bottom: 4px; }
.chart figcaption { color: var(--muted); font-size: .84rem; margin-bottom: 18px; }
.chart figcaption.note-end { margin: 18px 0 0; }
.chart-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: .82rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-ghost { background: #dfe3ee; border: 1px solid var(--ghost-border); }
.dot-main { background: #4f46e5; }

/* Cột viên thuốc */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 24px; align-items: center; }
.flow-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.yaxis { height: 220px; display: flex; flex-direction: column-reverse; justify-content: space-between; font-size: .74rem; color: var(--muted); text-align: right; line-height: 1; }
.groups { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); }
.group { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pills { height: 220px; display: flex; align-items: flex-end; gap: 6px; }
.pill { width: clamp(20px, 4vw, 36px); height: 0; border-radius: 999px; transition: height 1s cubic-bezier(.2, .7, .2, 1); }
.pill-before { background: var(--ghost); border: 1px solid var(--ghost-border); }
.pill-after { background: var(--g-indigo); }
.is-visible .pill { height: var(--h); }
.group-label { margin-top: 10px; font-size: .76rem; color: var(--muted); text-align: center; line-height: 1.3; padding: 0 4px; }
.flow-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.stat-label { font-size: .84rem; color: var(--muted); }
.stat-value { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-up { color: #059669; }

/* Health – thanh tiến độ gradient */
.score { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 20px; }
.score-star { font-size: 1.6rem; align-self: center; }
.score-num { font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.score-tag { color: var(--muted); font-size: 1.1rem; }
.meters { display: grid; gap: 16px; }
.meter-head { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; margin-bottom: 6px; }
.meter-head b { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.is-visible .meter-fill { width: var(--w); }
.m-1 { background: var(--g-indigo-h); }
.m-2 { background: var(--g-sky-h); }
.m-3 { background: var(--g-purple-h); }
.m-4 { background: var(--g-pink-h); }

/* Strip – nhu cầu */
.big-num { font-size: 2.3rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.big-sub { font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.strip { display: flex; gap: 4px; margin-bottom: 20px; }
.seg { height: 28px; border-radius: 999px; transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.is-visible .seg { transform: none; }
.s-1 { background: var(--g-indigo-h); }
.s-2 { background: var(--g-sky-h); }
.s-3 { background: var(--g-purple-h); }
.s-4 { background: var(--g-pink-h); }
.seg-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; margin: 0; padding: 0; list-style: none; }
.seg-legend li { padding-left: 12px; border-left: 2px solid var(--seg); }
.seg-legend span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.seg-legend b { font-size: 1.15rem; font-weight: 600; }

/* Thông tin mẫu */
.info-list { margin: 8px 0 0; display: grid; gap: 0; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.info-row dd { margin: 0; font-weight: 600; text-align: right; }

/* Thanh ngang xếp hạng / cặp thanh */
.bars { display: grid; gap: 14px; }
.bar-row-label { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; line-height: 1.4; margin-bottom: 6px; }
.bar-row-label span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.is-visible .bar-fill { width: var(--w); }
.f-indigo { background: var(--g-indigo-h); }
.f-sky { background: var(--g-sky-h); }
.dot-sky { background: #0ea5e9; }
.bars-pairs { gap: 16px; }
.bars-pairs .bar-row-label { margin-bottom: 4px; }
.pair-line { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pair-line span { width: 3.4em; text-align: right; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-val { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Bộ lọc và bố cục các khu vực biểu đồ */
.filters { position: sticky; top: 72px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 0; margin-bottom: 8px; background: var(--bg); }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.filter-btns { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 12px; }
.filter-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.filter-btn:hover { color: var(--text); }
.filter-btn.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
.filter-n { margin: 0 0 0 auto; font-size: .85rem; color: var(--muted); }
.subsection { margin-top: 40px; }
.sub-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 2px; }
.subsection > p { margin-bottom: 16px; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cgrid .wide { grid-column: 1 / -1; }
#kpis { margin-top: 12px; }

/* ===== Tabs & quotes ===== */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; font-weight: 600; padding: 9px 18px; border-radius: 10px; cursor: pointer; }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(17, 24, 39, .1); }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quotes[hidden] { display: none; }
.quote { display: flex; flex-direction: column; gap: 16px; }
.quote blockquote { margin: 0; font-size: .96rem; }
.quote blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; background: var(--g-indigo); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.quote footer { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--primary-strong); flex: none; }
.quote-name { font-weight: 600; line-height: 1.3; }
.quote-role { color: var(--muted); font-size: .84rem; line-height: 1.3; }

/* ===== Chatbot ===== */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.chat { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-log { height: 420px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-bot { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--g-indigo); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--muted); }
.chat-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary-strong); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.chat-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.fab { position: fixed; right: 24px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%; display: none; place-items: center; background: var(--g-indigo); color: #fff; box-shadow: 0 8px 24px rgba(67, 56, 202, .4); z-index: 40; transition: opacity .2s, transform .2s; }
.fab svg { width: 24px; height: 24px; }
.fab:hover { transform: translateY(-2px); }
.fab.is-hidden { opacity: 0; pointer-events: none; }

/* ===== Team & footer ===== */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.person { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.team-meta { grid-column: 1 / -1; color: var(--muted); margin: 4px 0 0; }
.site-footer { padding: 20px 32px 28px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }
.site-footer p { margin: 0; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .features, .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash, .dash-2, .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .quotes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  body { padding: 0; background: var(--frame); }
  .app { grid-template-columns: minmax(0, 1fr); border-radius: 0; box-shadow: none; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: 280px; z-index: 70;
    transform: translateX(-100%); transition: transform .25s ease; visibility: hidden;
  }
  .sidebar.is-open { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .menu-btn { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .fab { display: grid; }
  main { padding: 24px 16px 8px; }
  .site-footer { padding: 20px 16px 28px; }
  .hero { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .quotes, .cgrid { grid-template-columns: 1fr; }
  .filter-n { margin-left: 0; width: 100%; }
  .filters { position: static; }
  .crumb span, .crumb i { display: none; }
  .search { max-width: none; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .kpis { gap: 12px; }
  .kpi { padding: 16px; }
  .top-actions .has-dot { display: none; }
  .flow-side { gap: 8px; }
  .stat-value { font-size: 1.15rem; }
  .chat-log { height: 360px; }
  .cta-row .btn { width: 100%; }
  .seg-legend { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill, .meter-fill, .seg, .sidebar { transition: none; }
}
