/* ============================================================
   InterOne — Design System
   Palette: cool-neutral light / maritime navy sidebar / copper-amber accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --sidebar-bg:       #1B2A3B;
  --sidebar-border:   rgba(255,255,255,0.07);
  --sidebar-text:     #7A98B2;
  --sidebar-active:   rgba(232,117,10,0.13);
  --sidebar-hover:    rgba(255,255,255,0.05);
  --sidebar-accent:   #E8750A;
  --sidebar-width:    240px;

  --ground:           #EFF1F5;
  --surface:          #FFFFFF;
  --surface-hover:    #F7F9FB;

  --text:             #1A2536;
  --text-2:           #4B5668;
  --text-muted:       #8896A7;
  --text-placeholder: #B0BDCC;

  --accent:           #E8750A;
  --accent-hover:     #CE6608;
  --accent-light:     #FFF3E6;
  --accent-border:    #F9C490;

  --blue:             #1D6FCC;
  --blue-light:       #EBF3FF;
  --blue-border:      #93C5FD;

  --green:            #16A34A;
  --green-light:      #F0FDF4;
  --green-border:     #86EFAC;

  --orange:           #C2410C;
  --orange-light:     #FFF7ED;
  --orange-border:    #FDBA74;

  --red:              #DC2626;
  --red-light:        #FEF2F2;
  --red-border:       #FCA5A5;

  --purple-light:     #F3F0FF;
  --purple:           #7C3AED;

  --border:           #E1E7EF;
  --border-strong:    #C9D3DF;

  --font:             'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:        'JetBrains Mono', 'SF Mono', monospace;

  --r-sm:  6px;
  --r:     10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-ful: 9999px;

  --sh-sm: 0 1px 3px rgba(26,37,54,.06), 0 1px 2px rgba(26,37,54,.04);
  --sh:    0 2px 8px rgba(26,37,54,.08), 0 1px 3px rgba(26,37,54,.05);
  --sh-lg: 0 8px 24px rgba(26,37,54,.10), 0 2px 8px rgba(26,37,54,.06);
  --sh-focus: 0 0 0 3px rgba(232,117,10,.22);

  --t: 150ms ease;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--ground); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; }

/* ── App shell ──────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  padding: 0;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  background: #fff;
}
.sidebar-logo-inner {
  background: transparent;
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-logo img {
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(122,152,178,.45);
  padding: 12px 10px 4px;
  margin-top: 4px;
}
.nav-group-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item.active .nav-icon { color: var(--sidebar-accent); }

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--sidebar-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-ful);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t);
}
.sidebar-user:hover { background: var(--sidebar-hover); }

/* ── Main content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-left h1 { font-size: 1.0625rem; font-weight: 700; line-height: 1.2; }
.topbar-subtitle { font-size: .8125rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.ham-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r);
  color: var(--text);
  flex-shrink: 0;
}
.ham-btn:hover { background: var(--border); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

.page-body { flex: 1; padding: 32px; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-ful);
  background: var(--sidebar-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.blue { background: var(--blue); }
.avatar.green { background: var(--green); }

.user-name-text { font-size: .8125rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-text { font-size: .75rem; color: var(--sidebar-text); }

/* ── Stat cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue   { background: var(--blue-light); color: var(--blue); }
.stat-icon.amber  { background: var(--accent-light); color: var(--accent); }
.stat-icon.green  { background: var(--green-light); color: var(--green); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }

.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: .875rem; color: var(--text-muted); font-weight: 500; }
.stat-sub   { font-size: .75rem; color: var(--text-placeholder); margin-top: 2px; }
.stat-link  {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8125rem; font-weight: 600; color: var(--accent);
  margin-top: 10px; cursor: pointer;
  transition: gap var(--t);
}
.stat-link:hover { gap: 8px; }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: .9375rem; font-weight: 700; }
.card-link  { font-size: .8125rem; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.card-body  { padding: 0; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: var(--r-ful);
  white-space: nowrap;
}
.badge-gepland       { background: var(--blue-light); color: var(--blue); }
.badge-onderweg      { background: var(--orange-light); color: var(--orange); }
.badge-in_uitvoering { background: var(--accent-light); color: #9A4E00; }
.badge-afgerond      { background: var(--green-light); color: var(--green); }
.badge-geannuleerd   { background: var(--red-light); color: var(--red); }

.badge-prio-laag   { background: var(--green-light); color: var(--green); }
.badge-prio-normaal{ background: var(--blue-light); color: var(--blue); }
.badge-prio-hoog   { background: var(--orange-light); color: var(--orange); }
.badge-prio-spoed  { background: var(--red); color: #fff; }

/* verzoek type */
.badge-materiaal  { background: var(--blue-light);   color: var(--blue); }
.badge-gereedschap{ background: var(--accent-light);  color: #9A4E00; }
/* verzoek status */
.badge-ingediend     { background: var(--blue-light);   color: var(--blue); }
.badge-in_behandeling{ background: var(--orange-light); color: var(--orange); }
.badge-goedgekeurd   { background: var(--green-light);  color: var(--green); }
.badge-afgewezen     { background: var(--red-light);    color: var(--red); }
.badge-geleverd      { background: var(--purple-light); color: var(--purple); }
/* Storingen status */
.badge-str-open          { background: var(--red-light);    color: var(--red); }
.badge-str-in_behandeling{ background: var(--orange-light); color: var(--orange); }
.badge-str-opgelost      { background: var(--green-light);  color: var(--green); }
.badge-str-gesloten      { background: var(--ground);       color: var(--text-muted); border:1px solid var(--border); }
/* Storingen type */
.badge-str-type-gereedschap  { background: var(--blue-light);    color: var(--blue); }
.badge-str-type-voertuig     { background: var(--orange-light);  color: var(--orange); }
.badge-str-type-locatie      { background: var(--purple-light);  color: var(--purple); }
.badge-str-type-installatie  { background: var(--green-light);   color: var(--green); }
.badge-str-type-anders       { background: var(--ground);        color: var(--text-2); border:1px solid var(--border); }

/* ── Verzoeken form ─────────────────────────────────────── */
.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 2px; }
.type-option {
  border: 2px solid var(--border); border-radius: var(--r-lg);
  padding: 14px 12px; text-align: center; cursor: pointer;
  transition: all var(--t);
}
.type-option:hover { border-color: var(--accent); }
.type-option.selected { border-color: var(--accent); background: var(--accent-light); }
.type-option svg { width: 26px; height: 26px; display: block; margin: 0 auto 7px; }
.type-option .type-lbl { font-weight: 700; font-size: .875rem; }
.type-option .type-sub { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

.urgentie-row { display: flex; gap: 6px; flex-wrap: wrap; }
.urgentie-opt {
  padding: 5px 14px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid var(--border); font-size: .8125rem; font-weight: 600;
  transition: all var(--t);
}
.urgentie-opt:hover { border-color: var(--border-strong); }
.urgentie-opt.sel-laag    { background: var(--green-light);   border-color: var(--green-border);  color: var(--green); }
.urgentie-opt.sel-normaal { background: var(--blue-light);    border-color: var(--blue-border);   color: var(--blue); }
.urgentie-opt.sel-hoog    { background: var(--orange-light);  border-color: var(--orange-border); color: var(--orange); }
.urgentie-opt.sel-spoed   { background: var(--red);           border-color: var(--red);           color: #fff; }

/* ── Verzoek cards ──────────────────────────────────────── */
.verzoek-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 10px; align-items: start;
  transition: border-color var(--t); cursor: pointer;
}
.verzoek-card:hover { border-color: var(--border-strong); }
.verzoek-card.urgentie-spoed { border-left: 3px solid var(--red); }
.verzoek-card.urgentie-hoog  { border-left: 3px solid var(--orange); }
.verzoek-omschrijving { font-size: .9375rem; font-weight: 700; margin-bottom: 4px; }
.verzoek-meta { font-size: .8125rem; color: var(--text-muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.verzoek-reactie { font-size: .8125rem; background: var(--green-light); border: 1px solid var(--green-border); border-radius: var(--r-sm); padding: 6px 10px; margin-top: 8px; color: var(--green); }
.verzoek-reactie-rej { background: var(--red-light); border-color: var(--red-border); color: var(--red); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  font-family: var(--font); font-size: .875rem; font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,117,10,.28);
}
.btn-secondary {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--ground); }
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: transparent;
}
.btn-ghost:hover { background: var(--ground); color: var(--text); }
.btn-danger {
  background: var(--red-light); color: var(--red); border-color: var(--red-border);
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success {
  background: var(--green); color: #fff; border-color: var(--green);
}
.btn-success:hover { background: #138A3E; }

.btn-sm { font-size: .8125rem; padding: 6px 12px; }
.btn-lg { font-size: 1rem; padding: 12px 24px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.sm { width: 30px; height: 30px; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.form-label {
  display: block;
  font-size: .875rem; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.form-label.req::after { content: ' *'; color: var(--red); }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font); font-size: .9rem;
  color: var(--text); background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: var(--sh-focus);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-placeholder); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint  { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 4px; }

/* ── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--ground);
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .875rem; color: var(--text-2);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t); cursor: pointer; }
.table tbody tr:hover { background: var(--surface-hover); }

/* Work order ID chip */
.wb-id {
  font-family: var(--font-mono);
  font-size: .8125rem; font-weight: 500;
  color: var(--text);
  background: var(--ground);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ── Filter / search bar ────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center;
  gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-muted);
  pointer-events: none;
}
.search-wrap input {
  width: 260px;
  padding: 8px 12px 8px 32px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font); font-size: .875rem;
  background: var(--surface); outline: none;
  transition: border-color var(--t);
}
.search-wrap input:focus { border-color: var(--accent); }

/* ── Page header ────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 { font-size: 1.375rem; font-weight: 800; }
.page-header p  { font-size: .875rem; color: var(--text-muted); margin-top: 2px; }

/* ── Grids ──────────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* Dashboard specific grid */
.dash-mid { display: grid; grid-template-columns: 1fr 280px 240px; gap: 20px; }
.dash-bot { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Werkbon list rows ──────────────────────────────────── */
.wb-row {
  display: flex; align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  cursor: pointer;
  transition: background var(--t);
}
.wb-row:last-child { border-bottom: none; }
.wb-row:hover { background: var(--surface-hover); }
.wb-row-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.wb-row-indicator { width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.wb-row-indicator.gepland       { background: var(--blue); }
.wb-row-indicator.onderweg      { background: var(--orange); }
.wb-row-indicator.in_uitvoering { background: var(--accent); }
.wb-row-indicator.afgerond      { background: var(--green); }
.wb-row-id { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.wb-row-title { font-weight: 600; font-size: .875rem; color: var(--text); }
.wb-row-client { font-size: .8125rem; color: var(--text-muted); }

/* ── Planning timeline rows ─────────────────────────────── */
.plan-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.plan-row:last-child { border-bottom: none; }
.plan-time { font-size: .875rem; font-weight: 700; color: var(--text-muted); font-family: var(--font-mono); width: 48px; flex-shrink: 0; }
.plan-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.plan-dot.gepland       { background: var(--blue); }
.plan-dot.onderweg      { background: var(--orange); }
.plan-dot.in_uitvoering { background: var(--accent); }
.plan-dot.afgerond      { background: var(--green); }
.plan-info { flex: 1; min-width: 0; }
.plan-wb   { font-weight: 600; font-size: .875rem; }
.plan-meta { font-size: .8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* ── Status track (the aesthetic signature) ─────────────── */
.status-track {
  display: flex; align-items: center;
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--ground);
  border-radius: var(--r);
  overflow: hidden;
}
.track-step {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  position: relative;
}
.track-line {
  position: absolute; top: 14px; left: 50%; right: -50%;
  height: 2px; background: var(--border);
  z-index: 0;
}
.track-step:last-child .track-line { display: none; }
.track-line.done { background: var(--green); }
.track-line.active { background: linear-gradient(90deg, var(--green), var(--accent)); }

.track-node {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  z-index: 1; position: relative;
  transition: all .3s ease;
}
.track-node svg { width: 13px; height: 13px; }
.track-step.done .track-node { border-color: var(--green); background: var(--green); color: #fff; }
.track-step.active .track-node {
  border-color: var(--accent); background: var(--accent); color: #fff;
  box-shadow: 0 0 0 5px var(--accent-light);
  animation: nodePulse 2s infinite;
}
.track-label { font-size: .72rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.track-step.done .track-label   { color: var(--green); }
.track-step.active .track-label { color: var(--accent); }

@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 5px var(--accent-light); }
  50%       { box-shadow: 0 0 0 10px rgba(232,117,10,.08); }
}

/* ── Uren progress ──────────────────────────────────────── */
.progress { height: 6px; background: var(--ground); border-radius: var(--r-ful); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--r-ful); background: var(--accent); transition: width .5s ease; }
.progress-bar.blue  { background: var(--blue); }
.progress-bar.green { background: var(--green); }

/* ── Divider ────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); gap: 2px; margin-bottom: 20px; }
.tab {
  padding: 10px 16px;
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--t); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Notif button ───────────────────────────────────────── */
.notif-btn {
  position: relative; width: 36px; height: 36px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: all var(--t);
}
.notif-btn:hover { border-color: var(--border-strong); color: var(--text); }
.notif-btn svg { width: 17px; height: 17px; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  border: 1.5px solid #fff;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--text); color: #fff;
  padding: 12px 16px; border-radius: var(--r);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--sh-lg);
  animation: toastIn .2s ease;
  max-width: 300px;
}
.toast.ok      { background: var(--green); }
.toast.err     { background: var(--red); }
.toast.warning { background: var(--accent); }

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,37,54,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-size: 1rem; font-weight: 700; }
.modal-body   { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* ── Checkbox list ──────────────────────────────────────── */
.check-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.check-item:last-child { border-bottom: none; }
.check-item input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}
.check-item label { font-size: .875rem; flex: 1; cursor: pointer; }
.check-item label.done { text-decoration: line-through; color: var(--text-muted); }

/* ── Signature canvas ───────────────────────────────────── */
.sig-wrap {
  border: 1.5px solid var(--border); border-radius: var(--r);
  background: #FAFAFA;
  position: relative; overflow: hidden;
}
.sig-wrap canvas { display: block; cursor: crosshair; touch-action: none; }
.sig-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-placeholder); font-size: .875rem;
  pointer-events: none;
}

/* ── Planning calendar ──────────────────────────────────── */
.cal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cal-head {
  display: grid;
  grid-template-columns: 64px repeat(5,1fr);
  background: var(--ground);
  border-bottom: 2px solid var(--border);
}
.cal-head-cell {
  padding: 12px 8px;
  font-size: .8125rem; font-weight: 700; text-align: center;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
}
.cal-head-cell:last-child { border-right: none; }
.cal-head-cell.today { color: var(--accent); }

.cal-body  { position: relative; }
.cal-grid-row {
  display: grid;
  grid-template-columns: 64px repeat(5,1fr);
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.cal-grid-row:last-child { border-bottom: none; }
.cal-time-cell {
  padding: 6px 8px 0;
  font-size: .75rem; font-weight: 600; font-family: var(--font-mono);
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.cal-day-cell {
  border-right: 1px solid var(--border);
  padding: 4px;
  position: relative;
}
.cal-day-cell:last-child { border-right: none; }
.cal-day-cell.today { background: rgba(232,117,10,.025); }
.cal-event {
  border-radius: 5px; padding: 4px 8px;
  font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: all var(--t);
  margin-bottom: 3px; line-height: 1.3;
}
.cal-event:hover { transform: translateY(-1px); box-shadow: var(--sh); }
.cal-event.gepland { background: var(--blue-light); color: var(--blue); border-left: 3px solid var(--blue); }
.cal-event.in_uitvoering { background: var(--accent-light); color: #9A4E00; border-left: 3px solid var(--accent); }
.cal-event.afgerond { background: var(--green-light); color: var(--green); border-left: 3px solid var(--green); }
.cal-event.onderweg { background: var(--orange-light); color: var(--orange); border-left: 3px solid var(--orange); }

/* ── Message rows ───────────────────────────────────────── */
.msg-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--t);
}
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: var(--surface-hover); }
.msg-row.unread { background: var(--accent-light); }
.msg-row.unread:hover { background: #fdecd7; }
.msg-body { flex: 1; min-width: 0; }
.msg-from { font-weight: 700; font-size: .875rem; }
.msg-preview { font-size: .8125rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.msg-time { font-size: .75rem; color: var(--text-placeholder); white-space: nowrap; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); transition: color var(--t); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border-strong); }

/* ── Empty state ────────────────────────────────────────── */
.empty {
  text-align: center; padding: 48px 32px;
  color: var(--text-muted);
}
.empty svg { width: 40px; height: 40px; margin: 0 auto 14px; opacity: .3; }
.empty h3  { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty p   { font-size: .875rem; max-width: 240px; margin: 0 auto 16px; }

/* ── Login page ─────────────────────────────────────────── */
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 420px 1fr; }
.login-panel {
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.login-panel::after {
  content: '';
  position: absolute; bottom: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,117,10,.18) 0%, transparent 70%);
  pointer-events: none;
}
.login-panel::before {
  content: '';
  position: absolute; top: -60px; left: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,111,204,.15) 0%, transparent 70%);
  pointer-events: none;
}
.login-brand { margin-bottom: auto; }
.login-brand img { height: 36px; }
.login-tagline { margin-top: auto; padding-top: 40px; }
.login-tagline h2 { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 10px; }
.login-tagline p  { font-size: .9rem; color: var(--sidebar-text); line-height: 1.6; }

.login-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--ground);
}
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.login-box > p { font-size: .9rem; color: var(--text-muted); margin-bottom: 32px; }

.demo-accounts {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: .8125rem;
}
.demo-accounts strong { color: var(--blue); display: block; margin-bottom: 4px; }
.demo-accounts code {
  font-family: var(--font-mono); font-size: .8rem;
  background: rgba(29,111,204,.1); padding: 2px 6px; border-radius: 3px;
  color: var(--blue);
}

/* ── Admin stats row ────────────────────────────────────── */
.kpi-row {
  display: flex; gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.kpi {
  flex: 1; text-align: center;
  padding: 8px 4px;
  border-radius: var(--r-sm);
}
.kpi-val  { font-size: 1.25rem; font-weight: 800; }
.kpi-lbl  { font-size: .75rem; color: var(--text-muted); font-weight: 500; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2,1fr); }
  .dash-mid { grid-template-columns: 1fr 260px; }
  .dash-mid > :last-child { display: none; }
}
@media (max-width: 1024px) {
  .g3 { grid-template-columns: repeat(2,1fr); }
  .dash-mid { grid-template-columns: 1fr; }
  .dash-bot { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .page-body { padding: 16px; }
  .topbar { padding: 0 16px; }
  .ham-btn { display: flex; }
  .login-layout { grid-template-columns: 1fr; }
  .login-panel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Photo grid (werkbon foto's) ────────────────────────── */
.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.foto-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  background: var(--ground);
  border: 1px solid var(--border);
}
.foto-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .2s;
}
.foto-thumb:hover img { transform: scale(1.06); }
.foto-del {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  transition: background var(--t);
}
.foto-del:hover { background: var(--red); }
.foto-add-label {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--text-muted);
  font-size: .75rem; font-weight: 600;
  gap: 5px;
  transition: all var(--t);
}
.foto-add-label:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.foto-add-label svg { width: 22px; height: 22px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 2000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%; max-height: 80vh;
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  object-fit: contain;
}
.lightbox-name {
  color: rgba(255,255,255,.6);
  font-size: .875rem; margin-top: 12px;
}
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  display: flex; justify-content: space-between;
  width: 100%; padding: 0 16px;
  pointer-events: none;
}
.lightbox-btn {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border: none; border-radius: 50%;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  pointer-events: all;
  transition: background var(--t);
}
.lightbox-btn:hover { background: rgba(255,255,255,.3); }

/* ── Daguren page ───────────────────────────────────────── */
.day-nav {
  display: flex; align-items: center; gap: 10px;
}
.day-label {
  font-weight: 700; font-size: 1rem;
  min-width: 220px; text-align: center;
}
.dag-entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  transition: border-color var(--t);
}
.dag-entry-card:hover { border-color: var(--border-strong); }
.dag-entry-main { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; align-items: end; }
.dag-entry-meta { font-size: .8125rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.dag-entry-val  { font-size: .9375rem; font-weight: 700; color: var(--text); }
.dag-totaal-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dag-tot-val { font-size: 1.5rem; font-weight: 800; }
.dag-tot-lbl { font-size: .8125rem; color: var(--text-muted); margin-top: 2px; }

/* ── Monteur chips (multiple assignees) ─────────────────── */
.monteur-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.monteur-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-light); border: 1px solid var(--blue-border);
  color: var(--text); border-radius: 99px;
  padding: 4px 10px 4px 4px; font-size: .8125rem; font-weight: 600;
}
.monteur-chip .avatar { width: 22px; height: 22px; font-size: .65rem; flex-shrink: 0; }

/* ── Voertuig badge on werkbon ──────────────────────────── */
.voertuig-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.voertuig-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ground); border: 1px solid var(--border);
  border-radius: var(--r); padding: 6px 12px;
  font-size: .8125rem; font-weight: 600;
}
.voertuig-badge svg { color: var(--text-muted); }
.voertuig-badge .kenteken {
  font-family: var(--font-mono); font-size: .8rem;
  background: #FFDE00; color: #000; border-radius: 3px;
  padding: 1px 6px; letter-spacing: .06em;
}

/* ── Checkbox grid (form: monteur multi-select) ─────────── */
.check-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px; margin-top: 4px;
}
.check-grid-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--r); cursor: pointer;
  transition: all var(--t); user-select: none;
}
.check-grid-item:hover { border-color: var(--accent); background: var(--accent-light); }
.check-grid-item.selected { border-color: var(--accent); background: var(--accent-light); }
.check-grid-item input[type="checkbox"] { display: none; }
.check-grid-item .avatar { width: 30px; height: 30px; font-size: .75rem; flex-shrink: 0; }
.check-grid-item span { font-size: .875rem; font-weight: 600; }

/* ── Team pill (quick-fill selector) ────────────────────── */
.team-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.team-pill {
  padding: 5px 14px; border-radius: 99px; border: 1.5px solid transparent;
  font-size: .8125rem; font-weight: 700; cursor: pointer;
  transition: all var(--t);
}
.team-pill:hover { opacity: .85; }

/* Login panel logo container */
.login-logo-wrap {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
}
.login-logo-wrap img { width: 260px; height: auto; display: block; filter: brightness(0) invert(1); }

/* ── Verlof badges ──────────────────────────────────────── */
.badge-vl-type-ziekte   { background:#FEE2E2;color:#DC2626 }
.badge-vl-type-verlof   { background:#EBF3FF;color:#1D6FCC }
.badge-vl-type-vakantie { background:#D1FAE5;color:#059669 }
.badge-vl-aangevraagd   { background:#FEF9C3;color:#A16207;border:1px solid #FDE68A }
.badge-vl-goedgekeurd   { background:#D1FAE5;color:#059669 }
.badge-vl-afgewezen     { background:#FEE2E2;color:#DC2626 }
