/* Huisstijl ironbikes.be: Sora-koppen (600 + 300), Inter als tekst, goud als enige accent.
   Dag = licht papier met donker goud voor tekst; Avond = de donkere look van de site. */
:root {
  --bg: #f5f4f1;
  --panel: #ffffff;
  --panel-2: #f0eee9;
  --ink: #080709;
  --ink-2: #45434a;
  --muted: #6d6b70;
  --line: #e0ddd5;
  --gold: #8a6a1f;
  --gold-fill: #d0a850;
  --series: #b08a36;
  --series-soft: #f3e8cf;
  --good: #1f7a3a; --good-bg: #e2f2e6;
  --warn: #a85100; --warn-bg: #fcebd9;
  --crit: #c02f2f; --crit-bg: #fbe4e2;
  --shadow: 0 1px 2px rgba(8, 7, 9, .04), 0 12px 28px -18px rgba(8, 7, 9, .25);
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080709; --panel: #111013; --panel-2: #19181c; --ink: #ffffff; --ink-2: #c4c7cc; --muted: #999999; --line: #2b292e;
    --gold: #d0a850; --gold-fill: #d0a850; --series: #d0a850; --series-soft: #3a3020;
    --good: #7cc47f; --good-bg: #16261a; --warn: #ff9a4d; --warn-bg: #33200f; --crit: #ff6b6b; --crit-bg: #3a1618;
    --shadow: 0 0 0 1px rgba(208, 168, 80, .06), 0 16px 32px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080709; --panel: #111013; --panel-2: #19181c; --ink: #ffffff; --ink-2: #c4c7cc; --muted: #999999; --line: #2b292e;
  --gold: #d0a850; --gold-fill: #d0a850; --series: #d0a850; --series-soft: #3a3020;
  --good: #7cc47f; --good-bg: #16261a; --warn: #ff9a4d; --warn-bg: #33200f; --crit: #ff6b6b; --crit-bg: #3a1618;
  --shadow: 0 0 0 1px rgba(208, 168, 80, .06), 0 16px 32px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: "Sora", "Segoe UI", system-ui, sans-serif; font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.light { font-weight: 300; }
p { margin: 0; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-fill); outline-offset: 2px; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-2); font: 300 16px "Sora", sans-serif; }
.brand img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 7px; border: 1px solid transparent; font-weight: 500; }
.nav a:hover { background: var(--panel); border-color: var(--line); }
.nav a[aria-current="page"] { color: var(--gold); background: var(--panel); border-color: var(--gold-fill); }
.topbar .spacer { flex: 1; }
.today { color: var(--muted); font-size: 13px; }

main { max-width: 1320px; margin: 0 auto; padding: 24px 20px 64px; display: grid; gap: 24px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- building blocks ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--gold-fill); }
.kpi .pill { justify-self: start; }
.kpi .lbl { font-size: 13px; color: var(--muted); }
.kpi .val { font: 600 32px/1 "Sora", sans-serif; }
.kpi .val small { font-size: 17px; color: var(--muted); font-weight: 300; }
.meter { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--series); border-radius: 3px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font: 500 12px/1 "Inter", sans-serif; padding: 5px 8px; border-radius: 99px; white-space: nowrap; }
.pill svg { width: 11px; height: 11px; flex: none; }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.info { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip { font-size: 12px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 13.5px "Inter", sans-serif; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 5px; padding: 7px 12px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--gold-fill); color: var(--gold); }
.btn.primary { background: var(--gold-fill); border-color: var(--gold-fill); color: #080709; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.05); color: #080709; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.danger:hover { border-color: var(--crit); color: var(--crit); }
.btn[disabled] { opacity: .5; cursor: default; }

/* Dag/avond-schakelaar: knop links = dag, rechts = avond */
.theme-switch {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between;
  width: 58px; height: 30px; padding: 0 8px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
}
.theme-switch svg { width: 14px; height: 14px; position: relative; z-index: 1; transition: color .2s; }
.theme-switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-fill); box-shadow: 0 1px 3px rgba(8, 7, 9, .25); transition: transform .2s ease;
}
.theme-switch[aria-checked="false"] .sun, .theme-switch[aria-checked="true"] .moon { color: #080709; }
.theme-switch[aria-checked="true"] .knob { transform: translateX(28px); }
.theme-switch:hover { border-color: var(--gold-fill); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--panel); }
.seg > * { font: 500 13px "Inter", sans-serif; padding: 6px 11px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-left: 1px solid var(--line); text-decoration: none; }
.seg > *:first-child { border-left: 0; }
.seg > [aria-pressed="true"], .seg > [aria-current="true"] { background: var(--gold-fill); color: #080709; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; max-width: 760px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .field .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="date"], input[type="search"], input[type="tel"], input[type="email"], input[type="password"], input:not([type]), select, textarea {
  font: 14px "Inter", sans-serif; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-fill); outline-offset: 0; border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--gold-fill); }
.form-error { background: var(--crit-bg); color: var(--crit); border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- lists ---------- */
.actions-list { list-style: none; margin: 0; padding: 0; display: grid; }
.actions-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.actions-list li:first-child { border-top: 0; }
.actions-list .t { font-size: 14px; min-width: 0; }
.actions-list .t a { color: var(--ink); text-decoration: none; font-weight: 500; }
.actions-list .t a:hover { color: var(--gold); }
.actions-list .t small { display: block; color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .actions-list li { grid-template-columns: 1fr; gap: 6px; } }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 16px; color: var(--muted); font-size: 13.5px; text-align: center; }

.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.inactive td { color: var(--muted); }

/* ---------- board ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.filters form { display: contents; }
.board-wrap { overflow-x: auto; padding-bottom: 6px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; min-width: 1180px; }
.lane { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; align-content: start; }
.lane > header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.lane > header b { font: 600 14px "Sora", sans-serif; }
.lane > header span { font-size: 12.5px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 7px; font-size: 13px; }
.card.late { border-left: 3px solid var(--crit); }
.card .art { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
.card .art:hover { color: var(--gold); }
.card .row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card .who { color: var(--muted); font-size: 12.5px; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- timeline ---------- */
.tl-wrap { overflow-x: auto; }
.tl { min-width: 980px; font-size: 12.5px; }
.tl-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; border-top: 1px solid var(--line); min-height: 32px; }
.tl-row.group { border-top: 0; min-height: 34px; }
.tl-row.group .nm { font: 600 13px "Sora", sans-serif; color: var(--gold); padding-top: 10px; }
.tl-row .nm { padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tl-days { display: grid; grid-template-columns: 190px 1fr; position: sticky; top: 0; }
.tl-scale { display: grid; }
.tl-scale div { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 4px; line-height: 1.25; }
.tl-scale div.we { color: var(--ink-2); background: var(--panel-2); border-radius: 4px 4px 0 0; }
.tl-scale div.now { color: var(--ink); font-weight: 700; }
.lanebar { position: relative; height: 32px; }
.bk { position: absolute; top: 5px; height: 22px; border-radius: 4px; padding: 0 7px; font-size: 11.5px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none; }
.bk:hover { outline: 2px solid var(--gold-fill); outline-offset: 1px; z-index: 2; }
.bk.run { background: var(--series-soft); border: 1px solid var(--series); }
.bk.done { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.bk.late { background: repeating-linear-gradient(135deg, var(--crit-bg) 0 6px, var(--panel) 6px 9px); border: 1px solid var(--crit); color: var(--crit); }
.bk.future { background: var(--panel); border: 1px dashed var(--series); }
.bk.open-l { border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bk.open-r { border-right-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .3; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 18px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.lg-run { background: var(--series-soft); border: 1px solid var(--series); }
.lg-future { background: var(--panel); border: 1px dashed var(--series); }
.lg-done { background: var(--panel-2); border: 1px solid var(--line); }
.lg-late { background: repeating-linear-gradient(135deg, var(--crit-bg) 0 4px, var(--panel) 4px 6px); border: 1px solid var(--crit); }

/* ---------- chart ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 11px "Inter", sans-serif; }
.chart .strong { fill: var(--ink); }
.chart .grid { stroke: var(--line); }
.chart .bar { fill: var(--series); }
.chart g:hover .bar { opacity: .8; }

.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pick { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); cursor: pointer; font-size: 13.5px; }
.pick:has(input:checked) { border-color: var(--gold-fill); box-shadow: inset 0 0 0 1px var(--gold-fill); }
.pick input { accent-color: var(--gold-fill); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .topbar { position: static; }
  .topbar-inner { padding: 8px 16px; gap: 8px 12px; }
  .brand { font-size: 14px; }
  .brand img { height: 26px; }
  .today { display: none; }
  .topbar .spacer { display: none; }
  /* row 1: logo + dag/avond; row 2: menu (scrolls sideways) + afmelden */
  .nav { order: 3; flex: 1 0 calc(100% - 92px); min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
  .logout { order: 4; }
  .nav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .topbar .theme-switch { margin-left: auto; }
  main { padding: 16px 16px 48px; gap: 18px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 26px; }
}

/* ---------- Laravel additions ---------- */
form.inline { display: inline; margin: 0; }
.flash { background: var(--good-bg); color: var(--good); border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.logout { margin: 0; }
.logout button { background: none; border: 0; color: var(--muted); font: 13px "Inter", sans-serif; cursor: pointer; padding: 6px 4px; }
.logout button:hover { color: var(--gold); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(380px, 100%); display: grid; gap: 18px; }
.login img { width: 200px; height: auto; justify-self: center; }
.login h1 { text-align: center; font-size: 22px; }
.field-error { color: var(--crit); font-size: 12.5px; }
