/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #c0392b;
  --primary-hover: #e74c3c;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-input: #16213e;
  --bg-surface: #1e1e3a;
  --text: #ecf0f1;
  --text-muted: #7f8c8d;
  --gold: #f39c12;
  --success: #27ae60;
  --danger: #e74c3c;
  --info: #3498db;
  --border: #2c3e50;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; }

/* === Utilities === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* === Grid === */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { color: var(--gold); margin-bottom: 12px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2ecc71; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }

.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--text); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; min-height: auto; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 8px; font-size: 1.1rem; min-height: auto; }
.btn-icon:hover { color: var(--text); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* Responsieve variant: velden (ook wanneer sommige verborgen zijn) lijnen netjes
   uit en vullen de rij gelijkmatig, in plaats van een vaste 2-koloms grid. */
.form-row-auto { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: start; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}
textarea { resize: vertical; min-height: 100px; }
select { cursor: pointer; }

input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; flex: 0 0 auto; align-self: center; margin-right: 8px; accent-color: var(--primary); cursor: pointer; }

/* Oog-knop om wachtwoordvelden als platte tekst i.p.v. puntjes te tonen
   (zie public/js/password-toggle.js, past dit automatisch toe). */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: auto;
  min-height: 0;
  padding: 6px 8px;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.password-toggle-btn:hover { opacity: 1; }
.password-toggle-btn.is-showing { opacity: 1; }

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}
.checkbox-label:hover { background: var(--bg-surface); }
.checkbox-label.checked { border-color: var(--success); background: rgba(39,174,96,0.1); }

/* === Tables === */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-surface); font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text); background: rgba(255,255,255,0.04); }
th.sortable .sort-indicator { color: var(--gold); font-weight: 700; }
tr:hover td { background: rgba(255,255,255,0.02); }
tr:last-child td { border-bottom: none; }
/* Eerste badge in een cel niet laten inspringen, zodat de kolom netjes links uitlijnt. */
td .badge:first-child { margin-left: 0; }
/* Actieknoppen op één regel houden en rechts uitlijnen. */
.table-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.table-actions .btn { white-space: nowrap; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: rgba(192,57,43,0.1); }

/* === Badges === */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 8px;
}
.badge-wit { background: #ecf0f1; color: #2c3e50; }
.badge-geel { background: #f1c40f; color: #2c3e50; }
.badge-oranje { background: #e67e22; color: #fff; }
.badge-paars { background: #9b59b6; color: #fff; }
.badge-blauw { background: #3498db; color: #fff; }
.badge-groen { background: #27ae60; color: #fff; }
.badge-bruin { background: #8B4513; color: #fff; }
.badge-zwart { background: #2c3e50; color: #fff; border: 1px solid #ecf0f1; }
.badge-success { background: var(--success); color: #fff; }
.badge-danger { background: var(--danger); color: #fff; }
.badge-info { background: var(--info); color: #fff; }
.badge-warning { background: #f39c12; color: #fff; }

/* === Alerts === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-danger { background: rgba(231,76,60,0.15); border: 1px solid var(--danger); color: #e74c3c; }
.alert-success { background: rgba(39,174,96,0.15); border: 1px solid var(--success); color: #2ecc71; }
.alert-info { background: rgba(52,152,219,0.15); border: 1px solid var(--info); color: #3498db; }
.alert-warning { background: rgba(243,156,18,0.15); border: 1px solid #f39c12; color: #f39c12; }

/* === Toast === */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 400px;
}
.toast.show { transform: translateX(0); }
.toast.toast-success { border-color: var(--success); }
.toast.toast-danger { border-color: var(--danger); }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.modal-confirm { max-width: 520px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.btn-close:hover { color: var(--text); }

/* === Navigation (App) === */
nav {
  background: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.nav-links a:hover { background: var(--bg-surface); text-decoration: none; }
.nav-links a.active { background: var(--primary); color: #fff; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.nav-dropdown-toggle:hover { background: var(--bg-surface); }
.nav-dropdown-toggle.active { background: var(--primary); color: #fff; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 1100;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { display: block; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user span { color: var(--text-muted); font-size: 0.9rem; }

/* Mutation diff view */
.diff-section { padding: 8px 0; }
.diff-title { font-size: 0.95rem; margin-bottom: 8px; }
.diff-title.diff-added { color: var(--success); }
.diff-title.diff-removed { color: var(--danger); }
.diff-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.diff-table th, .diff-table td { padding: 4px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.diff-table th { color: var(--text-muted); font-weight: 600; }
.diff-key { font-weight: 500; white-space: nowrap; color: var(--text-muted); width: 140px; }
.diff-val { word-break: break-all; }
.diff-old { background: rgba(231, 76, 60, 0.15); color: #e74c3c; text-decoration: line-through; }
.diff-new { background: rgba(39, 174, 96, 0.15); color: #27ae60; }
.diff-changed td { font-weight: 500; }

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* === Main Content === */
.app-page main { padding: 30px 20px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 { font-size: 1.6rem; }

.search-input {
  max-width: 300px;
  background: var(--bg-input);
}

/* === Sorteer-controls (ledenselectie) === */
.sorteer-controls { margin-top: 4px; }
.sorteer-controls .sorteer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--text-muted, inherit);
}
/* Even hoog als de naastgelegen btn-sm (Oplopend/Aflopend) */
.sorteer-controls .sorteer-label select {
  width: auto;
  max-width: 160px;
  padding: 6px 12px;
  font-size: 0.85rem;
  min-height: 0;
  line-height: 1.4;
}

/* === Stats === */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* === Detail View === */
.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.detail-section h3 {
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
/* === Tabs === */
.tabs-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: -2px;
  padding: 8px 18px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { border-bottom-color: var(--primary); color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
/* === Stat indicators === */
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.indicator-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.indicator-number { font-size: 2rem; font-weight: 700; color: var(--gold); }
.indicator-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.detail-item label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-item p { font-size: 1rem; margin-top: 2px; }

/* === Video Grid === */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.video-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.video-icon { font-size: 2.5rem; margin-bottom: 12px; }
.video-name { font-weight: 600; word-break: break-word; }
.video-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* === Manuals === */
.manual-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.manual-list { display: flex; flex-direction: column; gap: 8px; }
.manual-list-item {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.manual-list-item:hover { border-color: var(--primary-hover); }
.manual-list-item.active { border-color: var(--primary); background: var(--bg-surface); }
.manual-file-icon {
  flex: 0 0 42px;
  padding: 7px 4px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.manual-list-details { min-width: 0; display: flex; flex-direction: column; }
.manual-list-details small { color: var(--text-muted); overflow-wrap: anywhere; }
.manual-viewer-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.manual-viewer-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.manual-viewer-header h3 { font-size: 1rem; }
.manual-viewer {
  width: 100%;
  height: calc(100vh - 190px);
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-y: auto;
  padding: 16px;
  background: #252525;
  user-select: none;
}
.manual-page { display: block; max-width: 100%; height: auto !important; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.45); }
.manual-render-status { padding: 32px 16px; color: #fff; }

@media print {
  .manual-viewer-shell { display: none !important; }
}

/* === Attendance === */
.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1.1rem; }

/* === Landing Page === */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { font-size: 1.3rem; font-weight: 700; color: var(--gold); }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 70%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(192,57,43,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 3.5rem; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 32px; }

.section { padding: 80px 0; }
.section-dark { background: var(--bg-card); }
.section-title { font-size: 2rem; text-align: center; margin-bottom: 40px; color: var(--gold); }

.feature { text-align: center; padding: 20px; }
.feature-icon { font-size: 3rem; margin-bottom: 16px; }
.feature h3 { margin-bottom: 8px; }

.landing-footer {
  background: var(--bg-card);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* === Login Page === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 70%);
}
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 8px; }
.login-box h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-box .text-muted { margin-bottom: 24px; }
.login-box .form-group { text-align: left; }
.back-link { display: inline-block; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .nav-links { flex-wrap: wrap; }
  .nav-links a { padding: 6px 10px; font-size: 0.85rem; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .search-input { max-width: 100%; }
  table { font-size: 0.85rem; }
  th, td { padding: 10px 12px; }
  .attendance-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .manual-viewer { height: 75vh; min-height: 500px; }
  .btn-group { gap: 8px; }
  .btn, button { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .login-box { padding: 24px; }
  .page-header h2 { font-size: 1.4rem; }
  .attendance-grid { gap: 8px; }
  .btn { padding: 10px 16px; min-height: 44px; font-size: 0.9rem; }
  .btn-sm { min-height: 36px; padding: 8px 12px; }
  .btn-group { flex-direction: column; gap: 8px; }
  .btn-block, .btn-group .btn { width: 100%; }
  input, select, textarea { font-size: 16px; }
  .modal { width: 90%; max-height: 90vh; overflow-y: auto; }
}

/* =============================================
   Financieel Portaal (.fin-portal)
   ============================================= */

.fin-portal .verborgen { display: none !important; }

/* Basis knopstijl voor plain <button> in fin-portal */
.fin-portal button {
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  transition: opacity 0.15s;
}
.fin-portal button:hover { opacity: 0.85; }
.fin-portal button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Inlogschermen */
.fin-portal .scherm {
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 70%);
}

.fin-portal .login-kaart {
  max-width: 400px;
  margin: 10vh auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.fin-portal .login-kaart h1 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.fin-portal .login-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.fin-portal .login-kaart form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.fin-portal .login-kaart button[type=submit] {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem;
}

.fin-portal .knop-secundair {
  width: 100%;
  margin-top: 0.5rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border) !important;
}
.fin-portal .knop-secundair:hover { background: var(--bg-surface); opacity: 1; }

.fin-portal .fout {
  margin-top: 0.75rem;
  color: var(--danger);
  font-size: 0.875rem;
}

/* Header */
.fin-portal .fin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.fin-portal .fin-titel { font-weight: 700; font-size: 1.05rem; color: var(--gold); }

/* Navigatie in header */
.fin-portal .fin-nav { display: flex; gap: 4px; flex: 1; margin: 0 1rem; }
.fin-portal .fin-nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none !important;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.fin-portal .fin-nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); opacity: 1; }
.fin-portal .fin-nav-btn.actief { background: var(--primary); color: #fff; opacity: 1; }
.fin-portal .header-gebruiker { font-size: 0.85rem; color: var(--text-muted); }
.fin-portal .knop-uitloggen {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border) !important;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}
.fin-portal .knop-uitloggen:hover { border-color: var(--danger) !important; color: var(--danger); opacity: 1; }

/* Hoofdlayout */
.fin-portal .fin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Kaart */
.fin-portal .kaart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}

.fin-portal .kaart h2 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

/* Knoprij en meldingen */
.fin-portal .knop-rij { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.fin-portal .knop-rij button { background: var(--primary); color: #fff; font-weight: 600; }
.fin-portal .melding { font-size: 0.875rem; color: var(--success); }
.fin-portal .knop-gevaar { background: var(--danger) !important; color: #fff; }

/* CSV upload */
.fin-portal .upload-uitleg { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.fin-portal .upload-rij { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.fin-portal .upload-rij .verborgen { display: none !important; }
.fin-portal .upload-bestandsnaam { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.fin-portal .upload-rij #ing-bestandsnaam { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-portal .upload-rij button { background: var(--primary); color: #fff; font-weight: 600; white-space: nowrap; }

/* Rekeningen */
.fin-portal .rekeningen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.fin-portal .rekening-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
}
.fin-portal .rekening-naam { font-weight: 600; font-size: 0.95rem; }
.fin-portal .rekening-iban { font-size: 0.8rem; color: var(--text-muted); margin: 0.2rem 0; }
.fin-portal .rekening-saldo { font-size: 1.15rem; font-weight: 700; }
.fin-portal .rekening-saldo.credit { color: var(--success); }
.fin-portal .rekening-saldo.debit  { color: var(--danger); }

/* Filterrij */
.fin-portal .filter-rij { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.fin-portal .filter-rij input[type=text] { flex: 1; min-width: 140px; }
.fin-portal .filter-rij button { background: var(--primary); color: #fff; padding: 0.45rem 1rem; }

/* Transactiebedragen */
.col-bedrag { text-align: right; }
td.col-bedrag { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
td.bedrag-credit { color: var(--success); }
td.bedrag-debit  { color: var(--danger); }

/* Paginering */
.fin-portal .paginering { display: flex; gap: 0.4rem; margin-top: 0.9rem; justify-content: center; flex-wrap: wrap; }
.fin-portal .paginering button {
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border) !important;
  color: var(--text);
  font-size: 0.85rem;
}
.fin-portal .paginering button.actief { background: var(--primary); color: #fff; border-color: var(--primary) !important; }

@media (max-width: 600px) {
  .fin-portal .fin-header { padding: 0.6rem 1rem; }
  .fin-portal .kaart { padding: 1rem; }
  .fin-portal .filter-rij { flex-direction: column; }
  .fin-portal .filter-rij input[type=text] { min-width: unset; }
}
