/* ==========================================================
   basis.css – ProRail RGG Inspectie-app
   Huisstijl: Rood #BE1238 · Donkergrijs #44546A · Arial
   ========================================================== */

/* ── Variabelen ── */
:root {
  --pr-rood:       #BE1238;
  --pr-rood-hover: #9A0E2D;
  --pr-grijs:      #44546A;
  --pr-grijs-lt:   #6B7D92;
  --pr-geel:       #E8DD11;
  --pr-blauw-lt:   #A2D5F1;
  --pr-lichtgrijs: #E5E5E5;
  --pr-wit:        #FFFFFF;
  --pr-achtergrond:#F4F5F7;
  --pr-tekst:      #1A1A1A;
  --pr-rand:       #D0D3D8;
  --radius:        6px;
  --schaduw:       0 1px 4px rgba(0,0,0,0.10);
}

/* ── Reset & basis ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  background: var(--pr-achtergrond);
  color: var(--pr-tekst);
}

h1 { font-size: 1.3rem; font-weight: 700; margin: 0 0 1rem; color: var(--pr-grijs); }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--pr-grijs); }
h3 { font-size: 0.95rem; font-weight: 700; margin: 0.75rem 0 0.35rem; color: var(--pr-grijs); }

a { color: var(--pr-rood); }

/* ── App-container ── */
.app-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.75rem;
}

/* ── Schermen (kaarten) ── */
section.scherm {
  background: var(--pr-wit);
  border: 1px solid var(--pr-rand);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--schaduw);
}

/* ── Startscherm ── */
.scherm-start {
  padding: 0;
  overflow: hidden;
}

.start-header {
  background: var(--pr-grijs);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.start-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--pr-wit);
  padding: 4px;
  flex-shrink: 0;
}

.start-titel-wrap { color: var(--pr-wit); }
.start-merk  { font-size: 0.75rem; letter-spacing: 0.08em; opacity: 0.8; text-transform: uppercase; }
.start-h1    { font-size: 1.5rem; font-weight: 700; margin: 0.15rem 0; color: var(--pr-wit); }
.start-subtitel { font-size: 0.85rem; opacity: 0.75; margin: 0; }

.start-uitleg {
  padding: 1.1rem 1.25rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.start-uitleg p  { margin: 0 0 0.5rem; }
.start-uitleg ol { padding-left: 1.4rem; margin: 0.3rem 0 0.75rem; }
.start-uitleg li { margin-bottom: 0.35rem; }

.start-resultaat-blok {
  background: #EEF2F7;
  border-left: 4px solid var(--pr-rood);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.65rem 0.9rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
}
.start-resultaat-blok ul { margin: 0.3rem 0; padding-left: 1.2rem; }
.start-resultaat-blok li { margin-bottom: 0.2rem; }
.start-resultaat-blok p  { margin: 0.3rem 0 0; }
.start-resultaat-blok code {
  background: var(--pr-lichtgrijs);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.knop-start {
  display: block;
  margin: 0 1.25rem 0.5rem !important;
  width: calc(100% - 2.5rem) !important;
}

.start-versie {
  text-align: center;
  color: #999;
  font-size: 0.75rem;
  padding: 0 0 0.75rem;
  margin: 0;
}

/* ── Knoppen ── */
button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.25rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: var(--pr-grijs);
  color: var(--pr-wit);
  cursor: pointer;
  transition: background 0.15s;
}
button:hover  { background: #354555; }
button:disabled { background: #B0B8C4; cursor: not-allowed; color: #fff; }

.knop-primair {
  background: var(--pr-rood);
  color: var(--pr-wit);
  width: 100%;
  padding: 0.7rem 1.25rem;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.knop-primair:hover { background: var(--pr-rood-hover); }

.knop-afronden {
  background: var(--pr-rood);
  color: var(--pr-wit);
  flex: 1;
  padding: 0.6rem;
}
.knop-afronden:hover { background: var(--pr-rood-hover); }

.knop-secundair {
  background: var(--pr-lichtgrijs);
  color: var(--pr-grijs);
  border: 1px solid var(--pr-rand);
  flex: 1;
  padding: 0.6rem;
}
.knop-secundair:hover { background: #D5D8DE; }

.knop-klein {
  padding: 0.35rem 0.7rem !important;
  font-size: 0.82rem !important;
  margin-top: 0 !important;
}

.knoppenrij { margin-top: 0.5rem; }
.knoppenrij-afsluiten {
  margin-top: 1rem;
  border-top: 1px solid var(--pr-rand);
  padding-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

/* ── Formuliervelden ── */
.veld {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.veld label {
  min-width: 140px;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pr-grijs-lt);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.veld div { font-weight: 600; }

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--pr-rand);
  border-radius: var(--radius);
  background: var(--pr-wit);
  color: var(--pr-tekst);
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pr-rood);
  box-shadow: 0 0 0 2px rgba(190,18,56,0.12);
}
select:disabled { background: #F0F1F3; color: #999; }
textarea { resize: vertical; min-height: 56px; }

/* ── Fieldsets ── */
fieldset {
  border: 1px solid var(--pr-rand);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  background: var(--pr-wit);
}
legend {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pr-grijs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 0.4rem;
}

/* ── Gebouwenlijst ── */
#zoekveld { margin-bottom: 0.75rem; }
#gebouwenLijst { display: flex; flex-direction: column; gap: 0.4rem; }

.gebouw-item {
  background: var(--pr-wit);
  border: 1px solid var(--pr-rand);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.9rem;
}
.gebouw-item:hover    { background: #EEF2F7; border-left-color: var(--pr-grijs-lt); }
.gebouw-item.geselecteerd { background: #FBEAEE; border-left-color: var(--pr-rood); }

/* ── Import-knoppen ── */
.import-knoppen-rij { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.import-knoppen-rij button { flex: 1; margin-top: 0; }
#importGebouwenVeld small { display: block; margin-top: 0.2rem; color: #888; font-size: 0.8rem; }

/* ── Inspectiecontext (scherm 0) ── */
.ctx-blok  { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.5rem; }
.ctx-rij   { display: flex; align-items: baseline; gap: 0.5rem; }
.ctx-label { min-width: 90px; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--pr-grijs-lt); text-transform: uppercase; }
.ctx-waarde{ font-weight: 700; font-size: 1rem; word-break: break-all; }

/* ── Conditiescore ── */
#conditiescore { font-size: 1.8rem; font-weight: 700; text-align: center; color: var(--pr-rood); }
#conditieOmschrijving { font-style: italic; color: var(--pr-grijs-lt); font-size: 0.88rem; }

/* ── Foto's ── */
#fotoPreviewContainer, #locFotoPreviewContainer { width: 100%; margin-bottom: 8px; }

.foto-wrapper { display: block; width: 100%; margin: 8px 0; text-align: center; }
.foto-preview { display: block; width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--pr-rand); border-radius: var(--radius); margin-bottom: 4px; }
.foto-wrapper small { display: block; font-size: 11px; color: #888; margin: 2px 0 4px 0; word-break: break-all; }
.foto-wrapper button { width: auto; padding: 3px 10px; font-size: 12px; margin-top: 0; }

#fotoKnoppenRij, #locFotoKnoppenRij {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
#fotoKnoppenRij button, #locFotoKnoppenRij button { flex: 1; padding: 8px; font-size: 0.85rem; margin-top: 0; }
#fotoTeller, #locFotoTeller { width: 100%; text-align: center; font-size: 0.8rem; color: #888; }

/* ── Gebouwbalk ── */
.gebouw-balk {
  background: var(--pr-grijs);
  color: var(--pr-wit);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  letter-spacing: 0.02em;
}

/* ── Globale actiebalk ── */
.globale-actiebalk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #EEF2F7;
  border-top: 2px solid var(--pr-rood);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.actiebalk-status { font-size: 0.82rem; color: var(--pr-grijs); font-weight: 600; }
.actiebalk-knoppen { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Gebrekken-overzicht ── */
.gebrek-kaart {
  border: 1px solid var(--pr-rand);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.gebrek-kaart-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: #EEF2F7;
  border-bottom: 1px solid var(--pr-rand);
}
.gebrek-nr     { font-size: 0.72rem; font-weight: 700; color: #999; min-width: 26px; }
.gebrek-titel  { flex: 1; font-weight: 600; font-size: 0.83rem; color: var(--pr-tekst); }
.gebrek-score  { font-size: 0.78rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 4px; background: #eee; }
.score-1 { background:#d4edda; color:#155724; }
.score-2 { background:#cce5ff; color:#004085; }
.score-3 { background:#fff3cd; color:#856404; }
.score-4 { background:#ffe5b4; color:#7d4e00; }
.score-5 { background:#f8d7da; color:#721c24; }
.score-6 { background:#4a0000; color:#fff; }
.gebrek-verwijder { background:none; border:none; cursor:pointer; font-size:0.95rem; padding:0; margin:0; color:#c00; min-width:auto; }
.gebrek-details { display:flex; flex-wrap:wrap; gap:0.25rem 0.75rem; padding:0.35rem 0.6rem; font-size:0.76rem; color:#666; }
.gebrek-fotos   { display:flex; gap:0.4rem; padding:0.35rem 0.6rem; background:#fafafa; }
.gebrek-thumb   { width:56px; height:56px; object-fit:cover; border-radius:3px; border:1px solid var(--pr-rand); }

/* ── Mutaties (D-bladen) ── */
.obj-tabbar { display:flex; flex-wrap:wrap; gap:0.4rem; margin-bottom:0.75rem; }
.obj-tab-knop {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  background: var(--pr-lichtgrijs);
  border: 1px solid var(--pr-rand);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0;
  color: var(--pr-grijs);
  font-weight: 600;
}
.obj-tab-knop.actief { background: var(--pr-rood); color: var(--pr-wit); border-color: var(--pr-rood); }
.obj-tab-knop:hover  { background: #D5D8DE; }
.obj-tab-knop.actief:hover { background: var(--pr-rood-hover); }

.object-header { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.6rem; color: var(--pr-grijs); }
.eqnr-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  background: #EEF2F7;
  color: var(--pr-grijs);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.mut-veld-rij {
  display: grid;
  grid-template-columns: 180px 150px 1fr;
  gap: 0.4rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid #F0F1F3;
}
.mut-veld-rij:last-child { border-bottom: none; }
.mut-label  { font-size: 0.78rem; font-weight: 600; color: #444; }
.sap-waarde { font-size: 0.78rem; color: var(--pr-grijs); background: #EEF2F7; padding: 0.18rem 0.35rem; border-radius: 3px; word-break: break-word; }
.sap-leeg   { font-size: 0.78rem; color: #bbb; }
.mut-invoer-wrap input, .mut-invoer-wrap select { font-size: 0.82rem; padding: 0.28rem 0.45rem; }

/* ── Overige ── */
hr { border: none; border-top: 1px solid var(--pr-rand); margin: 1rem 0; }
.leeg-melding { color: #aaa; font-style: italic; padding: 0.5rem 0; font-size: 0.88rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .mut-veld-rij { grid-template-columns: 1fr; }
  .sap-waarde::before { content: "SAP: "; font-weight: 700; }
  .start-header { flex-direction: column; text-align: center; }
  .start-logo-img { width: 90px; height: 90px; }
}

/* ── Status-chips in globale actiebalk ── */
.actiebalk-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.actiebalk-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pr-grijs-lt);
  text-transform: uppercase;
  margin-right: 0.2rem;
}
.status-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.chip-actief {
  background: #BE1238;
  color: #fff;
}
.chip-leeg {
  background: var(--pr-lichtgrijs);
  color: #aaa;
  border: 1px solid var(--pr-rand);
}
