/* ============================================================
   THE SUMMIT SCHOOL — Unified Platform Mockup
   Brand: navy #24405b · sage #5a7c70 · gold #fbbb4b
   Type:  Fraunces (display) · Karla (UI)
   ============================================================ */

:root {
  --navy: #24405b;
  --navy-deep: #1a3049;
  --navy-night: #132538;
  --sage: #5a7c70;
  --sage-soft: #e3ebe6;
  --gold: #fbbb4b;
  --gold-soft: #fdeecd;
  --teal: #a1c7ca;
  --teal-soft: #e7f1f2;
  --lime: #c4d15e;
  --plum: #964379;
  --plum-soft: #f2e2ec;
  --paper: #faf8f3;
  --paper-warm: #f3efe6;
  --card: #ffffff;
  --ink: #26313c;
  --ink-soft: #5a6675;
  --ink-faint: #8d97a5;
  --line: #e4ddce;
  --line-soft: #eee9dd;
  --red: #b3512f;
  --red-soft: #f6e3dc;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Karla', -apple-system, 'Helvetica Neue', sans-serif;
  --shadow: 0 1px 2px rgba(38,49,60,.05), 0 4px 14px rgba(38,49,60,.06);
  --shadow-lift: 0 2px 4px rgba(38,49,60,.07), 0 10px 28px rgba(38,49,60,.12);
  --r: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--body); cursor: pointer; border: none; background: none; font-size: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--navy-deep); }

/* ============ TOP APP BAR ============ */
.appbar {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--navy-deep), var(--navy-night));
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 0 20px; height: 56px;
}
.ab-logo { display: flex; align-items: center; }
.ab-logo img { height: 32px; display: block; filter: brightness(0) invert(1); opacity: .96; }
.ab-search {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 7px 12px;
  color: rgba(223,231,239,.65); font-size: 13px; cursor: pointer;
}
.ab-search:hover { background: rgba(255,255,255,.11); }
.ab-search kbd {
  margin-left: auto; font-family: var(--body); font-size: 10.5px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 4px; padding: 1px 5px;
  color: rgba(223,231,239,.5);
}
.ab-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ab-bell {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #c6d2de;
  transition: background .15s, color .15s;
}
.ab-bell:hover { background: rgba(255,255,255,.09); color: #fff; }
.ab-bell .badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--gold); color: var(--navy-deep);
  font-size: 9.5px; font-weight: 800; line-height: 1;
  border-radius: 99px; padding: 2.5px 5px;
  border: 2px solid var(--navy-deep);
}
.ab-av { border: 2px solid rgba(255,255,255,.28); cursor: pointer; width: 34px; height: 34px; font-size: 12px; }
.ab-av:hover { border-color: var(--gold); }

/* notification panel */
.notifpanel {
  position: absolute; top: calc(100% + 10px); right: 14px;
  width: 375px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lift); overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s cubic-bezier(.2,.8,.3,1);
  z-index: 75;
}
.notifpanel.open { opacity: 1; pointer-events: auto; transform: none; }
.np-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
}
.np-h h4 { font-family: var(--display); font-size: 15px; font-weight: 580; color: var(--ink); }
.np-h button { color: var(--sage); font-size: 12px; font-weight: 800; }
.np-h button:hover { color: var(--navy); }
.np-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  transition: background .12s;
}
.np-row:hover { background: #fcfaf5; }
.np-row.unread { background: #fdf8ec; }
.np-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; visibility: hidden; }
.np-row.unread .dot { visibility: visible; }
.np-row .t { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.np-row .t .s { display: block; font-size: 11.5px; color: var(--ink-soft); font-weight: 500; padding-top: 1px; }
.np-row .w { font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; padding-top: 2px; }
.np-f { display: block; width: 100%; padding: 12px; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--sage); }
.np-f:hover { background: var(--paper-warm); }

/* ============ SHELL ============ */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 56px); }

/* ---- Sidebar ---- */
.sidebar {
  background: linear-gradient(180deg, var(--navy-night), var(--navy-deep));
  color: #dfe7ef;
  display: flex; flex-direction: column;
  position: sticky; top: 56px; height: calc(100vh - 56px);
  padding: 12px 14px 16px;
}
.sidebar .logo {
  display: block; padding: 4px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  margin-bottom: 14px;
}
.sidebar .logo img {
  width: 148px; display: block;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.sidebar .logo .sub {
  display: block; padding-top: 8px;
  font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav .nav-label {
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(223,231,239,.4); font-weight: 700;
  padding: 16px 10px 6px;
}
.nav a, .nav button.stub {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: #c6d2de;
  transition: background .15s, color .15s;
  width: 100%; text-align: left;
}
.nav a:hover, .nav button.stub:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active {
  background: rgba(251,187,75,.14);
  color: var(--gold);
  box-shadow: inset 2.5px 0 0 var(--gold);
}
.nav .ico { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav a.active .ico { opacity: 1; }
.nav .phase-tag {
  margin-left: auto; font-size: 8.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 2.5px 6px; border-radius: 99px;
  background: rgba(161,199,202,.16); color: var(--teal);
}
.sidebar .whoami {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 14px 6px 2px; margin-top: 12px;
}
.sidebar .whoami .av { width: 32px; height: 32px; font-size: 12px; }
.sidebar .whoami .nm { font-size: 12.5px; font-weight: 700; color: #fff; line-height: 1.25; }
.sidebar .whoami .rl { font-size: 10.5px; color: rgba(223,231,239,.5); }

/* ---- Main column ---- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 56px; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  background: rgba(250,248,243,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px; min-height: 58px;
}
.topbar h1 {
  font-family: var(--display); font-weight: 560; font-size: 20px;
  letter-spacing: -.01em; white-space: nowrap;
}
.topbar .crumb { color: var(--ink-faint); font-size: 13px; white-space: nowrap; }
.topbar .crumb b { color: var(--ink); font-weight: 700; }
.searchbox {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px;
  color: var(--ink-faint); font-size: 13px;
}
.searchbox kbd {
  margin-left: auto; font-family: var(--body); font-size: 10.5px;
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
  color: var(--ink-faint); background: var(--paper);
}
.topbar .spacer { flex: 1; }

/* ---- Layout switcher ---- */
.switcher {
  display: flex; align-items: center; gap: 10px;
  background: var(--navy-deep); border-radius: 99px;
  padding: 4px 5px 4px 14px;
  box-shadow: var(--shadow);
}
.switcher .sl {
  font-size: 10px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal);
}
.switcher .opts { display: flex; gap: 3px; }
.switcher button {
  width: 30px; height: 30px; border-radius: 99px;
  font-family: var(--display); font-style: italic; font-size: 14px;
  color: rgba(255,255,255,.55);
  transition: all .15s;
}
.switcher button:hover { color: #fff; background: rgba(255,255,255,.1); }
.switcher button.on { background: var(--gold); color: var(--navy-deep); font-weight: 700; }

/* ---- Content + variants ---- */
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.variant { display: none; animation: fadein .35s ease; }
body[data-layout="a"] .variant.va { display: block; }
body[data-layout="b"] .variant.vb { display: block; }
body[data-layout="c"] .variant.vc { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--navy-deep); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 12px 20px; border-radius: 99px;
  box-shadow: var(--shadow-lift);
  opacity: 0; transition: all .3s cubic-bezier(.2,.8,.3,1);
  z-index: 100; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--gold); }

/* ============ COMPONENTS ============ */

/* avatars */
.av {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
  font-family: var(--body); letter-spacing: .02em;
}
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.av.xl { width: 84px; height: 84px; font-size: 28px; border: 3px solid #fff; box-shadow: var(--shadow); }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.av.c1 { background: var(--sage); } .av.c2 { background: var(--navy); }
.av.c3 { background: var(--plum); } .av.c4 { background: #b3773a; }
.av.c5 { background: #4a7f83; } .av.c6 { background: #7c6a9c; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3.5px 9px; border-radius: 99px; white-space: nowrap;
}
.chip.tutoring { background: var(--sage-soft); color: #3d5a4f; }
.chip.testing  { background: var(--teal-soft); color: #33686d; }
.chip.camp     { background: var(--gold-soft); color: #8a5f13; }
.chip.enroll   { background: #e2e8f0; color: var(--navy); }
.chip.donor    { background: var(--plum-soft); color: var(--plum); }
.chip.bench    { background: #eef1d8; color: #66702a; }
.chip.muted    { background: var(--paper-warm); color: var(--ink-soft); }
.chip .dt { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px;
}
.pill.ok   { background: var(--sage-soft); color: #3d6a52; }
.pill.due  { background: var(--red-soft); color: var(--red); }
.pill.wait { background: var(--gold-soft); color: #8a5f13; }
.pill.new  { background: var(--teal-soft); color: #2f666c; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.card .card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px 13px; border-bottom: 1px solid var(--line-soft);
}
.card .card-h h3 {
  font-family: var(--display); font-weight: 580; font-size: 15.5px; letter-spacing: -.005em;
}
.card .card-h .cnt {
  font-size: 11px; font-weight: 800; color: var(--ink-faint);
  background: var(--paper-warm); border-radius: 99px; padding: 2px 8px;
}
.card .card-h .more { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--sage); }
.card .card-h .more:hover { color: var(--navy); }

/* stat tiles */
.stat-tile { padding: 18px 20px 16px; position: relative; overflow: hidden; }
.stat-tile .k {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.stat-tile .v {
  font-family: var(--display); font-weight: 520; font-size: 34px;
  letter-spacing: -.02em; line-height: 1.15; color: var(--navy);
}
.stat-tile .d { font-size: 12px; color: var(--ink-faint); }
.stat-tile .d b.up { color: #3d6a52; } .stat-tile .d b.dn { color: var(--red); }
.stat-tile .spark { position: absolute; right: 14px; bottom: 14px; opacity: .9; }
.stat-tile.accent { background: var(--navy-deep); border-color: var(--navy-deep); }
.stat-tile.accent .k { color: var(--teal); }
.stat-tile.accent .v { color: #fff; }
.stat-tile.accent .d { color: rgba(255,255,255,.55); }

/* list rows (reminders, activity) */
.rowlist { list-style: none; }
.rowlist li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
}
.rowlist li:last-child { border-bottom: none; }
.rowlist .t { flex: 1; min-width: 0; }
.rowlist .t .p { font-weight: 700; font-size: 13.5px; }
.rowlist .t .p a:hover { color: var(--sage); text-decoration: underline; }
.rowlist .t .s { font-size: 12.5px; color: var(--ink-soft); padding-top: 1px; }
.rowlist .when { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; padding-top: 2px; }
.rowlist .act {
  font-size: 12px; font-weight: 800; color: var(--navy);
  background: var(--gold); padding: 6px 13px; border-radius: 99px;
  white-space: nowrap; align-self: center;
  transition: transform .12s;
}
.rowlist .act:hover { transform: translateY(-1px); }
.rowlist .act.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-soft); }
.rowlist .act.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--sage); color: var(--sage); }

/* icon dot for reminders */
.idot {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.idot.call { background: var(--red-soft); color: var(--red); }
.idot.mail { background: var(--teal-soft); color: #33686d; }
.idot.form { background: var(--gold-soft); color: #8a5f13; }
.idot.cal  { background: var(--sage-soft); color: #3d6a52; }
.idot.pay  { background: var(--plum-soft); color: var(--plum); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead th {
  text-align: left; font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  padding: 11px 16px; border-bottom: 1.5px solid var(--line);
  background: var(--paper-warm); white-space: nowrap;
}
.tbl thead th:first-child { border-radius: 8px 0 0 0; }
.tbl thead th:last-child { border-radius: 0 8px 0 0; }
.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fcfaf5; }
.tbl tbody tr.sel { background: var(--gold-soft); }
.tbl .who { display: flex; align-items: center; gap: 11px; }
.tbl .who .nm { font-weight: 700; }
.tbl .who .nm:hover { color: var(--sage); }
.tbl .who .mt { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 400; }
.tbl .chips { display: flex; gap: 5px; flex-wrap: wrap; }
.tbl .num { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.cbx { width: 15px; height: 15px; accent-color: var(--sage); }

/* filter bar */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar .fsearch {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; color: var(--ink-faint); min-width: 240px;
}
.fchip {
  font-size: 12px; font-weight: 700; padding: 7px 14px;
  border-radius: 99px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink-soft);
  transition: all .13s;
}
.fchip:hover { border-color: var(--sage); color: var(--sage); }
.fchip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.fchip .n { opacity: .6; font-weight: 600; padding-left: 3px; }
.filterbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 800; border-radius: 8px;
  padding: 9px 16px; transition: all .15s;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn.gold { background: var(--gold); color: var(--navy-deep); }
.btn.gold:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn.ghost { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-soft); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--sage); color: var(--sage); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--line); overflow-x: auto; }
.tabs button {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  padding: 10px 15px 11px; border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px; white-space: nowrap; transition: color .13s;
}
.tabs button:hover { color: var(--navy); }
.tabs button.on { color: var(--navy); border-bottom-color: var(--gold); }
.tabs button .bdg {
  font-size: 10px; font-weight: 800; background: var(--paper-warm);
  border-radius: 99px; padding: 1px 6px; margin-left: 5px; color: var(--ink-faint);
}
.tabs button.svc { color: var(--sage); }
.tabs button.svc.on { color: #3d5a4f; }
.tabpanes .pane { display: none; animation: fadein .3s ease; }
.tabpanes .pane.on { display: block; }

/* timeline */
.timeline { list-style: none; position: relative; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 20px; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline .tdot {
  position: absolute; left: -24px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line);
  background: var(--ink-faint);
}
.timeline .tdot.g { background: var(--sage); } .timeline .tdot.y { background: var(--gold); }
.timeline .tdot.p { background: var(--plum); } .timeline .tdot.t { background: var(--teal); }
.timeline .tt { font-weight: 700; font-size: 13.5px; }
.timeline .ts { font-size: 12.5px; color: var(--ink-soft); }
.timeline .tw { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding-top: 2px; }

/* form status rows */
.formrow { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.formrow:last-child { border-bottom: none; }
.formrow .fst {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
}
.formrow .fst.done { background: var(--sage-soft); color: #3d6a52; }
.formrow .fst.pend { background: var(--gold-soft); color: #8a5f13; }
.formrow .fnm { flex: 1; font-weight: 700; font-size: 13.5px; }
.formrow .fnm span { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.formrow .fw { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--paper-warm); border: 1px solid var(--line); border-radius: var(--r); min-width: 250px; }
.kcol .kh {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.kcol .kh .kn { margin-left: auto; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-size: 10.5px; }
.kcol .kh .kdot { width: 8px; height: 8px; border-radius: 50%; }
.kcards { padding: 0 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.kcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 13px; box-shadow: var(--shadow);
  transition: transform .13s, box-shadow .13s; cursor: pointer;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.kcard .knm { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kcard .kmt { font-size: 11.5px; color: var(--ink-soft); padding: 3px 0 7px; }
.kcard .kft { display: flex; align-items: center; gap: 6px; }
.kcard .kft .when { margin-left: auto; font-size: 10.5px; color: var(--ink-faint); }

/* mini bar chart */
.bars { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 34px; align-items: center; gap: 12px; font-size: 12.5px; }
.bar-row .bl { font-weight: 700; color: var(--ink-soft); }
.bar-row .bt { height: 10px; border-radius: 99px; background: var(--paper-warm); overflow: hidden; }
.bar-row .bf { height: 100%; border-radius: 99px; }
.bar-row .bn { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* generic grids */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .g4 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } }
.mt { margin-top: 18px; }

/* section label inside pages */
.seclabel {
  font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin: 22px 0 10px;
}

/* ============ DASHBOARD VARIANTS ============ */

/* B — Today view */
.today-grid { display: grid; grid-template-columns: 300px 1fr 280px; gap: 18px; align-items: start; }
@media (max-width: 1200px) { .today-grid { grid-template-columns: 1fr; } }
.datecard { text-align: center; padding: 26px 20px 22px; background: var(--navy-deep); border-color: var(--navy-deep); }
.datecard .dow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--teal); font-weight: 800; }
.datecard .dnum { font-family: var(--display); font-size: 74px; font-weight: 480; color: #fff; line-height: 1.05; letter-spacing: -.03em; }
.datecard .dmo { font-family: var(--display); font-style: italic; font-size: 17px; color: var(--gold); }
.agenda { list-style: none; }
.agenda li { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.agenda li:last-child { border-bottom: none; }
.agenda .atime { font-size: 11.5px; font-weight: 800; color: var(--sage); font-variant-numeric: tabular-nums; white-space: nowrap; width: 58px; }
.agenda .at { font-size: 13px; font-weight: 700; }
.agenda .at span { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.feedgroup { margin-bottom: 4px; }
.feedgroup .fg-h {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  padding: 4px 2px 8px;
}
.feedgroup .fg-h.overdue { color: var(--red); }
.feedgroup .fg-h.today { color: var(--sage); }
.feedgroup .fg-h.week { color: var(--ink-faint); }
.feedgroup .fg-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ministat { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.ministat:last-child { border-bottom: none; }
.ministat .k { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.ministat .v { font-family: var(--display); font-size: 22px; font-weight: 540; color: var(--navy); }

/* C — pipeline-first strip stats */
.strip { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.strip .s {
  flex: 1; padding: 14px 20px; border-right: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 13px;
}
.strip .s:last-child { border-right: none; }
.strip .sv { font-family: var(--display); font-size: 26px; font-weight: 520; color: var(--navy); }
.strip .sk { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); line-height: 1.35; }
@media (max-width: 1000px) { .strip { flex-wrap: wrap; } .strip .s { min-width: 45%; } }

/* ============ CONTACTS INDEX VARIANTS ============ */

/* B — card grid */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 15px; }
.ccard { padding: 18px 18px 15px; position: relative; transition: transform .15s, box-shadow .15s; display: block; }
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ccard .top { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.ccard .nm { font-family: var(--display); font-size: 16.5px; font-weight: 580; }
.ccard .mt { font-size: 12px; color: var(--ink-faint); }
.ccard .chips { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 12px; }
.ccard .foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-soft); padding-top: 11px;
  font-size: 11.5px; color: var(--ink-faint);
}
.ccard .foot b { color: var(--ink-soft); }
.ccard .bookmark {
  position: absolute; top: 0; right: 18px; width: 20px; height: 26px;
  background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}

/* C — split pane */
.splitpane { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .splitpane { grid-template-columns: 1fr; } }
.slist { overflow: hidden; }
.slist .srow {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .12s; width: 100%; text-align: left;
}
.slist .srow:hover { background: #fcfaf5; }
.slist .srow.sel { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.slist .srow .nm { font-weight: 700; font-size: 13.5px; }
.slist .srow .mt { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 400; }
.slist .srow .end { margin-left: auto; text-align: right; }
.preview { position: sticky; top: 84px; }
.preview .ph {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px 18px;
  background: linear-gradient(120deg, var(--navy-deep), var(--navy));
  border-radius: var(--r) var(--r) 0 0; color: #fff;
}
.preview .ph .nm { font-family: var(--display); font-size: 22px; font-weight: 540; }
.preview .ph .mt { font-size: 12.5px; color: var(--teal); }
.preview .pb { padding: 18px 24px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 14px; font-size: 13px; }
.kv dt { color: var(--ink-faint); font-weight: 600; }
.kv dd { font-weight: 700; }
.kv dd a { color: var(--sage); }
.kv dd a:hover { text-decoration: underline; }

/* ============ CONTACT DETAIL VARIANTS ============ */

/* A — profile rail */
.det-a { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .det-a { grid-template-columns: 1fr; } }
.rail .id { text-align: center; padding: 26px 22px 18px; }
.rail .id .nm { font-family: var(--display); font-size: 21px; font-weight: 560; padding-top: 12px; }
.rail .id .mt { font-size: 12.5px; color: var(--ink-soft); }
.rail .id .chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; padding-top: 12px; }
.rail .sec { border-top: 1px solid var(--line-soft); padding: 14px 20px 16px; }
.rail .sec .sh {
  font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); padding-bottom: 9px;
}
.linked { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.linked li { display: flex; align-items: center; gap: 10px; }
.linked .nm { font-size: 13px; font-weight: 700; line-height: 1.2; }
.linked .nm:hover { color: var(--sage); }
.linked .rel { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 500; }
.linked .go { margin-left: auto; color: var(--ink-faint); font-size: 14px; }

/* B — banner */
.banner {
  background: linear-gradient(115deg, var(--navy-deep) 0%, var(--navy) 58%, #35597c 100%);
  border-radius: var(--r); color: #fff; box-shadow: var(--shadow);
  padding: 26px 28px 0; position: relative; overflow: hidden;
}
.banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 88% 0%, rgba(251,187,75,.18), transparent 60%);
}
.banner .brow { display: flex; align-items: center; gap: 20px; position: relative; flex-wrap: wrap; }
.banner .nm { font-family: var(--display); font-size: 28px; font-weight: 520; letter-spacing: -.01em; }
.banner .mt { font-size: 13px; color: var(--teal); padding-top: 2px; }
.banner .chips { display: flex; gap: 6px; padding-top: 10px; flex-wrap: wrap; }
.banner .bstats { margin-left: auto; display: flex; gap: 26px; text-align: right; }
.banner .bstat .v { font-family: var(--display); font-size: 24px; font-weight: 520; color: var(--gold); }
.banner .bstat .k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 700; }
.banner .tabs { border-bottom: none; margin-top: 20px; position: relative; }
.banner .tabs button { color: rgba(255,255,255,.6); }
.banner .tabs button:hover { color: #fff; }
.banner .tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }

/* C — activity-first two column */
.det-c { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .det-c { grid-template-columns: 1fr; } }
.miniheader {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 18px;
}
.miniheader .nm { font-family: var(--display); font-size: 19px; font-weight: 560; }
.miniheader .chips { display: flex; gap: 5px; flex-wrap: wrap; }
.miniheader .right { margin-left: auto; display: flex; gap: 8px; }

/* composer */
.composer { display: flex; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.composer .fake {
  flex: 1; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 13px; font-size: 13px; color: var(--ink-faint);
}

/* payments mini table */
.payrow { display: flex; align-items: baseline; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.payrow:last-child { border-bottom: none; }
.payrow .pk { flex: 1; font-weight: 700; }
.payrow .pk span { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.payrow .pv { font-family: var(--display); font-size: 15px; font-weight: 580; color: var(--navy); font-variant-numeric: tabular-nums; }

/* doc rows */
.docrow { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.docrow:last-child { border-bottom: none; }
.docrow .dico {
  width: 34px; height: 40px; border-radius: 5px; flex-shrink: 0;
  background: var(--paper-warm); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 900; letter-spacing: .04em; color: var(--red);
}
.docrow .dnm { flex: 1; font-weight: 700; font-size: 13px; }
.docrow .dnm span { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 500; }
.docrow .lock { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--plum); background: var(--plum-soft); border-radius: 99px; padding: 3px 9px; text-transform: uppercase; }

/* footer note */
.mock-note {
  margin-top: 44px; text-align: center;
  font-size: 11.5px; color: var(--ink-faint);
  letter-spacing: .06em;
}
.mock-note b { color: var(--sage); }

/* ============ MOBILE — bottom app bar + drawer ============ */
.bottombar { display: none; }
.scrim {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(19,37,56,.55);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(19,37,56,.25);
  padding: 8px 20px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.8,.3,1);
  max-height: 78vh; overflow-y: auto;
}
.drawer.open { transform: none; }
.dr-handle { width: 42px; height: 4.5px; border-radius: 99px; background: var(--line); margin: 8px auto 4px; }
.dr-user {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 2px 14px; border-bottom: 1px solid var(--line-soft);
}
.dr-user .nm { font-size: 14px; font-weight: 800; line-height: 1.2; }
.dr-user .rl { font-size: 11.5px; color: var(--ink-faint); }
.dr-label {
  font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-faint); padding: 16px 2px 6px;
}
.dr-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px 2px; text-align: left;
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.dr-item:last-child { border-bottom: none; }
.dr-item .ico { width: 19px; height: 19px; color: var(--sage); flex-shrink: 0; }
.dr-item .phase-tag {
  margin-left: auto; font-size: 8.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 99px;
  background: var(--teal-soft); color: #33686d;
}

/* responsive shell */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }

  /* kill the min-content overflow chain */
  .main, .content, .variant { min-width: 0; }
  .g2 > *, .g3 > *, .g4 > *, .today-grid > *, .det-a > *, .det-c > *, .splitpane > * { min-width: 0; }
  .topbar .crumb { min-width: 0; }

  /* reminder rows wrap onto two lines instead of forcing width */
  .rowlist li { flex-wrap: wrap; }
  .rowlist .t { flex: 1 1 200px; }
  .rowlist .when { order: 3; margin-left: 46px; padding-top: 0; }
  .rowlist .act { order: 4; margin-left: auto; }

  .bottombar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: var(--navy-deep);
    border-top: 1px solid rgba(255,255,255,.09);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .bb-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 800; letter-spacing: .04em;
    color: #93a5b6; padding: 4px 0; border-radius: 8px;
    transition: color .15s;
  }
  .bb-item .ico { width: 21px; height: 21px; }
  .bb-item.on { color: var(--gold); }
  .bb-item:active { color: #fff; }

  .appbar { height: 50px; padding: 0 14px; gap: 12px; }
  .ab-logo img { height: 26px; }
  .ab-search { display: none; }
  .notifpanel { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; }

  .topbar { padding: 10px 16px; gap: 10px; min-height: 52px; top: 50px; }
  .topbar .searchbox { display: none; }
  .topbar h1 { font-size: 18px; }
  .topbar .crumb { overflow: hidden; text-overflow: ellipsis; }
  .switcher { padding: 3px 4px 3px 11px; }
  .switcher button { width: 27px; height: 27px; font-size: 13px; }

  .content { padding: 16px 14px calc(92px + env(safe-area-inset-bottom)); }

  /* tables become thin, info-dense cards */
  .card:has(> .tbl) { overflow: visible !important; background: none; border: none; box-shadow: none; border-radius: 0; }
  .tbl { display: block; min-width: 0; }
  .tbl thead { display: none; }
  .tbl tbody { display: flex; flex-direction: column; gap: 9px; }
  .tbl tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: 6px 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 12px; box-shadow: var(--shadow);
  }
  .tbl tbody tr:hover { background: var(--card); }
  .tbl tbody td { display: block; padding: 0; border: none; }
  .tbl td:nth-child(1), .tbl td:nth-child(7) { display: none; }              /* checkbox + arrow */
  .tbl td:nth-child(2) { grid-column: 1; grid-row: 1; min-width: 0; }        /* who */
  .tbl td:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; }   /* status */
  .tbl td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; font-size: 11.5px; color: var(--ink-faint); } /* linked to */
  .tbl td:nth-child(3)::before { content: "Linked to · "; font-weight: 700; color: var(--ink-soft); }
  .tbl td:nth-child(4) { grid-column: 1; grid-row: 3; }                      /* service chips */
  .tbl td:nth-child(6) { grid-column: 2; grid-row: 3; justify-self: end; align-self: center; font-size: 11px; color: var(--ink-faint); } /* last contact */
  .tbl .who { gap: 10px; }
  .tbl .who .av { width: 34px; height: 34px; font-size: 12px; }
  .tbl .pill { font-size: 10px; padding: 2.5px 8px; }
  .tbl .chip { font-size: 10.5px; padding: 3px 8px; }

  /* filter bar becomes a horizontal scroller */
  .filterbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .filterbar::-webkit-scrollbar { display: none; }
  .filterbar .fsearch { min-width: 200px; flex-shrink: 0; }
  .fchip, .filterbar .right .btn { white-space: nowrap; flex-shrink: 0; }
  .filterbar .right { margin-left: 0; }

  /* banner + headers stack */
  .banner { padding: 20px 18px 0; }
  .banner .bstats { margin-left: 0; width: 100%; justify-content: flex-start; text-align: left; gap: 22px; padding-top: 4px; }
  .banner .nm { font-size: 23px; }
  .miniheader { flex-wrap: wrap; }
  .miniheader .right { margin-left: 0; width: 100%; }
  .miniheader .right .btn { flex: 1; justify-content: center; }

  .preview { position: static; }
  .kanban { -webkit-overflow-scrolling: touch; }
  .pitch { padding: 30px 22px; }
  .stat-tile .v { font-size: 28px; }
  .datecard .dnum { font-size: 56px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); white-space: normal; text-align: center; }
}
