/* Praatmaak — Aardvark-palet: #081F30 + oranje (hoof), groen (goed), rooi (gevaar), geel, blou. */
:root {
  --nag: #081F30; --nag2: #0F2C42; --oranje: #FF8A1F; --oranje-d: #E06F05; --groen: #12A150; --rooi: #D93A2B;
  --geel: #F2D518; --blou: #1F7AE0; --grond: #F2F5F8; --kaart: #FFFFFF; --lyn: #DCE3EA; --teks: #13232F; --sag: #5B6B78;
  --r: 14px; --kop: 56px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--grond); color: var(--teks); font: 500 16px/1.45 Nunito, system-ui, sans-serif; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.6rem; font-weight: 900; margin: 8px 0 12px; line-height: 1.15; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 22px 0 10px; }
h3 { font-size: 1rem; font-weight: 800; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.klein, small { color: var(--sag); font-size: .86rem; }
.ik { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ik.groot { width: 36px; height: 36px; }
.ik.reus { width: 88px; height: 88px; stroke-width: 1.5; }
.draai { animation: draai 1s linear infinite; }
.swaai { width: 56px; height: 56px; color: var(--oranje); animation: swaai 1.4s ease-in-out infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
@keyframes swaai { 50% { transform: rotate(-14deg) scale(1.08); } }

/* Kop (S1 terug links, S3 Instellings regs — die kern sit sy knoppie hier) */
#kop { position: sticky; top: 0; z-index: 20; height: calc(var(--kop) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px; background: var(--nag); color: #fff; }
#kop .titel { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; margin-right: auto; }
#kop .titel b { font-weight: 900; color: var(--oranje); margin-right: -6px; }
.ikknop { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
#kop .ikknop:hover { background: rgba(255,255,255,.08); }
#kop #terug span { font-weight: 700; }

main { max-width: 760px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right)); }

.kaart { background: var(--kaart); border: 1px solid var(--lyn); border-radius: var(--r); padding: 16px; }
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--lyn); background: var(--kaart); font-weight: 800; cursor: pointer; transition: transform .08s, background .15s; }
.knop:active { transform: scale(.97); }
.knop:disabled { opacity: .45; cursor: default; }
.knop.hoof { background: var(--oranje); border-color: var(--oranje); color: #fff; }
.knop.hoof:hover:not(:disabled) { background: var(--oranje-d); }
.knop.sag { background: var(--kaart); }
.knop.rooi, .knop.gevaar { background: var(--rooi); border-color: var(--rooi); color: #fff; }
.knop.gevaar-sag { border-color: transparent; background: transparent; color: var(--rooi); margin-top: 18px; }
.knop.breed { width: 100%; margin-top: 12px; }
.knop.groot { min-height: 64px; font-size: 1.05rem; flex: 1; }
.knop.klein { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.ry { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pil { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lyn); background: var(--kaart); cursor: pointer; font-weight: 700; }
.pil.aan { background: var(--nag); border-color: var(--nag); color: #fff; }
.pil .ik { width: 18px; height: 18px; color: var(--oranje); }

/* Welkom */
.welkom { text-align: center; padding-top: 18px; }
.welkom-prent { color: var(--oranje); margin: 10px 0; }
.welkom p { color: var(--sag); }
.vorm { text-align: left; display: grid; gap: 12px; margin-top: 18px; }
.vorm label { display: grid; gap: 4px; font-weight: 800; }
input:not([type=range]):not([type=checkbox]), select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--lyn); border-radius: 10px; background: #fff; }
textarea { resize: vertical; min-height: 96px; margin-top: 12px; }

/* Tuis */
.groet { margin-top: 14px; }
.groot-aksie { display: flex; align-items: center; gap: 14px; background: var(--nag); color: #fff; border: 0; padding: 20px; }
.groot-aksie .ik { color: var(--oranje); background: rgba(255,138,31,.14); border-radius: 50%; padding: 12px; width: 64px; height: 64px; }
.groot-aksie b { display: block; font-size: 1.2rem; font-weight: 900; }
.groot-aksie small { color: #b9c8d4; }
.snel { display: flex; gap: 8px; margin-top: 12px; }
.snel .knop { flex: 1; }
.rooster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ding { padding: 10px; display: grid; gap: 6px; }
.ding .prent { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--nag2); display: grid; place-items: center; overflow: hidden; color: #4d7290; }
.ding .prent img { width: 100%; height: 100%; object-fit: cover; }
.ding b { font-weight: 800; line-height: 1.2; }
.soek { display: flex; align-items: center; gap: 8px; border: 1px solid var(--lyn); border-radius: 10px; background: #fff; padding: 0 10px; margin-bottom: 12px; }
.soek input { border: 0 !important; padding-left: 0 !important; }
.leeg-teks { color: var(--sag); grid-column: 1 / -1; text-align: center; padding: 18px 0; }
.leeg { text-align: center; padding: 24px 8px; color: var(--sag); }
.leeg .ik { width: 40px; height: 40px; }
.laai { grid-column: 1 / -1; display: grid; place-items: center; padding: 24px; color: var(--sag); }

/* Stem-paneel */
.stemknoppe { display: flex; gap: 10px; flex-wrap: wrap; }
.knop.praat { background: var(--oranje); border-color: var(--oranje); color: #fff; }
.opname { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opname .tyd { font-weight: 800; flex: 1; }
.pols { width: 18px; height: 18px; border-radius: 50%; background: var(--rooi); animation: pols 1s ease-in-out infinite; }
@keyframes pols { 50% { transform: scale(1.4); opacity: .55; } }
.besig { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--sag); font-weight: 700; }
.gehoor { margin: 12px 0 -4px; font-weight: 800; }
.idees { display: flex; flex-wrap: wrap; gap: 8px; }

/* Werkbank */
.kop2 { display: flex; align-items: center; gap: 4px; }
.kop2 h1 { margin-bottom: 4px; }
.opsomming { margin: 0 0 10px; color: var(--sag); }
.kyker { position: relative; height: min(46vh, 420px); border-radius: var(--r); overflow: hidden; background: radial-gradient(circle at 50% 30%, #17384f, var(--nag)); touch-action: none; }
.kyker canvas { width: 100%; height: 100%; display: block; }
.kyk-besig { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(8,31,48,.8); color: #fff; font-weight: 700; font-size: .9rem; }
.mate { margin: 8px 2px; font-weight: 700; font-size: .92rem; }
.goed { color: var(--groen); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.sleg { color: var(--rooi); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.mate .goed, .mate .sleg { display: inline-flex; }
.oortjies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--lyn); border-radius: 12px; padding: 4px; margin: 6px 0 10px; }
.oortjies button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; border-radius: 9px; background: transparent; font-weight: 800; font-size: .82rem; cursor: pointer; color: var(--sag); }
.oortjies button[aria-selected=true] { background: #fff; color: var(--teks); box-shadow: 0 1px 2px rgba(8,31,48,.12); }
.oortjies button[aria-selected=true] .ik { color: var(--oranje); }
.paneel { display: grid; gap: 6px; }
.paneel h3:first-child { margin-top: 0; }
.skuif { display: grid; gap: 2px; padding: 6px 0; }
.skuif span { display: flex; justify-content: space-between; font-weight: 700; }
.skuif output { font-weight: 900; color: var(--oranje-d); min-width: 3ch; text-align: right; }
input[type=range] { width: 100%; height: 44px; accent-color: var(--oranje); }
.janee { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; font-weight: 700; cursor: pointer; }
.janee input { position: absolute; opacity: 0; pointer-events: none; }
.janee i { width: 52px; height: 30px; border-radius: 99px; background: var(--lyn); position: relative; transition: background .15s; flex: none; }
.janee i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.janee input:checked + i { background: var(--groen); }
.janee input:checked + i::after { transform: translateX(22px); }
.janee input:focus-visible + i { outline: 2px solid var(--blou); outline-offset: 2px; }
.keuse { display: grid; gap: 6px; padding: 6px 0; font-weight: 700; }
.pille { display: flex; flex-wrap: wrap; gap: 6px; }
.getal { display: grid; gap: 4px; font-weight: 700; padding: 6px 0; }
.deel { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--lyn); }
.deel:last-child { border-bottom: 0; }
.deel > span { font-weight: 800; }
.kolle { display: flex; flex-wrap: wrap; gap: 8px; }
.kol { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: var(--k); box-shadow: 0 0 0 1px var(--lyn); cursor: pointer; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.kol.aan { box-shadow: 0 0 0 3px var(--oranje); }
.kol .ik { width: 18px; height: 18px; mix-blend-mode: difference; }
.mat { margin-top: -2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wens { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--k); border: 1px solid var(--lyn); }
.syfers { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.syfers > div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 10px; border-radius: 10px; background: var(--grond); }
.syfers .ik { grid-row: span 2; color: var(--oranje); }
.syfers b { font-weight: 900; }
.wenke { margin: 0; padding-left: 20px; }
.lys { display: grid; gap: 8px; }
.ry-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ry-item > div { display: grid; min-width: 0; }
.ry-item small { overflow: hidden; text-overflow: ellipsis; }
#weergawes .ry-item { padding: 8px 0; border-bottom: 1px solid var(--lyn); }

/* Druktou */
.taak .status { font-weight: 800; font-size: .85rem; padding: 4px 10px; border-radius: 99px; background: var(--grond); white-space: nowrap; }
.st-klaar .status { background: #dff4e7; color: #0b6b35; }
.st-misluk .status { background: #fbe1de; color: #9c2318; }
.st-druk .status, .st-besig .status { background: #fff0e0; color: #9a4a00; }
.st-wag_goedkeuring .status { background: #fdf7cf; color: #6b5c00; }
.balk { height: 10px; border-radius: 99px; background: var(--grond); overflow: hidden; margin: 10px 0 4px; }
.balk i { display: block; height: 100%; background: var(--oranje); border-radius: 99px; transition: width .4s; }

/* Drukker */
.gleuf { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--lyn); }
.gleuf .kol { width: 36px; height: 36px; }
#gleuwe .knop { margin-top: 12px; }
#stand .syfers { margin-top: 12px; }

/* Oorleg (S8: net een op 'n slag, bo alles) */
.oorleg { position: fixed; inset: 0; z-index: 50; background: rgba(8,31,48,.55); display: grid; place-items: center; padding: 16px; }
.dialoog { background: #fff; border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; }
.dialoog .ry { justify-content: flex-end; }
.dialoog.vordering { text-align: center; display: grid; justify-items: center; gap: 4px; }
.dialoog.vordering .st { font-weight: 800; font-size: 1.1rem; margin: 6px 0 0; }
.boodskap { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--nag); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(8,31,48,.25); transition: opacity .5s; }
.boodskap.fout { background: var(--rooi); }
.boodskap.weg { opacity: 0; }

@media (min-width: 900px) {
  main { max-width: 1180px; }
  .werkbank { display: grid; grid-template-columns: 1fr 420px; column-gap: 20px; align-items: start; }
  .werkbank > .kop2, .werkbank > .opsomming { grid-column: 1 / -1; }
  .werkbank .kyker { grid-column: 1; grid-row: 3 / span 3; height: 68vh; position: sticky; top: calc(var(--kop) + 12px); }
  .werkbank .mate, .werkbank .oortjies, .werkbank .paneel { grid-column: 2; }
}
