/* dBB Meetplanner - licht thema */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e4e7ec;
  --border-strong: #cbd2d9;
  --text: #1a2332;
  --text-muted: #5b6b7e;
  --text-subtle: #8a95a4;
  --primary: #71a96a;
  --primary-hover: #5c9256;
  --primary-light: #e8f3e6;
  --success: #2f855a;
  --success-light: #e6f4ec;
  --danger: #c53030;
  --danger-light: #fbe9e9;
  --warning: #b7791f;
  --warning-light: #fdf3d9;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px;
}

header.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

header.topbar .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--mono);
}

h1, h2, h3 { letter-spacing: -0.01em; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="datetime-local"], input[type="number"], textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea { resize: vertical; min-height: 80px; font-family: inherit; }

.form-row { margin-bottom: 14px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

button:hover, .btn:hover { border-color: var(--text-muted); background: var(--bg); }
button:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-danger { color: var(--danger); border-color: var(--danger-light); }
.btn-danger:hover { background: var(--danger-light); border-color: var(--danger); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; color: var(--text); font-weight: 400; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-open { background: var(--primary-light); color: var(--primary); }
.badge-gepland { background: var(--warning-light); color: var(--warning); }
.badge-afgerond { background: var(--success-light); color: var(--success); }
.badge-buur { background: #eef2f7; color: var(--text-muted); }
.badge-ondernemer { background: var(--warning-light); color: var(--warning); }

.code-tag {
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--text);
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 1000;
  animation: slideIn 0.2s ease-out;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes slideIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hidden { display: none !important; }

.helper-text {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* Matrix view */
.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.matrix {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.matrix th, .matrix td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  min-width: 80px;
  vertical-align: middle;
}

.matrix th:last-child, .matrix td:last-child { border-right: none; }
.matrix tr:last-child td { border-bottom: none; }

.matrix th.partij-head, .matrix td.partij-cell {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 2;
  min-width: 180px;
  border-right: 2px solid var(--border-strong);
}

.matrix th.partij-head { background: var(--bg); }

.matrix th.slot-head {
  background: var(--bg);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.matrix th.slot-head.match { background: var(--success-light); color: var(--success); }
.matrix th.slot-head .slot-date { font-weight: 600; display: block; }
.matrix th.slot-head .slot-time { color: var(--text-muted); font-family: var(--mono); font-size: 11px; }

.matrix td.status { font-weight: 600; font-size: 13px; }
.matrix td.status-kan { background: var(--success-light); color: var(--success); }
.matrix td.status-niet { background: var(--danger-light); color: var(--danger); }
.matrix td.status-misschien { background: var(--warning-light); color: var(--warning); }
.matrix td.status-leeg { color: var(--text-subtle); }

.matrix tfoot td {
  background: var(--bg);
  font-weight: 600;
  font-size: 12px;
}

.matrix tfoot td.match { background: var(--success-light); color: var(--success); }

/* Slot picker (buur kant) */
.slot-list { display: flex; flex-direction: column; gap: 10px; }

.slot-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
  transition: border-color 0.15s;
}

.slot-item:hover { border-color: var(--border-strong); }

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
}

.slot-when { font-weight: 600; font-size: 15px; }
.slot-duration { color: var(--text-muted); font-size: 13px; font-family: var(--mono); }
.slot-label { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.status-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.status-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  color: var(--text-muted);
}

.status-btn:hover { border-color: var(--text-muted); }

.status-btn.selected.kan {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.status-btn.selected.niet {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.status-btn.selected.misschien {
  background: var(--warning);
  border-color: var(--warning);
  color: white;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--surface);
  gap: 12px;
}

.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-weight: 500; font-size: 14px; }
.list-item-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.copy-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}

.copy-link:hover { background: var(--primary-light); }

.banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.banner-info { background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }
.banner-success { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.banner-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }

.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 3px; }

.login-screen {
  max-width: 380px;
  margin: 15vh auto;
  text-align: center;
}

.login-screen .card { text-align: left; }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: inherit;
}
.faq-question:hover { color: var(--primary); }

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
  font-size: 18px;
  line-height: 1;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.faq-answer p { margin: 0 0 10px 0; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { margin: 0 0 10px 0; padding-left: 20px; }
.faq-answer strong { color: var(--text); }

.faq-item.open .faq-answer { display: block; }
