/* ═══════════════════════════════════════════════════════════════
   Aurora Shell — v5 layout, components, JS-rendered widgets.
   Loaded after aurora.css; uses its design tokens.
   ═══════════════════════════════════════════════════════════════ */

/* ─── App shell ─────────────────────────────────────────────── */
body.app {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50, #fafafa);
  color: var(--gray-900, #111827);
  font-size: 14px;
}
[data-theme="dark"] body.app,
[data-theme="dark"].app,
[data-theme="dark"] {
  background: #0b0d12;
  color: #e5e7eb;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Header ────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  height: 60px;
  display: flex;
  align-items: center;
}
[data-theme="dark"] .app-header {
  background: #11141b;
  border-bottom-color: #1f242f;
}
.app-header__container {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 0 16px;
}
.app-header__brand { display: flex; align-items: center; gap: 8px; }

.sidebar-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--gray-700, #374151);
}
.sidebar-toggle:hover { background: var(--gray-100, #f3f4f6); }
[data-theme="dark"] .sidebar-toggle { color: #d1d5db; }
[data-theme="dark"] .sidebar-toggle:hover { background: #1f242f; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 15px; font-weight: 700; }
.brand__version { font-size: 11px; color: var(--gray-500, #6b7280); }

.app-header__search { display: flex; justify-content: center; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  width: min(540px, 100%);
  border: 1px solid var(--gray-200, #e5e7eb);
  background: var(--gray-50, #f9fafb);
  border-radius: 10px;
  color: var(--gray-500, #6b7280);
  font-size: 13px;
  transition: border-color .15s, background .15s;
}
.search-trigger:hover { border-color: var(--primary-300, #a5b4fc); background: #fff; }
[data-theme="dark"] .search-trigger { background: #11141b; border-color: #1f242f; color: #9ca3af; }
[data-theme="dark"] .search-trigger:hover { border-color: #4b5563; background: #181c25; }
.search-trigger__text { flex: 1; text-align: left; }
.kbd {
  font: inherit; font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--gray-100, #f3f4f6);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 4px;
  color: var(--gray-700, #374151);
}
[data-theme="dark"] .kbd { background: #181c25; border-color: #2a313e; color: #cbd5e1; }

.app-header__actions { display: flex; align-items: center; gap: 12px; }
.live-clock { display: flex; flex-direction: column; line-height: 1.1; text-align: right; }
.live-clock__time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.live-clock__date { color: var(--gray-500, #6b7280); font-size: 11px; }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-action-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600, #4b5563);
}
.header-action-btn:hover { background: var(--gray-100, #f3f4f6); color: var(--gray-900, #111827); }
[data-theme="dark"] .header-action-btn { color: #9ca3af; }
[data-theme="dark"] .header-action-btn:hover { background: #1f242f; color: #f3f4f6; }
.header-action-btn .badge { position: absolute; top: 4px; right: 4px; }

.user-avatar { width: 32px; height: 32px; border-radius: 999px; overflow: hidden; }
.user-avatar__image { width: 100%; height: 100%; object-fit: cover; }

/* ─── Layout ────────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  min-height: 0;
}
body.sidebar-collapsed .app-layout { grid-template-columns: 64px 1fr; }
@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.app-sidebar {
  background: var(--surface, #fff);
  border-right: 1px solid var(--gray-200, #e5e7eb);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
[data-theme="dark"] .app-sidebar { background: #11141b; border-right-color: #1f242f; }
.app-sidebar__inner { display: flex; flex-direction: column; gap: 16px; padding: 16px 12px; }

.sidebar-nav__title,
.sidebar-section__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500, #6b7280);
  font-weight: 600;
  margin: 4px 8px;
}
.sidebar-nav__section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--gray-700, #374151);
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.sidebar-nav__item:hover { background: var(--gray-100, #f3f4f6); color: var(--gray-900, #111827); }
.sidebar-nav__item.active {
  background: linear-gradient(90deg, rgba(99,102,241,.12), rgba(139,92,246,.12));
  color: #4f46e5;
}
[data-theme="dark"] .sidebar-nav__item { color: #d1d5db; }
[data-theme="dark"] .sidebar-nav__item:hover { background: #1a1f29; color: #f3f4f6; }
[data-theme="dark"] .sidebar-nav__item.active { background: rgba(99,102,241,.18); color: #a5b4fc; }
.sidebar-nav__item .badge { margin-left: auto; }

body.sidebar-collapsed .sidebar-nav__text,
body.sidebar-collapsed .brand__text,
body.sidebar-collapsed .sidebar-section__title,
body.sidebar-collapsed .sidebar-nav__item .badge,
body.sidebar-collapsed .stat-mini-card__content,
body.sidebar-collapsed .timer-widget__label,
body.sidebar-collapsed .sidebar-stats,
body.sidebar-collapsed .sidebar-timer,
body.sidebar-collapsed .sidebar-activity { display: none; }
body.sidebar-collapsed .sidebar-nav__item { justify-content: center; }

.stat-mini-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
}
[data-theme="dark"] .stat-mini-card { background: #14181f; }
.stat-mini-card__icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.1); color: #6366f1;
}
.stat-mini-card__icon--success { background: rgba(16,185,129,.12); color: #10b981; }
.stat-mini-card__icon--warning { background: rgba(245,158,11,.12); color: #f59e0b; }
.stat-mini-card__icon--danger { background: rgba(239,68,68,.12); color: #ef4444; }
.stat-mini-card__label { font-size: 11px; color: var(--gray-500, #6b7280); }
.stat-mini-card__value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.timer-widget {
  background: var(--gray-50, #f9fafb);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
[data-theme="dark"] .timer-widget { background: #14181f; }
.timer-widget__display {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 22px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.timer-widget__controls { display: flex; gap: 6px; justify-content: center; }
.timer-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  color: var(--gray-700, #374151);
}
.timer-btn:hover { background: var(--gray-100, #f3f4f6); }
.timer-btn--start { background: #10b981; color: #fff; border-color: transparent; }
.timer-btn--start:hover { background: #059669; }
.timer-widget__input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  font-size: 12px;
  background: var(--surface, #fff);
}
[data-theme="dark"] .timer-widget__input { background: #11141b; border-color: #1f242f; color: #f3f4f6; }

.sidebar-collapse-toggle {
  margin-top: auto;
  align-self: flex-end;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-500, #6b7280);
}
.sidebar-collapse-toggle:hover { background: var(--gray-100, #f3f4f6); }
body.sidebar-collapsed .sidebar-collapse-toggle .icon { transform: rotate(180deg); }

/* Recent activity */
.activity-feed { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.activity-item:hover { background: var(--gray-100, #f3f4f6); }
[data-theme="dark"] .activity-item:hover { background: #1a1f29; }
.activity-item__icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.activity-item__content { min-width: 0; flex: 1; }
.activity-item__title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-item__meta { font-size: 11px; color: var(--gray-500, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-empty { padding: 12px; color: var(--gray-500, #6b7280); font-size: 12px; text-align: center; }

/* ─── Main content ──────────────────────────────────────────── */
.app-main { padding: 0; min-width: 0; }
.app-main__container { padding: 24px; max-width: 1400px; margin: 0 auto; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Cards (BEM) ───────────────────────────────────────────── */
.card,
.card.card--featured,
.card.card--no-padding {
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
[data-theme="dark"] .card { background: #11141b; border-color: #1f242f; }
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  gap: 8px;
}
[data-theme="dark"] .card__header { border-bottom-color: #1a1f29; }
.card__title-group { display: flex; align-items: center; gap: 8px; }
.card__title { font-size: 14px; font-weight: 700; }
.card__title-icon { color: #6366f1; }
.card__subtitle { font-size: 12px; color: var(--gray-500, #6b7280); }
.card__actions { display: flex; gap: 4px; }
.card__body { padding: 16px; }
.card.card--no-padding .card__body { padding: 0; }
.card.card--featured { border-left: 3px solid #6366f1; }

/* ─── Section headers ───────────────────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 12px; gap: 12px; flex-wrap: wrap;
}
.section-header--large { margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; }
.section-title--large { font-size: 22px; }
.section-subtitle { color: var(--gray-500, #6b7280); font-size: 13px; margin-top: 2px; }
.section-header__actions { display: flex; gap: 8px; }

/* ─── Buttons (BEM) ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 6px 10px; font-size: 12px; }
.btn--lg { padding: 10px 16px; font-size: 14px; }
.btn--primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.btn--primary:hover { filter: brightness(1.05); }
.btn--secondary { background: var(--gray-100, #f3f4f6); color: var(--gray-800, #1f2937); }
.btn--secondary:hover { background: var(--gray-200, #e5e7eb); }
[data-theme="dark"] .btn--secondary { background: #1f242f; color: #e5e7eb; }
[data-theme="dark"] .btn--secondary:hover { background: #2a313e; }
.btn--danger { background: #ef4444; color: #fff; }
.btn--danger:hover { background: #dc2626; }
.btn--ghost { background: transparent; color: var(--gray-700, #374151); }
.btn--ghost:hover { background: var(--gray-100, #f3f4f6); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--gray-600, #4b5563);
  background: transparent;
  transition: background .12s;
}
.btn-icon:hover { background: var(--gray-100, #f3f4f6); }
[data-theme="dark"] .btn-icon { color: #9ca3af; }
[data-theme="dark"] .btn-icon:hover { background: #1f242f; color: #f3f4f6; }
.btn-icon--lg { width: 40px; height: 40px; }
.btn-icon--danger:hover { background: rgba(239,68,68,.12); color: #ef4444; }

/* ─── Badges (BEM) ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
}
[data-theme="dark"] .badge { background: #1f242f; color: #d1d5db; }
.badge--primary { background: rgba(99,102,241,.12); color: #4f46e5; }
.badge--success { background: rgba(16,185,129,.12); color: #059669; }
.badge--warning { background: rgba(245,158,11,.12); color: #b45309; }
.badge--danger { background: rgba(239,68,68,.12); color: #dc2626; }
.badge--neutral { background: var(--gray-100, #f3f4f6); color: var(--gray-700, #374151); }

/* ─── Form (BEM) ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--gray-700, #374151); }
[data-theme="dark"] .form-label { color: #d1d5db; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 0;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
[data-theme="dark"] .form-input, [data-theme="dark"] .form-select, [data-theme="dark"] .form-textarea {
  background: #11141b; border-color: #1f242f; color: #e5e7eb;
}
.form-input--search { padding-left: 32px; }
.form-textarea--tall { min-height: 200px; resize: vertical; }
.form-help { font-size: 11px; color: var(--gray-500, #6b7280); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox { width: 16px; height: 16px; cursor: pointer; }

.search-input { position: relative; }
.search-input .icon {
  position: absolute; top: 50%; left: 10px; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--gray-400, #9ca3af);
  pointer-events: none;
}
.search-input input { padding-left: 32px; }
.search-input--lg input { padding: 10px 10px 10px 36px; font-size: 14px; }

/* ─── Filter bar / quick add ────────────────────────────────── */
.filter-bar__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
}
.filter-bar__filters { display: flex; gap: 8px; }
.filter-bar__actions { display: flex; gap: 8px; }
.form-select--sm { padding: 6px 8px; font-size: 12px; }

.quick-add-form__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 2fr auto;
  gap: 10px;
  align-items: end;
}
.form-group--submit { align-self: end; }
@media (max-width: 900px) {
  .quick-add-form__grid { grid-template-columns: 1fr; }
}

/* ─── Dashboard hero ────────────────────────────────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 16px;
}
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; } }

.progress-ring-container { position: relative; display: flex; justify-content: center; align-items: center; min-height: 240px; }
.progress-ring { width: 220px; height: 220px; }
.progress-ring__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.progress-ring__value { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; }
.progress-ring__label { color: var(--gray-500, #6b7280); font-size: 12px; }
.progress-ring__percentage { font-weight: 700; color: #6366f1; margin-top: 4px; }

.week-days-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 6px;
  border-radius: 8px;
}
.week-day__label { font-size: 11px; color: var(--gray-500, #6b7280); font-weight: 600; }
.week-day__bar {
  width: 100%;
  min-height: 6px;
  height: calc(var(--height, 0%) * 0.6);
  max-height: 70px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  transition: height .3s ease;
}
.week-day.complete .week-day__bar { background: linear-gradient(180deg, #10b981, #059669); }
.week-day.active { background: rgba(99,102,241,.06); }
.week-day__value { font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; }

.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.stat-card {
  display: flex; gap: 10px;
  padding: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
}
[data-theme="dark"] .stat-card { background: #11141b; border-color: #1f242f; }
.stat-card__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card--primary .stat-card__icon { background: rgba(99,102,241,.12); color: #6366f1; }
.stat-card--success .stat-card__icon { background: rgba(16,185,129,.12); color: #10b981; }
.stat-card--warning .stat-card__icon { background: rgba(245,158,11,.12); color: #f59e0b; }
.stat-card--info .stat-card__icon { background: rgba(59,130,246,.12); color: #3498db; }
.stat-card__label { font-size: 11px; color: var(--gray-500, #6b7280); }
.stat-card__value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card__value--warning { color: #f59e0b; }
.stat-card__change { font-size: 11px; color: var(--gray-500, #6b7280); display: inline-flex; align-items: center; gap: 4px; }
.stat-card__change--positive { color: #10b981; }

/* ─── Today registrations grid ──────────────────────────────── */
.registrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.reg-card {
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .12s, transform .1s;
}
.reg-card:hover { border-color: #6366f1; }
[data-theme="dark"] .reg-card { background: #11141b; border-color: #1f242f; }
.reg-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.reg-card__ticket { font-weight: 700; font-size: 13px; }
.reg-card__hours { font-weight: 800; font-variant-numeric: tabular-nums; color: #6366f1; }
.reg-card__desc { font-size: 12px; color: var(--gray-600, #4b5563); margin: 4px 0 8px; min-height: 18px; }
.reg-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reg-card__cat { font-size: 10px; padding: 2px 6px; background: var(--gray-100, #f3f4f6); border-radius: 4px; color: var(--gray-700, #374151); }
.reg-card__type { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--type-color) 15%, transparent); color: var(--type-color); font-weight: 700; }
.reg-card__status { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.reg-card__status--verwerkt { background: rgba(16,185,129,.12); color: #059669; }
.reg-card__status--open { background: var(--gray-100, #f3f4f6); color: var(--gray-700, #374151); }

/* ─── Date picker / week calendar ───────────────────────────── */
.date-picker-card {
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
[data-theme="dark"] .date-picker-card { background: #11141b; border-color: #1f242f; }
.date-navigation { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.date-display { flex: 1; }
.date-display__date { font-size: 18px; font-weight: 700; }
.date-display__week { font-size: 12px; color: var(--gray-500, #6b7280); }

.week-calendar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.week-day-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .12s;
}
.week-day-card:hover { border-color: #6366f1; }
.week-day-card.active { background: rgba(99,102,241,.1); border-color: #6366f1; }
.week-day-card.complete { background: rgba(16,185,129,.08); }
[data-theme="dark"] .week-day-card { background: #14181f; }
[data-theme="dark"] .week-day-card.active { background: rgba(99,102,241,.18); }
.week-day-card__header { display: flex; justify-content: space-between; align-items: baseline; }
.week-day-card__label { font-size: 11px; color: var(--gray-500, #6b7280); font-weight: 600; }
.week-day-card__date { font-size: 14px; font-weight: 700; }
.week-day-card__hours { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ─── Data table ────────────────────────────────────────────── */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table__head th {
  position: sticky; top: 0;
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-600, #4b5563);
  padding: 10px 12px;
  background: var(--gray-50, #f9fafb);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}
[data-theme="dark"] .data-table__head th { background: #14181f; border-bottom-color: #1f242f; color: #d1d5db; }
.data-table__th--center { text-align: center; }
.data-table__th--right { text-align: right; }
.data-table__th--checkbox { width: 36px; }
.data-table__th--sortable { cursor: pointer; user-select: none; }
.data-table__th-content { display: inline-flex; align-items: center; gap: 4px; }
.data-table__th--sortable.sort-asc .data-table__th-content::after { content: '↑'; color: #6366f1; }
.data-table__th--sortable.sort-desc .data-table__th-content::after { content: '↓'; color: #6366f1; }

.data-table__row { border-bottom: 1px solid var(--gray-100, #f3f4f6); transition: background .12s; }
.data-table__row:hover { background: var(--gray-50, #f9fafb); }
[data-theme="dark"] .data-table__row { border-bottom-color: #1a1f29; }
[data-theme="dark"] .data-table__row:hover { background: #14181f; }
.data-table__row--verwerkt { box-shadow: inset 3px 0 0 #10b981; }
.data-table__row--open { box-shadow: inset 3px 0 0 var(--gray-300, #d1d5db); }
.data-table__td { padding: 10px 12px; vertical-align: middle; }
.data-table__td--center { text-align: center; }
.data-table__td--right { text-align: right; }

.row-ticket { display: flex; align-items: center; gap: 8px; }
.row-ticket__nr { font-weight: 700; }
.row-ticket__type { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 700; background: color-mix(in srgb, var(--type-color) 15%, transparent); color: var(--type-color); }
.row-meta { font-size: 11px; color: var(--gray-500, #6b7280); margin-top: 2px; }

.table-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100, #f3f4f6);
  font-size: 12px;
  color: var(--gray-500, #6b7280);
}
[data-theme="dark"] .table-footer { border-top-color: #1a1f29; }
.table-footer__center {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--gray-500, #6b7280);
}
.page-size {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gray-500, #6b7280);
}
.page-size .form-select { padding: 4px 22px 4px 8px; min-width: 64px; }
.pagination-page-info { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gray-700, #374151); }
[data-theme="dark"] .pagination-page-info { color: #d1d5db; }

.pagination { display: flex; gap: 4px; align-items: center; }
.pagination__btn,
.pagination__page {
  min-width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; padding: 0 8px;
  background: transparent; color: var(--gray-700, #374151); font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s;
  cursor: pointer;
}
[data-theme="dark"] .pagination__btn,
[data-theme="dark"] .pagination__page { color: #d1d5db; }
.pagination__btn:hover:not(:disabled),
.pagination__page:hover:not(.pagination__page--current) {
  background: var(--gray-100, #f3f4f6);
  border-color: var(--gray-200, #e5e7eb);
}
[data-theme="dark"] .pagination__btn:hover:not(:disabled),
[data-theme="dark"] .pagination__page:hover:not(.pagination__page--current) {
  background: #1f242f;
  border-color: #2a313e;
}
.pagination__page--current,
.pagination__page.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(99,102,241,.35);
  cursor: default;
}
.pagination__btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination__pages { display: flex; gap: 4px; }
.pagination__ellipsis {
  padding: 0 4px;
  min-width: 18px; text-align: center;
  color: var(--gray-400, #9ca3af);
  user-select: none;
}

@media (max-width: 720px) {
  .table-footer { flex-wrap: wrap; gap: 8px; }
  .table-footer__center { order: 3; width: 100%; justify-content: space-between; }
  .pagination-page-info { display: none; }
}

/* ─── Templates ─────────────────────────────────────────────── */
.category-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.category-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
}
.category-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.category-tab .badge { background: rgba(255,255,255,.25); color: inherit; }

.cc-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) { .cc-builder-grid { grid-template-columns: 1fr; } }
.cc-builder-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .12s, transform .1s;
}
.cc-builder-card:hover { border-color: #6366f1; transform: translateY(-1px); }
[data-theme="dark"] .cc-builder-card { background: #11141b; border-color: #1f242f; }
.cc-builder-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.cc-builder-card__icon--primary { background: rgba(99,102,241,.12); color: #6366f1; }
.cc-builder-card__icon--secondary { background: rgba(245,158,11,.12); color: #f59e0b; }
.cc-builder-card__title { font-size: 14px; font-weight: 700; }
.cc-builder-card__description { font-size: 12px; color: var(--gray-500, #6b7280); }
.cc-builder-card__arrow { margin-left: auto; color: var(--gray-400, #9ca3af); }

.template-controls__inner { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.template-card {
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: border-color .12s;
}
.template-card:hover { border-color: #6366f1; }
[data-theme="dark"] .template-card { background: #11141b; border-color: #1f242f; }
.template-card--pinned::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #f59e0b; border-radius: 12px 0 0 12px;
}
.template-card__head { display: flex; justify-content: space-between; align-items: center; }
.template-card__name { font-size: 14px; font-weight: 700; }
.template-card__pin { color: #f59e0b; }
.template-card__cat { font-size: 11px; color: var(--gray-500, #6b7280); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.template-card__preview {
  font-size: 12px;
  color: var(--gray-600, #4b5563);
  max-height: 80px; overflow: hidden;
  background: var(--gray-50, #f9fafb);
  padding: 8px;
  border-radius: 6px;
  white-space: pre-wrap;
  font-family: 'SF Mono', ui-monospace, monospace;
}
[data-theme="dark"] .template-card__preview { background: #14181f; color: #cbd5e1; }
.template-card__meta { font-size: 11px; color: var(--gray-500, #6b7280); }
.template-card__actions { display: flex; gap: 4px; align-items: center; }
.template-card__actions .btn { margin-right: auto; }

/* ─── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-600, #4b5563);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-state--inline { padding: 16px; }
.empty-state__illustration { color: var(--gray-300, #d1d5db); margin-bottom: 4px; }
.empty-state__title { font-size: 15px; font-weight: 700; color: var(--gray-700, #374151); }
.empty-state__description { font-size: 13px; color: var(--gray-500, #6b7280); max-width: 360px; margin: 0 auto 8px; }

.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-sm { width: 12px; height: 12px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 36px; height: 36px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Skeleton ──────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-line, .skeleton-box {
  background: linear-gradient(90deg, var(--gray-100, #f3f4f6) 25%, var(--gray-200, #e5e7eb) 50%, var(--gray-100, #f3f4f6) 75%);
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
  border-radius: 4px;
}
.skeleton-line { height: 12px; margin: 6px 0; }
.skeleton-line--75 { width: 75%; }
.skeleton-line--50 { width: 50%; }
.skeleton-line--25 { width: 25%; }
.skeleton-box { height: 32px; }
.skeleton-box--sm { width: 18px; height: 18px; }
.skeleton-box--badge { width: 60px; height: 22px; border-radius: 999px; }

/* ─── FAB ───────────────────────────────────────────────────── */
.fab {
  position: fixed; right: 24px; bottom: 24px;
  width: 56px; height: 56px; border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(99,102,241,.4);
  transition: transform .15s, box-shadow .15s;
  z-index: 40;
}
.fab:hover { transform: scale(1.05); }

/* ─── Bulk toolbar ──────────────────────────────────────────── */
.bulk-toolbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%);
  background: var(--gray-900, #111827); color: #fff;
  border-radius: 14px;
  padding: 8px 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
  z-index: 50;
  transition: transform .25s ease;
}
.bulk-toolbar[data-state="visible"] { transform: translateX(-50%) translateY(0); }
.bulk-toolbar__container { display: contents; }
.bulk-toolbar__info { display: flex; align-items: baseline; gap: 4px; }
.bulk-toolbar__count { font-weight: 800; font-variant-numeric: tabular-nums; }
.bulk-toolbar__label { font-size: 12px; color: #d1d5db; }
.bulk-toolbar__actions { display: flex; gap: 4px; }
.bulk-action-btn {
  padding: 6px 10px;
  border-radius: 8px;
  color: #f3f4f6;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
}
.bulk-action-btn:hover { background: rgba(255,255,255,.08); }
.bulk-action-btn--danger:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
.bulk-toolbar__close { color: #d1d5db; padding: 4px; }
.bulk-toolbar__close:hover { color: #fff; }
.bulk-toolbar__divider {
  width: 1px; align-self: stretch;
  background: rgba(255,255,255,.12);
  margin: 4px 4px;
}
.bulk-action-btn .icon { width: 14px; height: 14px; }
@media (max-width: 720px) {
  .bulk-toolbar { left: 8px; right: 8px; transform: translateY(140%); width: auto; max-width: none; flex-wrap: wrap; }
  .bulk-toolbar[data-state="visible"] { transform: translateY(0); }
  .bulk-toolbar__actions { flex-wrap: wrap; }
}

/* ─── Toasts (BEM) ──────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 80px; right: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
  animation: toastIn .2s ease both;
}
[data-theme="dark"] .toast { background: #11141b; border-color: #1f242f; }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast--leave { animation: toastOut .18s ease both; }
@keyframes toastOut { to { transform: translateX(20px); opacity: 0; } }
.toast__icon { flex-shrink: 0; }
.toast__content { flex: 1; }
.toast__action { font-weight: 600; color: #6366f1; padding: 4px 6px; border-radius: 4px; }
.toast__action:hover { background: rgba(99,102,241,.1); }
.toast__close { color: var(--gray-500, #6b7280); padding: 2px; }
.toast__close:hover { color: var(--gray-900, #111827); }
.toast--success { border-left-color: #10b981; }
.toast--success .toast__icon { color: #10b981; }
.toast--error { border-left-color: #ef4444; }
.toast--error .toast__icon { color: #ef4444; }
.toast--warning { border-left-color: #f59e0b; }
.toast--warning .toast__icon { color: #f59e0b; }
.toast--info { border-left-color: #3498db; }
.toast--info .toast__icon { color: #3498db; }

/* ─── Slide panels ──────────────────────────────────────────── */
.slide-panel {
  position: fixed; inset: 0;
  z-index: 70;
  pointer-events: none;
}
.slide-panel[data-state="open"] { pointer-events: auto; }
.slide-panel__overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.45);
  opacity: 0;
  transition: opacity .2s;
}
.slide-panel[data-state="open"] .slide-panel__overlay { opacity: 1; }
.slide-panel__content {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(460px, 100vw);
  background: var(--surface, #fff);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -10px 0 30px rgba(15,23,42,.15);
}
[data-theme="dark"] .slide-panel__content { background: #11141b; }
.slide-panel[data-state="open"] .slide-panel__content { transform: translateX(0); }
.slide-panel__header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--gray-100, #f3f4f6); }
[data-theme="dark"] .slide-panel__header { border-bottom-color: #1a1f29; }
.slide-panel__title { font-size: 15px; font-weight: 700; }
.slide-panel__close { padding: 6px; border-radius: 6px; color: var(--gray-500, #6b7280); }
.slide-panel__close:hover { background: var(--gray-100, #f3f4f6); }
.slide-panel__body { flex: 1; overflow-y: auto; padding: 16px; }
.slide-panel__footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--gray-100, #f3f4f6); }
[data-theme="dark"] .slide-panel__footer { border-top-color: #1a1f29; }

/* ─── Modal (centered) ──────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.modal[data-state="open"] { pointer-events: auto; opacity: 1; }
.modal__overlay { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.modal__content {
  position: relative;
  background: var(--surface, #fff);
  border-radius: 14px;
  width: min(720px, 92vw);
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px rgba(15,23,42,.3);
  transform: translateY(10px);
  transition: transform .2s ease;
}
.modal[data-state="open"] .modal__content { transform: translateY(0); }
.modal__content--large { width: min(900px, 95vw); }
.modal__content--sm { width: min(440px, 92vw); }
.modal__message { font-size: 14px; line-height: 1.55; color: var(--gray-700, #374151); margin: 0; }
[data-theme="dark"] .modal__message { color: #d1d5db; }
[data-theme="dark"] .modal__content { background: #11141b; }
.modal__header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--gray-100, #f3f4f6); }
[data-theme="dark"] .modal__header { border-bottom-color: #1a1f29; }
.modal__title { font-size: 15px; font-weight: 700; }
.modal__close { padding: 6px; color: var(--gray-500, #6b7280); border-radius: 6px; }
.modal__close:hover { background: var(--gray-100, #f3f4f6); }
.modal__body { padding: 16px; overflow-y: auto; flex: 1; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--gray-100, #f3f4f6); }
[data-theme="dark"] .modal__footer { border-top-color: #1a1f29; }

body.panel-open, body.modal-open { overflow: hidden; }

/* ─── Command palette ───────────────────────────────────────── */
.command-palette {
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.command-palette[data-state="open"] { pointer-events: auto; opacity: 1; }
.command-palette__overlay { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.command-palette__content {
  position: relative;
  margin: 80px auto 0;
  width: min(640px, 90vw);
  max-height: 70vh;
  background: var(--surface, #fff);
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(15,23,42,.3);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(-10px);
  transition: transform .15s ease;
}
.command-palette[data-state="open"] .command-palette__content { transform: translateY(0); }
[data-theme="dark"] .command-palette__content { background: #11141b; }
.command-palette__search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--gray-100, #f3f4f6); }
[data-theme="dark"] .command-palette__search { border-bottom-color: #1a1f29; }
.command-palette__input { flex: 1; border: 0; outline: 0; padding: 6px; font-size: 14px; background: transparent; color: inherit; }
.command-palette__results { overflow-y: auto; max-height: calc(70vh - 60px); padding: 6px; }
.command-palette__section-title { font-size: 11px; text-transform: uppercase; color: var(--gray-500, #6b7280); padding: 6px 8px; font-weight: 700; }
.command-palette__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; width: 100%; text-align: left; color: inherit; font-size: 13px; }
.command-palette__item kbd { margin-left: auto; }
.command-palette__item:hover, .command-palette__item.active { background: rgba(99,102,241,.1); }

/* ─── Charts ────────────────────────────────────────────────── */
.charts-section { display: flex; flex-direction: column; gap: 16px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1024px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-card .card__body { min-height: 200px; }
.chart-card--full .card__body { min-height: 240px; }
.chart-container { position: relative; }
.chart-container--tall { min-height: 220px; }

.bar-chart { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; min-height: 160px; padding: 8px 0; }
.bar-chart__bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-chart__bar-fill {
  width: 100%; min-height: 6px;
  height: calc(var(--height, 0%) * 1.4);
  max-height: 140px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 6px 6px 2px 2px;
  transition: height .3s ease;
}
.bar-chart__bar.complete .bar-chart__bar-fill { background: linear-gradient(180deg, #10b981, #059669); }
.bar-chart__bar.active .bar-chart__bar-fill { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
.bar-chart__label { font-size: 11px; color: var(--gray-500, #6b7280); font-weight: 600; }
.bar-chart__value { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pie-chart-placeholder { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
@media (max-width: 600px) { .pie-chart-placeholder { grid-template-columns: 1fr; } }
.pie-chart { width: 180px; height: 180px; }
.pie-chart-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.legend-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.legend-color { width: 10px; height: 10px; border-radius: 999px; }
.legend-value { font-variant-numeric: tabular-nums; color: var(--gray-500, #6b7280); }

.line-chart-placeholder { padding: 32px; text-align: center; color: var(--gray-500, #6b7280); }
.line-chart { width: 100%; height: 220px; }

/* ─── Heatmap ───────────────────────────────────────────────── */
.heatmap-container { position: relative; }
.heatmap-months { position: relative; height: 14px; margin-bottom: 4px; font-size: 10px; color: var(--gray-500, #6b7280); }
.heatmap-months span { position: absolute; }
.heatmap-grid-svg { display: block; max-width: 100%; }
rect.heatmap-cell { fill: var(--gray-100, #f3f4f6); }
rect.heatmap-cell[data-level="1"] { fill: rgba(99,102,241,.25); }
rect.heatmap-cell[data-level="2"] { fill: rgba(99,102,241,.5); }
rect.heatmap-cell[data-level="3"] { fill: rgba(99,102,241,.75); }
rect.heatmap-cell[data-level="4"] { fill: #6366f1; }
[data-theme="dark"] rect.heatmap-cell { fill: #1a1f29; }
.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--gray-500, #6b7280); }
.heatmap-legend__cell { width: 10px; height: 10px; border-radius: 2px; background: var(--gray-100, #f3f4f6); }
.heatmap-legend__cell[data-level="1"] { background: rgba(99,102,241,.25); }
.heatmap-legend__cell[data-level="2"] { background: rgba(99,102,241,.5); }
.heatmap-legend__cell[data-level="3"] { background: rgba(99,102,241,.75); }
.heatmap-legend__cell[data-level="4"] { background: #6366f1; }

/* ─── Period selector / export ──────────────────────────────── */
.period-selector { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; }
.period-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  background: transparent; color: var(--gray-700, #374151); font-weight: 600; font-size: 13px;
}
.period-btn:hover { background: var(--gray-100, #f3f4f6); }
.period-btn.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
[data-theme="dark"] .period-btn { color: #d1d5db; }
[data-theme="dark"] .period-btn:hover { background: #1f242f; }

.period-selector-inline { display: flex; gap: 4px; }
.period-btn-inline {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
  font-size: 12px; font-weight: 600;
}
.period-btn-inline.active { background: #6366f1; color: #fff; }

.export-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.export-option-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px;
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  color: var(--gray-700, #374151);
  transition: border-color .12s, transform .1s;
}
.export-option-btn:hover { border-color: #6366f1; transform: translateY(-1px); }
[data-theme="dark"] .export-option-btn { background: #14181f; border-color: #1f242f; color: #d1d5db; }
.export-option-btn__label { font-size: 13px; font-weight: 700; margin-top: 4px; }
.export-option-btn__description { font-size: 11px; color: var(--gray-500, #6b7280); }

.export-format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.export-format-card {
  cursor: pointer;
  display: block;
  padding: 12px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
  text-align: center;
}
.export-format-card:has(input:checked) { border-color: #6366f1; background: rgba(99,102,241,.08); }
.export-format-card__content { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.export-format-card__label { font-size: 12px; font-weight: 700; }
[data-theme="dark"] .export-format-card { background: #14181f; border-color: #1f242f; }

/* ─── CC Builder ────────────────────────────────────────────── */
.cc-builder-form { display: flex; flex-direction: column; gap: 8px; }
.form-section-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.cc-preview-box { background: var(--gray-900, #111827); color: #f3f4f6; border-radius: 8px; padding: 12px; }
.cc-preview-text { font-family: 'SF Mono', ui-monospace, monospace; font-size: 12px; white-space: pre-wrap; line-height: 1.6; }

/* ─── Notifications dot ─────────────────────────────────────── */
.badge[data-count]:after { content: attr(data-count); }
.badge[data-count="0"] { display: none; }

/* ─── Settings panel ────────────────────────────────────────── */
.settings-form { display: flex; flex-direction: column; gap: 18px; }
.settings-section {
  border: 1px solid var(--gray-100, #f3f4f6);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
[data-theme="dark"] .settings-section { border-color: #1f242f; }
.settings-section__title {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gray-500, #6b7280);
  padding: 0 4px;
}
.settings-section--danger { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.04); }
.settings-section--danger .settings-section__title { color: #ef4444; }
.settings-help { font-size: 12px; color: var(--gray-500, #6b7280); margin: 0; line-height: 1.5; }
[data-theme="dark"] .settings-help { color: #9ca3af; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-footer__hint { font-size: 12px; color: var(--gray-500, #6b7280); flex: 1; }

/* Segmented control (theme/language/sidebar choices) */
.seg-control {
  display: inline-flex;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
  padding: 3px;
  gap: 2px;
  width: 100%;
}
[data-theme="dark"] .seg-control { background: #0e1218; border-color: #1f242f; }
.seg-control__btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-700, #374151);
  background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s;
}
[data-theme="dark"] .seg-control__btn { color: #d1d5db; }
.seg-control__btn:hover { color: var(--gray-900, #111827); }
[data-theme="dark"] .seg-control__btn:hover { color: #fff; }
.seg-control__btn--active {
  background: #fff;
  color: var(--gray-900, #111827);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
[data-theme="dark"] .seg-control__btn--active { background: #1f242f; color: #fff; }
.seg-control__btn .icon { width: 14px; height: 14px; }

/* ─── Notifications popover ─────────────────────────────────── */
.header-action-btn--with-badge { position: relative; }
.header-action-btn__badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--surface, #fff);
}
[data-theme="dark"] .header-action-btn__badge { box-shadow: 0 0 0 2px #11141b; }

.notifications-popover {
  position: fixed; inset: 0;
  z-index: 75;
  /* Outer overlay laat clicks ALTIJD door zodat de bel-knop opnieuw klikbaar
     blijft en clicks buiten de panel gewoon de onderliggende UI bereiken.
     Alleen het panel zelf (zie hieronder) is interactief wanneer open. */
  pointer-events: none;
}
.notifications-popover__panel {
  position: absolute; top: 64px; right: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-100, #f3f4f6);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  display: flex; flex-direction: column;
  transform: translateY(-8px) scale(.98);
  opacity: 0;
  pointer-events: none; /* niet klikbaar zolang dicht */
  transition: transform .15s ease, opacity .15s ease;
}
.notifications-popover[data-state="open"] .notifications-popover__panel { pointer-events: auto; }
[data-theme="dark"] .notifications-popover__panel { background: #11141b; border-color: #1f242f; }
.notifications-popover[data-state="open"] .notifications-popover__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.notifications-popover__header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}
[data-theme="dark"] .notifications-popover__header { border-bottom-color: #1a1f29; }
.notifications-popover__title { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 700; font-size: 14px; }
.notifications-popover__title .icon { width: 16px; height: 16px; color: var(--gray-500, #6b7280); }
.notifications-popover__count {
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--gray-100, #f3f4f6); color: var(--gray-600, #4b5563);
}
[data-theme="dark"] .notifications-popover__count { background: #1f242f; color: #d1d5db; }
.notifications-popover__actions { display: flex; gap: 4px; }
.notifications-popover__list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.notifications-popover__empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--gray-500, #6b7280);
  font-size: 13px;
}
.notifications-popover__empty p { margin: 8px 0 4px; font-weight: 600; color: var(--gray-700, #374151); }
[data-theme="dark"] .notifications-popover__empty p { color: #d1d5db; }
.notifications-popover__empty span { font-size: 12px; }

.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  position: relative;
  cursor: default;
  transition: background .12s;
}
.notif-item:hover { background: var(--gray-50, #f9fafb); }
[data-theme="dark"] .notif-item:hover { background: #161b24; }
.notif-item--unread { background: rgba(99,102,241,.05); }
[data-theme="dark"] .notif-item--unread { background: rgba(99,102,241,.10); }
.notif-item__icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-item__icon .icon { width: 16px; height: 16px; }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title { font-size: 13px; font-weight: 600; color: var(--gray-900, #111827); line-height: 1.35; }
[data-theme="dark"] .notif-item__title { color: #e5e7eb; }
.notif-item__detail { font-size: 12px; color: var(--gray-500, #6b7280); margin-top: 2px; }
.notif-item__time { font-size: 11px; color: var(--gray-400, #9ca3af); margin-top: 4px; font-variant-numeric: tabular-nums; }
.notif-item__dot {
  position: absolute; right: 14px; top: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6366f1;
}

.btn-icon--sm { padding: 4px; }
.btn-icon--sm .icon { width: 14px; height: 14px; }

/* ─── Snippets sidebar card ─────────────────────────────────── */
.sidebar-snippets {
  padding: 12px 14px;
  border-top: 1px solid var(--gray-100, #f3f4f6);
}
[data-theme="dark"] .sidebar-snippets { border-top-color: #1a1f29; }
.sidebar-snippets__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.sidebar-snippets__header .sidebar-section__title { margin: 0; }
.snippets-list { display: flex; flex-direction: column; gap: 4px; }
.snippets-empty {
  font-size: 11px;
  color: var(--gray-400, #9ca3af);
  padding: 8px 4px;
  line-height: 1.4;
}
.snippet-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  color: var(--gray-700, #374151);
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background .12s, color .12s;
}
[data-theme="dark"] .snippet-item { color: #d1d5db; }
.snippet-item:hover {
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-900, #111827);
}
[data-theme="dark"] .snippet-item:hover { background: #1a1f29; color: #fff; }
.snippet-item .icon { width: 14px; height: 14px; color: var(--gray-400, #9ca3af); flex-shrink: 0; }
.snippet-item__name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.snippet-item__pin { width: 12px !important; height: 12px !important; color: #f59e0b !important; }

.snippets-seed-btn {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px dashed var(--gray-300, #d1d5db);
  background: transparent;
  font-size: 11px; font-weight: 500;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.snippets-seed-btn:hover {
  background: rgba(99,102,241,.05);
  color: var(--gray-800, #1f2937);
  border-color: #6366f1;
}
[data-theme="dark"] .snippets-seed-btn { border-color: #2a313e; color: #9ca3af; }
[data-theme="dark"] .snippets-seed-btn:hover { background: rgba(99,102,241,.10); color: #fff; }
.snippets-seed-btn .icon { width: 12px; height: 12px; color: #6366f1; }

.notif-item--clickable { cursor: pointer; }
.notif-item--clickable:active { background: rgba(99,102,241,.08); }

/* Hide snippets in collapsed sidebar */
.app-sidebar[data-state="collapsed"] .sidebar-snippets { display: none; }

/* ─── History panel (audit + snapshots) ─────────────────────── */
.slide-panel--wide .slide-panel__content { width: min(560px, 100vw); }
.history-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.history-tabs {
  display: flex; gap: 4px;
  background: var(--gray-100, #f3f4f6);
  padding: 4px; border-radius: 10px;
}
[data-theme="dark"] .history-tabs { background: #1a1f29; }
.history-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px;
  background: transparent;
  border: 0; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--gray-600, #4b5563);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.history-tab:hover { color: var(--gray-900, #111827); }
.history-tab.active {
  background: var(--surface, #fff);
  color: var(--gray-900, #111827);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
[data-theme="dark"] .history-tab { color: #9ca3af; }
[data-theme="dark"] .history-tab.active { background: #11141b; color: #fff; }
.history-tab .icon { width: 14px; height: 14px; }

.history-toolbar { display: flex; gap: 8px; align-items: center; }
.history-toolbar .form-select { flex: 1; }

.audit-list, .snapshots-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.audit-empty { padding: 24px 8px; text-align: center; color: var(--gray-500, #6b7280); font-size: 13px; }

.audit-item {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
}
[data-theme="dark"] .audit-item { background: #161b24; }
.audit-item__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.audit-item__icon .icon { width: 14px; height: 14px; }
.audit-item__body { flex: 1; min-width: 0; }
.audit-item__title { display: flex; gap: 8px; align-items: baseline; }
.audit-item__title strong { font-size: 13px; color: var(--gray-900, #111827); text-transform: capitalize; }
[data-theme="dark"] .audit-item__title strong { color: #e5e7eb; }
.audit-item__entity {
  font-size: 11px; color: var(--gray-500, #6b7280);
  background: var(--gray-100, #f3f4f6);
  padding: 1px 6px; border-radius: 4px;
}
[data-theme="dark"] .audit-item__entity { background: #1f242f; color: #9ca3af; }
.audit-item__summary { font-size: 12px; color: var(--gray-700, #374151); margin-top: 3px; word-break: break-word; }
[data-theme="dark"] .audit-item__summary { color: #d1d5db; }
.audit-item__time { font-size: 11px; color: var(--gray-400, #9ca3af); margin-top: 4px; font-variant-numeric: tabular-nums; }

.snapshot-item {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gray-50, #f9fafb);
}
[data-theme="dark"] .snapshot-item { background: #161b24; }
.snapshot-item__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(99,102,241,.10);
  color: #6366f1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.snapshot-item__icon .icon { width: 14px; height: 14px; }
.snapshot-item__body { flex: 1; min-width: 0; }
.snapshot-item__name { font-size: 12px; font-weight: 600; color: var(--gray-900, #111827); word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; }
[data-theme="dark"] .snapshot-item__name { color: #e5e7eb; }
.snapshot-item__meta { font-size: 11px; color: var(--gray-500, #6b7280); margin-top: 2px; font-variant-numeric: tabular-nums; }
.snapshot-item__actions { display: flex; gap: 2px; }

/* ─── Ticket autocomplete dropdown ─────────────────────────── */
.quick-ticket-group { position: relative; }
.ticket-suggest {
  position: absolute; left: 0; right: 0; top: 100%;
  margin-top: 4px;
  background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,.14);
  z-index: 70;
  max-height: 360px; overflow-y: auto;
  padding: 4px;
}
[data-theme="dark"] .ticket-suggest { background: #11141b; border-color: #1f242f; box-shadow: 0 12px 28px rgba(0,0,0,.5); }
.ticket-suggest[hidden] { display: none; }
.ticket-suggest__item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s;
}
.ticket-suggest__item:hover,
.ticket-suggest__item.is-active {
  background: rgba(99,102,241,.08);
}
[data-theme="dark"] .ticket-suggest__item:hover,
[data-theme="dark"] .ticket-suggest__item.is-active {
  background: rgba(99,102,241,.14);
}
.ticket-suggest__row {
  display: flex; align-items: baseline; gap: 8px;
}
.ticket-suggest__row strong {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--gray-900, #111827);
}
[data-theme="dark"] .ticket-suggest__row strong { color: #e5e7eb; }
.ticket-suggest__cat {
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(99,102,241,.10); color: #6366f1;
}
.ticket-suggest__hrs {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--gray-500, #6b7280);
  font-variant-numeric: tabular-nums;
}
.ticket-suggest__desc {
  font-size: 12px;
  color: var(--gray-600, #4b5563);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-theme="dark"] .ticket-suggest__desc { color: #9ca3af; }
.ticket-suggest__meta {
  font-size: 10px; color: var(--gray-400, #9ca3af);
  margin-top: 2px;
}

/* ─── Lockbox / submission block ────────────────────────────── */
.submission-block {
  margin-top: 14px; padding: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,.05), rgba(139,92,246,.05));
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 12px;
}
[data-theme="dark"] .submission-block {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.10));
  border-color: rgba(99,102,241,.30);
}
.submission-block__title {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 6px;
  font-size: 13px; font-weight: 700;
  color: var(--gray-900, #111827);
}
[data-theme="dark"] .submission-block__title { color: #e5e7eb; }
.submission-block__title .icon { width: 14px; height: 14px; color: #6366f1; }

.submission-row__locked, .submission-row__open {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin: 10px 0;
  border-radius: 10px;
  background: var(--surface, #fff);
}
[data-theme="dark"] .submission-row__locked,
[data-theme="dark"] .submission-row__open { background: #11141b; }
.submission-row__locked .icon { color: #f59e0b; width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.submission-row__open .icon { color: #6b7280; width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.submission-row__meta { font-size: 12px; color: var(--gray-500, #6b7280); margin-top: 2px; }
.submission-row__hash {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--gray-400, #9ca3af);
  margin-top: 3px;
  letter-spacing: .5px;
}
.submission-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Lock badge in registratie-rijen */
.badge--locked {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(245,158,11,.15); color: #92400e;
  text-transform: uppercase; letter-spacing: .3px;
  margin-left: 4px;
}
[data-theme="dark"] .badge--locked { background: rgba(245,158,11,.20); color: #fbbf24; }
.badge--locked .icon { width: 10px; height: 10px; }
.data-table__row--locked { opacity: 0.92; }
.data-table__row--locked .btn-icon--danger[disabled] { opacity: 0.3; cursor: not-allowed; }
