/* Spaiker huisstijl (brandbook v3): Manrope, canvas, zwart, oranje als accent. */

:root {
  --orange: #F05A28;
  --black: #141414;
  --canvas: #F5F4F0;
  --white: #FFFFFF;
  --muted: #6B6A62;
  --peach: #F8C4A8;
  --light-orange: #FDEAD0;
  --rule: #D9D6CC;
  --good: #2b7a3e;
  --bad: #a4462b;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--black);
  background: var(--canvas);
  overflow-x: hidden;
}
[hidden] { display: none !important; }

a { color: var(--black); text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--orange); }

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1; }
h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.lead { font-size: 1.1rem; font-weight: 500; margin: .75rem 0 0; max-width: 34rem; }
.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--bad); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Logo: altijd het hele woord, "ai" in oranje */
.logo { font-weight: 700; letter-spacing: -0.035em; font-size: 1.5rem; color: var(--black); }
.logo .ai { color: var(--orange); }

/* Blobs: organische vlakken die uit de sectie bloeden */
.blob { position: absolute; z-index: 0; pointer-events: none; background: no-repeat center / contain; }
.blob-peach { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 440'><path fill='%23F8C4A8' d='M220,40 C320,40 400,120 400,220 C400,320 320,400 220,400 C120,400 40,320 40,220 C40,120 120,40 220,40 Z'/></svg>"); }
.blob-light { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 440'><path fill='%23FDEAD0' d='M220,45 C330,55 405,135 400,235 C395,335 305,405 205,395 C110,385 45,300 55,200 C65,105 125,40 220,45 Z'/></svg>"); }

/* Layout */
.wrap { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; }
.brand { display: flex; align-items: baseline; gap: .75rem; text-decoration: none; }
.brand:hover { color: inherit; }
.user { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--muted); min-width: 0; }
.user #who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Blobs mogen onder de hero doorlopen, de pagina knipt alleen horizontaal (body overflow-x). */
.hero { position: relative; }
.hero .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.hero .blob-peach { width: 520px; height: 520px; right: -200px; top: -260px; }
.hero .blob-light { width: 300px; height: 300px; right: 180px; top: -170px; }

main.wrap { padding-bottom: 4rem; }

.card { background: var(--white); border: 1px solid var(--rule); padding: 1.5rem; margin-bottom: 1.5rem; }
.card > h2:first-child { margin-bottom: 1rem; }

/* Formulieren en knoppen */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: .55rem .7rem;
  border-radius: 0;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }
label { font-weight: 600; font-size: .9rem; }

button {
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  padding: .55rem 1rem;
  font-weight: 600;
  font-size: .9rem;
}
button:hover { border-color: var(--black); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--black); border-color: var(--black); color: var(--white); }
button.primary:hover { background: var(--orange); border-color: var(--orange); }
button.ghost { background: var(--white); }
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.row label { display: flex; align-items: center; gap: .5rem; }

/* Uploadvak */
.drop {
  display: block;
  border: 1.5px dashed var(--rule);
  background: var(--canvas);
  padding: 2rem 1rem;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1rem;
}
.drop:hover, .drop.over { border-color: var(--orange); background: var(--light-orange); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop u { text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.upload-line { margin-top: 1rem; font-size: .9rem; }
.upload-line p { margin: 0 0 .35rem; }

progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  background: var(--rule);
  display: block;
}
progress::-webkit-progress-bar { background: var(--rule); }
progress::-webkit-progress-value { background: var(--orange); }
progress::-moz-progress-bar { background: var(--orange); }

/* Overzicht */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 .75rem .6rem;
}
td { padding: .8rem .75rem; border-top: 1px solid var(--rule); vertical-align: top; }
td:first-child a { font-weight: 600; text-decoration: none; }
td:first-child a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.table-card { padding: 1.25rem .75rem .5rem; }
.empty { padding: 1rem .75rem 1.5rem; margin: 0; }

.pill {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  padding: .1rem .55rem;
  white-space: nowrap;
  background: var(--canvas);
  color: var(--muted);
}
.pill.done { color: var(--good); background: #e6efe5; }
.pill.failed { color: var(--bad); background: #f6e4dd; }
.pill.active { color: var(--black); background: var(--light-orange); }

/* Detail */
.back { display: inline-block; margin-bottom: 1rem; font-weight: 600; text-decoration: none; }
.back::before { content: "\2190\00a0"; color: var(--orange); }
#renameForm { display: flex; gap: .75rem; align-items: center; }
#title {
  flex: 1;
  min-width: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .1rem 0;
}
#title:hover { border-bottom-color: var(--rule); }
#title:focus { outline: 0; border-bottom-color: var(--orange); }
#meta { margin: .5rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.5rem; }
.actions .muted { margin-right: .25rem; }
.actions a { font-weight: 600; font-size: .9rem; margin-right: .5rem; }
.actions .spacer { flex: 1; }

#progressBox { margin-bottom: 1.5rem; }
#progressBox p { margin: .5rem 0 0; }

#summaryBox { background: var(--light-orange); border-color: var(--peach); }
#summary { white-space: pre-wrap; margin: .75rem 0; }
#summaryBox details { margin: .75rem 0; }
#summaryBox summary { cursor: pointer; }

.segments { padding: .75rem 1.5rem; }
.seg { display: flex; gap: 1.25rem; padding: .45rem 0; border-top: 1px solid var(--canvas); }
.seg:first-child { border-top: 0; }
.seg time { font-family: var(--mono); font-size: .8rem; color: var(--muted); flex: none; min-width: 3.5rem; padding-top: .15rem; }

/* Inlogpagina */
.login { min-height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; }
.login .blob-peach { width: 700px; height: 700px; right: -260px; bottom: -300px; }
.login .blob-light { width: 380px; height: 380px; left: -170px; top: -150px; }
.login .wrap { max-width: 420px; width: 100%; }
.login .logo { font-size: 2rem; }
.login h1 { font-size: 2.2rem; margin: 2rem 0 .5rem; }
.login form { display: flex; flex-direction: column; gap: .75rem; }
.login label { display: flex; flex-direction: column; gap: .35rem; }
.login input { width: 100%; }
.login #code { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; }
.login button { width: 100%; padding: .75rem; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .hero .blob-peach { width: 360px; height: 360px; right: -160px; top: -190px; }
  .hero .blob-light { display: none; }
  .card { padding: 1.1rem; }
  .segments { padding: .5rem 1.1rem; }
  .seg { gap: .75rem; }
  .top .kicker { display: none; }
}
