/* Go Car Factory – huisstijl: wit, rond, antraciet logo met mint/turkoois en donkergroen */
:root {
  --antraciet: #3c3c3c;
  --donkergroen: #0f3f33;
  --mint: #38ffa8;
  --mint-donker: #1fd98a;
  --turkoois: #5cffe4;
  --taupe: #a0937a;
  --rood: #eb3b3b;
  --op-mint: #0f3f33;      /* tekstkleur op mint */
  --op-turkoois: #0f3f33;  /* tekstkleur op turkoois */
  /* Deze kleuren worden overschreven vanuit Beheer > Huisstijlkleuren */

  --bg: #f5f8f7;
  --paneel: #ffffff;
  --tekst: #262b2a;
  --sub: #6d7674;
  --rand: #e4ebe9;
  --fout: #c62828;
  --ok: #0f3f33;
  --radius: 22px;
  --radius-klein: 14px;
  --schaduw: 0 2px 10px rgba(15, 63, 51, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--tekst);
  min-height: 100vh;
}
a { color: var(--donkergroen); font-weight: 700; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; font-weight: 900; color: var(--antraciet); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.verborgen { display: none !important; }
.klein { font-size: .88rem; color: var(--sub); }
.sub { color: var(--sub); font-size: .86rem; font-weight: 600; }
.midden { text-align: center; }
.fout { background: #ffe5e5; color: var(--fout); padding: .8rem 1.1rem; border-radius: var(--radius-klein); font-weight: 700; }
.ok { background: color-mix(in srgb, var(--mint) 20%, #fff); color: var(--ok); padding: .8rem 1.1rem; border-radius: var(--radius-klein); font-weight: 700; }
.waarschuwing { background: #fff4d6; color: #7a5200; padding: .7rem 1rem; border-radius: var(--radius-klein); font-weight: 600; }

/* ---------- decoratieve bubbels (zoals in de huisstijl) */
.bubbels { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubbels span { position: absolute; border-radius: 50%; }
.bubbels span:nth-child(1) { width: 420px; height: 420px; right: -170px; bottom: -170px; background: var(--turkoois); opacity: .22; }
.bubbels span:nth-child(2) { width: 90px; height: 90px; right: 230px; bottom: 120px; background: var(--mint); opacity: .25; }
.bubbels span:nth-child(3) { width: 160px; height: 160px; left: -80px; top: 45%; border: 34px solid var(--donkergroen); opacity: .06; }
.kop, .inhoud, .los-blok { position: relative; z-index: 1; }

/* ---------- kop & navigatie */
.kop {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 1px 0 var(--rand), 0 6px 20px rgba(15, 63, 51, .05);
}
.kop-rij { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem .25rem; max-width: 1200px; margin: 0 auto; }
.logo { display: block; line-height: 0; }
.logo img { height: 46px; width: auto; }
.naam-knop {
  background: var(--bg); color: var(--antraciet); border: 2px solid var(--rand); border-radius: 999px;
  padding: .4rem 1rem; font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer; min-height: 42px;
  display: inline-flex; align-items: center;
}
.naam-knop:hover { border-color: var(--mint); }
.naam-icoon {
  width: 22px; height: 22px; border-radius: 50%; background: var(--mint); margin-right: .45rem;
  display: inline-block; font-size: 0;
}
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .35rem .75rem .65rem; max-width: 1200px; margin: 0 auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--antraciet); text-decoration: none; white-space: nowrap;
  padding: .5rem 1.05rem; border-radius: 999px; font-weight: 800; font-size: .97rem;
  border: 2px solid transparent;
}
.tabs a:hover { border-color: var(--rand); }
.tabs a.actief { background: var(--antraciet); color: #fff; }
.teller {
  display: inline-block; min-width: 1.6em; padding: 0 .45em; margin-left: .2rem; border-radius: 999px;
  background: var(--rand); color: var(--antraciet); font-size: .8rem; text-align: center; font-weight: 900;
}
.tabs a.actief .teller { background: var(--mint); color: var(--op-mint); }

.inhoud { max-width: 1200px; margin: 0 auto; padding: 1.1rem 1rem calc(2.5rem + env(safe-area-inset-bottom)); }

/* ---------- knoppen & formulieren */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-height: 46px; padding: .55rem 1.3rem; border-radius: 999px;
  border: 2px solid var(--rand); background: #fff; color: var(--antraciet);
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
}
.knop:hover { border-color: var(--antraciet); }
.knop.primair { background: var(--mint); border-color: var(--mint); color: var(--op-mint); }
.knop.primair:hover { background: var(--mint-donker); border-color: var(--mint-donker); }
.knop.gevaar { color: var(--fout); border-color: #ffd0d0; }
.knop.breed { width: 100%; }
.knop:disabled { opacity: .6; cursor: wait; }
.klein-knop { min-height: 36px; padding: .3rem .85rem; font-size: .86rem; }
.knoppen { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1rem; }
.inline { display: inline; }

input[type=text], input[type=password], input[type=number], input[type=search], textarea {
  width: 100%; font: inherit; font-weight: 600; padding: .7rem 1rem; border: 2px solid var(--rand); border-radius: var(--radius-klein);
  background: #fff; color: var(--tekst); min-height: 48px;
}
input:focus, textarea:focus { outline: none; border-color: var(--mint-donker); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 30%, transparent); }
input[type=color] { width: 52px; height: 42px; border: 2px solid var(--rand); border-radius: 12px; padding: 2px; background: #fff; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--donkergroen); }
textarea { resize: vertical; }
.formulier { display: grid; gap: .9rem; }
.veld { display: grid; gap: .3rem; }
.veld > span { font-size: .92rem; font-weight: 800; color: var(--antraciet); }
.vink { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.rij-form { grid-template-columns: 1fr auto; align-items: end; }
.smal-input { max-width: 80px; }
.twee-kol { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- losse pagina's (login/installatie) */
body.los { display: grid; place-items: center; padding: 1rem; background: #fff; }
.los-blok {
  background: #fff; padding: 2.2rem 2rem; border-radius: 28px; width: 100%; max-width: 420px;
  box-shadow: 0 18px 50px rgba(15, 63, 51, .12);
}
.los-blok.breed-blok { max-width: 520px; margin: 2rem 0; }
.los-blok h3 { margin-top: .6rem; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; margin: .8rem 0; }
.login-logo { margin: 0 0 1.6rem; text-align: center; line-height: 0; }
.login-logo img { width: 230px; max-width: 80%; height: auto; }

/* ---------- balk met zoeken/filters */
.balk { display: grid; gap: .7rem; margin-bottom: 1.1rem; }
.zoek {
  font-size: 1.05rem; border-radius: 999px !important; padding-left: 2.8rem !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233c3c3c' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E") no-repeat 1rem center !important;
}
.filters { display: flex; gap: .45rem; flex-wrap: wrap; }
.filter {
  border: 2px solid var(--rand); background: #fff; border-radius: 999px; padding: .45rem 1rem; min-height: 42px;
  font: inherit; font-size: .92rem; font-weight: 800; color: var(--antraciet); cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
}
.filter:hover { border-color: var(--antraciet); }
.filter.actief { background: var(--antraciet); color: #fff; border-color: var(--antraciet); }
.stip { width: 12px; height: 12px; border-radius: 50%; background: var(--k); display: inline-block; }

/* ---------- kaarten */
.kaarten { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.kaart {
  background: var(--paneel); border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: var(--schaduw); border: 2px solid transparent;
  display: flex; flex-direction: column; transition: opacity .3s, transform .3s, border-color .2s;
}
.kaart::before {
  /* statusbubbel rechtsboven */
  content: ""; position: absolute; top: -34px; right: -34px; width: 78px; height: 78px; border-radius: 50%;
  background: var(--k); opacity: .9;
}
.kaart:hover { border-color: var(--rand); }
.kaart.weg { opacity: 0; transform: scale(.96); }
.kaart-link { color: inherit; text-decoration: none; font-weight: inherit; padding: 1rem 1.1rem .7rem; display: grid; gap: .5rem; flex: 1; }
.kaart-kop { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-right: 2rem; }
.voertuig { font-size: 1.08rem; font-weight: 900; color: var(--antraciet); }
.badges { display: flex; gap: .3rem; flex-wrap: wrap; }
.badge { font-size: .72rem; font-weight: 900; text-transform: lowercase; letter-spacing: .02em; padding: .18rem .6rem; border-radius: 999px; }
.badge.update { background: var(--donkergroen); color: var(--mint); animation: puls 2s infinite; }
.badge.nieuw { background: var(--turkoois); color: var(--op-turkoois); }
.badge.terug { background: #efe9dd; color: #6b5f45; }
@keyframes puls { 50% { opacity: .6; } }
.kaart-info { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .93rem; }
.lev { font-weight: 800; }
.lev.bijna { color: #b86e00; }
.lev.vandaag { color: #d9480f; }
.lev.te-laat { color: var(--fout); }
.loc { font-weight: 800; color: var(--donkergroen); }
.loc::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--mint-donker); margin-right: .35rem; }
.opm-preview { font-size: .9rem; color: var(--antraciet); background: var(--bg); border-radius: var(--radius-klein); padding: .45rem .75rem; font-weight: 600; }

.plaat {
  display: inline-block; background: #f6c600; color: #111; font-weight: 900; letter-spacing: .06em;
  border: 2px solid #111; border-radius: 6px; padding: .02rem .45rem; font-size: .95rem; white-space: nowrap;
  border-left: 10px solid #1e40af; font-family: "Nunito", sans-serif;
}
.plaat.groot { font-size: 1.5rem; padding: .1rem .7rem; border-left-width: 14px; }

/* statusknoppen */
.status-knoppen { display: flex; gap: .4rem; padding: 0 .8rem .8rem; }
.status-knop {
  flex: 1; min-height: 48px; border: 2px solid var(--rand); background: #fff; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: .9rem; color: var(--antraciet);
  cursor: pointer; touch-action: manipulation; padding: .3rem .5rem;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15;
}
.status-knop::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--k); margin-right: .4rem; }
.status-knop:hover { border-color: var(--k); }
.status-knop.actief { background: var(--k); border-color: var(--k); color: var(--t); }
.status-knop.actief::before { background: var(--t); opacity: .6; }
.status-knop:disabled { opacity: .6; }
.status-knoppen.groot { padding: 0; margin-top: 1.1rem; }
.status-knoppen.groot .status-knop { min-height: 62px; font-size: 1.05rem; }

/* ---------- lijst (afgerond) */
.lijst { display: grid; gap: .6rem; }
.lijst-rij {
  display: flex; gap: .9rem; align-items: center; background: #fff; padding: .8rem 1.1rem;
  border-radius: var(--radius-klein); text-decoration: none; color: inherit; font-weight: inherit; box-shadow: var(--schaduw);
}
.lijst-tekst { display: grid; }
.lijst-tekst strong { font-weight: 900; color: var(--antraciet); }

/* ---------- panelen / detail */
.paneel { background: var(--paneel); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--schaduw); }
.paneel.smal { max-width: 420px; margin-left: auto; margin-right: auto; }
.paneel-kop { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.paneel-kop h2 { margin: 0; }
.kop-paneel { position: relative; overflow: hidden; }
.kop-paneel::before {
  content: ""; position: absolute; top: -60px; right: -60px; width: 150px; height: 150px; border-radius: 50%;
  background: var(--k); opacity: .9;
}
.kop-paneel > * { position: relative; }
.detail { max-width: 760px; margin: 0 auto; }
.detail-kop { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding-right: 4.5rem; }
.detail-kop h1 { margin: 0; }
.terug { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .8rem; text-decoration: none; font-weight: 800; padding: .3rem 0; color: var(--antraciet); }
.banner { margin-top: 1rem; background: var(--bg); padding: .8rem 1rem; border-radius: var(--radius-klein); display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-weight: 700; }
.update-paneel { background: var(--donkergroen); color: #fff; }
.update-paneel h2 { color: var(--mint); }
.update-paneel .oud { color: #a8c4bc; }
.update-paneel .nieuw { color: var(--mint); }
.update-paneel .sub { color: #a8c4bc; }
.update-paneel .knop { background: var(--mint); border-color: var(--mint); color: var(--op-mint); }
.wijz { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.wijz li { font-size: .96rem; }
.oud { text-decoration: line-through; color: var(--sub); }
.nieuw { font-weight: 900; color: var(--donkergroen); }
.gegevens { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.2rem; margin: 0; align-items: center; }
.gegevens dt { color: var(--sub); font-size: .9rem; font-weight: 700; }
.gegevens dd { margin: 0; font-weight: 700; }
.inline-form { display: flex; gap: .4rem; }
.opm-form { display: grid; gap: .5rem; margin-bottom: 1rem; }
.opm-form .knop { justify-self: end; }
.opm-lijst, .hist, .simpel, .namen { list-style: none; margin: 0; padding: 0; }
.opm-lijst li { background: var(--bg); border-radius: var(--radius-klein); padding: .7rem .9rem; margin-top: .6rem; }
.opm-meta { font-size: .86rem; color: var(--sub); display: flex; align-items: center; gap: .3rem; font-weight: 600; }
.opm-meta strong { color: var(--donkergroen); font-weight: 900; }
.opm-tekst { margin-top: .15rem; word-wrap: break-word; font-weight: 600; }
.opm-weg { margin-left: auto; border: 0; background: none; color: #9aa5a2; font-size: 1rem; cursor: pointer; padding: .3rem .5rem; min-width: 36px; min-height: 36px; border-radius: 50%; }
.opm-weg:hover { color: var(--fout); background: #ffe5e5; }
.hist li { border-top: 1px solid var(--rand); padding: .5rem 0; font-size: .92rem; display: grid; }
.simpel li { padding: .3rem 0; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2 { display: inline; }
details > summary::before { content: "＋ "; color: var(--mint-donker); font-weight: 900; }
details[open] > summary::before { content: "－ "; }
.namen li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--rand); font-weight: 700; }
.namen form { margin-left: auto; }

/* ---------- import */
.bestand-kiezer {
  display: block; border: 3px dashed var(--mint-donker); border-radius: var(--radius); padding: 2.2rem 1rem; text-align: center;
  cursor: pointer; background: color-mix(in srgb, var(--mint) 10%, #fff); font-weight: 800; font-size: 1.08rem; color: var(--donkergroen);
}
.bestand-kiezer.sleep { background: color-mix(in srgb, var(--mint) 22%, #fff); border-style: solid; }
.bestand-kiezer input { display: none; }
.samenvatting { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.tegel { background: var(--bg); border-radius: var(--radius-klein); padding: .8rem; text-align: center; font-size: .86rem; color: var(--sub); font-weight: 700; }
.tegel b { display: block; font-size: 1.8rem; color: var(--antraciet); font-weight: 900; }
.tegel.nieuw { background: color-mix(in srgb, var(--turkoois) 25%, #fff); }
.tegel.terug { background: #f3eee4; }
.tegel.update { background: var(--donkergroen); color: #a8c4bc; }
.tegel.update b { color: var(--mint); }
.vb-blok { border: 2px solid var(--rand); border-radius: var(--radius-klein); padding: .7rem .9rem; margin-bottom: .6rem; }
.vb-blok summary { font-weight: 900; color: var(--antraciet); }
.vb-lijst { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.vb-lijst > li { padding: .45rem 0; border-top: 1px solid var(--rand); font-weight: 700; }
.vb-lijst .wijz { margin: .3rem 0 0 .2rem; }
.status-pil { display: inline-block; font-size: .75rem; font-weight: 900; padding: .1rem .55rem; border-radius: 999px; border: 2px solid var(--k); }

/* ---------- tabellen */
.tabel-wrap { overflow-x: auto; margin-bottom: 1rem; }
.tabel { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabel th, .tabel td { padding: .55rem; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: middle; }
.tabel th { font-size: .8rem; color: var(--sub); font-weight: 900; text-transform: lowercase; }
.status-tabel input[type=text] { min-width: 140px; }

/* ---------- kleuren kiezen (beheer) */
.kleur-raster { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kleur-veld { background: var(--bg); border-radius: var(--radius-klein); padding: .8rem .9rem; }
.kleur-kop { display: flex; align-items: center; gap: .7rem; }
.kleur-kop > span { display: grid; line-height: 1.25; }
.kleur-kop input[type=color] { width: 56px; height: 56px; border-radius: 50%; padding: 3px; flex: none; cursor: pointer; }
.kleur-kop input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.kleur-kop input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.kleur-kop input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.palet { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; max-width: 260px; }
.palet-vak {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); padding: 0; cursor: pointer;
}
.palet-vak.actief { outline: 3px solid var(--antraciet); outline-offset: 2px; }
input.hex-invoer {
  width: 110px; min-height: 36px; padding: .3rem .7rem; margin-top: .35rem; border-radius: 999px;
  font-family: ui-monospace, Consolas, monospace; font-size: .9rem; font-weight: 700; text-transform: uppercase;
}
input.hex-invoer.ongeldig { border-color: var(--fout); box-shadow: 0 0 0 3px #ffe0e0; }
.status-tabel td { vertical-align: top; }
.status-tabel input[type=color] { vertical-align: middle; }
.status-tabel input.hex-invoer { margin: 0 0 0 .4rem; vertical-align: middle; }
.status-tabel .palet { max-width: 190px; }
.status-tabel .palet-vak { width: 20px; height: 20px; }

.leeg { text-align: center; color: var(--sub); padding: 2.5rem 1rem; font-weight: 700; }

/* ---------- dialoog & melding */
.dialoog { border: 0; border-radius: 28px; padding: 1.6rem; width: min(440px, calc(100vw - 2rem)); box-shadow: 0 24px 60px rgba(15, 63, 51, .3); }
.dialoog::backdrop { background: rgba(15, 63, 51, .45); }
.naam-lijst { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.naam-lijst:empty { display: none; }
.naam-optie {
  font: inherit; font-weight: 800; font-size: 1.05rem; padding: .65rem 1.2rem; min-height: 48px;
  border-radius: 999px; border: 2px solid var(--rand); background: #fff; color: var(--antraciet); cursor: pointer;
}
.naam-optie.actief, .naam-optie:hover { background: var(--mint); color: var(--op-mint); border-color: var(--mint); }
.melding {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 3rem));
  visibility: hidden;
  background: var(--donkergroen); color: #fff; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 800;
  transition: transform .25s; z-index: 50; max-width: calc(100vw - 2rem); box-shadow: 0 10px 28px rgba(15, 63, 51, .3);
}
.melding::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); margin-right: .55rem; }
.melding.zichtbaar { transform: translate(-50%, 0); visibility: visible; }
.melding.fout { background: var(--fout); }
.melding.fout::before { background: #fff; }

@media (max-width: 520px) {
  .inhoud { padding: .8rem .8rem 2rem; }
  .logo img { height: 42px; }
  .kaarten { grid-template-columns: 1fr; }
  .rij-form { grid-template-columns: 1fr; }
  .gegevens { grid-template-columns: 1fr; gap: .1rem; }
  .gegevens dd { margin-bottom: .55rem; }
  .status-knoppen { padding: 0 .6rem .7rem; gap: .3rem; }
  .status-knop { font-size: .84rem; }
  .status-knop::before { display: none; }
  .bubbels span:nth-child(1) { width: 260px; height: 260px; right: -120px; bottom: -120px; }
  .bubbels span:nth-child(2) { display: none; }
}
