/* ============================================================
   BRANDR ADS PORTAAL — huisstijl brandr.nl
   Diep zwart · off-white · geel accent
   Space Grotesk (display) · Inter (body)
   ============================================================ */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin.woff2) format("woff2"); }

:root {
  --bg: #0d0d0c;
  --bg-soft: #161615;
  --card: #161615;
  --fg: #f4f2ec;
  --muted: #8f8c83;
  --yellow: #fcda00;
  --line: rgba(244, 242, 236, .09);
  --line-strong: rgba(244, 242, 236, .18);
  --green: #6fe3a1;
  --red: #ff6b6b;
  --r: 18px;
  --font-display: "Space Grotesk", Arial, sans-serif;
  --font-body: Inter, Arial, sans-serif;
  --sidebar-w: 264px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.55;
  background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: #0d0d0c; }
button { font: inherit; cursor: pointer; color: inherit; }
.boot { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r); padding: 40px;
}
.login-card .logo { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 4px; }
.login-card .logo span { color: var(--yellow); }
.login-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.login-card input {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px;
  font: inherit; margin-bottom: 12px; outline: none; background: var(--bg); color: var(--fg);
  transition: border-color .15s;
}
.login-card input:focus { border-color: var(--yellow); }
.login-card button {
  width: 100%; padding: 13px; border: 0; border-radius: 12px; background: var(--yellow);
  color: #0d0d0c; font-weight: 700; transition: filter .15s;
}
.login-card button:hover { filter: brightness(1.06); }
.login-err { color: var(--red); font-size: 13px; margin-bottom: 10px; }

/* ---------- Shell: sidebar + main ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-soft); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.sidebar .brand {
  padding: 26px 22px 20px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.sidebar .brand .logo { font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.sidebar .brand .logo span { color: var(--yellow); }
.sidebar .brand .sub { font-size: 11.5px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }

.nav { padding: 14px 12px; }
.nav .nav-label {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 14px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; background: transparent; border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(244, 242, 236, .05); color: var(--fg); }
.nav-item.on { background: rgba(252, 218, 0, .1); color: var(--fg); }
.nav-item.on .dot { background: var(--yellow); }
.nav-item .dot {
  width: 7px; height: 7px; border-radius: 99px; background: var(--line-strong); flex: 0 0 7px;
}
.nav-item .dot.active-spend { background: var(--green); }
.nav-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.nav-item .amt { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item.on .amt { color: var(--fg); }

.sidebar .foot { margin-top: auto; padding: 14px 12px 20px; border-top: 1px solid var(--line); }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 0 clamp(18px, 3vw, 40px) 60px; }
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px 0 20px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 82%, transparent);
}
.topbar h1 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.03em; margin-right: auto; }
.topbar .sync { color: var(--muted); font-size: 12px; width: 100%; margin-top: -14px; }

.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.seg button.on { background: var(--yellow); color: #0d0d0c; }

.ghost {
  border: 1px solid var(--line-strong); background: transparent; border-radius: 12px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.ghost:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- KPI's ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 26px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.kpi .v { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Klantkaarten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.client {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; cursor: pointer; transition: border-color .15s, transform .12s;
}
.client:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.client h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 2px; }
.client .sync { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.client .row { display: flex; align-items: flex-end; gap: 22px; }
.client .big .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.client .big .l { font-size: 11.5px; color: var(--muted); }
.client .spark { margin-left: auto; }
.client .mini { display: flex; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.client .mini div { font-size: 12.5px; color: var(--muted); }
.client .mini b { color: var(--fg); font-weight: 650; }
.delta { font-size: 11.5px; font-weight: 650; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }
.empty {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 44px; text-align: center; color: var(--muted);
}
.empty b { color: var(--fg); display: block; margin-bottom: 6px; font-size: 16px; font-family: var(--font-display); }
.empty a { color: var(--yellow); }

/* ---------- Detail ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 16px; }
.panel h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.chart-box { height: 300px; position: relative; }
table.camp { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.camp th, table.camp td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.camp th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
table.camp td.num, table.camp th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.camp tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 9px; border-radius: 99px; background: rgba(244,242,236,.08); color: var(--muted); }
.badge.ENABLED { background: rgba(111, 227, 161, .14); color: var(--green); }
.badge.PAUSED { background: rgba(252, 218, 0, .12); color: var(--yellow); }

/* ---------- Instellingen ---------- */
.code {
  background: #0a0a09; border: 1px solid var(--line); color: #d9d6cc; border-radius: 12px; padding: 16px;
  font: 12px/1.55 ui-monospace, Consolas, monospace; overflow: auto; max-height: 420px; white-space: pre;
}
.copybtn { margin-bottom: 12px; }
.note { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.note b { color: var(--fg); }
ol.steps { margin: 0 0 16px 18px; font-size: 13.5px; color: var(--muted); }
ol.steps li { margin-bottom: 6px; }
ol.steps b { color: var(--fg); }

/* ---------- Mobiel ---------- */
.menubtn { display: none; }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 40; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%); transition: transform .2s ease; height: 100dvh;
  }
  .sidebar.open { transform: none; box-shadow: 24px 0 60px rgba(0,0,0,.5); }
  .menubtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 10px;
    background: transparent; color: var(--fg); font-size: 18px;
  }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
}
