/* =========================================================
   Nicky Clinch — Ad Dashboard
   Matched to the live nickyclinch.com brand:
     fonts  : MYROGE Regular (display serif), Aktiv Grotesk Light
              (labels, uppercase + wide tracking), Urbanist (data/nav)
     colour : white base, #131313 ink, lavender #D6B8DE signature band,
              golden #F2AD3F / ice #C2DEE1 / rose #EF98AC accents,
              brick red #8B1A1A for alerts.
   Editorial, monochrome-led, lavender as the one chrome accent.
   Zero em-dashes in any copy.
   ========================================================= */

@font-face {
  font-family: "Myroge"; font-display: swap; font-weight: 400;
  src: url("../fonts/myroge-regular.woff") format("woff");
}
@font-face {
  font-family: "Aktiv Grotesk"; font-display: swap; font-weight: 300;
  src: url("../fonts/aktivgrotesk-light.woff") format("woff");
}
@font-face {
  font-family: "Urbanist"; font-display: swap; font-weight: 300 700;
  src: url("../fonts/urbanist-variable.woff") format("woff");
}

:root {
  --bg: #faf8f5;          /* soft warm white */
  --surface: #ffffff;
  --ink: #131313;         /* her exact ink */
  --ink-soft: #565350;
  --ink-faint: #8f8b86;
  --line: #e9e4dd;
  --lavender: #d6b8de;    /* signature nav band */
  --lavender-soft: #f1e8f4;
  --golden: #f2ad3f;
  --golden-soft: #fcefd3;
  --ice: #c2dee1;
  --ice-soft: #e7f4f5;
  --rose: #ef98ac;
  --brick: #8b1a1a;       /* her deep red — alerts / negative */
  --brick-soft: #f6e7e5;
  --good: #0b7d72;        /* deep teal-green for positive deltas */
  --radius: 12px;
  --serif: "Fraunces", "Myroge", Georgia, serif;
  --label: "Aktiv Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --ui: "Urbanist", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--ui); font-size: 15px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; line-height: 1.1; }
.muted { color: var(--ink-faint); }
a { color: var(--ink); }

/* labels: uppercase, wide tracking — her site's signature treatment */
.label, .kpi-label, .eyebrow, .ctable th, .brand-tag {
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 300; font-size: 11px;
}

/* ---------- topbar: lavender band like her nav ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 30px; background: var(--lavender);
  position: sticky; top: 0; z-index: 10;
}
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: 0.02em; color: var(--ink); }
.brand-tag { margin-left: 16px; color: #4a3b50; }
.topbar-right { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.sync-status { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; color: #4a3b50; }
.logout { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid rgba(19,19,19,.3); padding-bottom: 1px; }
.logout:hover { border-color: var(--ink); }
.badge { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px;
  padding: 4px 11px; border-radius: 20px; font-weight: 300; }
.badge-sample { background: #fff; color: #4a3b50; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 34px 30px; }
.dateline { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.dateline h1 { font-size: 34px; margin: 0; }
.dateline .muted { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 24px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-head h2 { font-size: 19px; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 980px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 17px 17px; position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--lavender); }
.kpi-label { color: var(--ink-faint); }
.kpi-value { font-family: var(--ui); font-size: 27px; font-weight: 600; margin: 9px 0 5px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-soft); }
.delta { font-weight: 600; font-size: 12px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--brick); }
.delta.flat { color: var(--ink-faint); }

/* ---------- trend ---------- */
.chart-box { height: 300px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); padding: 7px 16px; cursor: pointer; color: var(--ink-soft);
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px;
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--ink); color: #fff; }

/* ---------- flags ---------- */
.flags { display: flex; flex-direction: column; gap: 11px; }
.flag { display: flex; gap: 12px; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line); }
.flag .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.flag.high { background: var(--brick-soft); border-color: #ecd6d3; }
.flag.high .dot { background: var(--brick); }
.flag.medium { background: var(--golden-soft); border-color: #f0e1c2; }
.flag.medium .dot { background: var(--golden); }
.flag-camp { font-weight: 600; }
.flag-msg { color: var(--ink-soft); font-size: 13px; }
.flags-clear { color: var(--ink-faint); padding: 10px 0; }

/* ---------- snapshot ---------- */
.snapshot { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.snap-row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dotted var(--line); padding: 10px 0; }
.snap-row span:first-child { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--ink-faint); }
.snap-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; }
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctable th { text-align: left; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ctable td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ctable tr:last-child td { border-bottom: 0; }
.ctable tbody tr:hover { background: var(--lavender-soft); }
.ctable .num { text-align: right; }
.pill { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px;
  padding: 3px 10px; border-radius: 999px; font-weight: 300; }
.pill.active { background: var(--ice-soft); color: #1f6168; }
.pill.paused { background: #efece6; color: var(--ink-faint); }
.spark { width: 120px; height: 28px; }

.foot { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px;
  color: var(--ink-faint); text-align: center; padding: 12px 0 36px; }

/* ---------- login ---------- */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center;
  background: var(--lavender); }
.login-card {
  background: var(--surface); border-radius: 16px; padding: 42px 34px; width: 340px; text-align: center;
  box-shadow: 0 18px 50px -26px rgba(19,19,19,.45);
}
.login-mark { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: 0.02em; }
.login-sub { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px;
  color: var(--ink-faint); margin: 8px 0 26px; }
.login-card input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 15px; margin-bottom: 12px; font-family: var(--ui); background: #fdfcfa;
}
.login-card input:focus { outline: 2px solid var(--lavender); border-color: var(--lavender); }
.login-card button {
  width: 100%; padding: 13px; border: 0; border-radius: 9px; background: var(--ink);
  color: #fff; font-size: 12px; font-weight: 300; cursor: pointer;
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em;
}
.login-card button:hover { background: #2c2c2c; }
.login-error { background: var(--brick-soft); color: var(--brick); font-size: 13px;
  padding: 9px; border-radius: 9px; margin-bottom: 14px; }

/* ================= Hub shell additions ================= */
.brand-name { text-decoration: none; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.hubnav { display: flex; gap: 6px; }
.hubnav a {
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; font-weight: 300; text-decoration: none; color: var(--ink-soft);
  padding: 7px 13px; border-radius: 999px;
}
.hubnav a:hover { background: var(--lavender-soft); color: var(--ink); }
.hubnav a.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.empty { padding: 8px 2px; }

/* flash messages */
.flash { padding: 11px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: #e6f4f1; color: var(--good); }
.flash-error { background: var(--brick-soft); color: var(--brick); }

/* hub landing module cards */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.module-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease;
  border-top: 3px solid var(--lavender);
}
.module-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(19,19,19,.09); }
.module-card.accent-lavender { border-top-color: var(--lavender); }
.module-card.accent-golden { border-top-color: var(--golden); }
.module-card.accent-ice { border-top-color: var(--ice); }
.module-blurb { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.module-go { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; font-weight: 300; color: var(--ink-faint); margin-top: auto; }

/* carousel studio */
.studio-form { display: flex; flex-direction: column; gap: 16px; padding: 4px 2px 2px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  padding: 11px 13px; font-family: var(--ui); font-size: 14px; color: var(--ink);
}
.field textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lavender); }
.studio-actions { display: flex; align-items: center; gap: 16px; }
.studio-actions button, .draft-actions button {
  border: none; border-radius: 999px; padding: 10px 22px; cursor: pointer;
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; font-weight: 300; background: var(--ink); color: #fff;
}
.studio-actions button:hover { background: #2c2c2c; }
.deck { padding: 14px 2px; border-top: 1px solid var(--line); }
.deck:first-of-type { border-top: none; }
.deck-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.deck-name { font-family: var(--serif); font-size: 17px; }
.frame-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.frame-thumb { flex: 0 0 auto; }
.frame-thumb img { width: 132px; height: 165px; object-fit: cover; border-radius: 6px;
  box-shadow: 0 6px 16px rgba(19,19,19,.12); display: block; }

/* approvals */
.draft { display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 16px 2px; border-top: 1px solid var(--line); }
.draft:first-of-type { border-top: none; }
.draft-name { font-family: var(--serif); font-size: 17px; margin-right: 10px; }
.draft-first { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.draft-caption { margin: 4px 0 0; font-size: 13px; }
.draft-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.btn-approve { background: var(--good) !important; }
.btn-reject { background: var(--bg) !important; color: var(--ink-soft) !important; box-shadow: inset 0 0 0 1px var(--line); }
.badge-alert { background: var(--brick-soft); color: var(--brick); padding: 3px 10px; border-radius: 999px; font-size: 11px; }
.draft-error { opacity: .8; }
