/* ============================================================
   CYBERFILOSOFIE — Design System
   Gebaseerd op Cyberperspectief Design System
   League Spartan (kop) + Open Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* --- Brand tokens (mode-onafhankelijk) --- */
:root {
  --color-accent:       #ff4a36;
  --color-accent-hover: #e03a28;
  --color-accent-soft:  rgba(255, 74, 54, 0.12);

  /* Light mode (standaard) */
  --color-bg-page:      #f4f4fa;
  --color-bg-surface:   #ffffff;
  --color-bg-sidebar:   #000029;
  --color-bg-sidebar-active: #0a0a3f;
  --color-bg-input:     #ffffff;
  --color-bg-hover:     #f0f0f8;

  --color-text-primary:   #1b1b2f;
  --color-text-secondary: #6b6b8a;
  --color-text-muted:     #a0a0c0;
  --color-text-on-dark:   #ffffff;
  --color-text-on-accent: #ffffff;
  --color-text-label:     #8888aa;

  --color-border:       #e5e5ef;
  --color-border-focus: #ff4a36;

  --color-success-bg:   #d1fae5;
  --color-success-text: #065f46;
  --color-success-dot:  #22c55e;
  --color-error-bg:     rgba(255, 74, 54, 0.08);
  --color-error-text:   #ff4a36;

  --shadow-sm:  0 1px 3px rgba(27, 27, 47, 0.06);
  --shadow-md:  0 4px 16px rgba(27, 27, 47, 0.10);

  /* Typography */
  --font-heading: 'League Spartan', sans-serif;
  --font-body:    'Open Sans', sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  /* Spacing (8px grid) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-pill: 999px;

  /* Layout */
  --sidebar-width:     192px;
  --header-height:     56px;
  --content-max-width: 1280px;
  --content-padding-x: 40px;
  --content-padding-y: 32px;
}

/* Dark mode — hierarchy mirrors Cyberassistent: sidebar darkest, page above it,
   cards/surfaces lightest. */
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg-page:      #000029;  /* navy — lighter than the sidebar */
  --color-bg-surface:   #0d1235;  /* cards/surfaces lift above the page */
  --color-bg-sidebar:   #00001f;  /* darkest element */
  --color-bg-sidebar-active: #1a1a4a;
  --color-bg-input:     #0d1235;
  --color-bg-hover:     #161840;

  --color-text-primary:   #e8e8f2;
  --color-text-secondary: #8080a8;
  --color-text-muted:     #5a5a7a;
  --color-text-label:     #6060a0;

  --color-border:       #1e2045;
  --color-success-bg:   rgba(34, 197, 94, 0.15);
  --color-success-text: #4ade80;
  --color-error-bg:     rgba(255, 74, 54, 0.15);
  --color-error-text:   #ff6b5a;

  --shadow-sm:  0 1px 3px rgba(0, 0, 20, 0.30);
  --shadow-md:  0 4px 16px rgba(0, 0, 20, 0.40);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-bg-sidebar);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
}
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: var(--content-padding-y) var(--content-padding-x);
  max-width: calc(var(--content-max-width) + var(--sidebar-width));
}

/* --- Sidebar --- */
.sidebar-logo {
  padding: var(--space-6) var(--space-4) var(--space-4);
  color: var(--color-text-on-dark);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sidebar-logo span { color: var(--color-accent); }
.sidebar-nav { flex: 1; padding: var(--space-2) var(--space-3); }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.70);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: var(--space-1);
}
.sidebar-nav-item:hover  { background: rgba(255,255,255,0.06); color: #ffffff; text-decoration: none; }
.sidebar-nav-item.active { background: var(--color-bg-sidebar-active); color: #ffffff; }
.sidebar-nav-section {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: var(--space-4) var(--space-3) var(--space-1);
}
.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* --- Buttons --- */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}
.btn-primary:hover { background: var(--color-accent-hover); text-decoration: none; color: white; }
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--color-text-secondary); background: var(--color-bg-hover); text-decoration: none; }
.btn-danger {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: var(--color-accent-soft); }

/* --- Inputs --- */
.input, .textarea, select.input {
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  width: 100%;
  transition: border-color 0.15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--color-border-focus); }
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted); }
.textarea { resize: vertical; min-height: 100px; }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}
.form-group { margin-bottom: var(--space-5); }

/* --- Cards --- */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-error   { background: var(--color-error-bg);   color: var(--color-error-text); }
.badge-muted   { background: var(--color-bg-hover);   color: var(--color-text-secondary); }

/* --- Progress bar --- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--color-accent);
  transition: width 0.3s ease;
  z-index: 100;
}

/* --- Labels --- */
.label-section {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-label);
}

/* --- Flash messages --- */
.flash { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-4); font-size: var(--text-sm); }
.flash-error   { background: var(--color-error-bg);   color: var(--color-error-text); }
.flash-success { background: var(--color-success-bg); color: var(--color-success-text); }

/* --- Sessie-type kaarten (homepage) --- */
.sessie-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.sessie-type-card {
  background: var(--color-bg-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  display: block;
}
.sessie-type-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.sessie-type-card .type-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  line-height: 0;
}
.sessie-type-card .type-naam {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.sessie-type-card .type-omschrijving {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.sessie-type-card .type-tag {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Stap indicator --- */
.stap-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.stap-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-heading);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all 0.2s;
}
.stap-dot.actief { border-color: var(--color-accent); background: var(--color-accent); color: white; }
.stap-dot.klaar  { border-color: var(--color-success-dot); background: var(--color-success-dot); color: white; }
.stap-lijn { flex: 1; height: 2px; background: var(--color-border); }

/* --- Theme toggle (sidebar) --- */
.theme-toggle {
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
}
.theme-icon-sun  { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun  { display: block; }

/* --- Mobile menu (hamburger) — hidden on desktop --- */
.mobile-menu-btn { display: none; }
.sidebar-backdrop { display: none; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; z-index: 50; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: var(--space-4); padding-top: 60px; }
  .sessie-type-grid { grid-template-columns: 1fr; }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    z-index: 40;
  }
  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 20, 0.5);
    z-index: 45;
  }
}
