/* Inventarisatie-tool Uwcamerabeveiliger. Eerst gemaakt voor de telefoon
   (op locatie), daarna verbreed voor tablet en computer. */
:root {
  --navy: #0E3A70;
  --blauw: #16559D;
  --groen: #55B463;
  --groen-donker: #3f9a4e;
  --lijn: #D5DEE8;
  --vlak: #EEF3FA;
  --achter: #F5F8FC;
  --tekst: #26323D;
  --grijs: #4A5C6B;
  --rood: #B3261E;
  --hoog: #FDE3C8;
  --midden: #DCE9F7;
  --laag: #DDF2E0;
  --straal: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--tekst);
  background: var(--achter);
}
a { color: var(--blauw); }
h1 { font-size: 1.45rem; line-height: 1.2; margin: 0 0 .3rem; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 0 0 .7rem; color: var(--blauw); }
h3 { font-size: 1rem; margin: 0 0 .4rem; color: var(--navy); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
p { margin: 0 0 .8rem; }
.sub { color: var(--grijs); font-size: .9rem; margin: 0 0 .8rem; display: block; }
.licht { color: var(--grijs); font-weight: normal; font-size: .85rem; }
.rood { color: var(--rood); }
.hint { color: var(--grijs); font-size: .85rem; margin: .35rem 0 0; }
.leeg { color: var(--grijs); background: #fff; border: 1px dashed var(--lijn); border-radius: var(--straal); padding: 1rem; }

/* Bovenbalk */
.balk {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: #fff; border-bottom: 3px solid var(--groen);
  padding: .5rem 1rem; padding-top: calc(.5rem + env(safe-area-inset-top));
}
.balk-logo img { height: 34px; display: block; }
.balk-menu { display: flex; align-items: center; gap: .9rem; font-size: .9rem; }
.balk-menu a { text-decoration: none; color: var(--navy); font-weight: bold; }
.balk-menu form { margin: 0; }
.linkknop { background: none; border: 0; padding: .4rem 0; font: inherit; font-size: .9rem; color: var(--blauw); text-decoration: underline; cursor: pointer; }
.linkknop.rood { color: var(--rood); }

.offline { background: #7a4b00; color: #fff; padding: .6rem 1rem; font-size: .9rem; text-align: center; position: sticky; top: 53px; z-index: 19; }

.inhoud { max-width: 780px; margin: 0 auto; padding: 1rem 1rem 7rem; }
.kruimels { font-size: .85rem; margin-bottom: .8rem; display: flex; flex-wrap: wrap; gap: .35rem; color: var(--grijs); }
.kruimels a { color: var(--grijs); }

.toast { background: var(--laag); border-left: 4px solid var(--groen); padding: .55rem .8rem; border-radius: 6px; margin-bottom: .9rem; font-size: .9rem; }
.gelukt { background: var(--laag); border-left: 4px solid var(--groen); padding: .7rem .9rem; border-radius: 6px; margin-bottom: 1rem; }
.foutmelding { background: #fde7e5; border-left: 4px solid var(--rood); padding: .7rem .9rem; border-radius: 6px; margin-bottom: 1rem; }
.concept-melding { background: #fff6da; border-left: 4px solid #d9a400; padding: .6rem .8rem; border-radius: 6px; margin-bottom: .9rem; font-size: .9rem; display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Kaarten en lijsten */
.kaart { background: #fff; border: 1px solid var(--lijn); border-radius: var(--straal); padding: 1rem; margin-bottom: 1rem; }
.lijst { display: grid; gap: .6rem; margin-bottom: 1rem; }
.lijstkaart {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: #fff; border: 1px solid var(--lijn); border-radius: var(--straal);
  padding: .8rem .9rem; text-decoration: none; color: inherit; min-height: 60px;
}
a.lijstkaart:active, .lijstkaart a.hoofd:active { background: var(--vlak); }
.lijstkaart .hoofd { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.lijstkaart .hoofd > div { min-width: 0; flex: 1; }
.lijstkaart strong { display: block; color: var(--navy); }
.lijstkaart .sub { margin: 0; font-size: .85rem; }
.lijstkaart .rechts { display: flex; align-items: center; gap: .5rem; }
.cijfers { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; font-size: .85rem; color: var(--grijs); white-space: nowrap; }
.titelrij { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .3rem .75rem; margin-bottom: .6rem; }
.titelrij h2 { margin: 0; white-space: nowrap; }
.titelrij .sub { margin: 0; }
.stappen { position: relative; }

.letter {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: bold;
}
.letter.klein { width: 28px; height: 28px; font-size: .85rem; }
.stapnr { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--vlak); color: var(--navy); font-weight: bold; }
.stapnr.klaar { background: var(--groen); color: #fff; }

.pil { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--vlak); color: var(--navy); font-size: .8rem; font-weight: bold; white-space: nowrap; }
.pil.groen { background: var(--laag); }
.urg-hoog { background: var(--hoog); }
.urg-midden { background: var(--midden); }
.urg-laag { background: var(--laag); }

.voortgang { display: block; height: 5px; background: var(--vlak); border-radius: 3px; margin-top: .35rem; overflow: hidden; }
.voortgang i { display: block; height: 100%; background: var(--groen); }

.tegels { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.2rem; }
.tegel { background: #fff; border: 1px solid var(--lijn); border-radius: var(--straal); padding: .6rem .4rem; text-align: center; }
.tegel b { display: block; font-size: 1.3rem; color: var(--navy); }
.tegel span { font-size: .75rem; color: var(--grijs); }

.pijlen { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.pijlen button { width: 34px; height: 26px; border: 1px solid var(--lijn); background: #fff; border-radius: 6px; color: var(--navy); font-size: .9rem; cursor: pointer; padding: 0; }
.pijlen button:disabled { opacity: .3; }

/* Kop van een object en de stappen */
.objectkop { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.objectkop h1 { margin: 0; font-size: 1.25rem; }
.objectkop .sub { margin: 0; }
.stappen { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 1rem .7rem; margin: 0 -1rem .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.stappen::-webkit-scrollbar { display: none; }
.stapje {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem .4rem .4rem; border-radius: 999px; border: 1px solid var(--lijn);
  background: #fff; color: var(--grijs); text-decoration: none; font-size: .85rem; white-space: nowrap;
}
.stapje .nr { width: 22px; height: 22px; border-radius: 50%; background: var(--vlak); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: bold; }
.stapje.klaar .nr { background: var(--groen); color: #fff; }
.stapje.actief { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: bold; }
.stapje.actief .nr { background: #fff; color: var(--navy); }

/* Formulieren */
.veld { margin-bottom: .9rem; }
.veld label, .veld .label { display: block; font-weight: bold; font-size: .9rem; color: var(--navy); margin-bottom: .3rem; }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--tekst);
  padding: .65rem .7rem; border: 1px solid #b9c6d4; border-radius: 8px; background: #fff; min-height: 46px;
}
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blauw); outline-offset: 1px; border-color: var(--blauw); }
::placeholder { color: #93a1af; }
.rij { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; }
.rij.drie { grid-template-columns: 1fr 1fr 1fr; }
.veld.onder { align-self: end; }
.inline { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.inline .veld { margin: 0; }
.groei { flex: 1 1 220px; }
.vink { display: flex; align-items: center; gap: .55rem; font-weight: normal !important; color: var(--tekst) !important; min-height: 44px; margin-bottom: .5rem; cursor: pointer; }
.vink input { width: 22px; height: 22px; flex: none; accent-color: var(--navy); }

/* Keuzeknoppen (grote tikvlakken in plaats van keuzelijsten) */
.keuze { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .4rem; }
.keuze.meer { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.keuze.kolom { grid-auto-flow: row; }
.keuze label { margin: 0; font-weight: normal; cursor: pointer; position: relative; }
.keuze input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.keuze span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: .4rem .5rem; border: 1px solid #b9c6d4; border-radius: 8px; background: #fff; color: var(--tekst); font-size: .95rem; }
.keuze input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: bold; }
.keuze input:focus-visible + span { outline: 2px solid var(--blauw); outline-offset: 2px; }
.keuze.urgentie .urg-hoog input:checked + span { background: var(--hoog); color: var(--tekst); border-color: #e09a4f; }
.keuze.urgentie .urg-midden input:checked + span { background: var(--midden); color: var(--tekst); border-color: #6f9fd3; }
.keuze.urgentie .urg-laag input:checked + span { background: var(--laag); color: var(--tekst); border-color: var(--groen); }
.keuze.urgentie label { background: none; }

/* Knoppen */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; text-align: center;
}
.knop.licht { background: #fff; color: var(--navy); border-color: #b9c6d4; }
.knop.klein { min-height: 38px; padding: .35rem .8rem; font-size: .9rem; }
.knop.groot { min-height: 54px; font-size: 1.05rem; background: var(--groen-donker); border-color: var(--groen-donker); }
.knop.breed { width: 100%; margin-bottom: 1rem; }
.knop.rood { background: var(--rood); border-color: var(--rood); }
.knop:disabled { opacity: .6; cursor: default; }
.knoppenrij { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }

.actiebalk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; gap: .6rem; justify-content: space-between;
  background: #fff; border-top: 1px solid var(--lijn);
  padding: .6rem 1rem; padding-bottom: calc(.6rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 14px rgba(14, 58, 112, .08);
}
.actiebalk .knop:last-child { flex: 1; max-width: 420px; margin-left: auto; }

/* Foto's */
.fotoknop { display: block; position: relative; cursor: pointer; margin-bottom: .5rem; }
.fotoknop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fotoknop span { display: flex; align-items: center; justify-content: center; min-height: 54px; border: 2px dashed var(--blauw); border-radius: 10px; background: var(--vlak); color: var(--navy); font-weight: bold; padding: .5rem; text-align: center; }
.fotoknop input:focus-visible + span { outline: 2px solid var(--blauw); outline-offset: 2px; }
.fotovoorbeeld { display: flex; flex-wrap: wrap; gap: .5rem; }
.fotovoorbeeld img { width: 110px; height: 82px; object-fit: cover; border-radius: 8px; border: 1px solid var(--lijn); }
.fotovoorbeeld .hint { width: 100%; }
.fotohuidig { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.fotohuidig img { width: 130px; height: 98px; object-fit: cover; border-radius: 8px; border: 1px solid var(--lijn); display: block; }
.duim { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--lijn); }
.duim.leeg { display: inline-flex; align-items: center; justify-content: center; background: var(--vlak); color: var(--grijs); font-size: .65rem; text-align: center; }
.fotogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; margin-bottom: .8rem; }
.fotogrid figure { margin: 0; }
.fotogrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--lijn); display: block; margin-bottom: .3rem; }
.fotogrid input[type=text] { min-height: 38px; padding: .35rem .5rem; font-size: 14px; }

.regelblok { border: 1px solid var(--lijn); border-radius: 10px; padding: .8rem .8rem .3rem; margin-bottom: .7rem; background: var(--achter); }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0 .9rem; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--lijn); text-decoration: none; color: var(--navy); font-size: .9rem; background: #fff; }
.tabs a.actief { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: bold; }

.tabelwrap { overflow-x: auto; margin-bottom: .5rem; }
.tabel { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabel th { background: var(--navy); color: #fff; text-align: left; padding: .45rem .55rem; white-space: nowrap; }
.tabel td { padding: .45rem .55rem; border-bottom: 1px solid var(--lijn); vertical-align: middle; }
.tabel tr:nth-child(even) td { background: #F7FAFD; }

.controle ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.controle { border-left: 4px solid #d9a400; }
.controle.goed { border-left-color: var(--groen); }
.controle .knoppenrij { margin-bottom: 0; }

.gevaar { margin: 1.5rem 0; color: var(--grijs); font-size: .9rem; }
.gevaar summary { cursor: pointer; padding: .4rem 0; }
.gevaar form { margin-top: .5rem; }

.inlog { max-width: 380px; margin: 8vh auto 0; background: #fff; border: 1px solid var(--lijn); border-radius: var(--straal); padding: 1.5rem; text-align: left; }
.inlog img { height: 56px; display: block; margin: 0 auto 1rem; }
.inlog h1 { font-size: 1.15rem; text-align: center; margin-bottom: 1.1rem; }

/* Objectblad op het scherm en het overzicht */
.kv { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: .6rem; }
.kv th { text-align: left; vertical-align: top; width: 42%; background: var(--vlak); color: var(--navy); padding: .45rem .6rem; border-bottom: 1px solid var(--lijn); font-weight: bold; }
.kv td { padding: .45rem .6rem; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.regels { white-space: pre-line; }
.blad h3 { margin-top: .6rem; }
.duiding { background: var(--vlak); border-left: 4px solid var(--groen); padding: .5rem .7rem; font-style: italic; font-size: .9rem; margin: .6rem 0 0; }
.duiding b { font-style: normal; color: var(--blauw); margin-right: .4rem; }
.fotostrook { display: flex; gap: .5rem; overflow-x: auto; padding: .3rem 0 .5rem; }
.fotostrook a { flex: none; width: 116px; text-decoration: none; color: var(--grijs); font-size: .75rem; text-align: center; }
.fotostrook img { width: 116px; height: 87px; object-fit: cover; border-radius: 6px; border: 1px solid var(--lijn); display: block; margin-bottom: .2rem; }
.fotostrook span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabel .totaal td { font-weight: bold; background: var(--vlak); border-top: 2px solid var(--navy); }
.tabel td .licht { font-size: .78rem; }

[hidden] { display: none !important; }

@media (max-width: 520px) {
  .rij, .rij.drie { grid-template-columns: 1fr; }
  .rij.kort { grid-template-columns: 1fr 1fr; }
  .balk-menu { gap: .7rem; font-size: .82rem; }
  .balk-logo img { height: 28px; }
  .tegel b { font-size: 1.1rem; }
  .keuze.meer { grid-template-columns: repeat(3, 1fr); }
  .cijfers .pil { display: none; }
}
@media (min-width: 900px) {
  .inhoud { padding-top: 1.5rem; }
  .breedkaart { margin-left: -140px; margin-right: -140px; }
  .actiebalk { padding-left: calc((100vw - 780px) / 2 + 1rem); padding-right: calc((100vw - 780px) / 2 + 1rem); }
}
