/* factuur.css — Facturen app styling */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #1a1a2e;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Login scherm ─────────────────────────────────────────────────────────── */

.win-venster {
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  max-width: 420px;
  margin: 60px auto 0;
  box-shadow: 2px 2px 0 #000;
}

.win-titelbalk {
  background: #000080;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-inhoud {
  padding: 20px 24px;
}

.win-inhoud p {
  margin-bottom: 14px;
  font-size: 14px;
}

/* ── App layout ───────────────────────────────────────────────────────────── */

.app-header {
  background: #000080;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#header-titel { font-weight: bold; font-size: 15px; }
.header-sub { font-size: 12px; opacity: 0.8; flex: 1; }
.logout-knop {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}
.logout-knop:hover { background: rgba(255,255,255,0.15); }

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.zijbalk {
  width: 180px;
  min-width: 180px;
  background: #f5f5f5;
  border-right: 1px solid #ddd;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-knop {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}
.nav-knop:hover { background: #e8e8e8; }
.nav-knop.actief { background: #000080; color: #fff; font-weight: bold; }

.inhoud {
  flex: 1;
  padding: 24px;
  background: #fff;
  overflow-y: auto;
}

/* ── Views ────────────────────────────────────────────────────────────────── */

.view { }
.verborgen { display: none !important; }

.sectie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sectie-header h2 { font-size: 18px; color: #1a1a2e; }

.filter-rij select {
  border: 1px solid #ccc;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 3px;
}

h2 { font-size: 18px; color: #1a1a2e; margin-bottom: 16px; }
h3 { font-size: 14px; color: #333; margin: 16px 0 8px; }

/* ── Factuur lijst ────────────────────────────────────────────────────────── */

.factuur-lijst { display: flex; flex-direction: column; gap: 8px; }

.factuur-kaart {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 130px 1fr 100px 110px 120px;
  align-items: center;
  gap: 12px;
  background: #fafafa;
  font-size: 13px;
}
.factuur-kaart:hover { background: #f0f4ff; border-color: #1565c0; }

.factuur-nr { font-weight: bold; color: #1565c0; }
.factuur-aan { color: #333; }
.factuur-datum { color: #666; font-size: 12px; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}
.status-openstaand  { background: #fff3cd; color: #856404; }
.status-betaald     { background: #d1e7dd; color: #0a3622; }
.status-geannuleerd { background: #f8d7da; color: #58151c; }
.status-herinnering { background: #cff4fc; color: #055160; }

.factuur-bedrag { font-weight: bold; text-align: right; }

.factuur-acties { display: flex; gap: 6px; justify-content: flex-end; }
.actie-knop {
  background: #000080;
  color: #fff;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}
.actie-knop:hover { background: #1565c0; }
.actie-knop.klein { background: #f5f5f5; color: #333; border: 1px solid #ccc; }
.actie-knop.klein:hover { background: #e0e0e0; }

/* ── Formulier ────────────────────────────────────────────────────────────── */

.formulier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 8px;
}

.veld-rij {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

label { font-size: 12px; color: #555; font-weight: 600; }

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  border: 1px solid #ccc;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  border-radius: 3px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #000080;
  box-shadow: 0 0 0 2px rgba(0,0,128,0.15);
}

textarea { resize: vertical; }

/* ── Factuurregels ────────────────────────────────────────────────────────── */

.regel-rij {
  display: grid;
  grid-template-columns: 1fr 60px 90px 70px 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 3px;
}

.regel-verwijder {
  background: #f8d7da;
  border: none;
  color: #58151c;
  font-size: 16px;
  cursor: pointer;
  border-radius: 3px;
  padding: 4px;
  line-height: 1;
}
.regel-verwijder:hover { background: #f5c2c7; }

/* ── Totaal blok ──────────────────────────────────────────────────────────── */

.totaal-blok {
  margin: 16px 0;
  max-width: 340px;
  margin-left: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.totaal-rij {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 13px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
.totaal-rij:last-child { border-bottom: none; }
.totaal-eind {
  font-weight: bold;
  font-size: 15px;
  background: #e8f0fe;
  color: #1a1a2e;
}

/* ── Knoppen ──────────────────────────────────────────────────────────────── */

button {
  font-family: inherit;
  cursor: pointer;
}

.knop-rij {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

#btn-ping, #btn-open, #btn-opslaan {
  background: #000080;
  color: #fff;
  border: none;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: bold;
}
#btn-ping:hover, #btn-open:hover, #btn-opslaan:hover { background: #1565c0; }

.secundair {
  background: #f0f0f0;
  border: 1px solid #ccc;
  color: #333;
  padding: 8px 16px;
  font-size: 13px;
}
.secundair:hover { background: #e0e0e0; }

#btn-regel-toevoegen {
  margin-top: 4px;
  padding: 6px 14px;
  font-size: 12px;
}

/* ── Hints en fouten ──────────────────────────────────────────────────────── */

.hint-tekst { font-size: 12px; color: #555; margin-bottom: 10px; }
.fout-tekst { color: #c00; font-size: 13px; margin-top: 8px; }
.laden-tekst { color: #888; font-style: italic; font-size: 13px; }

/* ── Responsief ───────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .app-body { flex-direction: column; }
  .zijbalk { width: 100%; flex-direction: row; border-right: none; border-bottom: 1px solid #ddd; padding: 6px; }
  .formulier-grid { grid-template-columns: 1fr; }
  .factuur-kaart { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .regel-rij { grid-template-columns: 1fr 60px 80px 60px 36px; }
}
