:root {
  --indigo: #1d2449;
  --indigo-2: #2a3363;
  --indigo-3: #3b4580;
  --peacock: #0f7a80;
  --peacock-2: #0b6267;
  --peacock-soft: #d9efef;
  --paper: #f3f5f9;
  --surface: #ffffff;
  --line: #dce0ea;
  --ink: #1d2449;
  --muted: #5b6382;
  --faint: #8a91ab;
  --brick: #a8442f;
  --brick-soft: #f7e6e1;
  --amber: #b7791f;
  --amber-soft: #fbf0dc;
  /* call outcomes */
  --o-ans: #0f7a80; --o-na: #8a91ab; --o-busy: #c08a2e; --o-rej: #7a5c99; --o-fail: #a8442f; --o-open: #c9cfdf;

  --f-latin: "Anek Latin", system-ui, sans-serif;
  --f-local: "Anek Latin", sans-serif; /* set per state language by app.js */

  /* type scale, ratio 1.25 from 15px */
  --t-xs: 12.5px; --t-sm: 13.5px; --t-base: 15px; --t-md: 18.75px; --t-lg: 23.4px; --t-xl: 29.3px; --t-2xl: 36.6px; --t-3xl: 57px;
  --r-lg: 18px; --r-md: 10px; --r-sm: 7px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-base)/1.5 var(--f-latin);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
.te, .local { font-family: var(--f-local); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: var(--t-2xl); line-height: 1.1; font-variation-settings: "wdth" 80; }
h2 { font-size: var(--t-md); line-height: 1.3; }
h3 { font-size: var(--t-base); }
p { margin: 0; }
a { color: var(--peacock); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--peacock) 55%, transparent); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--indigo) 248px, transparent 248px); }
.side {
  background: var(--indigo); color: #e6e9f5; padding: 26px 18px 20px;
  display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; align-self: start;
}
.mark { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; padding: 0 8px; }
.mark svg { flex: none; }
.mark b { font-size: var(--t-md); font-weight: 600; font-variation-settings: "wdth" 78; letter-spacing: 0; line-height: 1.05; }
.mark small { display: block; font-family: var(--f-local); font-size: var(--t-xs); color: #aab2d6; font-weight: 400; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-md);
  color: #c4cae6; text-decoration: none; font-weight: 500;
}
.nav a svg { opacity: .8; }
.nav a:hover { background: var(--indigo-2); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--indigo); }
.nav a[aria-current="page"] svg { opacity: 1; color: var(--peacock); }
.side-status { margin-top: auto; display: grid; gap: 10px; }
.chip {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--indigo-2); font-size: var(--t-sm); line-height: 1.35; color: #d7dcf0;
}
.chip i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: #7ee0dc; box-shadow: 0 0 0 3px rgb(126 224 220 / .18); }
.chip.off i { background: #f0c36b; box-shadow: 0 0 0 3px rgb(240 195 107 / .18); }
.chip.live { background: #5a2a22; color: #ffe1d9; }
.chip.live i { background: #ff8a6b; box-shadow: 0 0 0 3px rgb(255 138 107 / .25); }
.chip.sim i { background: #c3b5ff; box-shadow: 0 0 0 3px rgb(195 181 255 / .18); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--indigo-3); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--peacock); color: #fff; font-weight: 600; text-transform: uppercase;
}
.me .who { flex: 1; min-width: 0; font-size: var(--t-sm); line-height: 1.3; }
.me .who b { display: block; color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.me .who button { color: #aab2d6; }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

main { padding: 36px clamp(16px, 4vw, 48px) 80px; max-width: 1180px; width: 100%; min-width: 0; }
h1 { overflow-wrap: anywhere; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.pagehead p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: var(--t-sm); margin-bottom: 10px; }
.back:hover { color: var(--ink); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  font: 500 var(--t-base)/1.2 var(--f-latin); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #c3c9d9; background: #fafbfd; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--peacock); border-color: var(--peacock); color: #fff; }
.btn.primary:hover { background: var(--peacock-2); }
.btn.big { padding: 14px 24px; font-size: var(--t-md); border-radius: 12px; }
.btn.danger { color: var(--brick); }
.btn.danger:hover { background: var(--brick-soft); border-color: #e7c3b9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.quiet { border-color: transparent; background: transparent; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 500; font-size: var(--t-sm); }
.field > small { color: var(--muted); font-size: var(--t-xs); }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font: 400 var(--t-base)/1.4 var(--f-latin); color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--peacock); box-shadow: 0 0 0 3px rgb(15 122 128 / .15); }
textarea { min-height: 150px; resize: vertical; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--peacock); flex: none; }
.check small { display: block; color: var(--muted); font-size: var(--t-sm); }
.err { color: var(--brick); font-size: var(--t-sm); }
.err:empty { display: none; }
.notice { padding: 14px 16px; border-radius: var(--r-md); background: var(--peacock-soft); color: var(--peacock-2); }
.notice.warn { background: var(--amber-soft); color: #7a5112; }
.notice.bad { background: var(--brick-soft); color: var(--brick); }

/* drop zones */
.drop {
  position: relative; border: 1.5px dashed #c3c9d9; border-radius: var(--r-md); padding: 22px; text-align: center;
  background: var(--surface); transition: border-color .15s, background .15s; cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--peacock); background: #f5fbfb; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { display: block; font-weight: 500; }
.drop small { color: var(--muted); }
.drop.filled { border-style: solid; border-color: var(--line); text-align: left; cursor: default; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.panel + .panel { margin-top: 18px; }
.grid2 > .panel { margin-top: 0; }
.panel h2 { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- status pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px;
  font-size: var(--t-xs); font-weight: 500; background: #eceef4; color: var(--muted); white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.running { background: var(--peacock-soft); color: var(--peacock-2); }
.pill.running::before { animation: pulse 1.6s ease-in-out infinite; }
.pill.paused { background: var(--amber-soft); color: #8a5b14; }
.pill.completed { background: #e3e7f6; color: var(--indigo-3); }
.pill.cancelled { background: var(--brick-soft); color: var(--brick); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- login ---------- */
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-art {
  background: var(--indigo); color: #fff; padding: clamp(28px, 6vw, 72px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; overflow: hidden; position: relative;
}
.login-art .mark small { color: #aab2d6; }
:root[data-long] .login-art h1 { font-size: clamp(34px, 4.4vw, 60px); }
.login-art h1 {
  font-family: var(--f-local); font-size: clamp(40px, 5.4vw, 72px); line-height: 1.12; font-weight: 600;
  font-variation-settings: normal; max-width: 12ch; letter-spacing: 0;
}
.login-art .sub { color: #b9c0e0; font-size: var(--t-md); max-width: 34ch; margin-top: 18px; }
.wave-hero { display: flex; align-items: center; gap: 4px; height: 120px; }
.wave-hero span {
  flex: 1; max-width: 9px; border-radius: 9px; background: var(--peacock); min-height: 6px;
  transform-origin: center; animation: rise .9s cubic-bezier(.2,.8,.2,1) both;
}
.wave-hero span.lit { background: #7ee0dc; }
@keyframes rise { from { transform: scaleY(.05); opacity: 0; } }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-form form { width: 100%; max-width: 360px; display: grid; gap: 18px; }
.login-form h2 { font-size: var(--t-xl); font-variation-settings: "wdth" 80; }

/* ---------- campaigns list ---------- */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.totals div { padding: 20px 24px; }
.totals div + div { border-left: 1px solid var(--line); }
.totals b { display: block; font-size: var(--t-xl); font-weight: 600; font-variation-settings: "wdth" 85; font-variant-numeric: tabular-nums; line-height: 1.15; }
.totals span { color: var(--muted); font-size: var(--t-sm); }
.clist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.crow {
  display: grid; grid-template-columns: minmax(0, 2.2fr) 1.6fr 110px 110px; gap: 20px; align-items: center;
  padding: 18px 24px; text-decoration: none; color: inherit; border-top: 1px solid var(--line);
}
.crow:first-child { border-top: 0; }
.crow:hover { background: #f8f9fc; }
.crow .name { font-weight: 600; font-size: var(--t-md); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.crow .meta { color: var(--muted); font-size: var(--t-sm); margin-top: 3px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crow .stat b { display: block; font-size: var(--t-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.crow .stat span { font-size: var(--t-xs); color: var(--muted); }
.mini { display: grid; gap: 6px; }
.mini-bar { height: 6px; border-radius: 6px; background: #eceef4; overflow: hidden; display: flex; }
.mini-bar i { display: block; height: 100%; }
.mini small { color: var(--muted); font-size: var(--t-xs); }
.colhead { display: grid; grid-template-columns: minmax(0, 2.2fr) 1.6fr 110px 110px; gap: 20px; padding: 12px 24px; font-size: var(--t-xs); color: var(--faint); border-bottom: 1px solid var(--line); background: #fafbfd; }

.empty { text-align: center; padding: 64px 24px; }
.empty .te { font-size: var(--t-xl); color: var(--indigo); font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* ---------- campaign page ---------- */
.stage {
  background: var(--indigo); color: #fff; border-radius: 22px; padding: 28px clamp(20px, 3vw, 34px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: end; margin-bottom: 18px;
}
.stage .wavewrap { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.play {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--indigo);
  display: grid; place-items: center; cursor: pointer;
}
.play:hover { background: #e9fbfa; }
.wave { flex: 1; min-width: 0; height: 96px; display: block; width: 100%; cursor: pointer; }
.stage .reach b { display: block; font-size: var(--t-3xl); line-height: 1; font-weight: 600; font-variation-settings: "wdth" 75; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stage .reach span { color: #b9c0e0; font-size: var(--t-md); }
.stage .reach span em { font-style: normal; color: #fff; }
.stage .side-stats { display: flex; gap: 32px; }
.stage .side-stats b { display: block; font-size: var(--t-xl); font-weight: 600; font-variation-settings: "wdth" 85; font-variant-numeric: tabular-nums; }
.stage .side-stats span { color: #b9c0e0; font-size: var(--t-sm); }
.stage .progress-line { grid-column: 1 / -1; color: #b9c0e0; font-size: var(--t-sm); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -14px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.funnel { display: grid; gap: 14px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 130px; gap: 14px; align-items: center; }
.funnel-row .lbl { font-size: var(--t-sm); }
.funnel-row .lbl small { display: block; color: var(--muted); font-size: var(--t-xs); }
.funnel-row .track { display: block; height: 30px; background: #f0f2f7; border-radius: 8px; overflow: hidden; }
.funnel-row .fill { display: block; height: 100%; background: var(--indigo-3); border-radius: 8px; transition: width .6s cubic-bezier(.2,.8,.2,1); min-width: 2px; }
.funnel-row:nth-child(3) .fill { background: var(--peacock); }
.funnel-row:nth-child(4) .fill { background: var(--peacock-2); }
.funnel-row .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel-row .v small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-xs); }

.stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--o-open); }
.stack i { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin-top: 16px; }
.legend div { display: flex; align-items: center; gap: 9px; font-size: var(--t-sm); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.hours { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 6px; }
.hours .h { flex: 1; max-width: 40px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; min-width: 6px; }
.hours .h i { display: block; background: #c8d6ee; border-radius: 3px 3px 0 0; }
.hours .h i.a { background: var(--peacock); border-radius: 0; }
.hours-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: var(--t-xs); margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
td, th { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--faint); font-weight: 400; font-size: var(--t-xs); }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; font-size: var(--t-sm); }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }

/* ---------- new campaign ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; grid-template-columns: 36px 1fr; gap: 0 16px; }
.step + .step { margin-top: 16px; }
.step .n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600;
  background: #eceef4; color: var(--muted); font-variant-numeric: tabular-nums; transition: background .2s, color .2s;
}
.step.done .n { background: var(--peacock); color: #fff; }
.step .body { display: grid; gap: 16px; min-width: 0; }
.step h2 { margin: 6px 0 0; }
.step .lead { color: var(--muted); margin-top: -10px; font-size: var(--t-sm); }

.summary { position: sticky; top: 24px; background: var(--indigo); color: #fff; border-radius: var(--r-lg); padding: 24px; display: grid; gap: 18px; }
.summary h2 { color: #fff; font-size: var(--t-md); }
.summary .big b { display: block; font-size: var(--t-2xl); line-height: 1.05; font-weight: 600; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; }
.summary .big span { color: #b9c0e0; font-size: var(--t-sm); }
.summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: var(--t-sm); }
.summary li { display: flex; justify-content: space-between; gap: 12px; color: #c9cee8; }
.summary li b { color: #fff; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.summary li.bad b { color: #ffb4a3; }
.summary .btn.primary { width: 100%; }
.summary .btn.primary:disabled { opacity: 1; background: var(--indigo-2); border-color: var(--indigo-3); color: #8d95bd; }
.summary .todo { font-size: var(--t-xs); color: #aab2d6; }
.wave-small { width: 100%; height: 56px; display: block; }
.audio-row { display: flex; gap: 14px; align-items: center; }
.audio-row .play { width: 42px; height: 42px; background: var(--indigo); color: #fff; }
.audio-row .info { flex: 1; min-width: 0; }
.audio-row .info b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-row .info small { color: var(--muted); }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  background: none; border: 0; padding: 10px 14px; font: 500 var(--t-base) var(--f-latin); color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--peacock); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 18px; }

/* calling mode */
.modecard { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 26px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid #9a8fd6; }
.modecard.live { border-left-color: var(--brick); background: #fffaf8; }
.modecard h2 { font-size: var(--t-lg); font-variation-settings: "wdth" 85; }
.modecard p { color: var(--muted); max-width: 62ch; margin-top: 6px; }
.modecard small { display: block; color: var(--faint); margin-top: 8px; font-size: var(--t-xs); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); }
.checklist i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; }
.checklist .ok i { background: var(--peacock); color: #fff; }
.checklist .no i { border: 2px solid #c3c9d9; }
.checklist .no span { color: var(--muted); }

/* region picker */
.regionform { display: grid; gap: 18px; max-width: 640px; }
.regionpreview { background: var(--indigo); color: #fff; border-radius: var(--r-md); padding: 22px 24px; }
.regionpreview .rp-big { font-size: var(--t-xl); line-height: 1.3; font-weight: 600; }
.regionpreview .muted { color: #b9c0e0; margin-top: 6px; font-size: var(--t-sm); }

/* message type */
.mtypes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mtypes legend { font-weight: 500; font-size: var(--t-sm); margin-bottom: 8px; padding: 0; }
.mtype { position: relative; display: block; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.mtype:hover { border-color: #c3c9d9; }
.mtype:has(input:checked) { border-color: var(--peacock); background: #f5fbfb; }
.mtype:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--peacock) 55%, transparent); outline-offset: 2px; }
.mtype input { position: absolute; opacity: 0; }
.mtype b { display: block; font-weight: 600; font-size: var(--t-sm); }
.mtype span { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 4px; line-height: 1.4; }
@media (max-width: 900px) { .mtypes { grid-template-columns: 1fr; } }

/* calling hours */
.hours-form { display: grid; grid-template-columns: 180px 180px auto; gap: 14px; align-items: end; justify-items: start; }
@media (max-width: 640px) { .hours-form { grid-template-columns: 1fr 1fr; } .hours-form .btn { grid-column: 1 / -1; } }

/* people list */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); font: 500 var(--t-sm) var(--f-latin); color: var(--muted); cursor: pointer; }
.filters button b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.filters button[aria-selected="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.filters button[aria-selected="true"] b { color: #7ee0dc; }
.people-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.people-tools input[type=search] { flex: 1; min-width: 200px; max-width: 320px; }
.tablewrap { overflow-x: auto; }
.ptable td { white-space: nowrap; }
.ptable th, .ptable td { padding-left: 10px; padding-right: 10px; }
.ptable th:first-child, .ptable td:first-child { padding-left: 0; }
.ptable th:last-child, .ptable td:last-child { padding-right: 0; }
@media (max-width: 640px) {
  .ptable .hide-sm { display: none; }
  .people-tools input[type=search] { max-width: none; flex-basis: 100%; }
  .ptable th, .ptable td { padding-left: 6px; padding-right: 6px; }
  .ptable .btn.small { padding: 5px 6px; }
  .ptable .tag { display: none; }
}
.ptable .pill { font-size: 12px; }
.btn.small { padding: 6px 10px; font-size: var(--t-sm); color: var(--peacock); }
.btn.small:hover { background: var(--peacock-soft); }
.tag { font-size: 11px; color: var(--indigo-3); background: #e3e7f6; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.pager-note { margin-top: 12px; font-size: var(--t-sm); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 14px; }
dialog input[type=file] { font: inherit; font-size: var(--t-sm); }

/* ---------- toast & dialog ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 50;
  background: var(--indigo); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: var(--t-sm);
  box-shadow: 0 10px 30px rgb(29 36 73 / .3); transition: opacity .2s, transform .2s; max-width: min(560px, calc(100vw - 32px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; border-radius: var(--r-lg); padding: 26px; width: min(440px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 20px 60px rgb(29 36 73 / .35); }
dialog::backdrop { background: rgb(29 36 73 / .45); }
dialog h2 { margin-bottom: 8px; }
dialog p { color: var(--muted); margin-bottom: 20px; }
dialog .actions { justify-content: flex-end; }
dialog form { display: grid; gap: 14px; }

/* ---------- mobile ---------- */
.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: static; height: auto; padding: 14px 16px; gap: 12px; }
  .side .nav { flex-direction: row; overflow-x: auto; }
  .side .nav a { padding: 8px 12px; white-space: nowrap; }
  .side-status { display: none; }
  .composer { grid-template-columns: 1fr; }
  .summary { position: static; }
  .stage { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 46vh; }
  .colhead { display: none; }
  .crow { grid-template-columns: 1fr 1fr; gap: 12px; }
  .crow > :first-child, .crow .mini { grid-column: 1 / -1; }
  .totals { grid-template-columns: 1fr; }
  .totals div + div { border-left: 0; border-top: 1px solid var(--line); }
  .funnel-row { grid-template-columns: 1fr 80px; }
  .funnel-row .track { grid-column: 1 / -1; grid-row: 2; }
  .inline-form { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 12px; }
  .stage .reach b { font-size: var(--t-2xl); }
  .stage .wavewrap { gap: 12px; }
  .stage .wave { height: 72px; }
  .play { width: 44px; height: 44px; }
  .stage .side-stats { gap: 22px; flex-wrap: wrap; }
  h1 { font-size: var(--t-xl); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
