/* Marketing Suite HQ — Ads Dashboard
   Brand: Plus Jakarta Sans + DM Sans · purple #7B3FA0 · green #4AB74D · warm white */

:root {
  color-scheme: light;
  --page:        #f8f7f5;
  --surface:     #ffffff;
  --surface-2:   #fbfaf8;
  --line:        #e8e5e0;
  --line-soft:   #f0ede8;
  --ink:         #17121b;
  --ink-2:       #4d4652;
  --muted:       #7d7682;
  --faint:       #a9a3ad;

  --brand:       #7B3FA0;
  --brand-ink:   #6a3290;
  --brand-wash:  #f3ebf9;
  --brand-soft:  #e6d6f3;
  --green:       #3f9b42;
  --green-ink:   #2f7a32;
  --green-wash:  #eaf7ea;

  --series-1:    #7B3FA0;   /* validated vs #fff: dataviz checks pass */
  --series-2:    #3f9b42;
  --grid:        #eeebe6;
  --axis:        #cfcac2;

  --good:        #0ca30c;
  --good-ink:    #1d6b1f;
  --warn:        #fab219;
  --warn-ink:    #8a5a00;
  --warn-wash:   #fef7ec;
  --bad:         #d03b3b;
  --bad-ink:     #a62828;
  --bad-wash:    #fef2f2;

  --side:        #1a1320;
  --side-2:      #241b2c;
  --side-ink:    #cfc5d6;
  --side-faint:  #85798e;

  --shadow:      0 1px 0 rgba(23,18,27,.04), 0 1px 3px rgba(23,18,27,.06);
  --shadow-lg:   0 18px 50px -12px rgba(26,19,32,.35);
  --radius:      10px;
  --radius-sm:   6px;

  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body:    'DM Sans', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page:       #120e15;
    --surface:    #1b1820;
    --surface-2:  #211d27;
    --line:       #2f2936;
    --line-soft:  #26212c;
    --ink:        #f4f0f6;
    --ink-2:      #c9c1cf;
    --muted:      #9a91a1;
    --faint:      #6e6576;
    --brand:      #a271cc;
    --brand-ink:  #c39be3;
    --brand-wash: #2a1f33;
    --brand-soft: #3a2a48;
    --green:      #3fa443;
    --green-ink:  #6dd470;
    --green-wash: #18291a;
    --series-1:   #a271cc;  /* validated vs #1b1820 */
    --series-2:   #3fa443;
    --grid:       #2a2530;
    --axis:       #3c3543;
    --good-ink:   #4fd04f;
    --warn-ink:   #f5c04a;
    --warn-wash:  #2c2412;
    --bad-ink:    #f08080;
    --bad-wash:   #2e1717;
    --side:       #0c090e;
    --side-2:     #18131c;
    --shadow:     0 1px 0 rgba(0,0,0,.3);
    --shadow-lg:  0 18px 50px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:       #120e15;
  --surface:    #1b1820;
  --surface-2:  #211d27;
  --line:       #2f2936;
  --line-soft:  #26212c;
  --ink:        #f4f0f6;
  --ink-2:      #c9c1cf;
  --muted:      #9a91a1;
  --faint:      #6e6576;
  --brand:      #a271cc;
  --brand-ink:  #c39be3;
  --brand-wash: #2a1f33;
  --brand-soft: #3a2a48;
  --green:      #3fa443;
  --green-ink:  #6dd470;
  --green-wash: #18291a;
  --series-1:   #a271cc;
  --series-2:   #3fa443;
  --grid:       #2a2530;
  --axis:       #3c3543;
  --good-ink:   #4fd04f;
  --warn-ink:   #f5c04a;
  --warn-wash:  #2c2412;
  --bad-ink:    #f08080;
  --bad-wash:   #2e1717;
  --side:       #0c090e;
  --side-2:     #18131c;
  --shadow:     0 1px 0 rgba(0,0,0,.3);
  --shadow-lg:  0 18px 50px -12px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------
   Shell
   --------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

.side {
  background: var(--side);
  color: var(--side-ink);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
  overflow: hidden;
}
/* signal rings radiating from the logo corner — the "reach" motif */
.side::before {
  content: '';
  position: absolute; left: -180px; top: -180px; width: 420px; height: 420px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(162,113,204,.09) 34px 35px);
  pointer-events: none;
}
.side .logo { position: relative; padding: 4px 10px 6px; }
.side .logo img { width: 150px; display: block; }
.side .logo span {
  display: block; margin-top: 8px;
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--side-faint);
}
.side nav { position: relative; margin-top: 26px; display: grid; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 8px;
  color: var(--side-ink); font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.side nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.side nav a[aria-current="page"] { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 #a271cc; }
.side nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.side .foot { margin-top: auto; position: relative; display: grid; gap: 4px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 12px; }
.side .foot button {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; border-radius: 8px; color: var(--side-faint); font-size: 13px;
}
.side .foot button:hover { color: #fff; background: var(--side-2); }
.side .foot svg { width: 16px; height: 16px; flex: none; }
.side .foot button:focus-visible { outline: 2px solid #a271cc; }
.side .foot .who { padding: 4px 11px 6px; font-size: 12px; color: var(--side-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; padding: 30px 36px 60px; max-width: 1320px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.kicker { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 6px; }
.page-head h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   Controls
   --------------------------------------------------------------- */
.btn {
  font: 600 13.5px/1 var(--display);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 15px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad-ink); }
.btn.danger:hover { border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-soft); }
.btn.sm { padding: 7px 10px; font-size: 12.5px; }
.btn svg { width: 15px; height: 15px; }
:is(.btn, input, select, textarea):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.field { display: grid; gap: 5px; }
.field > span, .label {
  font: 600 11px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  font: 400 14px/1.4 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; min-height: 70px; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d7682' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters select, .filters input { width: auto; min-width: 150px; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button {
  all: unset; cursor: pointer; font: 600 12.5px/1 var(--display); padding: 7px 11px; border-radius: 6px; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--brand-wash); color: var(--brand-ink); }
.seg button:focus-visible { outline: 2px solid var(--brand); }

/* ---------------------------------------------------------------
   Cards, tiles
   --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 14px 18px 18px; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid.two { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hero {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.4fr); gap: 0;
  overflow: hidden;
}
.hero .lead {
  padding: 22px 22px 20px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--brand-wash), transparent 60%),
    var(--surface);
  border-right: 1px solid var(--line);
}
.hero .lead .label { color: var(--brand-ink); }
.hero .lead .big { font: 800 52px/1 var(--display); letter-spacing: -.03em; margin: 12px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { padding: 18px 18px 16px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); min-width: 0; }
.tiles .tile:nth-child(-n+4) { border-top: 0; }
.tiles .tile:nth-child(4n+1) { border-left: 0; }
.tile .v { font: 700 23px/1.1 var(--display); letter-spacing: -.02em; margin-top: 7px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; margin-top: 5px; color: var(--muted); }
.delta.good { color: var(--good-ink); }
.delta.bad { color: var(--bad-ink); }
.delta svg { width: 12px; height: 12px; }

/* ---------------------------------------------------------------
   Tactic chips + status
   --------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--display); padding: 5px 9px 5px 7px; border-radius: 999px;
  background: var(--brand-wash); color: var(--brand-ink); white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--display); text-transform: capitalize; white-space: nowrap; color: var(--ink-2);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.live { color: var(--green-ink); }
.status.live::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-wash); animation: pulse 2.4s ease-in-out infinite; }
.status.paused::before { background: var(--warn); }
.status.planning::before { background: var(--brand); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }

/* ---------------------------------------------------------------
   Tables
   --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font: 600 11px/1.2 var(--display); letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface-2);
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--surface-2); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td .name { font-weight: 600; color: var(--ink); }
td .sub { font-size: 12px; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* pacing meter: fill carries severity, track is a lighter step of the same ramp */
.meter { display: grid; gap: 4px; min-width: 110px; }
.meter .bar { height: 6px; border-radius: 3px; background: var(--brand-soft); position: relative; overflow: hidden; }
.meter .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--brand); }
.meter .bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .55; }
.meter.over .bar i { background: var(--bad); }
.meter.under .bar i { background: var(--warn); }
.meter small { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------
   Attention list
   --------------------------------------------------------------- */
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 8px; background: var(--warn-wash);
}
.alerts li.serious { background: var(--bad-wash); }
.alerts li svg { width: 18px; height: 18px; margin-top: 1px; color: var(--warn-ink); }
.alerts li.serious svg { color: var(--bad-ink); }
.alerts .t { font-size: 13.5px; color: var(--ink); }
.alerts .c { font-size: 12px; color: var(--muted); }
.alerts .lvl { font: 700 10.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--warn-ink); margin-right: 6px; }
.alerts li.serious .lvl { color: var(--bad-ink); }
.all-clear { display: flex; gap: 10px; align-items: center; color: var(--good-ink); font-weight: 500; padding: 6px 0; }
.all-clear svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------
   Tactic playbook strip
   --------------------------------------------------------------- */
.playbook { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.play {
  position: relative; padding: 16px 16px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; min-height: 172px;
  color: var(--ink); transition: border-color .15s, transform .15s;
}
a.play:hover { text-decoration: none; border-color: var(--brand-soft); transform: translateY(-1px); }
.play .icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-wash); color: var(--brand-ink);
}
.play .icon svg { width: 18px; height: 18px; }
.play h3 { font-size: 14px; font-weight: 700; }
.play p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; flex: 1; }
.play .stat { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 9px; font-size: 12px; color: var(--muted); }
.play .stat strong { font: 700 15px/1 var(--display); color: var(--ink); }
.play.idle { background: var(--surface-2); }
.play.idle .stat strong { color: var(--faint); }

/* ---------------------------------------------------------------
   Charts
   --------------------------------------------------------------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tick { font: 400 11px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .1; }
.chart .cross { stroke: var(--ink); stroke-width: 1; opacity: .25; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { font: 600 12px var(--display); fill: var(--ink); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--ink); color: var(--page); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; line-height: 1.4; white-space: nowrap; box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(-100% - 12px));
}
.tooltip b { font: 700 14px var(--display); display: block; }

.bars { display: grid; gap: 12px; }
.bars .row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 76px; gap: 12px; align-items: center; font-size: 13px; }
.bars .row .lbl { display: flex; gap: 8px; align-items: center; min-width: 0; color: var(--ink); font-weight: 500; }
.bars .row .lbl svg { width: 15px; height: 15px; color: var(--brand-ink); flex: none; }
.bars .row .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { height: 18px; position: relative; }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; max-width: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bars .row .meta { grid-column: 2 / 4; margin-top: -8px; font-size: 11.5px; color: var(--muted); }

details.table-view { margin-top: 12px; }
details.table-view summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
details.table-view summary:hover { color: var(--ink); }

/* ---------------------------------------------------------------
   Modal, toast
   --------------------------------------------------------------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50; background: rgba(18,12,22,.55); backdrop-filter: blur(3px);
  display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto;
  animation: fade .15s ease;
}
.modal {
  width: 100%; max-width: 640px; background: var(--surface); border-radius: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: rise .2s ease;
}
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.modal header h2 { font-size: 18px; font-weight: 800; }
.modal .body { padding: 20px 22px; display: grid; gap: 14px; }
.modal footer { display: flex; justify-content: space-between; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal footer .right { display: flex; gap: 8px; margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { background: var(--bad-wash); color: var(--bad-ink); border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.hint {
  background: var(--brand-wash); border-radius: 9px; padding: 12px 14px; font-size: 13px; color: var(--ink-2);
  display: grid; gap: 4px;
}
.hint strong { font-family: var(--display); color: var(--brand-ink); }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 9px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: rise .2s ease;
}
.toast.error { background: var(--bad); color: #fff; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* staggered page entrance */
.reveal > * { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.reveal > *:nth-child(2) { animation-delay: .05s; }
.reveal > *:nth-child(3) { animation-delay: .1s; }
.reveal > *:nth-child(4) { animation-delay: .15s; }
.reveal > *:nth-child(5) { animation-delay: .2s; }
.reveal > *:nth-child(n+6) { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--line-soft), var(--surface-2), var(--line-soft)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.checklist li:last-child { border-bottom: 0; }
.checklist input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); cursor: pointer; }
.checklist .t { font-weight: 600; font-size: 13.5px; }
.checklist li.done .t { color: var(--ink-2); }
.checklist .h { font-size: 12.5px; color: var(--muted); }
.checklist .need { font-size: 11.5px; color: var(--brand-ink); font-weight: 600; margin-top: 3px; }
.checklist .note-in { margin-top: 6px; font-size: 12.5px; padding: 6px 9px; }

.progress { height: 6px; border-radius: 3px; background: var(--green-wash); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; }

.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.client-card { padding: 18px; cursor: pointer; display: grid; gap: 12px; transition: border-color .15s, transform .15s; text-align: left; font: inherit; color: inherit; }
.client-card:hover { border-color: var(--brand-soft); transform: translateY(-1px); }
.client-card:focus-visible { outline: 2px solid var(--brand); }
.client-card h3 { font-size: 16px; font-weight: 700; }
.client-card .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.client-card .row strong { color: var(--ink); font-family: var(--display); }
.client-card.inactive { opacity: .6; }

/* drop zone */
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center;
  background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer; display: block;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-wash); }
.drop svg { width: 30px; height: 30px; color: var(--brand-ink); }
.drop strong { display: block; font-family: var(--display); margin-top: 8px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.badge { display: inline-block; font: 600 11px/1 var(--display); padding: 4px 7px; border-radius: 5px; background: var(--line-soft); color: var(--ink-2); }
.badge.new { background: var(--green-wash); color: var(--green-ink); }
.badge.changed { background: var(--warn-wash); color: var(--warn-ink); }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 1180px) {
  .playbook { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .lead { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 980px) {
  .grid.two, .grid.halves { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:nth-child(-n+4) { border-top: 1px solid var(--line-soft); }
  .tiles .tile:nth-child(-n+2) { border-top: 0; }
  .tiles .tile:nth-child(4n+1) { border-left: 1px solid var(--line-soft); }
  .tiles .tile:nth-child(2n+1) { border-left: 0; }
}
@media (max-width: 780px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; }
  .side::before { display: none; }
  .side .logo { padding: 0; }
  .side .logo img { width: 104px; }
  .side .logo span, .side .foot .who { display: none; }
  .side nav { margin: 0 0 0 auto; display: flex; gap: 0; }
  .side nav a { padding: 8px; }
  .side nav a span { display: none; }
  .side .foot { margin: 0; border: 0; padding: 0; display: flex; }
  .side .foot button span { display: none; }
  .side .foot button { padding: 8px; }
  .main { padding: 20px 16px 50px; }
  .page-head h1 { font-size: 24px; }
  .playbook { grid-template-columns: minmax(0, 1fr); }
  .play { min-height: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .lead .big { font-size: 44px; }
  .bars .row { grid-template-columns: 110px minmax(0, 1fr) 64px; }
  .filters select, .filters input { min-width: 0; flex: 1 1 140px; }
}
