/* ==============================================================
   Optimal Research Sites — Recruitment Intelligence
   Aesthetic: "Clinical Command" — instrument-grade, precise,
   warm-paper canvas, deep teal-ink rail, one confident accent.
   ============================================================== */

/* ---- Fonts ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,400&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---- Design tokens ------------------------------------------- */
:root {
  /* surfaces */
  --canvas:        oklch(98.6% 0.005 95);
  --paper:         oklch(100% 0 0);
  --paper-2:       oklch(97.8% 0.006 95);
  --ink:           oklch(23% 0.028 210);
  --ink-2:         oklch(27% 0.030 210);
  --ink-rail:      oklch(20% 0.026 212);

  /* text */
  --text:          oklch(26% 0.02 220);
  --text-soft:     oklch(46% 0.015 220);
  --text-faint:    oklch(62% 0.012 220);
  --on-ink:        oklch(92% 0.012 200);
  --on-ink-soft:   oklch(70% 0.018 205);

  /* accent + semantic data palette */
  --teal:          oklch(56% 0.105 195);
  --teal-bright:   oklch(64% 0.12 192);
  --teal-soft:     oklch(94% 0.035 195);
  --amber:         oklch(72% 0.135 68);
  --amber-soft:    oklch(95% 0.05 75);
  --rose:          oklch(60% 0.17 18);
  --rose-soft:     oklch(95% 0.04 20);
  --violet:        oklch(54% 0.13 290);
  --violet-soft:   oklch(95% 0.035 290);
  --slate:         oklch(58% 0.022 240);
  --slate-soft:    oklch(95% 0.006 240);

  /* lines + shadow */
  --line:          oklch(90% 0.008 220);
  --line-soft:     oklch(94% 0.006 220);
  --shadow-sm:     0 1px 2px oklch(40% 0.03 220 / 0.06), 0 1px 3px oklch(40% 0.03 220 / 0.05);
  --shadow-md:     0 2px 8px oklch(40% 0.03 220 / 0.07), 0 8px 24px oklch(40% 0.03 220 / 0.06);
  --shadow-lg:     0 4px 14px oklch(35% 0.03 220 / 0.10), 0 24px 56px oklch(35% 0.03 220 / 0.12);

  /* type */
  --display: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --r-sm: 7px;  --r-md: 12px;  --r-lg: 18px;  --r-xl: 26px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--teal); color: white; }

/* paper-grain atmosphere on the canvas */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ============================================================
   LOGIN GATE
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  background: var(--canvas);
}
.gate.hide { display: none; }

.gate__brandside {
  background: var(--ink-rail);
  color: var(--on-ink);
  padding: 56px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
/* layered atmosphere on the brand panel */
.gate__brandside::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(620px 420px at 88% 8%, oklch(56% 0.105 195 / 0.30), transparent 70%),
    radial-gradient(520px 460px at 8% 96%, oklch(54% 0.13 290 / 0.18), transparent 72%);
  pointer-events: none;
}
.gate__mark {
  display: flex; align-items: center; gap: 13px;
  position: relative; z-index: 1;
}
.gate__pulse {
  width: 38px; height: 38px; flex: none;
}
.gate__wordmark {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-ink-soft);
}
.gate__hero { position: relative; z-index: 1; max-width: 30ch; }
.gate__hero h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.6rem, 1.4rem + 2.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: oklch(97% 0.01 195);
}
.gate__hero h1 em {
  font-style: italic; color: var(--teal-bright);
}
.gate__hero p {
  margin-top: 20px; color: var(--on-ink-soft);
  font-size: 15px; max-width: 38ch; line-height: 1.6;
}
.gate__stats {
  position: relative; z-index: 1;
  display: flex; gap: 38px;
}
.gate__stat .n {
  font-family: var(--display); font-size: 2rem; font-weight: 500;
  color: oklch(96% 0.01 195); letter-spacing: -0.01em;
}
.gate__stat .l {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--on-ink-soft); margin-top: 3px;
}

.gate__formside {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.gate__form { width: 100%; max-width: 360px; }
.gate__eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 10px;
}
.gate__form h2 {
  font-family: var(--display); font-weight: 500; font-size: 1.85rem;
  letter-spacing: -0.015em; margin-bottom: 6px;
}
.gate__form > p {
  color: var(--text-soft); font-size: 13.5px; margin-bottom: 28px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-soft); margin-bottom: 7px; letter-spacing: 0.01em;
}
.field input {
  width: 100%; padding: 12px 14px;
  font-family: var(--sans); font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 4px oklch(56% 0.105 195 / 0.12);
}
.gate__submit {
  width: 100%; margin-top: 8px; padding: 13px;
  background: var(--ink); color: var(--on-ink);
  border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease);
}
.gate__submit:hover { background: var(--teal); }
.gate__submit:active { transform: scale(0.99); }
.gate__error {
  margin-top: 14px; font-size: 12.5px; color: var(--rose);
  font-weight: 500; min-height: 16px; opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.gate__error.show { opacity: 1; }
.gate__hint {
  margin-top: 26px; padding: 12px 14px;
  background: var(--teal-soft); border-radius: var(--r-sm);
  font-size: 11.5px; color: oklch(40% 0.06 195); line-height: 1.55;
}
.gate__hint b { font-family: var(--mono); font-weight: 600; }
.gate__foot {
  margin-top: 22px; font-size: 11px; color: var(--text-faint);
  display: flex; align-items: center; gap: 7px;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: none; min-height: 100vh; position: relative; z-index: 1; }
.app.show { display: grid; grid-template-columns: 248px 1fr; }

/* ---- Rail ---------------------------------------------------- */
.rail {
  background: var(--ink-rail); color: var(--on-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 22px 16px;
}
.rail__mark {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 8px 22px;
}
.rail__logo { width: 30px; height: 30px; flex: none; }
.rail__name {
  font-weight: 600; font-size: 13.5px; color: oklch(96% 0.01 195);
  line-height: 1.2;
}
.rail__name span {
  display: block; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-ink-soft); margin-top: 2px;
}
.rail__group {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(52% 0.02 210);
  padding: 16px 10px 7px;
}
.nav__item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--on-ink-soft); font-size: 13.5px; font-weight: 500;
  text-align: left; transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav__item svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav__item:hover { background: oklch(100% 0 0 / 0.05); color: var(--on-ink); }
.nav__item.active {
  background: oklch(56% 0.105 195 / 0.16); color: oklch(96% 0.02 195);
}
.nav__item.active svg { opacity: 1; color: var(--teal-bright); }
.nav__badge {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  background: oklch(100% 0 0 / 0.08); padding: 2px 6px; border-radius: 20px;
  color: var(--on-ink-soft);
}
.rail__spacer { flex: 1; }
.rail__user {
  display: flex; align-items: center; gap: 10px;
  padding: 11px; border-radius: var(--r-md);
  background: oklch(100% 0 0 / 0.04);
}
.rail__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--teal-bright), var(--violet));
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px; color: white;
}
.rail__user .nm { font-size: 12.5px; font-weight: 600; color: var(--on-ink); }
.rail__user .rl { font-size: 10.5px; color: var(--on-ink-soft); }
.rail__signout {
  margin-left: auto; color: var(--on-ink-soft); font-size: 11px;
}
.rail__signout:hover { color: var(--rose); }

/* ---- Main column --------------------------------------------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 32px; border-bottom: 1px solid var(--line);
  background: oklch(98.6% 0.005 95 / 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar__title h1 {
  font-family: var(--display); font-weight: 500; font-size: 1.42rem;
  letter-spacing: -0.012em;
}
.topbar__title p {
  font-size: 12px; color: var(--text-faint); margin-top: 1px;
}
.topbar__search {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 13px; width: 270px;
}
.topbar__search input {
  border: none; outline: none; background: none; flex: 1;
  font-family: var(--sans); font-size: 13px; color: var(--text);
}
.topbar__search svg { width: 15px; height: 15px; color: var(--text-faint); }
.topbar__search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.live-pill {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--teal); font-weight: 500;
  background: var(--teal-soft); padding: 7px 11px; border-radius: 20px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 oklch(56% 0.105 195 / 0.6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 oklch(56% 0.105 195 / 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px oklch(56% 0.105 195 / 0); }
}

.scroll { flex: 1; overflow-y: auto; }
.view { padding: 26px 32px 56px; max-width: 1480px; }
.view[hidden] { display: none; }

/* ---- Section heading ----------------------------------------- */
.sec {
  display: flex; align-items: baseline; gap: 12px; margin: 30px 0 14px;
}
.sec:first-of-type { margin-top: 4px; }
.sec h2 {
  font-family: var(--display); font-weight: 500; font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.sec .rule { flex: 1; height: 1px; background: var(--line-soft); }
.sec .meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
}

/* ---- KPI strip ----------------------------------------------- */
.kpis {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
.kpi {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 16px 13px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi__label {
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.05em;
  min-height: 26px;
}
.kpi__value {
  font-family: var(--display); font-weight: 500;
  font-size: 2.35rem; line-height: 1; letter-spacing: -0.022em;
  margin: 8px 0 6px; display: flex; align-items: baseline; gap: 2px;
}
.kpi__value .u { font-size: 1.1rem; color: var(--text-soft); }
.kpi__row { display: flex; align-items: center; gap: 8px; }
.kpi__delta {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: 5px;
}
.kpi__delta.up   { color: oklch(45% 0.11 160); background: oklch(94% 0.05 160); }
.kpi__delta.down { color: oklch(50% 0.16 18);  background: var(--rose-soft); }
.kpi__spark { margin-left: auto; }
.kpi__note {
  font-size: 11px; color: var(--text-faint); margin-top: 9px;
  border-top: 1px solid var(--line-soft); padding-top: 8px;
}

/* ---- Card grid ----------------------------------------------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1.55fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 0;
}
.card__head h3 {
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.005em;
}
.card__head .sub {
  font-size: 11.5px; color: var(--text-faint);
}
.card__head .tag {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint);
}
.card__body { padding: 16px 18px 18px; }

/* ---- Recruitment funnel -------------------------------------- */
.funnel { display: flex; flex-direction: column; gap: 3px; }
.funnel__row {
  display: grid; grid-template-columns: 116px 1fr 64px;
  align-items: center; gap: 12px;
}
.funnel__label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.funnel__track { height: 38px; position: relative; }
.funnel__bar {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  display: flex; align-items: center; padding-left: 12px;
  color: white; font-weight: 600; font-size: 13px;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.2);
  transform-origin: left;
  animation: growx 0.9s var(--ease) both;
}
@keyframes growx { from { transform: scaleX(0); } }
.funnel__row:nth-child(1) .funnel__bar { background: linear-gradient(90deg, oklch(40% 0.04 220), oklch(48% 0.05 220)); }
.funnel__row:nth-child(2) .funnel__bar { background: linear-gradient(90deg, oklch(46% 0.05 220), oklch(54% 0.06 220)); }
.funnel__row:nth-child(3) .funnel__bar { background: linear-gradient(90deg, var(--amber), oklch(78% 0.13 75)); }
.funnel__row:nth-child(4) .funnel__bar { background: linear-gradient(90deg, oklch(70% 0.13 60), var(--amber)); }
.funnel__row:nth-child(5) .funnel__bar { background: linear-gradient(90deg, oklch(66% 0.12 50), oklch(70% 0.13 60)); }
.funnel__conv {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--text-soft); text-align: right;
}
.funnel__conv span { color: var(--text-faint); font-size: 10px; display: block; }

/* ---- Donut --------------------------------------------------- */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { position: relative; width: 158px; height: 158px; flex: none; }
.donut__center {
  position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center;
}
.donut__center .n {
  font-family: var(--display); font-size: 1.9rem; font-weight: 500;
  letter-spacing: -0.02em;
}
.donut__center .l {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
}
.legend { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.legend__row {
  display: grid; grid-template-columns: 11px 1fr auto;
  align-items: center; gap: 9px; font-size: 12.5px;
}
.legend__dot { width: 11px; height: 11px; border-radius: 3px; }
.legend__val { font-family: var(--mono); font-weight: 600; font-size: 12px; }

/* ---- Enrollment curve ---------------------------------------- */
.curve { width: 100%; height: auto; display: block; }

/* ---- Study rows ---------------------------------------------- */
.studies { display: flex; flex-direction: column; }
.study {
  display: grid;
  grid-template-columns: 86px 1fr 150px 92px 70px;
  align-items: center; gap: 14px;
  padding: 13px 18px; border-top: 1px solid var(--line-soft);
  transition: background 0.14s var(--ease);
}
.study:hover { background: var(--paper-2); }
.study:first-child { border-top: none; }
.study__id {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.study__ind { font-size: 13px; font-weight: 600; }
.study__sub {
  font-size: 11px; color: var(--text-faint); margin-top: 1px;
}
.bar {
  height: 8px; background: var(--slate-soft); border-radius: 20px;
  overflow: hidden;
}
.bar > i {
  display: block; height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  animation: growx 1s var(--ease) both;
}
.study__pct {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  text-align: right;
}
.study__count { font-size: 11.5px; color: var(--text-soft); }
.study__count b { font-family: var(--mono); }

/* phase chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; letter-spacing: 0.01em;
}
.chip--teal   { background: var(--teal-soft);   color: oklch(40% 0.08 195); }
.chip--amber  { background: var(--amber-soft);  color: oklch(48% 0.11 55); }
.chip--rose   { background: var(--rose-soft);   color: oklch(48% 0.14 18); }
.chip--violet { background: var(--violet-soft); color: oklch(44% 0.11 290); }
.chip--slate  { background: var(--slate-soft);  color: var(--text-soft); }
.dot { width: 6px; height: 6px; border-radius: 50%; }

/* ---- Activity feed ------------------------------------------- */
.feed { display: flex; flex-direction: column; }
.feed__item {
  display: grid; grid-template-columns: 30px 1fr auto;
  gap: 11px; padding: 11px 18px;
  border-top: 1px solid var(--line-soft);
  animation: feedin 0.5s var(--ease) both;
}
.feed__item:first-child { border-top: none; }
@keyframes feedin {
  from { opacity: 0; transform: translateY(-7px); }
}
.feed__icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
}
.feed__icon svg { width: 15px; height: 15px; }
.feed__icon.teal   { background: var(--teal-soft);   color: var(--teal); }
.feed__icon.amber  { background: var(--amber-soft);  color: oklch(58% 0.13 60); }
.feed__icon.violet { background: var(--violet-soft); color: var(--violet); }
.feed__icon.slate  { background: var(--slate-soft);  color: var(--slate); }
.feed__text { font-size: 12.5px; line-height: 1.45; }
.feed__text b { font-weight: 600; }
.feed__meta {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  margin-top: 3px; letter-spacing: 0.02em;
}
.feed__time {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-faint);
  white-space: nowrap;
}

/* ---- Visit schedule ------------------------------------------ */
.visit {
  display: grid; grid-template-columns: 54px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 18px; border-top: 1px solid var(--line-soft);
}
.visit:first-child { border-top: none; }
.visit__time {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--text-soft);
}
.visit__who { font-size: 12.5px; font-weight: 600; }
.visit__what { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

/* ---- Data table ---------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.tbl tbody td {
  padding: 12px 14px; font-size: 12.5px;
  border-bottom: 1px solid var(--line-soft);
}
.tbl tbody tr { transition: background 0.13s var(--ease); }
.tbl tbody tr:hover { background: var(--paper-2); }
.tbl .mono { font-family: var(--mono); font-size: 11.5px; }
.subj {
  display: flex; align-items: center; gap: 9px;
}
.subj__av {
  width: 27px; height: 27px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; font-weight: 600;
  color: white; background: linear-gradient(140deg, var(--teal), var(--violet));
}
.flag {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rose); margin-left: 5px; vertical-align: middle;
}

/* ---- Site cards ---------------------------------------------- */
.sites { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.site {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.site__top { display: flex; align-items: center; gap: 9px; }
.site__id {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: white; background: var(--ink); padding: 3px 7px; border-radius: 5px;
}
.site__city { font-size: 13.5px; font-weight: 700; }
.site__lead { font-size: 11px; color: var(--text-faint); }
.site__metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px;
}
.site__m .n {
  font-family: var(--display); font-size: 1.5rem; font-weight: 500;
  letter-spacing: -0.02em;
}
.site__m .l {
  font-size: 10px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.util {
  margin-top: 13px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.util__head {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-soft); margin-bottom: 6px;
}
.util__head b { font-family: var(--mono); color: var(--text); }

/* ---- empty state placeholder for unbuilt views --------------- */
.placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 90px 20px; text-align: center;
  color: var(--text-faint);
}
.placeholder svg { width: 40px; height: 40px; margin-bottom: 14px; opacity: 0.4; }
.placeholder h3 { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--text-soft); }
.placeholder p { font-size: 13px; margin-top: 5px; }

/* ---- page-load stagger --------------------------------------- */
.stagger > * { animation: rise 0.6s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.17s; }
.stagger > *:nth-child(5) { animation-delay: 0.22s; }
.stagger > *:nth-child(6) { animation-delay: 0.27s; }
.stagger > *:nth-child(7) { animation-delay: 0.32s; }
.stagger > *:nth-child(8) { animation-delay: 0.37s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* ---- responsive ---------------------------------------------- */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .sites { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .app.show { grid-template-columns: 1fr; }
  .rail { display: none; }
  .gate { grid-template-columns: 1fr; }
  .gate__brandside { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .sites { grid-template-columns: 1fr; }
  .topbar__search { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
