/* ===== 2MF Band Management — Design System ===== */
/* Generated by UI/UX Pro Max: Vibrant & Block-based, Dark Audio + Play Green */
/* Typography: Righteous (headings) + Poppins (body) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');

:root {
  /* Color Palette — Dark Audio + Play Green */
  --bg: #0F0F23;
  --surface: #161831;
  --surface-2: #1E2040;
  --border: #2A2D52;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --primary: #4338CA;
  --primary-deep: #1E1B4B;
  --primary-hover: #6366F1;
  --primary-bg: rgba(67,56,202,.15);
  --cta: #22C55E;
  --cta-hover: #16A34A;
  --cta-bg: rgba(34,197,94,.12);
  --accent-green: #22C55E;
  --accent-green-bg: rgba(34,197,94,.12);
  --accent-orange: #F59E0B;
  --accent-orange-bg: rgba(245,158,11,.12);
  --accent-red: #EF4444;
  --accent-red-bg: rgba(239,68,68,.12);
  --accent-blue: #3B82F6;
  --accent-blue-bg: rgba(59,130,246,.12);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,.25);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.3);

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --topbar-h: 56px;

  /* Transitions */
  --transition: 200ms ease;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--cta); color: #fff; padding: 8px 16px;
  border-radius: var(--radius-sm); z-index: 9999;
  font-size: .85rem; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ===== App Shell ===== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  grid-row: 1 / -1;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 20px 12px;
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo {
  width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--cta));
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 15px; color: #fff;
  flex-shrink: 0; font-family: 'Righteous', sans-serif;
}
.sidebar-brand-name { font-weight: 700; font-size: 1.15rem; font-family: 'Righteous', sans-serif; }
.sidebar-brand-sub { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }

.nav-section {
  padding: var(--space-md) 12px var(--space-xs);
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 2px 8px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; font-size: .88rem;
  transition: all var(--transition); cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:focus-visible {
  outline: 2px solid var(--cta); outline-offset: 2px;
}
.nav-item.active {
  background: var(--primary-bg); color: var(--primary-hover); font-weight: 600;
  border-left: 3px solid var(--cta);
}
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--cta); color: #fff;
  font-size: .68rem; padding: 2px 8px; border-radius: 99px; font-weight: 600;
}

.sidebar-footer {
  margin-top: auto; padding: var(--space-md); border-top: 1px solid var(--border);
}
.user-card { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cta));
  display: flex; align-items: center;
  justify-content: center; font-weight: 700; color: #fff; font-size: .85rem;
}
.user-name { font-size: .85rem; font-weight: 600; }
.user-role { font-size: .72rem; color: var(--text-muted); }
.build-tag {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: .68rem; color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .02em; text-align: center; user-select: all; cursor: help;
}

/* ===== Topbar ===== */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-lg);
}
.topbar-title {
  font-size: 1rem; font-weight: 600;
  font-family: 'Righteous', sans-serif;
  letter-spacing: .02em;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ===== Main Content ===== */
.main-content { padding: var(--space-lg); overflow-y: auto; }

/* ===== Headings ===== */
h1 { font-family: 'Righteous', sans-serif; font-size: 1.5rem; font-weight: 400; margin: 0 0 var(--space-md); letter-spacing: .02em; }
h3 { font-family: 'Righteous', sans-serif; font-size: 1rem; font-weight: 400; margin: 0; letter-spacing: .01em; }
h4 { font-size: .88rem; font-weight: 600; margin: var(--space-md) 0 var(--space-sm); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: .84rem; cursor: pointer; text-decoration: none;
  transition: all var(--transition); font-family: inherit;
}
.btn:hover { background: var(--border); color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

.btn-primary {
  background: var(--cta); border: 1px solid var(--cta); color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: .84rem; cursor: pointer; text-decoration: none;
  transition: all var(--transition); font-family: inherit;
  font-weight: 600;
}
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

.btn-danger {
  background: var(--accent-red-bg); border: 1px solid rgba(239,68,68,.3);
  color: var(--accent-red); padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: .84rem; cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-sm { padding: 5px 10px; font-size: .78rem; }

.btn-icon {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .85rem; transition: all var(--transition); padding: 0;
}
.btn-icon:hover { color: var(--text); background: var(--border); }
.btn-icon:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

/* ===== Cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow var(--transition);
}
.card-header {
  padding: var(--space-md) 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: .95rem; }
.card-body { padding: var(--space-md) 20px; }
.card-body-flush { padding: 0; overflow: visible; }

/* ===== Stats Cards ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-bottom: var(--space-sm); display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; font-family: 'Righteous', sans-serif; }
.stat-change { font-size: .75rem; margin-top: 6px; }
.stat-change.up { color: var(--accent-green); }
.stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.stat-icon.purple { background: var(--primary-bg); color: var(--primary-hover); }
.stat-icon.green { background: var(--accent-green-bg); color: var(--accent-green); }
.stat-icon.orange { background: var(--accent-orange-bg); color: var(--accent-orange); }
.stat-icon.blue { background: var(--accent-blue-bg); color: var(--accent-blue); }

/* ===== Panels Grid ===== */
.panels-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 99px; font-size: .73rem; font-weight: 600;
}
.badge-green, .badge-success { background: var(--accent-green-bg); color: var(--accent-green); }
.badge-orange, .badge-warning { background: var(--accent-orange-bg); color: var(--accent-orange); }
.badge-red { background: var(--accent-red-bg); color: var(--accent-red); }
.badge-blue { background: var(--accent-blue-bg); color: var(--accent-blue); }
.badge-purple { background: var(--primary-bg); color: var(--primary-hover); }
.badge-grey, .badge-gray { background: rgba(148,163,184,.15); color: var(--text-muted); }

/* ===== Tables ===== */
/* Table wrapper for horizontal scroll on mobile */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 700px; }
.table th {
  text-align: left; padding: 12px 20px; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: 14px 20px; font-size: .85rem; border-bottom: 1px solid var(--border); }
.table tr { transition: background var(--transition); }
.table tr:hover td { background: rgba(67,56,202,.06); }
.table-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Mobile card view for tables */
.mobile-cards { display: none; }

@media (max-width: 768px) {
  .desktop-table { display: none; }
  .mobile-cards { display: flex; flex-direction: column; gap: 12px; padding: var(--space-md); }
  .mobile-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px;
  }
  .mobile-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }
  .mobile-card-title { font-weight: 600; font-size: .9rem; word-break: break-word; }
  .mobile-card-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
    padding: 4px 0; font-size: .82rem;
  }
  .mobile-card-row > span:last-child { text-align: right; word-break: break-word; min-width: 0; }
  .mobile-card-label { color: var(--text-muted); flex-shrink: 0; }
  .mobile-card-actions {
    display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .mobile-card-actions .btn, .mobile-card-actions .btn-icon {
    flex: 1 1 auto; min-width: 80px; justify-content: center; padding: 8px;
  }
}

/* ===== Gig List ===== */
.gig-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.gig-item:last-child { border-bottom: none; }
.gig-item:hover { background: rgba(67,56,202,.06); }
.gig-date { text-align: center; min-width: 50px; }
.gig-day { font-size: 1.4rem; font-weight: 700; line-height: 1; font-family: 'Righteous', sans-serif; }
.gig-month { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.gig-title { font-size: .88rem; font-weight: 600; }
.gig-loc { font-size: .78rem; color: var(--text-muted); }
.gig-status { margin-left: auto; }

/* ===== Timeline ===== */
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.timeline-dot.green { background: var(--accent-green); }
.timeline-dot.orange { background: var(--accent-orange); }
.timeline-dot.blue { background: var(--accent-blue); }
.timeline-dot.purple { background: var(--primary); }
.timeline-text { font-size: .84rem; line-height: 1.6; }
.timeline-time { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.form-card h3 {
  font-size: .95rem; margin: 0 0 14px;
  color: var(--cta); font-family: 'Righteous', sans-serif;
}
.form-card h4 { font-size: .82rem; font-weight: 600; margin: var(--space-md) 0 10px; color: var(--text); }
.form-hint-block { font-size: .78rem; color: var(--text-muted); margin: -8px 0 14px; }

.label {
  display: block; font-size: .78rem; color: var(--text-muted);
  margin-bottom: 5px; margin-top: 12px; font-weight: 500;
}
.input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%; max-width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: .85rem;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit; line-height: 1.5;
}
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,56,202,.2);
}
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { appearance: none; cursor: pointer; }
textarea { min-height: 80px; resize: vertical; }

.checkbox {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px;
}
.checkbox input[type="checkbox"],
.checkbox input[type="radio"] {
  margin-top: 3px; accent-color: var(--cta);
  width: auto; padding: 0; cursor: pointer;
}
.checkbox label { font-size: .84rem; line-height: 1.5; cursor: pointer; }

.form-section-divider {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
  margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ===== Search Bar ===== */
.search-bar {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: .85rem;
  color: var(--text); width: 240px; outline: none; font-family: inherit;
  transition: border-color var(--transition);
}
.search-bar::placeholder { color: var(--text-muted); }
.search-bar:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,56,202,.2); }

/* ===== Alerts ===== */
.alert { background: var(--accent-orange-bg); border: 1px solid rgba(245,158,11,.3); padding: 12px var(--space-md); border-radius: var(--radius-sm); color: var(--accent-orange); font-size: .85rem; }
.alert-error { background: var(--accent-red-bg); border-color: rgba(239,68,68,.3); color: var(--accent-red); }
.alert-success { background: var(--accent-green-bg); border-color: rgba(34,197,94,.3); color: var(--accent-green); }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}

/* ===== Login (no sidebar) ===== */
.login-shell {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--bg);
}
/* Light card zodat het donkere 4am.nl wordmark uit het logo goed leesbaar is. */
.login-card {
  background: #ffffff; color: #1e1b4b;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius); padding: var(--space-xl); width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 1.3rem; margin-bottom: 4px; color: #1e1b4b; }
.login-card .sub { color: #64748b; font-size: .85rem; margin-bottom: var(--space-lg); }
.login-card .label { color: #334155; }
.login-card .input {
  background: #f8fafc; color: #0f172a;
  border: 1px solid #cbd5e1;
}
.login-card .input:focus { border-color: var(--primary); background: #ffffff; }
.login-card a { color: var(--primary); }
.login-card .alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.login-card .alert-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* ===== Publieke klant-layout (geen sidebar/topbar) ===== */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.public-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.public-main {
  flex: 1;
  padding: 32px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.public-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ===== Utilities ===== */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: var(--space-md); }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: var(--space-lg); }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: var(--space-md); }
.mb-24 { margin-bottom: var(--space-lg); }
.gap-8 { gap: var(--space-sm); }
.flex { display: flex; }
.flex-end { justify-content: flex-end; }
.items-center { align-items: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }

/* ===== Validation ===== */
.validation-message { color: var(--accent-red); font-size: .78rem; margin-top: 4px; }

/* ===== Mobile menu (hamburger + drawer) ===== */
.mobile-menu-toggle {
  display: none;
  background: transparent; border: none;
  color: var(--text); padding: 8px; cursor: pointer;
  border-radius: var(--radius-sm);
  margin-right: 8px;
}
.mobile-menu-toggle:hover { background: var(--surface-2); }
.mobile-menu-toggle svg { width: 24px; height: 24px; display: block; }
.mobile-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 998;
  -webkit-tap-highlight-color: transparent;
}
.mobile-backdrop.is-visible {
  display: block;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Tap highlight + larger hit area op touch devices */
.mobile-menu-toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px; min-height: 44px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) { .panels-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    display: flex;
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w); max-width: 85vw; height: 100vh;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
  }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-menu-toggle { display: inline-flex; }
  .mobile-backdrop.is-visible { display: block; }
  .stats-grid, .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.2rem; }
  .topbar { padding: 0 var(--space-md); }
  .topbar-title { font-size: .95rem; }

  /* Search bar groeit mee met container (voorkomt horizontale scroll op smalle schermen). */
  .search-bar { width: 100%; max-width: 100%; min-width: 0; }

  /* Page headers met titel + zoek + knoppen mogen wrappen zodat niets overschrijft. */
  .page-header,
  .card-header { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
  .stats-grid, .stats-grid-3 { grid-template-columns: 1fr; }
  .main-content { padding: var(--space-md); }

  /* Tabs in bijv. boekingsformulier moeten wrappen i.p.v. afgekapt worden. */
  .form-grid-2 > div { min-width: 0; }

  /* Modal-kaart vult bijna hele viewport op kleine telefoons. */
  .modal-backdrop > .card { width: 98% !important; max-height: 95vh; }
}

/* ===== Agenda matrix — mobiele compact-mode met zoom =====
   Desktop (> 768px) blijft 100% ongewijzigd: de `.agenda-matrix` wrapper heeft
   geen effect. Onder 768px krijgt de wrapper een --zoom variabele (default 1.0)
   en schalen cell-afmetingen, fonts, padding mee. Ctrl+wheel / pinch / slider
   verandert --zoom (zie agenda-zoom.js). De inline styles op <th>/<td> worden
   hier bewust met !important overruled om de huidige Agenda.razor niet overhoop
   te gooien. */
.agenda-zoom-controls { display: none; } /* desktop: geen controls */
.agenda-zoom-hint {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.72); color: #fff;
  padding: 8px 18px; border-radius: 16px;
  font-size: .82rem; font-weight: 600;
  pointer-events: none; opacity: 0;
  transition: opacity .18s;
  z-index: 10;
}
.agenda-zoom-hint.show { opacity: 1; }

@media (max-width: 768px) {
  .agenda-matrix { --zoom: 1; position: relative; }

  .agenda-zoom-controls {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: .78rem; color: var(--text-muted);
  }
  .agenda-zoom-controls .agenda-zoom-slider {
    flex: 1; accent-color: var(--primary-hover);
  }
  .agenda-zoom-controls .agenda-zoom-label {
    font-family: 'Righteous', monospace;
    color: var(--text); min-width: 46px; text-align: center;
  }
  .agenda-zoom-controls button {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    border-radius: var(--radius-sm); width: 32px; height: 32px;
    font-size: 16px; cursor: pointer; font-family: inherit;
  }

  /* Compacter startpunt én schaling op basis van --zoom.
     De inline-styles uit Agenda.razor hebben specificity 1000; we gebruiken
     !important om ze te overrulen binnen de matrix-wrapper. */
  .agenda-matrix table { min-width: 0 !important; }

  .agenda-matrix thead th {
    padding: calc(2px * var(--zoom)) 0 !important;
    font-size: calc(7px * var(--zoom)) !important;
    min-width: calc(18px * var(--zoom)) !important;
  }
  .agenda-matrix thead th:first-child {
    min-width: calc(80px * var(--zoom)) !important;
    padding: calc(4px * var(--zoom)) calc(6px * var(--zoom)) !important;
    font-size: calc(10px * var(--zoom)) !important;
  }
  .agenda-matrix thead th > div:first-child { font-size: calc(7px * var(--zoom)) !important; }
  .agenda-matrix thead th > div:last-child { font-size: calc(9px * var(--zoom)) !important; }

  .agenda-matrix tbody td {
    padding: 0 !important;
    height: calc(18px * var(--zoom)) !important;
    min-width: calc(18px * var(--zoom)) !important;
    font-size: calc(9px * var(--zoom)) !important;
  }
  .agenda-matrix tbody td:first-child {
    min-width: calc(80px * var(--zoom)) !important;
    width: calc(80px * var(--zoom)) !important;
    padding: calc(2px * var(--zoom)) calc(6px * var(--zoom)) !important;
    font-size: calc(10px * var(--zoom)) !important;
  }

  /* Prevent page-zoom op pinch — we willen ALLEEN de matrix zoomen. */
  .agenda-matrix { touch-action: pan-x pan-y; }
}

/* =====================================================================
   Rider edit mode — sidebar inklappen voor extra werkruimte
   Wordt door rider-editor.js geactiveerd via body-class .rider-edit-mode
   wanneer de gebruiker /riders/nieuw of /riders/{id} opent.
   ===================================================================== */
@media (min-width: 901px) {
  body.rider-edit-mode .app-shell {
    grid-template-columns: 56px 1fr;
    transition: grid-template-columns .25s ease;
  }
  body.rider-edit-mode .sidebar {
    overflow: hidden;
  }
  /* Toon alleen iconen — alle tekst-content verbergen */
  body.rider-edit-mode .sidebar-brand-name,
  body.rider-edit-mode .sidebar-brand-sub,
  body.rider-edit-mode .nav-section,
  body.rider-edit-mode .nav-item span:not(.nav-icon-wrap),
  body.rider-edit-mode .user-name,
  body.rider-edit-mode .user-role,
  body.rider-edit-mode .build-tag {
    display: none !important;
  }
  body.rider-edit-mode .sidebar-brand {
    padding: 16px 8px 12px;
    justify-content: center;
  }
  body.rider-edit-mode .sidebar-logo {
    width: 32px; height: 32px;
  }
  body.rider-edit-mode .nav-item {
    justify-content: center;
    padding: 10px 8px;
    margin: 2px 4px;
  }
  body.rider-edit-mode .nav-item .nav-icon {
    width: 20px; height: 20px;
  }
  body.rider-edit-mode .nav-badge {
    display: none;
  }
  body.rider-edit-mode .user-card {
    justify-content: center;
    padding: 0;
  }
  body.rider-edit-mode .sidebar-footer {
    padding: 8px;
  }

  /* Toggle: wanneer user expliciet de sidebar weer open wil tijdens editing */
  body.rider-edit-mode.rider-sidebar-open .app-shell {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
  body.rider-edit-mode.rider-sidebar-open .sidebar-brand-name,
  body.rider-edit-mode.rider-sidebar-open .sidebar-brand-sub,
  body.rider-edit-mode.rider-sidebar-open .nav-section,
  body.rider-edit-mode.rider-sidebar-open .nav-item span,
  body.rider-edit-mode.rider-sidebar-open .user-name,
  body.rider-edit-mode.rider-sidebar-open .user-role,
  body.rider-edit-mode.rider-sidebar-open .build-tag {
    display: revert !important;
  }
  body.rider-edit-mode.rider-sidebar-open .sidebar-brand {
    padding: 20px 20px 12px;
    justify-content: flex-start;
  }
  body.rider-edit-mode.rider-sidebar-open .nav-item {
    justify-content: flex-start;
    padding: 10px 16px;
    margin: 2px 8px;
  }
  body.rider-edit-mode.rider-sidebar-open .nav-badge {
    display: inline;
  }
}

/* Sidebar-toggle knop in de topbar — alleen zichtbaar tijdens edit-mode.
   Geeft de gebruiker een eenvoudige manier om het menu weer uit te klappen. */
.rider-sidebar-toggle {
  display: none;
}
body.rider-edit-mode .rider-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-family: inherit;
  cursor: pointer;
  margin-right: 12px;
  transition: all var(--transition);
}
body.rider-edit-mode .rider-sidebar-toggle:hover {
  background: var(--border);
  color: var(--text);
}
body.rider-edit-mode .rider-sidebar-toggle svg {
  width: 14px; height: 14px;
}
body.rider-edit-mode.rider-sidebar-open .rider-sidebar-toggle .label-collapse,
body.rider-edit-mode:not(.rider-sidebar-open) .rider-sidebar-toggle .label-expand {
  display: inline;
}
body.rider-edit-mode.rider-sidebar-open .rider-sidebar-toggle .label-expand,
body.rider-edit-mode:not(.rider-sidebar-open) .rider-sidebar-toggle .label-collapse {
  display: none;
}

