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

:root {
  --bg: #f5f5f3;
  --white: #fff;
  --border: #ddd;
  --text: #111;
  --muted: #666;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --radius: 5px;
  --font: Georgia, 'Times New Roman', serif;
  --mono: 'Courier New', monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAV */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .brand {
  font-weight: bold;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

nav .nav-links {
  display: flex;
  gap: 1.25rem;
}

nav .nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
}

nav .nav-links a:hover { color: var(--accent); }

.user-switcher {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}

.user-switcher select {
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

/* MAIN */
main {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.page-header h1 { font-size: 1.4rem; }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* HERO */
.hero {
  padding: 2rem 0 1.5rem;
}

.hero h1 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.hero .sub { color: var(--muted); margin-bottom: 1.25rem; }

.hero-actions { display: flex; gap: 0.75rem; }

/* QUICK LINKS */
.quick-links {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.quick-links h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.quick-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quick-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.quick-links a:hover { text-decoration: underline; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  line-height: 1.5;
}

.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn.outline {
  background: transparent;
  color: var(--accent);
}

.btn.outline:hover { background: var(--accent); color: #fff; }

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}

thead { background: #f0f0ec; }

th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf8; }

table a { color: var(--accent); text-decoration: none; }
table a:hover { text-decoration: underline; }

.actions { display: flex; gap: 0.5rem; align-items: center; }

/* DANGER BUTTON (delete) */
button.danger {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
}

button.danger:hover { text-decoration: underline; }

/* DETAIL CARD */
.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.detail-card .row {
  display: flex;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 1rem;
}

.detail-card .row:last-child { border-bottom: none; }

.detail-card .label {
  width: 120px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.badge {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-family: var(--mono);
}

.badge.active { background: #dcfce7; color: #15803d; }
.badge.deleted { background: #fee2e2; color: #b91c1c; }

/* FORM */
.form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 520px;
  margin-bottom: 1rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}

.field small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.form-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }

.duration-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.duration-inputs input[type="number"] {
  width: 5rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-weight: normal;
  width: fit-content;
  margin-bottom: 5px; /* Extra ruimte tussen de rijen */
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  margin-right: 6px;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.checkbox-label span {
  vertical-align: middle;
  line-height: 1;
}

.playback-slider {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.playback-slider input[type="range"] {
  width: 100%;
  cursor: pointer;
}

.playback-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.playback-progress {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ERRORS */
.errors {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--danger);
  font-size: 0.875rem;
  max-width: 520px;
}

/* EMPTY STATE */
.empty {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

.empty a { color: var(--accent); }

/* BACK LINK */
.back {
  display: inline-block;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.back:hover { color: var(--accent); }

/* ERROR PAGE */
pre {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  overflow-x: auto;
  margin-top: 1rem;
  font-family: var(--mono);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Star ratings */
.stars {
  color: #fbbf24;
  font-size: 1.1rem;
}

.stars span {
  margin: 0 1px;
}

/* Rating input */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.5rem;
}

.rating-input label {
  cursor: pointer;
  font-size: 1.5rem;
  color: #ddd;
  transition: color 0.2s;
}

.rating-input input {
  display: none;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #fbbf24;
}

/* Info box */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
  max-width: 520px;
}

.info-box p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* Filters */
.filters {
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.9rem;
}

/* Section headers */
.section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Select inputs */
.field select {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 0.9rem;
  font-family: Georgia, 'Times New Roman', serif;
  background: #f5f5f3;
  color: #111;
}

.field select:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

/* Footer links */
footer a {
  color: #666;
  text-decoration: none;
  margin: 0 0.25rem;
}

footer a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Responsive tables */
@media (max-width: 768px) {
  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
  }
}