/* Kitebrook Early Learning: Parent Retention dashboard (prototype)
   Type: Familjen Grotesk (headings), Instrument Sans (UI/body), JetBrains Mono (labels). */
:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --side: #FBFAF7;
  --line: #E6E3DC;
  --line-2: #D6D2C8;
  --ink: #1B2420;
  --ink-2: #4F5A54;
  --ink-3: #7F8883;
  --pine: #1D5C4B;
  --pine-d: #144336;
  --pine-t: #E3EFEA;
  --pine-tt: #F1F7F4;
  --mari: #E39B1B;
  --mari-t: #FBF0DC;
  --sky-t: #E4EEF6;
  --clay-t: #F7E6E1;
  --good: #0E6B50;  --good-t: #E1F1EA;
  --warn: #8F5B00;  --warn-t: #FCEFD6;
  --bad: #B33526;   --bad-t: #FBE5E1;
  --s1: #0F7A5C; --s2: #E39B1B; --s3: #3A84C9; --s4: #D64E3C;
  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(27,36,32,.05), 0 6px 24px -12px rgba(27,36,32,.18);
  --f-head: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --side-w: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; letter-spacing: -.018em; line-height: 1.2; color: var(--ink); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, td.n, .tab-n { font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-3); font-weight: 500; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono, .eyebrow { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; text-decoration: none; color: var(--ink); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand__txt b { font: 700 18px/1 var(--f-head); letter-spacing: -.02em; }
.brand__txt small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav__group { margin: 14px 8px 6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); line-height: 1.35; }
.nav__item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; border: 0; background: none; width: 100%; text-align: left; line-height: 1.25; }
.nav__item:hover { background: #F0EEE8; color: var(--ink); }
.nav__item[aria-current="page"] { background: var(--pine); color: #fff; }
.nav__item[aria-current="page"] .nav__n { color: rgba(255,255,255,.7); }
.nav__n { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); width: 16px; flex: none; }
.nav__item .i { width: 17px; height: 17px; }
.nav__label { flex: 1; }
.nav__badge { font-size: 11px; font-weight: 600; background: var(--mari-t); color: var(--warn); border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav__item[aria-current="page"] .nav__badge { background: rgba(255,255,255,.18); color: #fff; }
.side__foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.nav__item--tour { color: var(--pine); font-weight: 600; }
.scrim { position: fixed; inset: 0; background: rgba(20,28,25,.38); z-index: 30; }

.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: 10px 28px; background: rgba(245,244,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__menu { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search__i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 34px 0 34px; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-t); }
.search__k { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 11px var(--f-mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: var(--side); }
.search__out { left: 0; right: 0; top: 42px; max-height: 360px; overflow: auto; }
.center-pick select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 30px 0 10px; font-size: 14px; }
.proto { margin-left: auto; font: 500 11px var(--f-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--warn); background: var(--mari-t); border: 1px dashed #E7C27A; padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; background: none; border-radius: 8px; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: #ECEAE3; color: var(--ink); }
.bell, .me { position: relative; }
.bell__n { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; border-radius: 9px; background: var(--s4); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); box-sizing: content-box; }
.me__btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.me__btn:hover { background: #ECEAE3; }
.pop { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; }
.pop--bell { right: 0; top: 44px; width: 340px; }
.pop--me { right: 0; top: 46px; width: 230px; }
.me__who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.me__who small { color: var(--ink-3); font-size: 12.5px; }
.pop__item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.pop__item:hover { background: var(--pine-tt); }
.pop__item small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pop__head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 8px; }
.dot-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--s3); margin-top: 6px; flex: none; }
.dot-read { width: 8px; height: 8px; flex: none; }

.view { padding: 26px 28px 80px; max-width: 1360px; width: 100%; outline: none; }

/* ---------- Page head ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.ph__txt { max-width: 760px; }
.ph .eyebrow { margin-bottom: 6px; display: block; }
.ph h1 { margin-bottom: 6px; }
.ph .lede { color: var(--ink-2); font-size: 15px; }
.value { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 10px; padding: 7px 12px; background: var(--pine-tt); border: 1px solid #D5E7DF; border-radius: 8px; font-size: 14px; color: var(--ink); }
.value b { font-weight: 600; }
.demo-tag { font: 500 10px var(--f-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; line-height: 16px; white-space: nowrap; }
.ph__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card__head p { color: var(--ink-3); font-size: 13px; }
.card__body { padding: 16px 18px; }
.card__foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
.g-side { grid-template-columns: 330px minmax(0, 1fr); }
.g-re { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); }
.kpis.kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.sp { flex: 1; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: #F4F2EC; border-color: #C9C4B8; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn--p { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn--p:hover { background: var(--pine-d); border-color: var(--pine-d); }
.btn--ghost { border-color: transparent; background: none; color: var(--pine); }
.btn--ghost:hover { background: var(--pine-tt); border-color: transparent; }
.btn--sm { height: 28px; padding: 0 9px; font-size: 13px; border-radius: 7px; }
.btn--warn { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { border: 0; background: none; color: var(--pine); font-weight: 600; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: var(--pine); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .tab-n { font-size: 11.5px; opacity: .7; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 21px; white-space: nowrap; background: #EFEDE7; color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill--plain::before { display: none; }
.pill--good { background: var(--good-t); color: var(--good); }
.pill--warn { background: var(--warn-t); color: var(--warn); }
.pill--bad { background: var(--bad-t); color: var(--bad); }
.pill--info { background: var(--sky-t); color: #24567F; }
.pill--pine { background: var(--pine-t); color: var(--pine); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 0 7px; line-height: 19px; border-radius: 5px; background: #EFEDE7; color: var(--ink-2); }
.tag--warn { background: var(--warn-t); color: var(--warn); }
.tag--bad { background: var(--bad-t); color: var(--bad); }
.tag--info { background: var(--sky-t); color: #24567F; }
.tag--ai { background: #EEE9FB; color: #4B3A9A; font-family: var(--f-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }

.av { --av: var(--pine-t); --avc: var(--pine); width: 34px; height: 34px; border-radius: 50%; background: var(--av); color: var(--avc); display: inline-grid; place-items: center; font: 600 12.5px var(--f-ui); flex: none; letter-spacing: .02em; }
.av--sm { width: 28px; height: 28px; font-size: 11px; }
.av--lg { width: 52px; height: 52px; font-size: 17px; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 7px 10px; font-size: 14px; font-weight: 400; color: var(--ink); min-height: 36px; }
textarea.inp { resize: vertical; line-height: 1.5; min-height: 96px; }
.inp:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-t); }
.inp--sm { min-height: 30px; padding: 4px 8px; font-size: 13px; }

.switch { position: relative; width: 36px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #CFCAC0; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--pine); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { outline: 2px solid var(--pine); outline-offset: 2px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; background: var(--side); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FCFBF8; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #EFECE6; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FBFAF6; }
.tbl .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl .who b { font-weight: 600; display: block; }
.tbl .who small { color: var(--ink-3); font-size: 12.5px; }
.tbl-wrap { overflow-x: auto; }
td.n, th.n { text-align: right; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty svg { width: 34px; height: 34px; color: var(--line-2); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 2px; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px 12px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.kpi:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.kpi__label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.kpi__value { font: 700 26px/1.1 var(--f-head); letter-spacing: -.02em; }
.kpi__value small { font: 500 13px var(--f-ui); color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.kpi__delta { font-size: 12.5px; color: var(--ink-3); }
.kpi__delta b { color: var(--good); font-weight: 600; }
.kpi__delta b.down { color: var(--bad); }
.kpi svg.spark { margin-top: 6px; width: 100%; height: 30px; overflow: visible; }
.meter { height: 6px; border-radius: 99px; background: var(--pine-t); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--s1); border-radius: 99px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid #EFECE6; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; font-size: 14px; }
.list .s { color: var(--ink-3); font-size: 13px; }
.qicon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--pine-tt); color: var(--pine); }
.qicon--warn { background: var(--warn-t); color: var(--warn); }
.qicon--bad { background: var(--bad-t); color: var(--bad); }
.qicon--info { background: var(--sky-t); color: #24567F; }
.qicon--mari { background: var(--mari-t); color: #9A6200; }
.feed li { align-items: flex-start; }
.feed .when { font: 500 11px var(--f-mono); color: var(--ink-3); width: 62px; flex: none; padding-top: 2px; }
.feed a { color: var(--ink); text-decoration: none; }
.feed a:hover { text-decoration: underline; }
.feed b { font-weight: 600; }

.risk { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.score { font: 700 15px var(--f-head); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.score--hi { background: var(--bad-t); color: var(--bad); }
.score--md { background: var(--warn-t); color: var(--warn); }
.score--lo { background: var(--good-t); color: var(--good); }

/* ---------- Charts ---------- */
.segbar { display: flex; gap: 2px; height: 28px; border-radius: 4px; overflow: hidden; }
.segbar > div { display: flex; align-items: center; padding-left: 8px; font-size: 12px; font-weight: 600; color: #fff; min-width: 0; white-space: nowrap; border-radius: 4px; }
.segbar > div.dk { color: #0B0B0B; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 12px; font-size: 13.5px; cursor: default; }
.hbar__name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar__bar { height: 16px; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; transition: width .35s ease; }
.hbar__val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.hbar__val small { color: var(--ink-3); font-weight: 500; }
.hbar.is-on .hbar__name { color: var(--ink); font-weight: 600; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 6px; max-width: 260px; line-height: 1.35; box-shadow: var(--shadow); }

/* ---------- Split list/detail ---------- */
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.plist { max-height: calc(100vh - 230px); overflow: auto; }
.plist__tools { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; background: var(--surface); z-index: 1; border-radius: var(--r) var(--r) 0 0; }
.prow { display: flex; gap: 10px; align-items: center; padding: 10px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #F0EDE7; }
.prow:hover { background: #FBFAF6; }
.prow[aria-current="true"] { background: var(--pine-tt); box-shadow: inset 3px 0 0 var(--pine); }
.prow .grow { flex: 1; min-width: 0; }
.prow b { font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow small { color: var(--ink-3); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .when { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.flagdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 4px; vertical-align: middle; }
.room-h { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 12px 12px 4px; }

.prof__head { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.prof__head h2 { font-size: 20px; }
.prof__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.prof__meta > div { padding: 12px 18px; border-right: 1px solid var(--line); min-width: 0; }
.prof__meta > div:last-child { border-right: 0; }
.prof__meta dt { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.prof__meta dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.prof__meta dd.em { font-size: 13px; }
.kid { display: inline-flex; align-items: center; gap: 6px; background: var(--side); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px 2px 3px; font-size: 13px; }
.kid .av { width: 22px; height: 22px; font-size: 10px; }

.tl { list-style: none; margin: 0; padding: 4px 18px 18px; }
.tl__month { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 16px 0 6px 44px; }
.tl__e { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 8px 0; position: relative; }
.tl__e::before { content: ""; position: absolute; left: 15.5px; top: 40px; bottom: -8px; width: 1px; background: var(--line); }
.tl__e:last-child::before { display: none; }
.tl__ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--side); border: 1px solid var(--line); color: var(--ink-2); }
.tl__ic .i { width: 15px; height: 15px; }
.tl__ic--sms { background: var(--pine-tt); color: var(--pine); border-color: #D5E7DF; }
.tl__ic--email { background: var(--sky-t); color: #24567F; border-color: #D2E2EF; }
.tl__ic--call { background: var(--mari-t); color: #9A6200; border-color: #F1DDB5; }
.tl__ic--in { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--mari); }
.tl__top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl__top b { font-weight: 600; font-size: 14px; }
.tl__top time { font-size: 12.5px; color: var(--ink-3); }
.tl__body { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.tl__meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl mark { background: #FBE9B9; color: inherit; border-radius: 2px; }

.composer { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; background: #FCFBF8; margin: 14px 18px 0; display: flex; flex-direction: column; gap: 10px; }
.composer[hidden] { display: none; }
.counter { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter b { color: var(--ink); }
.counter.over b { color: var(--bad); }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; font-size: 13.5px; }
.banner .i { margin-top: 1px; }
.banner--warn { background: var(--warn-t); color: #6B4400; }
.banner--bad { background: var(--bad-t); color: #7E2418; }
.banner--info { background: var(--sky-t); color: #1D4767; }
.banner--good { background: var(--good-t); color: #0B4F3B; }

/* ---------- Progress ---------- */
.dom { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.dom__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.dom__bar { display: flex; gap: 2px; height: 8px; margin-bottom: 10px; }
.dom__bar i { flex: 1; border-radius: 99px; background: #ECE9E2; }
.dom__bar i.secure { background: var(--s1); }
.dom__bar i.developing { background: var(--s3); }
.dom__bar i.emerging { background: var(--s2); }
.ms { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed #EAE6DE; font-size: 13.5px; }
.ms button.st { border: 0; cursor: pointer; }
.st { font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 0 9px; line-height: 21px; white-space: nowrap; }
.st.secure { background: var(--good-t); color: var(--good); }
.st.developing { background: var(--sky-t); color: #24567F; }
.st.emerging { background: var(--warn-t); color: var(--warn); }
.bigbar { height: 10px; border-radius: 99px; background: var(--pine-t); overflow: hidden; display: flex; gap: 2px; }
.bigbar i { display: block; height: 100%; }

/* ---------- SMS phone ---------- */
.phone { width: 270px; border-radius: 34px; border: 9px solid #1E2522; background: #F3F3F5; padding: 28px 12px 18px; position: relative; margin: 0 auto; min-height: 430px; box-shadow: var(--shadow); }
.phone::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 70px; height: 6px; border-radius: 6px; background: #1E2522; }
.phone__from { text-align: center; font-size: 11.5px; color: #6B7280; margin-bottom: 12px; }
.phone__from b { display: block; color: #111; font-size: 13px; }
.bubble { background: #E5E5EA; color: #111; border-radius: 17px 17px 17px 5px; padding: 8px 12px; font-size: 13.5px; line-height: 1.4; max-width: 90%; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble--me { background: #2F7D63; color: #fff; border-radius: 17px 17px 5px 17px; margin-left: auto; margin-top: 8px; }
.phone__t { font-size: 10.5px; color: #8E8E93; text-align: center; margin: 10px 0 6px; }
.merge { display: flex; gap: 6px; flex-wrap: wrap; }
.merge button { border: 1px dashed var(--line-2); background: var(--side); border-radius: 6px; font: 500 11.5px var(--f-mono); padding: 3px 7px; color: var(--ink-2); }
.merge button:hover { border-color: var(--pine); color: var(--pine); }
.rule { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 14px 18px; border-bottom: 1px solid #EFECE6; }
.rule:last-child { border-bottom: 0; }
.rule__s { font-size: 14.5px; line-height: 1.5; }
.rule__s b { font-weight: 600; }
.rule__s .kw { font: 500 10.5px var(--f-mono); color: var(--pine); letter-spacing: .04em; text-transform: uppercase; margin-right: 4px; }
.rule.is-off .rule__s { color: var(--ink-3); }
.rule__m { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.rule.is-sel { background: var(--pine-tt); }

/* ---------- Email preview ---------- */
.mailprev { background: #EEECE6; border-radius: var(--r); padding: 18px; display: flex; justify-content: center; transition: padding .2s; }
.mail { background: #fff; width: 100%; max-width: 560px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: max-width .25s; font-family: Georgia, "Times New Roman", serif; }
.mailprev.is-mobile .mail { max-width: 330px; }
.mail__bar { padding: 10px 14px; border-bottom: 1px solid #eee; font: 12.5px var(--f-ui); color: #555; }
.mail__bar b { color: #111; }
.mail__hd { display: flex; align-items: center; gap: 8px; padding: 18px 22px 0; font: 700 16px var(--f-head); color: var(--pine); }
.mail__body { padding: 14px 22px 8px; font-size: 15px; line-height: 1.6; color: #2A2F2C; white-space: pre-wrap; }
.mail__cta { margin: 8px 22px 20px; display: inline-block; background: var(--pine); color: #fff; padding: 10px 18px; border-radius: 6px; font: 600 14px var(--f-ui); }
.mail__ft { background: #F7F6F2; padding: 12px 22px; font: 11.5px var(--f-ui); color: #888; }
.tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.tpl button { min-width: 0; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 11px 12px; }
.tpl button:hover { border-color: var(--line-2); }
.tpl button[aria-pressed="true"] { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.tpl b { display: block; font-size: 14px; font-weight: 600; }
.tpl small { color: var(--ink-3); font-size: 12px; display: block; margin-top: 2px; }
.minibars { display: flex; gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--ink-2); }
.minibars span { flex: 1; }
.minibars i { display: block; height: 4px; background: var(--pine-t); border-radius: 99px; margin-top: 3px; overflow: hidden; }
.minibars i em { display: block; height: 100%; background: var(--s1); }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal__dow { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #FCFBF8; }
.cal__d { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; background: var(--surface); text-align: left; border-top: 0; border-left: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.cal__d:hover { background: #FBFAF6; }
.cal__d.is-out { background: #FAF9F5; color: var(--ink-3); }
.cal__d.is-today .cal__n { background: var(--pine); color: #fff; }
.cal__d.is-sel { box-shadow: inset 0 0 0 2px var(--pine); }
.cal__n { font-weight: 600; font-size: 12.5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cal__it { display: block; border-radius: 4px; padding: 1px 5px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 17px; }
.cal__it--bday { background: var(--mari-t); color: #7A4D00; }
.cal__it--event { background: var(--pine-t); color: var(--pine-d); }
.cal__it--closure { background: #ECE9E2; color: var(--ink-2); }
.cal__more { font-size: 11px; color: var(--ink-3); }

/* ---------- Kanban ---------- */
.kb { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.kb__col { background: #EFEDE7; border-radius: var(--r); padding: 8px; min-height: 160px; transition: background .12s, box-shadow .12s; }
.kb__col.is-over { background: var(--pine-t); box-shadow: inset 0 0 0 2px var(--pine); }
.kb__h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; }
.kb__h h3 { display: flex; align-items: center; gap: 7px; }
.kb__h h3 i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.kb__card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 11px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.kb__card:active { cursor: grabbing; }
.kb__card.is-drag { opacity: .45; }
.kb__card.is-new { animation: pop .5s ease; }
@keyframes pop { 0% { box-shadow: 0 0 0 3px var(--mari); } 100% { box-shadow: 0 1px 1px rgba(0,0,0,.03); } }
.kb__card b { font-weight: 600; font-size: 14px; }
.kb__card .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.kb__card .acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.kb__card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.count-big { font: 700 34px/1 var(--f-head); letter-spacing: -.03em; }

/* ---------- Absence ---------- */
.abs { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(170px, 1fr) minmax(180px, 1.1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid #EFECE6; }
.abs:last-child { border-bottom: 0; }
.abs.is-resolved { background: #FCFBF8; }
.abs .steps { font-size: 12.5px; color: var(--ink-3); }
.timer { font: 600 12.5px var(--f-ui); color: var(--bad); font-variant-numeric: tabular-nums; display: inline-flex; gap: 5px; align-items: center; }
.days14 { display: flex; gap: 3px; }
.days14 i { width: 12px; height: 16px; border-radius: 3px; background: #E7E4DC; }
.days14 i.on { background: var(--s4); }

/* ---------- Segmentation ---------- */
.cond { display: grid; grid-template-columns: 54px minmax(140px, 1fr) minmax(110px, .8fr) minmax(120px, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.cond__w { font: 500 11px var(--f-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.match { display: flex; align-items: baseline; gap: 8px; }
.match b { font: 700 30px/1 var(--f-head); letter-spacing: -.03em; transition: color .2s; }
.match.flash b { color: var(--mari); }

/* ---------- Reviews ---------- */
.stars { color: var(--mari); letter-spacing: 1px; font-size: 14px; }
.stars .off { color: #D9D5CC; }
.rev { padding: 14px 18px; border-bottom: 1px solid #EFECE6; }
.rev:last-child { border-bottom: 0; }
.rev p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.rev .reply { margin-top: 10px; padding: 10px 12px; background: var(--side); border-left: 3px solid var(--pine); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.rule-li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #EAE6DE; font-size: 14px; }
.rule-li:last-child { border-bottom: 0; }

/* ---------- Reactivation ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stepc { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); position: relative; }
.stepc + .stepc::before { content: ""; position: absolute; left: -12px; top: 26px; width: 12px; height: 1px; background: var(--line-2); }
.stepc__n { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--pine); }
.ai-line { font-size: 13px; color: var(--ink-2); background: #F7F5FD; border: 1px solid #E7E1F8; border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.fit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.fit i { display: inline-block; width: 38px; height: 6px; border-radius: 99px; background: #E7E4DC; overflow: hidden; }
.fit i em { display: block; height: 100%; background: var(--s1); }

/* ---------- Modal, toast, tour ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,28,25,.42); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__box { background: var(--surface); border-radius: 14px; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 20px 60px -20px rgba(0,0,0,.4); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal__body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); animation: tin .22s ease; max-width: 92vw; }
.toast .i { color: #8FD3B6; }
.toast button { background: none; border: 0; color: #F4C66B; font-weight: 600; padding: 0 0 0 6px; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.tour { position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 360px; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.55); }
.tour[hidden] { display: none; }
.tour__n { font: 500 10.5px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: #F4C66B; }
.tour h2 { color: #fff; font-size: 18px; margin: 6px 0 6px; }
.tour p { font-size: 14px; color: #D5DDD9; line-height: 1.5; }
.tour__prog { display: flex; gap: 3px; margin: 14px 0 12px; }
.tour__prog i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); }
.tour__prog i.on { background: var(--mari); }
.tour__acts { display: flex; gap: 8px; align-items: center; }
.tour .btn { border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
.tour .btn:hover { background: rgba(255,255,255,.1); }
.tour .btn--p { background: var(--mari); border-color: var(--mari); color: #1B1405; }
.tour .btn--p:hover { background: #F0AC33; }
.tour__skip { background: none; border: 0; color: #AEB9B4; font-size: 13px; margin-right: auto; }
.tour__keys { font-size: 11.5px; color: #8E9A95; margin-top: 10px; }
.tour-focus { outline: 3px solid var(--mari) !important; outline-offset: 4px; border-radius: 10px; transition: outline-color .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  :root { --side-w: 68px; }
  .side { padding: 14px 10px; align-items: center; }
  .brand__txt, .nav__label, .nav__group, .nav__n, .nav__badge, .side__foot span { display: none; }
  .brand { padding: 6px 0 14px; }
  .nav__item { justify-content: center; padding: 9px; position: relative; }
  .nav__group { display: block; height: 1px; background: var(--line); margin: 10px 6px; overflow: hidden; color: transparent; }
  .g-main, .g-side { grid-template-columns: 1fr; }
  .g-re { grid-template-columns: 180px minmax(0, 1fr); }
  .g-re > :last-child { grid-column: 1 / -1; }
  .split { grid-template-columns: 280px minmax(0, 1fr); }
  .prof__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof__meta > div:nth-child(2) { border-right: 0; }
  .prof__meta > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .abs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --side-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .22s ease; align-items: stretch; padding: 14px 12px; }
  .side.is-open { transform: none; }
  .brand__txt, .nav__label, .nav__n, .nav__badge, .side__foot span { display: initial; }
  .brand__txt { display: flex; }
  .nav__item { justify-content: flex-start; padding: 8px 9px; }
  .nav__group { display: block; height: auto; background: none; color: var(--ink-3); margin: 14px 8px 6px; }
  .top { padding: 8px 14px; gap: 8px; }
  .top__menu { display: inline-grid; }
  .center-pick, .me__name, .search__k { display: none; }
  .proto { font-size: 9.5px; padding: 4px 6px; }
  .view { padding: 18px 14px 80px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .g3, .g-re, .split, .steps3 { grid-template-columns: 1fr; }
  .kpis.kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plist { max-height: 340px; }
  .prof__meta { grid-template-columns: 1fr 1fr; }
  .abs { grid-template-columns: 1fr; gap: 8px; }
  .cond { grid-template-columns: 1fr 1fr; }
  .cond__w { grid-column: 1 / -1; }
  .hbar { grid-template-columns: 110px 1fr; }
  .cal__d { min-height: 58px; padding: 3px; }
  .cal__it { font-size: 0; height: 6px; padding: 0; }
  .tour { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .pop--bell { position: fixed; left: 10px; right: 10px; top: 56px; width: auto; }
  .phone { width: 250px; }
  .stepc + .stepc::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
