:root {
  --bg: #f4f5f7;
  --kaart: #fff;
  --tekst: #1d2330;
  --zacht: #5d6575;
  --rand: #d9dde4;
  --accent: #1f5fae;
  --accent-tekst: #fff;
  --goed: #1e7a3c;
  --fout: #b3261e;
  --fout-bg: #fdecea;
  --goed-bg: #e7f4ea;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --kaart: #1e232b;
    --tekst: #e6e9ee;
    --zacht: #a1a9b6;
    --rand: #343b46;
    --accent: #6ea8ff;
    --accent-tekst: #0d1117;
    --goed: #5cc97c;
    --fout: #ff8a80;
    --fout-bg: #3a1f1d;
    --goed-bg: #1c3324;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tekst);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.kop {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; background: var(--kaart); border-bottom: 1px solid var(--rand);
}
.merk { font-weight: 700; color: var(--tekst); text-decoration: none; }
.kop nav { display: flex; align-items: center; gap: 1rem; }
.kop nav a { color: var(--accent); }
.inhoud { max-width: 960px; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
.kaart {
  background: var(--kaart); border: 1px solid var(--rand); border-radius: 10px; padding: 1rem 1.25rem;
}
.smal { max-width: 440px; width: 100%; margin: 1rem auto; }
h1, h2 { margin: 0 0 .75rem; line-height: 1.25; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
.twee { display: grid; gap: 1rem; }
@media (min-width: 760px) { .twee { grid-template-columns: 1fr 1fr; } }
form { display: grid; gap: .75rem; margin: 0; }
label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
input, select {
  font: inherit; font-weight: 400; padding: .6rem .7rem; width: 100%;
  border: 1px solid var(--rand); border-radius: 8px; background: var(--bg); color: var(--tekst);
}
input:focus, select:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.rij { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
button {
  font: inherit; font-weight: 600; padding: .65rem 1rem; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-tekst); cursor: pointer; min-height: 44px;
}
button.link {
  background: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 400; text-decoration: underline;
}
button.gevaar { color: var(--fout); }
.terug { text-align: center; color: var(--accent); }
.fout { background: var(--fout-bg); color: var(--fout); padding: .6rem .8rem; border-radius: 8px; margin: 0 0 .75rem; }
.melding { background: var(--goed-bg); color: var(--goed); padding: .6rem .8rem; border-radius: 8px; margin: 0; }
.status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.status h1 { margin: 0; }
.status p { margin: 0; font-weight: 600; }
.status .online { color: var(--goed); }
.status .offline { color: var(--fout); }
.status .online::before, .status .offline::before { content: "● "; }
.klokkeuze { display: flex; gap: .5rem; }
.leeg { color: var(--zacht); margin: 0; }
.lijst { list-style: none; margin: 0; padding: 0; }
.lijst li {
  display: grid; gap: .2rem; padding: .75rem 0; border-top: 1px solid var(--rand);
}
.lijst li:first-child { border-top: 0; }
.wanneer { color: var(--zacht); font-size: .9rem; }
.wat { font-size: 1.05rem; overflow-wrap: anywhere; }
.soort {
  display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  padding: .05rem .4rem; border-radius: 4px; border: 1px solid var(--rand); color: var(--zacht);
  vertical-align: middle;
}
.acties { display: flex; gap: 1.25rem; align-items: center; }
.acties a { color: var(--accent); }
@media (min-width: 760px) {
  .lijst li { grid-template-columns: 14rem 1fr auto; align-items: center; gap: 1rem; }
}

/* ---------- uitbreidingen: status, herinneringen, foto's, instellingen ---------- */
.status-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; }
.status { flex-direction: column; align-items: stretch; }
.status-details { margin: 0; color: var(--zacht); font-weight: 400; }
.knop-licht {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 8px;
  border: 1px solid var(--rand); color: var(--accent); text-decoration: none; font-weight: 600;
}
fieldset { border: 1px solid var(--rand); border-radius: 8px; padding: .5rem .75rem .75rem; margin: 0; }
legend { font-weight: 600; font-size: .95rem; padding: 0 .25rem; }
.vinkjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .25rem .75rem; }
label.vinkje { display: flex; align-items: center; gap: .5rem; font-weight: 400; min-height: 44px; }
label.vinkje input { width: 1.4rem; height: 1.4rem; flex: none; accent-color: var(--accent); }
label.anders { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 400; margin-top: .25rem; }
label.anders input { width: 7rem; }
input[type="file"] { padding: .45rem; }
input[type="range"] { padding: 0; accent-color: var(--accent); }
input[type="color"] { width: 3.25rem; height: 2.75rem; padding: .15rem; flex: none; }
.lijst li { grid-template-columns: 4rem 1fr; align-items: start; }
.lijst .acties { grid-column: 2; }
.duim { width: 4rem; height: 4rem; border-radius: 8px; object-fit: cover; }
.leeg-duim { display: block; background: var(--bg); border: 1px dashed var(--rand); }
.item-tekst { display: grid; gap: .2rem; min-width: 0; }
.belletjes { color: var(--zacht); font-size: .9rem; }
.huidige-foto { display: grid; gap: .5rem; }
.huidige-foto img { max-width: 100%; max-height: 14rem; border-radius: 8px; object-fit: contain; justify-self: start; }
@media (min-width: 760px) {
  .lijst li { grid-template-columns: 4rem 14rem 1fr auto; align-items: center; }
  .lijst .item-tekst { grid-column: 2 / 4; grid-template-columns: 14rem 1fr; column-gap: 1rem; }
  .lijst .item-tekst .belletjes { grid-column: 2; }
  .lijst .acties { grid-column: auto; }
}
.instellingen { display: grid; gap: 1rem; }
.instellingen .kaart { display: grid; gap: .75rem; align-content: start; }
.kloktypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
label.kloktype {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; font-weight: 400;
  border: 2px solid var(--rand); border-radius: 10px; cursor: pointer;
}
label.kloktype:has(input:checked) { border-color: var(--accent); background: var(--bg); }
label.kloktype input { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--accent); }
label.kloktype .nr {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 8px;
  background: var(--accent); color: var(--accent-tekst); font-weight: 800; font-size: 1.2rem;
}
label.kloktype small { color: var(--zacht); }
.kleuren { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .5rem 1rem; }
label.kleur { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-weight: 400; }
.opslaan-balk {
  position: sticky; bottom: 0; padding: .75rem 0; background: linear-gradient(transparent, var(--bg) 35%);
}
.opslaan-balk button { width: 100%; }
@media (min-width: 760px) { .opslaan-balk button { width: auto; min-width: 16rem; } }

.geluid-keuze { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
.geluid-keuze label { flex: 1 1 12rem; }
.geluid-keuze .knop-licht { background: none; font: inherit; font-weight: 600; cursor: pointer; }
