/* Financieel Fit — Liquide-middelen web-UI
   Volgt FF design tokens uit ~/.claude/skills/ff-huisstijl/references/design-tokens.md */

:root {
  --navy: #1B3D5C;
  --teal: #4FAFAF;
  --grad-start: #A8D8DC;
  --grad-end: #B0D0F0;
  --text-dark: #2C2C2C;
  --text-muted: #6B7280;
  --border-light: #E5E7EB;
  --bg-soft: #F9FAFB;
  --white: #FFFFFF;
  --geel: #FEF3C7;
  --rood: #FEE2E2;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--bg-soft);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 24px;
}

.titel-blok h1 {
  color: var(--navy);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.titel-blok .subtitel {
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
  margin-top: 6px;
}

.logo img {
  width: 140px;
  height: auto;
}

/* === Gradient signature box === */
.gradient-box {
  background: linear-gradient(90deg, var(--grad-start) 0%, var(--grad-end) 100%);
  border-radius: 14px;
  padding: 24px 28px;
  color: var(--navy);
  margin-bottom: 28px;
}

.gradient-box h2 {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}

.gradient-box p {
  font-size: 14px;
}

/* === Card === */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

.card h2 {
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

/* === Form === */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  display: block;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.15s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 175, 175, 0.15);
}

.hint {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
}

/* === Drag & drop zone === */
.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-soft);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--teal);
  background: rgba(79, 175, 175, 0.05);
}

.dropzone p {
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 4px;
}

.dropzone .sub {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.dropzone input[type="file"] {
  display: none;
}

.bestand-lijst {
  margin-top: 14px;
  text-align: left;
}

.bestand-lijst li {
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.bestand-lijst li:last-child {
  border-bottom: none;
}

.bestand-lijst .grootte {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* === Knoppen === */
button,
.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}

button:hover,
.btn:hover {
  background: #142e46;
}

button:active,
.btn:active {
  transform: translateY(1px);
}

.btn.secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border-light);
}

.btn.secondary:hover {
  background: var(--bg-soft);
}

button:disabled {
  background: var(--border-light);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* === Flash messages === */
.flash {
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14.5px;
}

.flash.fout {
  background: var(--rood);
  color: #991b1b;
  border-left: 4px solid #dc2626;
}

.flash.info {
  background: rgba(176, 208, 240, 0.4);
  color: var(--navy);
  border-left: 4px solid var(--teal);
}

.flash.warning {
  background: var(--geel);
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

/* === Resultaat-tabel === */
.afschrift-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 10px;
}

.afschrift-tabel th {
  background: var(--bg-soft);
  color: var(--navy);
  font-weight: 700;
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
}

.afschrift-tabel td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
}

.afschrift-tabel tr:last-child td {
  border-bottom: none;
}

.afschrift-tabel td.bedrag {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.groep-titel {
  color: var(--navy);
  font-weight: 700;
  font-size: 15.5px;
  margin: 20px 0 8px;
}

.groep-titel .badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.subtotaal-rij {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--navy);
}

/* === Issue rows === */
.confidence-laag {
  background: var(--rood);
}

.confidence-medium {
  background: var(--geel);
}

.issue-lijst li {
  list-style: none;
  padding: 10px 14px;
  border-left: 3px solid var(--teal);
  background: var(--bg-soft);
  margin-bottom: 8px;
  font-size: 13.5px;
  border-radius: 0 6px 6px 0;
}

.issue-lijst strong {
  color: var(--navy);
}

.issue-lijst .reden {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* === Stats blokjes === */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 18px;
}

.stat .label {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat .waarde {
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.stat.totaal .waarde {
  font-size: 26px;
}

/* === Footer === */
footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

/* === Spinner === */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 999;
}

.spinner-overlay.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin-bottom: 16px;
}

.spinner-text {
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .container { padding: 24px 16px 60px; }
  header { flex-direction: column; align-items: flex-start; }
  .logo img { width: 110px; }
  .titel-blok h1 { font-size: 26px; }
}
