/* ============================================================
   SCHOONGENOEG PLATFORM v3.0 — VOLLEDIG SCHERM
   ============================================================ */

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

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #e30613;
  --accent-hover: #b50010;
  --green: #16a34a;
  --red: #e30613;
  --orange: #f59e0b;
  --purple: #7c3aed;
  --blue: #e30613;
  --bg: #f1f5f9;
  --card: #ffffff;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.14), 0 8px 16px rgba(0,0,0,0.08);
  --sidebar-w: 285px;
  --topbar-h: 56px;
  --bottom-h: 42px; /* hoogte excl. safe-area — v9.14.7 */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

html, body { height: 100%; width: 100%; overflow: hidden; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }

/* ============ LOGO ============ */
.sg-logo-wrap { width: 80px; height: 80px; border-radius: 12px; overflow: hidden; margin: 0 auto; background: #111; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sg-logo-wrap.small { width: 54px; height: 54px; }
.sg-logo-wrap.mini { width: 36px; height: 36px; border-radius: 8px; }
.sg-logo-img { width: 100%; height: 100%; object-fit: contain; }
.sg-logo-fallback { color: white; font-size: 1.4rem; font-weight: 800; letter-spacing: -1px; }

/* ============ SPLASH ============ */
.splash {
  position: fixed; inset: 0;
  background: #0f172a;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; z-index: 1000;
  transition: opacity .4s ease, background .35s ease;
}
.splash-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash-sub {
  color: rgba(255,255,255,.5);
  font-size: .9rem; letter-spacing: 4px; text-transform: uppercase;
  transition: color .3s;
}
.splash-loader { width: 40px; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.splash-loader div { height: 100%; background: var(--accent,#e30613); border-radius: 2px; animation: splashLoad 1.6s infinite; }
@keyframes splashLoad { 0%{width:0%} 60%{width:100%} 100%{width:100%;opacity:0} }


/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN — v2.0  (schone lichte kaart, geen donkere kaders)
   ═══════════════════════════════════════════════════════════════ */
.screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0f172a;
  overflow-y: auto;
}
.login-bg {
  position: absolute; inset: 0;
  background: linear-gradient(145deg,#0f172a 0%,#1a0608 50%,#0f172a 100%);
  pointer-events: none;
}
/* Subtiele achtergrond-animatie */
.login-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 30% 20%, rgba(227,6,19,.08), transparent),
              radial-gradient(ellipse 40% 40% at 80% 80%, rgba(227,6,19,.08), transparent);
}

/* ── Loginkaart — altijd wit, NOOIT donker ── */
.login-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 0;
  width: 100%;
  max-width: 400px;
  max-height: 96vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.login-card::-webkit-scrollbar { width: 4px; }
.login-card::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* ── Header (donkere banner bovenaan kaart) ── */
.lc-header {
  background: linear-gradient(145deg,#0a0a0a,#1a1a1a);
  padding: 28px 24px 24px;
  border-radius: 20px 20px 0 0;
  text-align: center;
}
.lc-logo-wrap {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: #111;
  border: 2px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  cursor: default;
}
.lc-logo-img { width: 52px; height: 52px; object-fit: contain; }
.lc-brand {
  font-size: 1.4rem; font-weight: 800; color: #ffffff; letter-spacing: -.5px;
}
.lc-brand span { color: #e30613; }
.lc-tagline {
  font-size: .68rem; color: rgba(255,255,255,.4);
  letter-spacing: 1.5px; text-transform: uppercase; margin-top: 4px;
  cursor: default; user-select: none;
}

/* ── Formulier ── */
.lc-form {
  padding: 20px 20px 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.lc-field { display: flex; flex-direction: column; gap: 5px; }
.lc-label {
  font-size: .72rem; font-weight: 700;
  color: #64748b; text-transform: uppercase; letter-spacing: .06em;
}
.lc-input-wrap {
  position: relative;
}
.lc-input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: .82rem; pointer-events: none;
}
.lc-input {
  width: 100%;
  padding: 11px 12px 11px 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit; font-size: .88rem;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-sizing: border-box;
}
.lc-input:focus {
  border-color: var(--wl-primary,#e30613);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(227,6,19,.10);
}
.lc-input::placeholder { color: #94a3b8; }
.lc-pwd-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: .85rem; padding: 4px;
}
.lc-pwd-toggle:hover { color: #475569; }

/* ── Inloggen knop ── */
.lc-login-btn {
  width: 100%; padding: 13px;
  background: #e30613; color: white;
  border: none; border-radius: 11px;
  font-size: .92rem; font-weight: 800; font-family: inherit;
  cursor: pointer; letter-spacing: -.1px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .12s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(227,6,19,.3);
}
.lc-login-btn:hover { background: #c5000f; box-shadow: 0 6px 18px rgba(227,6,19,.38); }
.lc-login-btn:active { transform: scale(.98); }

/* ── Wachtwoord vergeten ── */
.lc-forgot { text-align: center; }
.lc-forgot a {
  font-size: .78rem; color: #64748b; text-decoration: none;
  transition: color .15s;
}
.lc-forgot a:hover { color: var(--wl-primary,#e30613); }

/* ── Registratie-link blok ── */
.lc-register-wrap {
  padding: 4px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lc-register-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.lc-register-divider::before,
.lc-register-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.lc-register-divider span {
  font-size: .68rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: .06em;
  white-space: nowrap;
  text-transform: uppercase;
}
.lc-register-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: #0f172a;
  color: #f1f5f9;
  border: 2px solid #1e293b;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.lc-register-btn:hover {
  background: #1e293b;
  border-color: #334155;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  transform: translateY(-1px);
}
.lc-register-btn:active { transform: scale(.98); }
.lc-register-btn i {
  font-size: .85rem;
  color: #38bdf8;
}
.lc-register-sub {
  font-size: .7rem;
  color: #94a3b8;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* ── Divider ── */
.lc-divider {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 20px 0;
}
.lc-divider::before, .lc-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.lc-divider span {
  font-size: .65rem; font-weight: 800; color: #94a3b8;
  letter-spacing: .08em; white-space: nowrap;
}

/* ── Pakket tabs ── */
.lc-pkg-tabs {
  display: flex; gap: 4px;
  padding: 10px 20px 0;
}
.lc-pkg-tab {
  flex: 1; padding: 8px 6px;
  background: #f1f5f9; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: .72rem; font-weight: 700;
  color: #64748b; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .15s;
}
.lc-pkg-tab:hover { background: #e2e8f0; color: #334155; }
.lc-pkg-tab.active {
  background: #0f172a; color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ── Tab panes ── */
.lc-tab-pane { display: none; padding: 10px 20px 4px; }
.lc-tab-pane.active { display: block; }

/* ── Pakket info banner ── */
.lc-pkg-info {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 12px; padding: 12px;
  margin-bottom: 10px;
}
.lc-pkg-info-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.lc-pkg-info-title {
  font-size: .8rem; font-weight: 800; color: #0f172a; margin-bottom: 5px;
}
.lc-pkg-info-sub {
  font-size: .72rem; color: #64748b; line-height: 1.4;
}
.lc-pkg-info-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.lc-chip {
  background: rgba(227,6,19,.08); color: var(--wl-primary,#e30613);
  border: 1px solid rgba(227,6,19,.25);
  border-radius: 20px; padding: 2px 8px;
  font-size: .65rem; font-weight: 700;
  white-space: nowrap;
}

/* ── Rol knoppen grid ── */
.lc-role-grid {
  display: grid; gap: 7px; margin-bottom: 6px;
}
.lc-3col { grid-template-columns: repeat(3, 1fr); }
.lc-2col { grid-template-columns: repeat(2, 1fr); }

.lc-role-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 6px 8px;
  background: #ffffff; border: 1.5px solid #e2e8f0;
  border-radius: 12px; cursor: pointer; font-family: inherit;
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
  text-align: center;
}
.lc-role-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.lc-role-btn:active { transform: scale(.96); }
.lc-role-red:hover  { border-color: #fca5a5; background: #fff5f5; }
.lc-role-green:hover { border-color: #86efac; background: #f0fdf4; }
.lc-role-amber:hover { border-color: #fcd34d; background: #fffbeb; }

.lc-role-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.lc-role-name {
  font-size: .73rem; font-weight: 700; color: #0f172a; line-height: 1.2;
}
.lc-role-sub {
  font-size: .6rem; font-weight: 700; color: #64748b; line-height: 1;
}

/* ── Extra modules uitklapbaar ── */
.lc-extras-detail {
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 12px; overflow: hidden; margin-top: 6px;
}
.lc-extras-summary {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; font-size: .78rem; font-weight: 700;
  color: #475569; cursor: pointer; list-style: none;
  user-select: none;
}
.lc-extras-summary::-webkit-details-marker { display: none; }
.lc-extras-summary i:first-child { color: #e30613; }
.lc-extras-arrow { margin-left: auto; font-size: .7rem; transition: transform .2s; }
details[open] .lc-extras-arrow { transform: rotate(180deg); }
.lc-extras-body { padding: 0 12px 12px; border-top: 1px solid #e2e8f0; }
.lc-extras-intro {
  font-size: .7rem; color: #64748b; padding: 8px 0 6px; font-weight: 600;
}
.lc-extras-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
}
.lc-extra-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: #334155; font-weight: 600;
  padding: 4px 6px; background: #ffffff; border-radius: 7px;
  border: 1px solid #f1f5f9;
}
.lc-extra-item i { width: 14px; text-align: center; flex-shrink: 0; }
.lc-extras-note {
  margin-top: 8px; padding: 7px 10px;
  background: rgba(227,6,19,.05);
  border: 1px solid rgba(227,6,19,.15); border-radius: 9px;
  font-size: .7rem; color: #e30613; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.lc-extras-note kbd {
  background: #e30613; color: white; border-radius: 4px;
  padding: 1px 5px; font-size: .65rem; font-family: monospace;
}

/* ── Vervanger sectie ── */
.lc-vervanger {
  padding: 10px 20px 16px;
  border-top: 1.5px dashed #e2e8f0;
  margin-top: 4px;
}
.lc-vervanger-btn {
  width: 100%; padding: 11px;
  background: linear-gradient(135deg,#e30613,#b50010);
  color: white; border: none; border-radius: 11px;
  font-size: .85rem; font-weight: 700; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s, transform .12s;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.lc-vervanger-btn:hover { opacity: .9; }
.lc-vervanger-btn:active { transform: scale(.98); }
.lc-vervanger-sub {
  text-align: center; font-size: .7rem; color: #94a3b8; margin-top: 6px;
}

/* Legacy role-btn (behouden voor andere plekken in de app) */
.role-selector { margin-bottom: 4px; }
.role-btn { padding: 7px 6px 8px; border: 1.5px solid var(--border); border-radius: 10px; background: white; cursor: pointer; font-family: inherit; font-size: .75rem; font-weight: 500; color: var(--text); transition: all .18s cubic-bezier(.34,1.56,.64,1); width: 100%; text-align: center; line-height: 1.25; }
.role-btn:hover { background: var(--bg); border-color: var(--primary-light); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.role-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Form groups (algemeen, buiten login) ── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group textarea, .form-group select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; font-size: .9rem; outline: none; transition: border-color .15s; width: 100%; background: var(--card, #ffffff); color: var(--text, #111111); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* v16.9.14 — breakpoint verhoogd van 400px naar 520px zodat iPhone 13/14/15 (390px breed) ook 1-kolom krijgt */
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ============ APP LAYOUT ============ */
.app { display: flex; flex-direction: column; height: 100%; width: 100%; overflow: hidden; }

/* ============ TOP BAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: #0f172a;
  display: flex; align-items: center; gap: 4px;
  padding: 0 10px;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: visible;
}
/* Donker thema topbar */
html.sg-theme-dark .topbar {
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.4) !important;
}
.menu-btn { background: none; border: none; color: #ffffff; font-size: 1.1rem; cursor: pointer; padding: 5px 7px; border-radius: 8px; flex-shrink: 0; transition: background .15s; }
html.sg-theme-dark .menu-btn { color: white; }
.menu-btn:active { background: rgba(0,0,0,.06); }
html.sg-theme-dark .menu-btn:active { background: rgba(255,255,255,.1); }
.topbar-logo { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.topbar-logo span { color: #ffffff; font-size: .82rem; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; }
html.sg-theme-dark .topbar-logo span { color: white; }
.topbar-logo span b { color: #e30613; font-weight: 900; }
.topbar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; overflow: visible !important; }

/* Scheider tussen iconen en avatar in topbar */
.topbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.12);
  border-radius: 1px;
  flex-shrink: 0;
  margin: 0 2px;
}
html.sg-theme-dark .topbar-divider { background: rgba(255,255,255,.12); }

/* Standaard icon knop */
.icon-btn {
  background: none; border: none; color: #475569;
  font-size: .9rem; cursor: pointer;
  padding: 0; width: 30px; height: 30px;
  border-radius: 8px;
  position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.icon-btn:active { background: rgba(0,0,0,.06); }
html.sg-theme-dark .icon-btn         { color: rgba(255,255,255,.8); }
html.sg-theme-dark .icon-btn:active  { background: rgba(255,255,255,.1); }
/* Fix108: topbar altijd donker — iconen altijd wit */
.topbar .icon-btn                    { color: rgba(255,255,255,.85); }
.topbar .icon-btn:hover              { background: rgba(255,255,255,.1); color: #ffffff; }
.topbar .icon-btn:active             { background: rgba(255,255,255,.15); }

/* Thema toggle knop — altijd geel/goud */
.topbar-theme-btn {
  background: rgba(251,191,36,.15);
  border: 1.5px solid rgba(251,191,36,.35);
  color: #fbbf24;
  font-size: .85rem;
  transition: all .2s !important;
}
.topbar-theme-btn:hover { background: rgba(251,191,36,.28) !important; }
.topbar-theme-btn:active { background: rgba(251,191,36,.38) !important; transform: scale(.93); }
html.sg-theme-dark .topbar-theme-btn {
  background: rgba(251,191,36,.15);
  border-color: rgba(251,191,36,.35);
  color: #fbbf24;
}
html.sg-theme-dark .topbar-theme-btn:hover  { background: rgba(251,191,36,.28) !important; }
html.sg-theme-dark .topbar-theme-btn:active { background: rgba(251,191,36,.38) !important; }

/* QR knop — prominenter, geel accent */
.topbar-qr-btn {
  background: rgba(245,158,11,.18) !important;
  border: 1.5px solid rgba(245,158,11,.35) !important;
  color: #fbbf24 !important;
  font-size: .95rem !important;
}
.topbar-qr-btn:active { background: rgba(245,158,11,.32) !important; }

/* Backward-compat badge (route nav) */
.notif-btn .badge { position: absolute; top: -2px; right: -2px; background: var(--accent); color: white; font-size: .55rem; font-weight: 700; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #ffffff; pointer-events: none; }
html.sg-theme-dark .notif-btn .badge { border-color: #111; }

/* ── Topbar rode badges (chat + gemiste oproepen) ─────────────── */
.topbar-red-badge {
  position: absolute;
  top:    -6px;
  right:  -6px;
  min-width:   16px;
  height:      16px;
  padding:     0 4px;
  background:  #e30613;
  color:       white;
  font-size:   .52rem;
  font-weight: 800;
  border-radius: 8px;
  border:      2px solid #ffffff;
  display:     flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow:  0 2px 6px rgba(227,6,19,.45);
  pointer-events: none;
  white-space: nowrap;
  z-index:     9 !important;
}
.topbar-red-badge.hidden { display: none !important; }

/* Zorg dat de icon-btn de badge NOOIT afknipt */
.icon-btn {
  overflow: visible !important;
}

/* ── Topbar responsief ──────────────────────────────────── */

/* Greeting altijd verborgen — ruimte besparen */
#topbarGreeting { display: none !important; }

/* Aparte mic-knop altijd verborgen (zit al in robot-knop) */
.sg-mic-topbar-btn { display: none !important; }

/* Avatar altijd zichtbaar houden */
.user-avatar { flex-shrink: 0 !important; }

/* Topbar avatar wrapper — reset ALLE .user-avatar stijlen, wrapper is geen cirkel */
#topbarAvatar {
  background: transparent !important;
  border-radius: 10px !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 4px 4px 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

/* ── Mobiel (≤600px): compact — overbodige knoppen weg, naam blijft ALTIJD zichtbaar ── */
@media (max-width: 600px) {
  .topbar { gap: 2px; padding: 0 6px; }
  .topbar-right { gap: 2px; }
  /* Logo-tekst kleiner maar ALTIJD zichtbaar */
  .topbar-logo span { font-size: .74rem !important; }
  /* QR-scan: ALTIJD zichtbaar op mobiel — primaire actie v12.9.7 */
  #topbarQRBtn { display: inline-flex !important; padding: 6px 7px !important; font-size: .88rem !important; }
  /* Verbinden: zichtbaar op mobiel — uitnodigingen/netwerk is primaire actie */
  #sgConnectQRBtn { display: inline-flex !important; }
  /* Maan-knop altijd zichtbaar — ook op mobiel */
  /* #topbarThemeBtn { display: none !important; } */
  /* Naam+status tekst verbergen — alleen avatar cirkel op mobiel */
  #topbarNameStatus { display: none !important; }
  /* Topbar divider verbergen op mobiel */
  .topbar-divider { display: none !important; }
  /* Logo icoontje iets kleiner */
  .topbar-logo > div { width: 20px !important; height: 20px !important; }
  .topbar-logo > div img { width: 18px !important; height: 18px !important; }
}

/* ── Heel smal (≤360px): chat + call verbergen, QR blijft ALTIJD zichtbaar ── */
@media (max-width: 360px) {
  #topbarChatBtn { display: none !important; }
  #topbarQRBtn { display: inline-flex !important; padding: 5px 6px !important; font-size: .82rem !important; }
  .topbar-logo span { font-size: .68rem !important; }
}

/* ── Desktop (≥601px): alles zichtbaar ── */
@media (min-width: 601px) {
  #topbarNameStatus { display: flex !important; }
  .topbar-divider { display: block !important; }
  .topbar { gap: 5px; padding: 0 12px; }
  .topbar-right { gap: 5px; }
}

/* Timer stat chips: getallen nooit buiten beeld */
.timer-stat-chip { min-width: 0; overflow: hidden; }
.timer-stat-chip > div:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Topbar: aparte mic-knop altijd verbergen (zit al in robot-knop) */
#sgInfoBotMicTopbar { display: none !important; }

/* Luisterstatus mic-icoon in robot-knop */
@keyframes sgMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50%       { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}
#sgInfoBotTopbarBtn.sg-listening {
  background: #ef4444 !important;
  animation: sgMicPulse .8s ease infinite;
}

/* ── Chat-knop in topbar ──────────────────────────────────────── */
.topbar-chat-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  cursor: pointer;
  padding: 7px 8px;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.topbar-chat-btn.has-unread {
  color: #fff;
}
.topbar-chat-btn.has-unread i {
  filter: drop-shadow(0 0 5px rgba(227,6,19,.6));
}

/* ── Telefoon-knop in topbar ─────────────────────────────────── */
.topbar-call-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  cursor: pointer;
  padding: 7px 8px;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.topbar-call-btn.has-calls {
  color: #fff;
  animation: topbar-ring .7s ease infinite;
}
.topbar-call-btn.has-calls i {
  filter: drop-shadow(0 0 5px rgba(227,6,19,.6));
}
@keyframes topbar-ring {
  0%,100% { transform: rotate(0deg); }
  20%      { transform: rotate(-12deg); }
  40%      { transform: rotate(12deg); }
  60%      { transform: rotate(-8deg); }
  80%      { transform: rotate(8deg); }
}

/* ── QR-verzoek badge-pulse (knippert 3s bij nieuw inkomend verzoek) ── */
@keyframes sgBadgePulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(227,6,19,.7); }
  35%     { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(227,6,19,0);  }
  70%     { transform: scale(1.1);  box-shadow: 0 0 0 3px rgba(227,6,19,.2); }
}
.sg-badge-pulse {
  animation: sgBadgePulse .6s ease-in-out 5 !important;
}
/* InfoBot bubble — altijd boven alles, nooit buiten beeld */
#sgInfoBotBubble {
  z-index: 9990 !important;
  top: calc(var(--topbar-h) + 4px) !important;
  right: 8px !important;
  max-height: calc(100dvh - var(--topbar-h) - 12px) !important;
}
/* Gemiste oproepen popup ook correct boven content */
#sgMissedCallsPopup { top: calc(var(--topbar-h) + 4px) !important; }
.user-avatar { width: 30px; height: 30px; background: var(--accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; cursor: pointer; flex-shrink: 0; overflow: hidden; }
.user-avatar.large { width: 36px; height: 36px; font-size: .8rem; }   /* sidebar: compacter zodat naam meer ruimte krijgt */
.user-avatar.profile-avatar { width: 60px; height: 60px; font-size: 1.2rem; }

/* ============ SIDEBAR ============ */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0); pointer-events: none; z-index: 299; transition: background .3s cubic-bezier(.4,0,.2,1); }
.sidebar-overlay.active { background: rgba(0,0,0,0.45); pointer-events: all; }
/* ══════════════════════════════════════════════════════
   SIDEBAR — Professioneel, compact, volledig scherm
══════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 22px;
  left: calc(-1 * var(--sidebar-w) - 2px);
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d1117 0%, #111827 100%);
  color: white;
  z-index: 300;
  transition: left .3s cubic-bezier(.22,.68,0,1.05);
  overflow: hidden;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
  scrollbar-width: none;
  padding-top: 48px; /* balk omlaag — inhoud start lager in paneel */
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.open { left: 0; }

/* Header: logo + merk + gebruiker */
.sidebar-header {
  padding: 12px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  background: rgba(255,255,255,.03);
}
.sidebar-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sidebar-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name {
  font-size: .82rem; font-weight: 800;
  color: white; letter-spacing: -.3px; line-height: 1.2;
}
.sidebar-brand-name span { color: #e30613; }
.sidebar-brand-sub { font-size: .6rem; color: rgba(255,255,255,.35); letter-spacing: .02em; }

/* Gebruikersblok — verticale layout: avatar boven, tekst links eronder */
.sidebar-user {
  display: flex;
  flex-direction: column;       /* avatar boven, info onder */
  align-items: flex-start;      /* links uitgelijnd */
  gap: 6px;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 10px 12px;
  overflow: hidden;
  min-height: 0;
}
.sidebar-user .user-avatar.large {
  flex-shrink: 0;
  width: 36px !important;
  height: 36px !important;
  font-size: .8rem !important;
  margin-top: 0;
}
.sidebar-user .user-info {
  width: 100%;                  /* volledige breedte beschikbaar */
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.sidebar-user strong {
  font-size: .82rem;
  font-weight: 700;
  display: block;
  width: 100%;
  color: white;
  white-space: nowrap;          /* GEEN afbreken — blijft op 1 regel */
  overflow: hidden;
  text-overflow: ellipsis;      /* te lang → puntjes */
  line-height: 1.3;
}
/* Groene/gekleurde rol-badge (dynamisch van sg-nav-engine) */
#sgSidebarRolBadge {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  font-size: .56rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  padding: 2px 6px !important;
  border-radius: 20px !important;
  margin-left: 0 !important;
  align-self: flex-start;
  letter-spacing: .04em;
  flex-shrink: 0;
  max-width: 100%;
  /* Tekstkleur altijd zwart of wit via inline style van sg-nav-engine — nooit overschrijven */
}
/* Fallback tekst-badge (role-badge div) */
.role-badge {
  font-size: .6rem;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Badge op nav-item */
.nav-badge {
  background: var(--accent); color: white;
  font-size: .58rem; font-weight: 800;
  padding: 1px 5px; border-radius: 10px;
  margin-left: auto; flex-shrink: 0;
  min-width: 18px; text-align: center;
}

/* ══════════════════════════════════════════════════════
   SIDEBAR NAVIGATIE — v10.0 definitief, geen gaten
══════════════════════════════════════════════════════ */

/* Container: neemt alle resterende hoogte, geen extra padding */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 6px;
  scrollbar-width: none;
  min-height: 0;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

/* ── VERBORGEN ITEMS: nul ruimte, nul hoogte — hoogste prioriteit ── */
.nav-item.hidden,
.nav-item.sg-nav-hidden,
.sidebar-nav-section.hidden,
.sidebar-nav-section.sg-nav-hidden,
.nav-item[style*="display:none"],
.nav-item[style*="display: none"],
.sidebar-nav-section[style*="display:none"],
.sidebar-nav-section[style*="display: none"] {
  display:        none !important;
  height:         0   !important;
  min-height:     0   !important;
  max-height:     0   !important;
  margin:         0   !important;
  padding:        0   !important;
  overflow:       hidden !important;
  border:         none !important;
  opacity:        0   !important;
  pointer-events: none !important;
}

/* ── ZICHTBARE NAV-ITEMS: compacte flex-rij ── */
.nav-item {
  display:         flex;
  flex-direction:  row;
  align-items:     center;          /* icoon centreert t.o.v. 1-regel label */
  justify-content: flex-start;
  gap:             10px;
  padding:         7px 12px;        /* iets minder padding zodat 2-regel items niet te hoog worden */
  margin:          1px 8px;
  width:           calc(100% - 16px);
  box-sizing:      border-box;
  background:      none;
  border:          none;
  border-left:     2.5px solid transparent;
  border-radius:   8px;
  color:           rgba(255,255,255,.65);
  cursor:          pointer;
  font-family:     inherit;
  font-size:       .82rem;
  font-weight:     500;
  text-align:      left;
  text-decoration: none;
  /* FIX: geen nowrap op button-niveau — label mag wrappen */
  white-space:     normal;
  overflow:        visible;
  transition:      background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* FIX: label-span mag wrappen, max 2 regels, badge krimpt niet */
.nav-item > span:not(.nav-badge) {
  flex:                  1 1 auto;
  min-width:             0;
  overflow:              hidden;
  /* max 2 regels met graceful clamp */
  display:               -webkit-box;
  -webkit-line-clamp:    2;
  -webkit-box-orient:    vertical;
  line-clamp:            2;         /* standaard (toekomst) */
  white-space:           normal;    /* wrap toestaan */
  word-break:            break-word;
  text-overflow:         clip;      /* ellipsis werkt niet met line-clamp */
  text-align:            left;
  line-height:           1.25;
}
.nav-item:hover {
  background:       rgba(255,255,255,.07);
  color:            white;
  border-left-color: rgba(227,6,19,.4);
}
.nav-item:active { transform: scale(.97); }
.nav-item.active {
  background:        rgba(255,255,255,.10);
  color:             white;
  font-weight:       600;
  border-left-color: #e30613;
}
.nav-item.active .nav-icon {
  filter: brightness(1.4) drop-shadow(0 0 4px currentColor);
}
.nav-item:hover .nav-icon { transform: translateX(1px); }

/* ── ICONEN: vaste breedte, altijd zichtbaar, top-aligned bij 2-regel labels ── */
.nav-item i,
.nav-icon {
  width:       20px;
  min-width:   20px;
  text-align:  center;
  font-size:   .88rem;
  flex-shrink: 0;
  flex-grow:   0;
  /* FIX: zorg dat icoon bovenaan blijft bij 2-regel labels */
  align-self:  flex-start;
  margin-top:  1px;          /* optische uitlijning t.o.v. eerste tekstregel */
  transition:  transform .15s, filter .2s;
}

/* ── SECTIEKOPPEN: compact, scheidingslijn rechts ── */
.sidebar-nav-section {
  display:        flex;
  align-items:    center;
  gap:            8px;
  padding:        10px 14px 4px;
  margin-top:     4px;
  font-size:      .58rem;
  font-weight:    700;
  color:          rgba(255,255,255,.28);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space:    nowrap;
}
.sidebar-nav-section::after {
  content:    '';
  flex:       1;
  height:     1px;
  background: rgba(255,255,255,.07);
  margin-left: 4px;
}

/* ── FOOTER: uitloggen — altijd zichtbaar onderaan ── */
.sidebar-footer {
  flex-shrink: 0;
  padding: 4px 0 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: var(--sg-sidebar-bg);
}
.nav-item.logout {
  color:      rgba(248,113,113,.75);
  margin-top: 2px;
}
.nav-item.logout:hover {
  color:      #f87171;
  background: rgba(248,113,113,.09);
  border-left-color: rgba(248,113,113,.4);
}

/* ============ MAIN CONTENT ============ */
.main-content { position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 42px; overflow-y: auto; background: var(--bg); z-index: 100; -webkit-overflow-scrolling: touch; scroll-padding-top: 12px; }

/* ============ SECTIONS ============ */
/* Padding-top zodat content NOOIT achter de vaste topbar valt */
.section { padding: 16px; padding-top: 20px; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

/* ── MOBILE PERFORMANCE: hidden secties worden NIET gerenderd door browser ──
   content-visibility:hidden = browser slaat layout + paint over voor hidden secties.
   Dit bespaart 300-800ms op mobiel bij 760KB DOM met 30+ secties.
   contain-intrinsic-size voorkomt layout-shift als sectie zichtbaar wordt.    */
.section.hidden {
  content-visibility: hidden;
  contain-intrinsic-size: 0 500px;
}

/* Dashboard sectie heeft extra ruimte nodig boven vandaag-strip */
#sec-dashboard { padding-top: 16px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-header > div:first-child { flex: 1; min-width: 0; }
.section-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.section-header p { margin: 2px 0 0; }

/* ============ CARDS ============ */
.card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-header h3 { font-size: .9rem; font-weight: 600; }
.card-title { font-size: .9rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 6px; }

/* ============ STATS ============ */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-icon.blue { background: rgba(227,6,19,.10); color: var(--wl-primary,#e30613); }
.stat-icon.green { background: #dcfce7; color: var(--green); }
.stat-icon.red { background: #fee2e2; color: var(--red); }
.stat-icon.orange { background: #fef3c7; color: #d97706; }
.stat-info { flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 800; display: block; line-height: 1; color: #0f172a; }
.stat-label { font-size: .72rem; color: #64748b; margin-top: 2px; }

/* ============ DASHBOARD MODAL ============ */
.stat-modal-list { display: flex; flex-direction: column; gap: 10px; }
.stat-modal-item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg); border-radius: 10px; }

/* ============ QUICK ACTIONS ============ */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-action-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-family: inherit; text-align: left; transition: background .18s ease, border-color .18s ease, transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease; width: 100%; }
.quick-action-btn:hover { background: white; border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-action-btn:active { transform: scale(.97); }
.quick-action-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.quick-action-text strong { display: block; font-size: .82rem; color: var(--primary); }
.quick-action-text span { display: block; font-size: .72rem; color: var(--text-light); margin-top: 1px; }
@media (min-width: 600px) { .quick-actions, .quick-actions-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .quick-actions, .quick-actions-grid { grid-template-columns: repeat(4,1fr); } }

/* ============ PROJECTS ============ */
.filter-bar { display: flex; flex-direction: row; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--card-bg, white); color: var(--text, #111); cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 600; transition: all .15s; white-space: nowrap; flex-shrink: 0; }
.filter-btn.active { background: var(--primary); color: #fff !important; border-color: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
/* Dark mode filter buttons */
[data-theme="dark"] .filter-btn { background: var(--card-bg, #1e293b); color: var(--text, #f1f5f9); border-color: var(--border, #334155); }
[data-theme="dark"] .filter-btn.active { background: var(--primary); color: #fff !important; border-color: var(--primary); }
.project-cards-grid { display: grid; gap: 14px; }
.project-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.project-card-header { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.project-card-header.blue { background: rgba(227,6,19,.08); }
.project-card-header.red { background: #fee2e2; }
.project-card-header.green { background: #dcfce7; }
.project-card-header.orange { background: #fef3c7; }
.project-card-header.purple { background: #f3e8ff; }
.project-card-location { font-size: .77rem; color: var(--text-light); }
.project-card-body { padding: 14px; }
.project-card-body h3 { font-size: .95rem; margin-bottom: 3px; }
.project-card-body .client { font-size: .8rem; color: var(--text-light); margin-bottom: 8px; }
.project-card-meta { display: flex; gap: 8px; font-size: .75rem; color: var(--text-light); flex-wrap: wrap; margin-bottom: 8px; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.team-avatars { display: flex; gap: 0; flex-wrap: nowrap; }
.ta {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 800;
  margin-right: -7px; border: 2.5px solid white; flex-shrink: 0;
  /* Standaard kleur als fallback — wordt overschreven door role-klassen */
  background: #e30613; color: white;
}
/* Role-based avatar kleuren */
.ta.role-voorman      { background: #8b5cf6; color: white; }
.ta.role-monteur      { background: #0ea5e9; color: white; }
.ta.role-chauffeur    { background: #f59e0b; color: white; }
.ta.role-zzp          { background: #22c55e; color: white; }
.ta.role-sub          { background: #f97316; color: white; }
.ta.role-pm           { background: #e30613; color: white; }
.ta.role-teken        { background: #14b8a6; color: white; }
.ta.role-default      { background: #64748b; color: white; }
.ta.ta-more           { background: #e2e8f0; color: #475569; font-size: .6rem; }
/* ═══════════════════════════════════════════════
   PROJECT CARD v2 — kleurrijke, overzichtelijke kaart
═══════════════════════════════════════════════ */
.project-card-v2 {
  background: #f8fafc;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 0 0 1px rgba(226,232,240,.9);
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  margin-bottom: 10px;
}
.project-card-v2:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.10), 0 0 0 1px rgba(226,232,240,.9); }

/* Gekleurde header-balk */
.pcv2-header {
  padding: 9px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pcv2-header.pcv2-blue   { background: linear-gradient(135deg,#1e3a5f,#2a4d7f); }
.pcv2-header.pcv2-green  { background: linear-gradient(135deg,#14532d,#166534); }
.pcv2-header.pcv2-orange { background: linear-gradient(135deg,#7c2d12,#9a3412); }
.pcv2-header.pcv2-red    { background: linear-gradient(135deg,#7f1d1d,#991b1b); }
.pcv2-header.pcv2-purple { background: linear-gradient(135deg,#4c1d95,#5b21b6); }

.pcv2-header-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.pcv2-location { font-size: .74rem; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: none; padding: 0; }
.pcv2-location i { opacity: .7; margin-right: 3px; }
.pcv2-sub-badge { font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.85); border: none; white-space: nowrap; flex-shrink: 0; }
.pcv2-status-pill { font-size: .67rem; font-weight: 800; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

/* Body */
.pcv2-body { padding: 11px 14px 10px; background: var(--card-bg, #ffffff); }

.pcv2-title  { font-size: .95rem; font-weight: 800; color: var(--text, #0f172a); margin-bottom: 2px; line-height: 1.25; }
.pcv2-client { font-size: .73rem; color: var(--text-light, #64748b); margin-bottom: 6px; }
.pcv2-meta   { display: flex; gap: 10px; font-size: .71rem; color: var(--text-light, #64748b); flex-wrap: wrap; margin-bottom: 9px; }
.pcv2-meta i { opacity: .6; margin-right: 3px; }

/* Team-rij: avatars + voornamen */
.pcv2-team-row {
  display: flex; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 6px;
}
.pcv2-team-names { display: flex; gap: 4px; flex-wrap: wrap; }
.pcv2-name-chip {
  padding: 3px 9px; border-radius: 20px;
  font-size: .68rem; font-weight: 700;
  background: #f1f5f9; color: #475569;
  border: 1.5px solid #e2e8f0; white-space: nowrap;
  transition: background .15s;
}
.pcv2-name-chip:hover { background: #e2e8f0; }
/* Role-gekleurde naam chips */
.pcv2-name-chip.role-voorman   { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.pcv2-name-chip.role-monteur   { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.pcv2-name-chip.role-chauffeur { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.pcv2-name-chip.role-zzp       { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.pcv2-name-chip.role-sub       { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.pcv2-name-chip.role-pm        { background: rgba(227,6,19,.08); color: var(--wl-primary,#e30613); border-color: rgba(227,6,19,.25); }
.pcv2-name-chip.role-teken     { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.pcv2-name-more { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; font-style: italic; }

/* Week-dagbalken — verbeterd */
.pcv2-week-section { margin-bottom: 10px; }
.pcv2-week-labels {
  display: grid; grid-template-columns: repeat(7,1fr);
  font-size: .62rem; color: #94a3b8; text-align: center;
  margin-bottom: 4px; font-weight: 700; letter-spacing: .03em;
}
.pcv2-week-bars {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 3px;
}
/* Individuele dagbalk — grotere hoogte + betere afronding */
.pcv2-week-bars > div {
  height: 10px !important; border-radius: 4px !important;
}

/* Progressiebalk */
.pcv2-progress-wrap { margin-bottom: 10px; }

/* Snelknoppen — verbeterd */
.pcv2-actions {
  display: flex; gap: 6px; padding-top: 9px;
  border-top: 1px solid #f1f5f9; flex-wrap: wrap;
}
.pcv2-btn {
  flex: 1; min-width: 70px; padding: 7px 8px; border-radius: 9px; border: 1px solid;
  font-size: .71rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .15s; white-space: nowrap;
}
.pcv2-btn:active { transform: scale(.96); }
.pcv2-btn-blue  { background: rgba(227,6,19,.08); color: var(--wl-primary,#e30613); border-color: rgba(227,6,19,.25); }
.pcv2-btn-blue:hover  { background: rgba(227,6,19,.14); box-shadow: 0 2px 8px rgba(227,6,19,.20); }
.pcv2-btn-green { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.pcv2-btn-green:hover { background: #dcfce7; box-shadow: 0 2px 8px #bbf7d080; }
.pcv2-btn-purple { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.pcv2-btn-purple:hover { background: #ede9fe; box-shadow: 0 2px 8px #ddd6fe80; }
.pcv2-btn-gray  { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.pcv2-btn-gray:hover  { background: #f1f5f9; }

.compliance-bar { width: 80px; height: 5px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.compliance-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.compliance-fill.green { background: var(--green); }
.compliance-fill.yellow { background: var(--orange); }
.compliance-fill.red { background: var(--red); }
.compliance-alert-bar { background: #fff3cd; border-radius: 6px; padding: 5px 10px; font-size: .74rem; color: #856404; display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.status-pill { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: rgba(0,0,0,.08); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot.green { background: var(--green); }
.status-dot.yellow { background: var(--orange); }
.status-dot.red { background: var(--red); }
.status-dot.gray { background: #9ca3af; }
.status-dot.orange { background: var(--orange); }
.project-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.project-item:last-child { border-bottom: none; }
.project-color { width: 6px; height: 50px; border-radius: 3px; flex-shrink: 0; }
.project-color.blue { background: #3498db; }
.project-color.red { background: var(--red); }
.project-color.orange { background: var(--orange); }
.project-color.green { background: var(--green); }
.project-info { flex: 1; min-width: 0; }
.project-info strong { font-size: .88rem; display: block; color: var(--text, #0f172a); }
.project-info span { font-size: .76rem; color: var(--text-light); }
.project-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
/* Dark mode: project-item tekst wit */
.sg-theme-dark .project-info strong { color: #e2e8f0 !important; }
.sg-theme-dark .project-info span   { color: #64748b !important; }
.project-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.team-count { font-size: .75rem; color: var(--text-light); }

/* ════════════════════════════════════════════════════════════
   PROJECTEN — Compacte lijstweergave (plv-*)
   Doel: veel projecten op één scherm, volledig uitgeschreven
   ════════════════════════════════════════════════════════════ */

/* Groep per status */
.plv-group { margin-bottom: 14px; }
.plv-group-hdr {
  display: flex; align-items: center; gap: 7px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 10px;
  background: var(--bg, #f8fafc);
  border-radius: 10px 10px 0 0;
  border: 1.5px solid var(--border);
  border-bottom: none;
}
.plv-group-cnt {
  margin-left: auto;
  background: rgba(0,0,0,.07);
  color: #64748b;
  font-size: .68rem;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 700;
}

/* Lijstrij */
.plv-row {
  display: flex;
  align-items: stretch;
  background: white;
  border: 1.5px solid var(--border);
  border-top: none;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
  min-height: 72px;
  position: relative;
}
.plv-row:last-child { border-radius: 0 0 10px 10px; }
.plv-row:not(:last-child) { border-bottom: 1px solid #f1f5f9; }
.plv-row:hover { background: #f8fafc; box-shadow: inset 3px 0 0 #e30613; }
.plv-row:active { background: #f1f5f9; }

/* Kleurstreep links */
.plv-stripe {
  width: 4px;
  flex-shrink: 0;
  border-radius: 0;
}
.plv-row:first-child .plv-stripe { border-radius: 0; }

/* Hoofd-inhoud */
.plv-main {
  flex: 1;
  min-width: 0;
  padding: 9px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Rij 1: naam + urgentie badge + status */
.plv-row-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}
.plv-name {
  font-size: .88rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.plv-status {
  font-size: .63rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .01em;
}
.plv-urg {
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Rij 2: meta-items (klant · locatie · periode · team) */
.plv-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.plv-meta-item {
  font-size: .72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.plv-meta-item i {
  opacity: .55;
  font-size: .62rem;
  flex-shrink: 0;
}

/* Rij 3: progressie + avatars + acties */
.plv-row-bot {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Progressiebalk */
.plv-prog-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.plv-prog-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
  min-width: 40px;
}
.plv-prog-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}
.plv-prog-pct {
  font-size: .65rem;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}

/* Team avatars */
.plv-avatars {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}
.plv-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: .6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Snelknoppen (management-only, rechts in rij) */
.plv-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.plv-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .72rem;
  transition: all .12s;
}
.plv-btn:active { transform: scale(.92); }
.plv-btn-blue  { background: rgba(227,6,19,.08); color: #e30613; border-color: rgba(227,6,19,.25); }
.plv-btn-blue:hover  { background: rgba(227,6,19,.15); }
.plv-btn-green { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.plv-btn-green:hover { background: #dcfce7; }

/* Dark mode */
.sg-theme-dark .plv-row { background: var(--card-bg, #1e293b); border-color: rgba(255,255,255,.08); }
.sg-theme-dark .plv-row:hover { background: rgba(255,255,255,.04); }
.sg-theme-dark .plv-group-hdr { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.sg-theme-dark .plv-name { color: #f1f5f9; }
.sg-theme-dark .plv-meta-item { color: #94a3b8; }
.sg-theme-dark .plv-prog-bar { background: rgba(255,255,255,.1); }
.sg-theme-dark .plv-btn-blue  { background: rgba(37,99,235,.18); border-color: rgba(37,99,235,.4); }
.sg-theme-dark .plv-btn-green { background: rgba(22,163,74,.16); border-color: rgba(22,163,74,.4); }

/* ============ TABS ============ */
.tabs { display: flex; gap: 2px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { padding: 8px 10px; border: none; background: #f1f5f9; cursor: pointer; font-family: inherit; font-size: .78rem; font-weight: 500; color: var(--text-light); border-radius: 8px; white-space: nowrap; flex-shrink: 0; transition: all .15s; display: flex; align-items: center; gap: 4px; }
.tab-btn.active { background: var(--primary); color: white; }
.tab-btn:hover:not(.active) { background: #e2e8f0; }
.tab-btn i { font-size: .8rem; }

/* ── Tab kleur-identiteit (icon-kleur zichtbaar in inactive state) ── */
.tab-btn.tab-rood   i { color: #e30613; }
.tab-btn.tab-oranje i { color: #f97316; }
.tab-btn.tab-amber  i { color: #d97706; }
.tab-btn.tab-blauw  i { color: #2563eb; }
.tab-btn.tab-paars  i { color: #7c3aed; }
.tab-btn.tab-groen  i { color: #059669; }
.tab-btn.tab-roze   i { color: #ec4899; }

/* Actieve tab: gekleurde achtergrond per type */
.tab-btn.tab-rood.active   { background: linear-gradient(135deg,#e30613,#9b0000); color: #fff; }
.tab-btn.tab-oranje.active { background: linear-gradient(135deg,#f97316,#c2410c); color: #fff; }
.tab-btn.tab-amber.active  { background: linear-gradient(135deg,#f59e0b,#b45309); color: #fff; }
.tab-btn.tab-blauw.active  { background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff; }
.tab-btn.tab-paars.active  { background: linear-gradient(135deg,#7c3aed,#5b21b6); color: #fff; }
.tab-btn.tab-groen.active  { background: linear-gradient(135deg,#059669,#047857); color: #fff; }
.tab-btn.tab-roze.active   { background: linear-gradient(135deg,#ec4899,#be185d); color: #fff; }

/* Actieve tab: icon altijd wit */
.tab-btn.active i { color: inherit; }
.tab-label { display: none; }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Team-chat tab heeft flex-layout nodig i.p.v. block */
#tab-team-tab.active { display: flex; flex-direction: column; gap: 0; }

/* ============ OVERVIEW ============ */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.overview-item { display: flex; flex-direction: column; gap: 2px; }
.overview-item label { font-size: .7rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; }
.overview-item span { font-size: .88rem; font-weight: 500; }

/* ============ ADDRESS DROPDOWN ============ */
.address-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1.5px solid var(--border); border-radius: 8px; margin-top: 3px; z-index: 500; box-shadow: var(--shadow-md); max-height: 200px; overflow-y: auto; }
.address-suggestion { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 8px; transition: background .1s; line-height: 1.4; }
.address-suggestion:last-child { border-bottom: none; }
.address-suggestion:hover { background: var(--bg); }

/* ============ SUBPROJECTEN ============ */
.subproject-card { background: white; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.subproject-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.subproject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.sp-info-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-light); }
.sp-info-item i { color: var(--primary); font-size: .72rem; width: 14px; }

/* ============ OVERNACHTING ============ */
.accommodation-card { }
.acc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.acc-item { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.acc-item i { color: var(--primary); font-size: .9rem; flex-shrink: 0; }
.acc-item label { font-size: .7rem; color: var(--text-light); display: block; }
.acc-item strong { font-size: .82rem; }
.acc-notes { display: flex; gap: 8px; background: rgba(227,6,19,.06); border-radius: 8px; padding: 10px 12px; margin-top: 10px; border: 1px solid rgba(227,6,19,.2); }
.acc-person-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.acc-person-item:last-child { border-bottom: none; }

/* ============ CHAT ============ */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 280px); min-height: 300px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; }
.chat-msg.sent { flex-direction: row-reverse; }
.chat-avatar { width: 32px; height: 32px; background: var(--primary-light); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 600; flex-shrink: 0; }
.chat-avatar.sent-avatar { background: var(--accent); }
.chat-bubble { max-width: 72%; background: white; border-radius: 12px 12px 12px 4px; padding: 8px 12px; box-shadow: var(--shadow); }
.chat-msg.sent .chat-bubble { background: var(--primary); color: white; border-radius: 12px 12px 4px 12px; }
.chat-bubble strong { font-size: .75rem; color: var(--accent); display: block; margin-bottom: 2px; }
.chat-bubble p { font-size: .85rem; line-height: 1.4; margin: 0; }
.chat-msg.sent .chat-bubble p { color: rgba(255,255,255,.92); }
.chat-time { font-size: .68rem; opacity: .55; display: block; margin-top: 3px; }
.chat-input-bar { display: flex; align-items: center; gap: 6px; padding: 8px 0 0; border-top: 1px solid var(--border); }
.chat-action-btn { background: none; border: none; color: var(--text-light); font-size: 1.05rem; cursor: pointer; padding: 8px; border-radius: 8px; flex-shrink: 0; }
.chat-action-btn:hover { color: var(--primary); background: var(--bg); }
.chat-input-bar input { flex: 1; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 20px; font-family: inherit; font-size: .88rem; outline: none; }
.chat-send-btn { background: var(--primary); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.chat-photo .photo-placeholder { background: var(--bg); border-radius: 8px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-light); }

/* ============ TIJDEN ============ */
.tijden-stats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tijden-stats::-webkit-scrollbar { display: none; }
.tijden-stat { background: white; border-radius: 10px; padding: 10px 14px; flex-shrink: 0; min-width: 80px; text-align: center; box-shadow: var(--shadow); }
.tijden-stat.orange { border-bottom: 3px solid var(--orange); }
.tijden-stat.red { border-bottom: 3px solid var(--red); }
.tijden-stat.blue { border-bottom: 3px solid var(--blue); }
.tijden-stat.green { border-bottom: 3px solid var(--green); }
.ts-value { font-size: 1.2rem; font-weight: 800; display: block; }
.ts-label { font-size: .65rem; color: var(--text-light); margin-top: 1px; display: block; }
.ai-overwork-banner { background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.tijden-filters { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tijden-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tijden-table { width: 100%; border-collapse: collapse; font-size: .82rem; white-space: nowrap; }
.tijden-table thead tr { background: var(--primary); color: white; }
.tijden-table th { padding: 8px 10px; text-align: left; font-size: .73rem; font-weight: 600; }
.tijden-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tijden-table .tijden-row:hover { background: rgba(0,0,0,.02); }
.status-badge { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; border: 1.5px solid transparent; }
.status-badge.green  { background: #dcfce7; color: #14532d; border-color: #86efac; }
.status-badge.orange { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.status-badge.blue   { background: rgba(227,6,19,.1); color: #9b0000; border-color: rgba(227,6,19,.3); }
.status-badge.red    { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.status-badge.gray   { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.status-badge.purple { background: #f3e8ff; color: #581c87; border-color: #c4b5fd; }
.status-badge.teal   { background: #ccfbf1; color: #134e4a; border-color: #5eead4; }
.status-badge.yellow { background: #fef9c3; color: #713f12; border-color: #fde047; }
/* Dark mode aanpassingen voor status badges */
[data-theme="dark"] .status-badge.green  { background: #14532d; color: #86efac; border-color: #166534; }
[data-theme="dark"] .status-badge.orange { background: #78350f; color: #fcd34d; border-color: #92400e; }
[data-theme="dark"] .status-badge.blue   { background: rgba(227,6,19,.2); color: #f87171; border-color: rgba(227,6,19,.4); }
[data-theme="dark"] .status-badge.red    { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .status-badge.gray   { background: #374151; color: #e5e7eb; border-color: #4b5563; }
[data-theme="dark"] .status-badge.purple { background: #581c87; color: #c4b5fd; border-color: #6b21a8; }
[data-theme="dark"] .status-badge.teal   { background: #134e4a; color: #5eead4; border-color: #0f766e; }

/* ============ E-LEARNING ============ */
.learning-cards { display: flex; flex-direction: column; gap: 10px; }
.learn-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 10px; transition: background .15s; }
.learn-card.expired { background: #fff5f5; border: 1px solid #fecaca; }
.learn-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.learn-icon.green { background: #dcfce7; color: var(--green); }
.learn-icon.red { background: #fee2e2; color: var(--red); }
.learn-icon.blue { background: rgba(227,6,19,.1); color: var(--blue); }
.learn-icon.orange { background: #fef3c7; color: var(--orange); }
.learn-icon.purple { background: #f3e8ff; color: var(--purple); }
.learn-info { flex: 1; min-width: 0; }
.learn-info strong { font-size: .88rem; display: block; }
.learn-info span { font-size: .76rem; color: var(--text-light); }
.learn-expiry { font-size: .72rem; margin-top: 2px; }
.learn-expiry.green { color: var(--green); }
.learn-expiry.red { color: var(--red); }
.elearning-grid { display: grid; gap: 12px; }
.el-course-card { display: flex; gap: 12px; background: var(--bg); border-radius: 12px; padding: 14px; transition: background .15s; border: 1px solid transparent; }
.el-course-card.expired { border-color: #fecaca; background: #fff5f5; }
.el-course-card.done { border-color: #bbf7d0; background: #f0fdf4; }
.el-course-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.el-course-icon.red { background: #fee2e2; color: var(--red); }
.el-course-icon.orange { background: #fef3c7; color: var(--orange); }
.el-course-icon.blue { background: #dbeafe; color: var(--blue); }
.el-course-icon.green { background: #dcfce7; color: var(--green); }
.el-course-icon.purple { background: #f3e8ff; color: var(--purple); }
.el-course-info { flex: 1; min-width: 0; }
.el-course-info strong { font-size: .9rem; display: block; margin-bottom: 2px; }
.el-category { font-size: .72rem; color: var(--text-light); }
.video-play-btn { width: 60px; height: 60px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; }
.quiz-option { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; background: white; cursor: pointer; text-align: left; font-family: inherit; font-size: .88rem; width: 100%; transition: all .15s; }
.quiz-option:hover { border-color: var(--primary-light); }
.quiz-option:disabled { cursor: default; }

/* ============ ONDERTITELS — Subtitles styling ============ */
.sg-video-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.sg-video-wrap video { width: 100%; display: block; }

#_sgSubBar {
  position: absolute;
  bottom: 44px;
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  padding: 0 12px;
  z-index: 5;
  transition: opacity .2s;
}
#_sgSubText {
  display: inline-block;
  background: rgba(0,0,0,.82);
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.55;
  padding: 5px 14px;
  border-radius: 6px;
  max-width: 96%;
  white-space: pre-line;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
  letter-spacing: .01em;
  transition: opacity .15s;
}

/* iframe ondertitel-ctrl balk */
#_sgSubCtrl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(15,23,42,.75);
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
}

/* Editor: ondertitel details blok */
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; }

/* ============ TTS — Text-to-Speech highlight ============ */
._ttsWord {
  display: inline;
  border-radius: 3px;
  transition: background .1s, color .1s;
}
._ttsWord._ttsActive {
  background: #fde047;
  color: #1e3a8a;
  border-radius: 3px;
  padding: 0 1px;
}
#_ttsBalk input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.3);
  cursor: pointer;
}
#_ttsBalk input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e30613;
  cursor: pointer;
}
#_ttsInlineBtn:hover {
  opacity: .88;
  transform: scale(1.04);
  transition: all .15s;
}

/* ============ DOCUMENTKLUIS ============ */
.vault-banner { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; font-size: .83rem; font-weight: 500; margin-bottom: 12px; }
.vault-banner.orange { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.vault-banner.red { background: #fee2e2; color: #991b1b; }
.vault-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.vault-item:last-child { border-bottom: none; }
.vault-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.vault-info { flex: 1; min-width: 0; }

/* ============ COMPLIANCE ============ */
.compliance-summary { display: flex; gap: 10px; }
.comp-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 10px; text-align: center; }
.comp-stat.green { background: #f0fdf4; }
.comp-stat.orange { background: #fffbeb; }
.comp-stat.red { background: #fff5f5; }
.comp-stat i { font-size: 1.4rem; margin-bottom: 4px; }
.comp-stat.green i { color: var(--green); }
.comp-stat.orange i { color: var(--orange); }
.comp-stat.red i { color: var(--red); }
.comp-stat span { font-size: 1.4rem; font-weight: 800; }
.comp-stat label { font-size: .72rem; color: var(--text-light); }
/* ============ ALERT ITEMS ============ */
/* ── Aandachtspunten alert items — volledig redesign ── */
.alert-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px; margin-bottom: 7px;
  border: 1.5px solid transparent; transition: transform .12s, box-shadow .12s;
  cursor: pointer;
}
.alert-item:last-child { margin-bottom: 2px; }
.alert-item:active { transform: scale(.98); }
.alert-item.red   { background: #fff1f2; border-color: #fecdd3; }
.alert-item.orange{ background: #fff7ed; border-color: #fed7aa; }
.alert-item.green { background: #f0fdf4; border-color: #bbf7d0; }
.alert-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .88rem;
}
.alert-item.red    .alert-icon { background: #fee2e2; color: #dc2626; }
.alert-item.orange .alert-icon { background: #ffedd5; color: #ea580c; }
.alert-item.green  .alert-icon { background: #dcfce7; color: #16a34a; }
.alert-info { flex: 1; min-width: 0; }
.alert-info strong { font-size: .83rem; font-weight: 700; display: block; color: #1e293b; line-height: 1.3; }
.alert-info span   { font-size: .71rem; color: #64748b; display: block; margin-top: 2px; }
/* Bekijk-knop per type */
.alert-item .btn-xs {
  padding: 5px 11px; border-radius: 8px; font-size: .7rem;
  font-weight: 700; border: none; cursor: pointer; flex-shrink: 0;
  transition: opacity .15s; white-space: nowrap;
}
.alert-item.red    .btn-xs { background: #dc2626; color: white; }
.alert-item.orange .btn-xs { background: #ea580c; color: white; }
.alert-item.green  .btn-xs { background: #16a34a; color: white; }
.alert-item .btn-xs:active { opacity: .8; }

.comp-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 10px; }
.comp-check.green { background: #f0fdf4; }
.comp-check.orange { background: #fffbeb; }
.comp-check.red { background: #fff5f5; }
.comp-check i { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.comp-check.green i { color: var(--green); }
.comp-check.orange i { color: var(--orange); }
.comp-check.red i { color: var(--red); }
.comp-check div strong { font-size: .88rem; display: block; }
.comp-check div span { font-size: .78rem; color: var(--text-light); display: block; margin-top: 2px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .78rem; color: var(--blue); text-decoration: none; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ============ ALERT ITEMS ============ */
.alert-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.alert-item:last-child { margin-bottom: 0; }
.alert-item.red { background: #fee2e2; }
.alert-item.orange { background: #fef3c7; }
.alert-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.alert-item.red .alert-icon { background: #fecaca; color: var(--red); }
.alert-item.orange .alert-icon { background: #fde68a; color: #d97706; }
.alert-info { flex: 1; min-width: 0; }
.alert-info strong { font-size: .83rem; display: block; }
.alert-info span { font-size: .75rem; color: var(--text-light); }

/* ============ TEAM ============ */
.team-list { display: flex; flex-direction: column; gap: 2px; }
.team-member { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; transition: background .1s; }
.team-member:hover { background: var(--bg); }
.member-avatar { width: 36px; height: 36px; background: var(--primary-light); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; flex-shrink: 0; }
.member-info { flex: 1; }
.member-info strong { font-size: .88rem; display: block; }
.member-info span { font-size: .75rem; color: var(--text-light); display: block; }
.member-role { font-size: .7rem; padding: 2px 7px; border-radius: 8px; background: #e5e7eb; font-weight: 600; white-space: nowrap; }
.member-role.foreman { background: #fef3c7; color: #92400e; }

/* ============ PILL SELECTOR ============ */
.pill-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; background: white; cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 500; transition: all .15s; }
.pill:hover { border-color: var(--primary-light); background: var(--bg); }
.pill.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============ SUB-TABS ============ */
.sub-tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--bg); border-radius: 10px; padding: 4px; }
.sub-tab { flex: 1; padding: 7px 10px; border: none; border-radius: 8px; background: none; cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 500; color: var(--text-light); transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 5px; }
.sub-tab.active { background: white; color: var(--primary); font-weight: 700; box-shadow: var(--shadow-sm); }

/* ============ NETWORK ============ */
.search-bar { display: flex; align-items: center; gap: 8px; background: white; border: 1.5px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.search-bar input { flex: 1; border: none; outline: none; font-family: inherit; font-size: .88rem; }
.search-bar i { color: var(--text-light); }
.chip-bar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip { padding: 5px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: white; cursor: pointer; font-family: inherit; font-size: .78rem; font-weight: 500; white-space: nowrap; transition: all .15s; flex-shrink: 0; }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.network-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.network-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s; }
.network-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.network-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.network-avatar { width: 44px; height: 44px; background: var(--primary); color: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; }
.verified-icon { color: var(--green) !important; font-size: 1rem; }
.network-card h4 { font-size: .85rem; margin-bottom: 2px; }
.network-role { font-size: .73rem; color: var(--text-light); margin-bottom: 8px; }
.network-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.network-tag { font-size: .7rem; background: #f3f4f6; color: var(--text); padding: 2px 8px; border-radius: 6px; }
.availability { display: flex; align-items: center; gap: 5px; font-size: .76rem; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.avail-dot.green { background: var(--green); }
.avail-dot.red { background: var(--red); }
.country-info { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.country-flag { font-size: 2rem; flex-shrink: 0; }
.country-details { flex: 1; }
.country-details strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.country-details p { font-size: .82rem; color: var(--text-light); line-height: 1.5; margin: 0; }

/* ============ NOTIFICATIONS ============ */
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.notif-item.red .notif-icon { background: #fee2e2; color: var(--red); }
.notif-item.orange .notif-icon { background: #fef3c7; color: var(--orange); }
.notif-item.green .notif-icon { background: #dcfce7; color: var(--green); }
.notif-item.blue .notif-icon { background: rgba(227,6,19,.12); color: #e30613; }
.notif-info { flex: 1; min-width: 0; }
.notif-info strong { font-size: .85rem; display: block; margin-bottom: 2px; }
.notif-info p { font-size: .78rem; color: var(--text-light); line-height: 1.4; margin: 0; }
.notif-time { font-size: .7rem; color: var(--text-light); margin-top: 3px; display: block; }

/* ============ CONTRACTS ============ */
.contract-list { display: flex; flex-direction: column; gap: 8px; }
.contract-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 10px; }
.contract-icon { width: 40px; height: 40px; background: rgba(227,6,19,.1); color: #e30613; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.contract-info { flex: 1; min-width: 0; }
.contract-info strong { font-size: .85rem; display: block; }
.contract-info span { font-size: .76rem; color: var(--text-light); display: block; }
.contract-date { color: var(--text-light) !important; }
.doc-status { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.doc-status.green { background: #dcfce7; color: #166534; }
.doc-status.orange { background: #fef3c7; color: #92400e; }
.doc-status.red { background: #fee2e2; color: #991b1b; }
.doc-list { display: flex; flex-direction: column; gap: 6px; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg); border-radius: 8px; }
.doc-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; }
.doc-icon.pdf { background: #fee2e2; color: var(--red); }
.doc-info { flex: 1; min-width: 0; }
.doc-info strong { font-size: .82rem; display: block; }
.doc-info span { font-size: .73rem; color: var(--text-light); }
.doc-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }

/* ============ CONTRACT GENERATOR ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tag-item { background: var(--primary); color: white; padding: 3px 10px; border-radius: 20px; font-size: .78rem; display: flex; align-items: center; gap: 4px; }
.tag-item button { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; padding: 0; line-height: 1; font-size: .9rem; }
.safety-item { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.safety-item:last-child { border-bottom: none; }
.checkbox-label { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; font-size: .85rem; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; }
.remove-safety { background: none; border: none; color: var(--red); cursor: pointer; font-size: 1.1rem; padding: 0 4px; }
.contract-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contract-type { padding: 14px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; transition: all .15s; }
.contract-type:hover { border-color: var(--primary-light); }
.contract-type.active { border-color: var(--primary); background: #f9f9f9; }
.contract-type.highlight { border-color: var(--orange); background: #fffbeb; }
.contract-type i { font-size: 1.3rem; display: block; margin-bottom: 6px; }
.contract-type span { font-size: .82rem; font-weight: 600; display: block; }
.contract-type small { font-size: .7rem; color: var(--text-light); }
.contract-preview { font-size: .85rem; line-height: 1.7; }
.contract-preview h2 { text-align: center; font-size: 1.1rem; margin-bottom: 20px; }
.auto-value { background: #fffbea; padding: 1px 6px; border-radius: 4px; color: #7c5c10; font-weight: 600; }
.manual-value { background: #dcfce7; padding: 1px 6px; border-radius: 4px; color: #14532d; font-weight: 600; }
.section-h { font-weight: 700; font-size: .85rem; border-bottom: 1.5px solid #eee; padding-bottom: 4px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .5px; }

/* ============ FINANCE ============ */
.info-banner { display: flex; align-items: center; gap: 8px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 9px 12px; font-size: .82rem; color: #0369a1; margin-bottom: 4px; }
.finance-card { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.fc-label { font-size: .72rem; color: var(--text-light); margin-bottom: 2px; }
.fc-value { font-size: 1.4rem; font-weight: 800; }
.fc-sub { font-size: .72rem; color: var(--text-light); margin-top: 2px; }
.workflow-steps { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.workflow-steps::-webkit-scrollbar { display: none; }
.wf-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 60px; opacity: .4; transition: opacity .3s; }
.wf-step.active { opacity: 1; }
.wf-step.done { opacity: .7; }
.wf-step i { font-size: 1.2rem; color: var(--primary); }
.wf-step.active i { color: var(--accent); }
.wf-step.done i { color: var(--green); }
.wf-step span { font-size: .68rem; color: var(--text-light); }
.wf-connector { flex: 1; height: 2px; background: var(--border); min-width: 20px; }
.wf-connector.done { background: var(--green); }

/* ============ SETTINGS ============ */
.sub-badge { background: var(--primary); color: white; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.feature-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; }

/* ============ PROFILE ============ */
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.profile-header-info h3 { font-size: 1.05rem; margin-bottom: 2px; }
.verified-badge { font-size: .75rem; color: var(--green); font-weight: 600; margin-top: 4px; display: block; }
.profile-field { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.profile-field:last-child { border-bottom: none; }
.profile-field i { color: var(--primary); width: 16px; flex-shrink: 0; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 26px; transition: .3s; }
.toggle-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

/* ============ TOOLTIPS (JS-gebaseerd via #sgTooltip) ============ */
/*
  Pseudo-element tooltips werken NIET correct binnen containers met
  overflow:auto/hidden (zoals .tabs), omdat die een nieuwe stacking
  context vormen die het ::after element afknipt.
  Oplossing: één globaal tooltip-element direct in <body>, gepositioneerd
  met position:fixed via JavaScript — nooit afgeknopt door welke parent ook.
*/
#sgTooltip {
  position: fixed;
  z-index: 99999;
  background: rgba(15,23,42,.9);
  color: white;
  font-size: .69rem;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 7px;
  max-width: 220px;
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  white-space: normal;
  word-break: break-word;
  opacity: 0;
  transition: opacity .12s ease;
}
#sgTooltip.visible { opacity: 1; }
#sgTooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(15,23,42,.9);
}

/* ============ ONLINE STATUS DOT ============ */
.online-dot { position: absolute; bottom: 0; right: 0; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; border: 1.5px solid white; }

/* ============ BUTTONS ============ */
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; transition: background .15s; }
.btn-primary:hover { background: var(--primary-light); }
.btn-primary.red { background: var(--red); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); padding: 10px 18px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.btn-secondary:hover { background: #ebebeb; }
.btn-small { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; white-space: nowrap; }
.btn-small:hover { background: white; border-color: var(--primary-light); }
.btn-small.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-small.red { background: #fee2e2; color: var(--red); border-color: #fecaca; }
.btn-xs { background: var(--bg); color: var(--text); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: .74rem; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.btn-xs:hover { background: white; }
.full { width: 100%; justify-content: center; }

/* ============ BOTTOM NAV ============ */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(50px + env(safe-area-inset-bottom,0px)); padding-bottom: env(safe-area-inset-bottom,0px); background: white; display: flex; align-items: stretch; border-top: 1px solid var(--border); z-index: 200; box-shadow: 0 -2px 8px rgba(0,0,0,.06); overflow: hidden; }
.bottom-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: none; cursor: pointer; font-family: inherit; font-size: .54rem; font-weight: 600; color: var(--text-light); transition: color .2s ease; height: 100%; min-height: 0; padding: 5px 2px 4px; }
.bottom-nav-btn:active { transform: scale(.88); transition: transform .1s ease; }
.bottom-nav-btn.active i { animation: bnBounce .32s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes bnBounce { from { transform: scale(.75) translateY(3px); } to { transform: scale(1) translateY(0); } }
.bottom-nav-btn i { font-size: .9rem; }
.bottom-nav-btn.active { color: var(--primary); }
/* Geen color override op active i — eigen icon-kleur blijft bewaard */

/* Planning knop in bottom nav — uitgelicht */
.bottom-nav-planning {
  position: relative;
}
.bottom-nav-planning i {
  color: #e30613 !important;
}
.bottom-nav-planning span:first-of-type {
  color: #e30613;
  font-weight: 700;
}
.bottom-nav-planning.active i { color: var(--accent) !important; }
.bottom-nav-planning .badge {
  position: absolute;
  top: 3px; right: calc(50% - 18px);
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 800;
  padding: 0 4px;
}

/* ============ SECTION TITLE ============ */
.section-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
@media (min-width: 900px) { .section-title { font-size: 1.4rem; } }

/* ============ MODALS ============ */
/* .modal = de witte kaart binnenin .modal-overlay */
.modal {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - var(--topbar-h, 56px) - var(--bottom-h, 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: flex-end;
}
.modal.large  { max-width: 720px; }
.modal.xlarge { max-width: 900px; }
@media (min-width: 900px) {
  .modal        { border-radius: 18px; align-self: center; max-height: calc(100vh - 80px); }
  .modal.large  { border-radius: 18px; align-self: center; max-height: calc(100vh - 80px); }
  .modal.xlarge { border-radius: 18px; align-self: center; max-height: calc(100vh - 80px); }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Stopt BOVEN de bottom-nav (48px), zodat modal nooit eronder verdwijnt */
  bottom: var(--bottom-h, 48px);
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;     /* mobiel: bottom-sheet */
  justify-content: center;
  z-index: 9000;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.modal-content {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  /* Hoogte = beschikbaar scherm TUSSEN topbar en bottom-nav */
  max-height: calc(100vh - var(--topbar-h, 56px) - var(--bottom-h, 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
  align-self: flex-end;
}
.modal-content.large {
  max-height: calc(100vh - var(--topbar-h, 56px) - var(--bottom-h, 48px));
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  /* Header nooit mee-scrollen */
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); line-height: 1; padding: 0 4px; }
.modal-body {
  flex: 1;
  /* Altijd scrollbaar, nooit afkappen */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  /* Voorkom dat content buiten de modal valt */
  overscroll-behavior: contain;
}
.modal-footer {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  /* Footer altijd onderaan, nooit mee-scrollen */
  flex-shrink: 0;
  background: white;
}

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #111; color: white; padding: 10px 18px; border-radius: 10px; font-size: .85rem; z-index: 999; max-width: 90vw; text-align: center; box-shadow: var(--shadow-md); animation: fadeInUp .3s ease; }
@keyframes fadeInUp { from{opacity:0;transform:translateX(-50%) translateY(10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ============ TAG & MISC ============ */
.tag { font-size: .72rem; padding: 0; background: none; color: var(--text-light); }
.tag.location, .tag.date {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 0;
  font-size: .71rem; color: var(--text-light);
}
/* Dark mode: lichte tint, nooit witte kaders */
.sg-theme-dark .tag,
.sg-theme-dark .tag.location,
.sg-theme-dark .tag.date { background: none !important; color: #64748b !important; }

/* ============ RESPONSIVE — TABLET ============ */
@media (min-width: 600px) {
  .tab-label { display: inline; }
  .stats-grid { grid-template-columns: repeat(4,1fr); }
  .project-cards-grid { grid-template-columns: 1fr 1fr; }
  .network-grid { grid-template-columns: repeat(3,1fr); }
  .overview-grid { grid-template-columns: repeat(3,1fr); }
}

/* ============ RESPONSIVE — DESKTOP ============ */
/* NOTE: De sidebar is ALTIJD een overlay (ook op desktop) omdat dit een mobile-first app is.
   De sidebar-w desktop-layout is uitgeschakeld; sidebar toggle werkt via JS op alle schermbreedtes. */
@media (min-width: 900px) {
  /* .main-content { left: var(--sidebar-w); }  ← uitgeschakeld: sidebar is overlay, geen persistent panel */
  /* .sidebar { left: 0; }  ← uitgeschakeld: zou sidebar geforceerd openzetten op desktop/tablet */
  /* .sidebar-overlay { display: none !important; } ← uitgeschakeld: overlay wel nodig */
  .menu-btn { display: flex; } /* menu-knop altijd zichtbaar, ook op desktop */
  .project-cards-grid { grid-template-columns: repeat(3,1fr); }
  .network-grid { grid-template-columns: repeat(4,1fr); }
  /* Desktop: modal gecentreerd in het midden, niet als bottom-sheet */
  .modal-overlay {
    bottom: 0;             /* op desktop geen bottom-nav, dus inset:0 */
    align-items: center;
    padding: 20px;
  }
  .modal-content {
    border-radius: 18px;
    max-height: calc(100vh - 80px);
    align-self: auto;
  }
  .mkt-modal-overlay {
    bottom: 0;
    align-items: center;
    padding: 20px;
  }
  .mkt-modal-sheet {
    border-radius: 18px;
    max-height: calc(100vh - 80px);
    align-self: auto;
  }
  .section { padding: 24px; }
  .section-header h2 { font-size: 1.4rem; }
}

/* ============ DEMO ACCOUNT BUTTONS ============ */
.demo-account-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg);
  cursor: pointer; font-family: inherit; font-size: .8rem; transition: all .15s;
  width: 100%; text-align: left;
}
.demo-account-btn:hover { background: #e8f4fd; border-color: var(--primary-light); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.demo-account-btn div { display: flex; flex-direction: column; }
.demo-account-btn strong { font-size: .82rem; color: var(--text); }
.demo-account-btn small { font-size: .68rem; color: var(--text-light); }
.demo-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: white; flex-shrink: 0; }
.demo-avatar.og { background: #111; }
.demo-avatar.pm { background: var(--blue); }
.demo-avatar.vm { background: var(--orange); }
.demo-avatar.zzp { background: var(--green); }
.demo-avatar.sub { background: var(--purple); }
.demo-avatar.fin { background: var(--accent); }

/* ============ TIMER PLAY BUTTON ============ */
.btn-play-big {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: var(--green); color: white; border: none; border-radius: 10px;
  cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 600;
  transition: all .15s; box-shadow: 0 2px 8px rgba(39,174,96,.3);
}
.btn-play-big:hover { background: #229954; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(39,174,96,.4); }
.btn-play-big i { font-size: 1.1rem; }

/* Timer buttons */
.timer-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 14px 10px; border: 2px solid var(--border); border-radius: 12px;
  background: var(--bg); cursor: pointer; font-family: inherit; font-size: .85rem;
  font-weight: 600; transition: all .2s; width: 100%;
}
.timer-btn i { font-size: 1.5rem; }
.timer-btn.travel { border-color: #e30613; color: #e30613; }
.timer-btn.travel:hover, .timer-btn.travel.active { background: #e30613; color: white; }
.timer-btn.work { border-color: var(--green); color: var(--green); }
.timer-btn.work:hover, .timer-btn.work.active { background: var(--green); color: white; }
.timer-btn.pause { border-color: var(--orange); color: var(--orange); }
.timer-btn.pause:hover { background: var(--orange); color: white; }
.timer-btn.stop { border-color: var(--red); color: var(--red); }
.timer-btn.stop:hover { background: var(--red); color: white; }

/* ============ CONTRACT SIGN / ITEMS ============ */
.contract-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; background: white; margin-bottom: 8px; transition: box-shadow .15s; }
.contract-item:hover { box-shadow: var(--shadow); }
.contract-icon { width: 40px; height: 40px; background: #eff6ff; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
.contract-info { flex: 1; min-width: 0; }
.contract-info strong { font-size: .88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-info span { font-size: .75rem; color: var(--text-light); display: block; }
.contract-date { font-size: .72rem !important; color: var(--text-light) !important; margin-top: 2px; }

/* ============ NOTIF DISMISS ============ */
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid transparent; margin-bottom: 6px; transition: background .15s; position: relative; }
.notif-item.unread { background: #f0f8ff; border-color: #bfdbfe; }
.notif-item.red { border-left: 3px solid var(--red); }
.notif-item.orange { border-left: 3px solid var(--orange); }
.notif-item.green { border-left: 3px solid var(--green); }
.notif-item.blue { border-left: 3px solid var(--blue); }
.notif-dismiss { position: absolute; top: 8px; right: 8px; background: none; border: none; color: var(--text-light); cursor: pointer; font-size: .9rem; padding: 2px 6px; border-radius: 4px; opacity: 0; transition: opacity .15s; }
.notif-item:hover .notif-dismiss { opacity: 1; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item.red .notif-icon { background: #fee2e2; color: var(--red); }
.notif-item.orange .notif-icon { background: #fef3c7; color: var(--orange); }
.notif-item.green .notif-icon { background: #dcfce7; color: var(--green); }
.notif-item.blue .notif-icon { background: rgba(227,6,19,.12); color: #e30613; }
.notif-info { flex: 1; min-width: 0; padding-right: 20px; }
.notif-info strong { font-size: .88rem; display: block; }
.notif-info p { font-size: .78rem; color: var(--text-light); margin: 3px 0 0; line-height: 1.5; }
.notif-time { font-size: .7rem; color: var(--text-light); margin-top: 4px; display: block; }

/* ============ STAT MODAL LIST ============ */
.stat-modal-list { display: grid; gap: 8px; }
.stat-modal-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg); border-radius: 10px; }

/* ══════════════════════════════════════════════════════════
   APP UPGRADE v2 — VERBETERDE ANIMATIES, INTERACTIES & DESIGN
   ══════════════════════════════════════════════════════════ */

/* ── Globale animaties ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bounceIn { 0% { transform: scale(.8); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* Toepassingen */
.animate-fade-in { animation: fadeIn .25s ease both; }
.animate-fade-up { animation: fadeInUp .3s ease both; }
.animate-fade-down { animation: fadeInDown .3s ease both; }
.animate-scale { animation: fadeInScale .25s ease both; }
.animate-slide-right { animation: slideInRight .3s ease both; }
.animate-slide-left { animation: slideInLeft .3s ease both; }
.animate-bounce-in { animation: bounceIn .4s cubic-bezier(.34,1.56,.64,1) both; }
.animate-spin { animation: spin 1s linear infinite; }

/* Staggered delay helpers */
.delay-50  { animation-delay: .05s !important; }
.delay-100 { animation-delay: .1s !important; }
.delay-150 { animation-delay: .15s !important; }
.delay-200 { animation-delay: .2s !important; }
.delay-300 { animation-delay: .3s !important; }

/* ── Verbeterde Bottom Nav (v9.14.1 — hoogte via #sgBottomNavFix) ── */
.bottom-nav {
  background: white;
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.bottom-nav-btn {
  position: relative;
  gap: 1px;
  padding: 5px 2px 3px;
  transition: color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-btn i {
  font-size: .88rem;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), filter .2s, color .2s;
}
.bottom-nav-btn span:last-child {
  font-size: .52rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .2s, font-weight .2s;
}
.bottom-nav-btn:active { transform: scale(.9); }
.bottom-nav-btn.active i {
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 0 4px currentColor);
}
.bottom-nav-btn:hover i { filter: drop-shadow(0 0 3px currentColor); transform: translateY(-1px) scale(1.03); }
.bottom-nav-btn.active span:last-child { font-weight: 700; color: var(--primary); }

/* Active indicator dot */
.bottom-nav-btn.active::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
  animation: fadeIn .2s ease;
}

/* Badge op bottom nav */
.bottom-nav-btn .badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 20px);
  min-width: 16px;
  height: 16px;
  background: var(--accent);
  color: white;
  font-size: .58rem;
  font-weight: 800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
  animation: bounceIn .3s cubic-bezier(.34,1.56,.64,1) both;
}

/* ── Verbeterde Toast Notificaties ── */
#toastContainer {
  position: fixed;
  bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100%;
  max-width: 100%;
  background: #1e293b;
  color: white;
  padding: 11px 18px 11px 14px;
  border-radius: 14px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 0 0 1px rgba(255,255,255,.06);
  animation: toastIn .35s cubic-bezier(.34,1.56,.64,1) both;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  pointer-events: all;
  border-left: 4px solid rgba(255,255,255,.2);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.95); } }
.toast.out { animation: toastOut .25s ease forwards; }
.toast.success { border-left-color: #22c55e; }
.toast.error   { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info    { border-left-color: #0ea5e9; }

/* ── Verbeterde Cards ── */
.card {
  transition: box-shadow .2s ease, transform .2s ease;
  border: 1px solid rgba(0,0,0,.05);
}
.card:has(> [onclick]):hover,
.card[onclick]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-text  { height: 14px; margin-bottom: 6px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 8px; }
.skeleton-btn   { height: 36px; border-radius: 10px; }

/* ── Verbeterde Stat Cards ── */
.stat-card {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
  border: 1px solid transparent;
  animation: fadeInUp .35s ease both;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0,0,0,.06);
}
.stat-card:active { transform: scale(.97); }

/* ── nav-item: beheerd door regel 652 — geen duplicaten ── */

/* sidebar-nav-section: beheerd door regel 711 — geen duplicaat */

/* ── Verbeterde Topbar ── */
.topbar {
  background: var(--tb-bg, linear-gradient(to right, #0a0a0a, #111));
  border-bottom: 1px solid var(--tb-border, rgba(255,255,255,.05));
}
.icon-btn {
  transition: background .15s, color .15s, transform .15s;
  border-radius: 10px;
}
.icon-btn:hover { background: rgba(255,255,255,.1); color: white; }
.icon-btn:active { transform: scale(.9); }
.icon-btn .badge { animation: bounceIn .3s cubic-bezier(.34,1.56,.64,1) both; }

/* User avatar hover */
.user-avatar {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  cursor: pointer;
}
.user-avatar:hover { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(227,6,19,.3); }

/* ── Verbeterde Buttons ── */
.btn-primary {
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn-primary:active { transform: scale(.97); box-shadow: none; }

.btn-secondary { transition: all .15s; }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary:active { transform: scale(.97); }

.btn-small { transition: all .15s; }
.btn-small:hover { transform: translateY(-1px); }
.btn-small:active { transform: scale(.95); }

.btn-xs { transition: all .12s; }
.btn-xs:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-xs:active { transform: scale(.95); }

/* Minimale hoogte touch targets */
@media (max-width: 640px) {
  .btn-primary, .btn-secondary { min-height: 44px; }
  .btn-small { min-height: 38px; }
  .quick-action-btn { min-height: 64px; }
}

/* ── Verbeterde Filter Buttons ── */
.filter-btn {
  transition: all .15s cubic-bezier(.34,1.56,.64,1);
}
.filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.filter-btn:active { transform: scale(.95); }
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(15,23,42,.25);
}

/* ── Verbeterde Tab Buttons ── */
.tab-btn {
  transition: all .18s ease;
  position: relative;
}
.tab-btn.active {
  background: var(--primary);
  color: white;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15,23,42,.2);
}

/* ── Verbeterde Project Cards ── */
.project-card-v2 {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
  animation: fadeInUp .3s ease both;
}
.project-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.project-card-v2:active { transform: scale(.98); }

/* ── Section transitions ── */
.section {
  animation: fadeInUp .25s ease both;
}
.section.hidden { animation: none; }

/* ── Quick Action Buttons verbeterd ── */
.quick-action-btn {
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.quick-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: white;
}
.quick-action-btn:active { transform: scale(.95); }

/* ── Search bar ── */
.search-bar {
  transition: box-shadow .15s, border-color .15s;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}

/* ── Info badge ── */
.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
  transition: background .15s, color .15s;
}
.info-badge:hover { background: var(--primary); color: white; }

/* ── Form inputs verbeterd ── */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
  outline: none;
}

/* ── Modal verbeterd ── */
.modal-overlay {
  animation: fadeIn .2s ease;
}
.modal, .modal-content {
  animation: fadeInUp .3s cubic-bezier(.34,1.56,.64,1) both;
}
@media (min-width: 900px) {
  .modal, .modal-content { animation: fadeInScale .25s cubic-bezier(.34,1.56,.64,1) both; }
}

/* ── Verbeterde Scroll ── */
.main-content {
  scroll-behavior: smooth;
}
/* Mooiere scrollbar op desktop */
@media (min-width: 900px) {
  .main-content::-webkit-scrollbar { width: 6px; }
  .main-content::-webkit-scrollbar-track { background: transparent; }
  .main-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
  .main-content::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
}

/* ── Loading spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0,0,0,.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner.white { border-color: rgba(255,255,255,.2); border-top-color: white; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
.spinner.lg { width: 30px; height: 30px; border-width: 3px; }

/* ── Status indicators ── */
.status-dot {
  animation: none;
  transition: background .3s;
}
.status-dot.green { box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.status-dot.pulse-green {
  background: var(--green);
  animation: statusPulse 2s ease infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50% { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}

/* ── Dashboard timer widget verbeterd ── */
#dashTimerWidget {
  animation: fadeInUp .4s ease both;
  overflow: hidden;
}
#dashTimerWidget .timer-stat-chip {
  transition: background .2s;
}
#dashTimerWidget .timer-stat-chip:hover {
  background: rgba(255,255,255,.12) !important;
}
#dashTimerWidget .timer-stat-chip:active {
  background: rgba(255,255,255,.18) !important;
  transform: scale(.96);
}

/* ── Dashboard stats grid ── */
.stats-grid .stat-card:nth-child(1) { animation-delay: .05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: .1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: .15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: .2s; }

/* ── Pull-to-refresh indicator ── */
.ptr-indicator {
  position: fixed;
  top: var(--topbar-h);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: var(--shadow-md);
  font-size: .78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 150;
  opacity: 0;
  transition: opacity .2s, top .2s;
}
.ptr-indicator.visible { opacity: 1; top: calc(var(--topbar-h) + 8px); }

/* ── Lege staat indicator ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  text-align: center;
  animation: fadeIn .3s ease both;
}
.empty-state i {
  font-size: 2.5rem;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.empty-state h3 { font-size: .95rem; font-weight: 700; color: var(--text); }
.empty-state p { font-size: .82rem; color: var(--text-light); max-width: 260px; line-height: 1.5; }

/* ── Verbeterde alert items ── */
.alert-item {
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.alert-item:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }

/* ── Verbeterde Login ── */
.role-btn:active { transform: scale(.95) !important; }

/* ── Sidebar Brand ── */
.sidebar-brand-name { font-size: .92rem; font-weight: 800; }
.sidebar-user { display: flex; flex-direction: column; align-items: flex-start; background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.sidebar-user strong { font-size: .82rem; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }

/* ── Nav badge animatie ── */
.nav-badge {
  animation: bounceIn .35s cubic-bezier(.34,1.56,.64,1) both;
  font-size: .62rem !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

/* ── Verbeterde chip selector ── */
.pill {
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
}
.pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(15,23,42,.2);
}

/* ── Sub-tabs verbeterd ── */
.sub-tab {
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.sub-tab.active {
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ── Verbeterde card header ── */
.card-header h3, .card-title {
  font-size: .92rem;
  font-weight: 700;
}

/* ── Focus ring toegankelijkheid ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) { outline: none; }

/* ── Verbeterd splash scherm ── */
.splash { animation: none; }
.splash-logo img {
  animation: bounceIn .6s cubic-bezier(.34,1.56,.64,1) .2s both;
}
.splash-logo div:first-of-type {
  animation: fadeInUp .5s ease .4s both;
}
.splash-sub {
  animation: fadeInUp .5s ease .55s both;
}
.splash-loader {
  animation: fadeIn .4s ease .7s both;
}

/* ── Verbeterd topbar logo ── */
.topbar-logo img {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.topbar-logo:hover img { transform: scale(1.08); }

/* ── Section headers ── */
.section-header h2 {
  line-height: 1.2;
}

/* ── Kaart animaties bij laden ── */
.project-card-v2:nth-child(1) { animation-delay: .05s; }
.project-card-v2:nth-child(2) { animation-delay: .1s; }
.project-card-v2:nth-child(3) { animation-delay: .15s; }
.project-card-v2:nth-child(4) { animation-delay: .2s; }

/* ── Touch feedback voor alle interactieve elementen ── */
button, [onclick], .card[onclick], .stat-card, .project-card-v2, .learn-card, .network-card {
  -webkit-tap-highlight-color: transparent;
}

/* ── Verbeterde timer widget chips ── */
.timer-stat-chip {
  cursor: pointer;
  border-radius: 11px;
  transition: background .2s, transform .15s;
}
.timer-stat-chip:active { transform: scale(.95); }

/* ── Progress bar animatie ── */
#dashTimerBarTravel, #dashTimerBarWork {
  transition: flex .6s cubic-bezier(.34,1,.64,1), width .6s cubic-bezier(.34,1,.64,1) !important;
}

/* ── Verbeterde planning bar ── */
#dashPlanningBar {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
#dashPlanningBar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(227,6,19,.5) !important;
}
#dashPlanningBar:active { transform: scale(.98); }

/* ── GPS/Push bars verbeterd ── */
#dashboardPushBar, #dashboardGPSBar {
  transition: transform .15s, box-shadow .15s;
}
#dashboardPushBar:hover, #dashboardGPSBar:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ── Bottom safe area ── */
.main-content {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Verbeterde scroll chips ── */
.chip-bar .chip {
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
}
.chip-bar .chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chip-bar .chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(15,23,42,.2);
}

/* ── Verbeterde tijden stats ── */
.tijden-stat {
  transition: transform .15s, box-shadow .15s;
  cursor: default;
}
.tijden-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── vault item hover ── */
.vault-item {
  transition: background .15s;
  border-radius: 8px;
  padding-left: 4px;
  margin-left: -4px;
}
.vault-item:hover { background: var(--bg); }

/* ── Contract item hover ── */
.contract-item {
  transition: all .15s;
}
.contract-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* ── Notif item hover ── */
.notif-item {
  transition: transform .15s, box-shadow .15s;
}
.notif-item:hover { transform: translateX(2px); }

/* sidebar scrollbar: beheerd door regel 593 — geen duplicaat */

/* ── Header section border-bottom ── */
.section-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,.05);
  margin-bottom: 18px;
}

/* ── Verbeterde tijden tabel ── */
.tijden-table {
  border-radius: var(--radius);
  overflow: hidden;
}
.tijden-table thead tr {
  background: var(--primary);
}
.tijden-table .tijden-row {
  transition: background .1s;
}

/* ── Responsive font size voor grote schermen ── */
@media (min-width: 900px) {
  .stat-value { font-size: 1.8rem; }
  .card { padding: 20px; }
  .stats-grid { gap: 14px; }
  #dashTimerDisplay { font-size: 2.1rem !important; }
}

/* ── Mooiere tabel header ── */
.tijden-table th {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ── Login knop loading state ── */
#loginBtn.loading {
  pointer-events: none;
  opacity: .75;
}
#loginBtn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: 4px;
}

/* ── Pulsing online indicator ── */
.online-dot {
  background: #22c55e;
  animation: statusPulse 2.5s ease infinite;
}

/* ── Verbeterde modal footer ── */
.modal-footer {
  background: white;
  gap: 10px;
}

/* ── Verbeterde network cards ── */
.network-card {
  border: 1px solid var(--border);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.network-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.network-card:active { transform: scale(.97); }

/* ── Plan bar pulsing when there are alerts ── */
#dashPlanAlertCount:not([style*="display: none"]) {
  animation: wiggle 3s ease 2s infinite;
}

/* ── Verbeterde section transitions ── */
#mainContent > .section:not(.hidden) {
  animation: fadeInUp .22s ease both;
}


/* ============ SIGNATURE CANVAS ============ */
#signatureCanvas { touch-action: none; }

/* ============ CONTRACT SIGNING MODAL ============ */
#signatureCanvas { border: 1.5px solid var(--border); border-radius: 10px; width: 100%; display: block; background: #fafafa; }

/* ============ VAULT ENHANCEMENTS ============ */
.vault-item { transition: box-shadow .15s, transform .1s; }
.vault-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.vault-item.red { border-left: 3px solid var(--red); }
.vault-item.orange { border-left: 3px solid var(--orange); }
.vault-item.green { border-left: 3px solid var(--green); }
.vault-item.purple { border-left: 3px solid var(--purple); }
.vault-item.purple .vault-icon i { color: var(--purple) !important; }
#vaultItemsContainer { display: grid; gap: 0; }

/* ============ CONTRACT IMPROVEMENTS ============ */
.contract-item[data-status="to-sign"] { border-color: var(--accent); background: #fff8f8; }
.contract-item[data-status="to-sign"] .contract-icon { background: #fee2e2; color: var(--accent); }
.doc-status { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.doc-status.green { background: #dcfce7; color: #166534; }
.doc-status.orange { background: #fef3c7; color: #92400e; }
.doc-status.red { background: #fee2e2; color: #991b1b; }

/* ============ STAFF SWITCH & QUICK ACTIONS ============ */
.staff-switch-item { transition: background .15s, border-color .15s, transform .1s; }
.staff-switch-item:hover:not(.current) { transform: translateX(2px); }

/* Betaalstatus kleuren */
.status-badge.purple { background: #f3e8ff; color: #6b21a8; }

/* Missing hours banner */
#missingHoursBanner { transition: all .3s; }

/* Quick action buttons hover */
.quick-action-btn { transition: all .15s; }
.quick-action-btn:hover { background: #e8eeff !important; border-color: var(--primary) !important; transform: translateY(-1px); }

/* ============ TIMER MODAL ENHANCEMENTS ============ */
#timerDisplay { font-feature-settings: "tnum"; }
.timer-btn.active { transform: scale(1.03); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
#timerSummary { border: 1.5px solid var(--border); }

/* ============ FILTER BUTTONS ============ */
.filter-btn { display: inline-flex; align-items: center; gap: 4px; }

/* ============ VAULT TAB SCROLL ============ */
#vaultList .filter-btn { white-space: nowrap; flex-shrink: 0; }

/* ============ AGENDA MODAL ============ */
/* Agenda modal — grote full-screen weergave */
#agendaModal .modal,
#agendaModal .modal.xlarge {
  max-width: 980px;
  width: 98vw;
  max-height: 94vh;
  height: 94vh;
}
#agendaFullContent {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 200px;
}
/* Agenda tab hover */
.agenda-tab:hover {
  background: #f8fafc !important;
  color: var(--primary) !important;
}

/* ============ ZELF PLANNEN MODAL ============ */
#zelfPlannenModal .modal-content {
  max-width: 600px;
  max-height: 94vh;
  height: 94vh;
}
#zelfPlannenModal .modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ============ EDIT PROJECT MODAL ============ */
#editProjectModal .modal-content { max-width: 620px; }
#epOvernachtingFields { transition: all .2s; }

/* ============ OFFERTE MODAL ============ */
#offerteModal .modal-content { max-width: 680px; }
#offerteRegels input { box-sizing: border-box; }
#offerteCanvas { touch-action: none; }

/* ============ ZELF PLANNEN ============ */
#beschikbaarheidGrid input { box-sizing: border-box; }

/* ── Globale input/select/textarea reset: altijd leesbaar ── */
input, textarea, select {
  background: #ffffff;
  color: #111111;
  font-family: inherit;
}

/* Native date/time picker: force licht thema zodat ze leesbaar blijven */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: light;
  background: #ffffff !important;
  color: #111111 !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0);
  opacity: 0.7;
  cursor: pointer;
  color-scheme: light;
}

/* ============ BESCHIKBAARHEID RIJEN ============ */
.besch-row {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 6px;
  transition: border-color .2s;
}
.besch-row.beschikbaar  { border-left: 4px solid var(--green); background: #f0fdf4; }
.besch-row.niet-beschikbaar { border-left: 4px solid var(--red); background: #fff5f5; }
.besch-row input { padding: 7px 8px; border: 1.5px solid var(--border); border-radius: 8px; font-size: .82rem; outline: none; width: 100%; color: #111; background: white; }
.besch-row input:focus { border-color: var(--blue); }
.besch-row select { padding: 7px 8px; border: 1.5px solid var(--border); border-radius: 8px; font-size: .8rem; background: white; color: #111; outline: none; }

/* ============ AVATAR CROP MODAL ============ */
#avatarCropModal {
  animation: fadeInModal .2s ease;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#cropCircleOverlay {
  transition: none; /* geen transitie tijdens drag */
  box-sizing: border-box;
}
#cropCanvas {
  display: block;
  max-height: 55vh;
  object-fit: contain;
}

/* ============ TEAM CHAT — WhatsApp-stijl (v4.6) ============ */

/* Contact-sidebar smal scrolt soepel */
#tcContactList { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Berichten-venster soepel scrollen */
#tcMessages {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  min-height: 200px;
}
#tcMsgList { display: flex; flex-direction: column; gap: 4px; }

/* Chat-input auto-resize */
#tcInput::placeholder { color: #adb5bd; }
#tcInput:focus { outline: none; box-shadow: none; }

/* Aanwezig-gloed animatie voor online members */
@keyframes tcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(37,211,102,0); }
}
.tc-online-ring { animation: tcPulse 2s ease infinite; }

/* Berichten — hover effect */
#tcMsgList > div:hover { opacity: .97; }

/* ════════════════════════════════════════════════════════════
   MISSED CALLS SYSTEEM — v1.0
   ════════════════════════════════════════════════════════════ */

/* Puls-ring animatie rondom avatar bij openstaande gemiste oproep */
@keyframes callPulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.18); opacity: .45; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Rinkel-animatie voor header-badge */
@keyframes callBadgeRing {
  0%, 100% { transform: rotate(0deg); }
  10%       { transform: rotate(-15deg); }
  20%       { transform: rotate(15deg); }
  30%       { transform: rotate(-10deg); }
  40%       { transform: rotate(10deg); }
  50%       { transform: rotate(0deg); }
}

/* Header telefoon-knop — stijl nu via .topbar-call-btn in bovenstaande blok */
#callNotifBtn { /* legacy selector, knop heeft nu class topbar-call-btn */ }

/* Badge op de telefoon-knop — stijl nu via .topbar-red-badge */
#headerCallBadge { /* legacy selector, badge heeft nu class topbar-red-badge */ }

/* Stat-card for missed calls */
.stat-card.call-card { cursor: pointer; }
.stat-card.call-card .stat-icon { background: #fee2e2; }
.stat-card.call-card .stat-icon i { color: #e30613; }

/* Widget card in dashboard */
#missedCallsCard {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
#missedCallsCard.has-pending {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(227,6,19,.06), var(--shadow-sm);
}

/* Card header */
.missed-calls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.missed-calls-header h3 {
  margin: 0;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badge naast de titel */
#missedCallBadge {
  background: #e30613;
  color: white;
  font-size: .65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  animation: callPulse 1.6s ease-in-out infinite;
}

/* Widget body */
#missedCallsWidget { padding: 12px 14px; }

/* Permission banner fade-in */
#notifyPermBanner > div {
  animation: notifBannerIn .3s ease;
}
@keyframes notifBannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Rij hover */
[id^="callRow_"] { cursor: default; }
[id^="callRow_"]:hover { background: var(--bg) !important; }

/* Telefoon-puls op de snelle-actie kaart */
.call-quick-btn {
  animation: callPulse 1.8s ease-in-out infinite;
}

/* Responsive: verberg "Bellen" tekst op heel kleine schermen */
@media (max-width: 380px) {
  [id^="callRow_"] span { display: none !important; }
}

/* Marktplaats: verberg knop-label op heel kleine schermen zodat credits-badge niet overloopt */
@media (max-width: 400px) {
  .mkt-btn-label { display: none !important; }
}

/* Credits mini-widget: nooit te breed worden */
#sgCreditMiniWidget > div {
  max-width: 110px;
  overflow: hidden;
}

/* Topbar: verberg begroeting op kleine schermen zodat knoppen niet overlappen */
@media (max-width: 420px) {
  #topbarGreeting { display: none !important; }
  .icon-btn { padding: 5px !important; font-size: .88rem !important; }
  .user-avatar { width: 30px !important; height: 30px !important; font-size: .72rem !important; }
}

/* Mobiel: contactlijst smaller op kleine schermen */
@media (max-width: 380px) {
  #tcContactList { width: 68px !important; min-width: 68px !important; }
  #tcContactList span { font-size: .5rem !important; }
}

/* ============ TEAM CHAT — SLIDE GEDRAG (alle schermformaten) ============ */
/*
  Gedrag op ALLE schermformaten:
  - Standaard: sidebar zichtbaar (260px), chatpaneel neemt resterende ruimte in
  - Als chat open is (.tc-chat-open): sidebar verdwijnt, chat krijgt volledige breedte
  - Terug-knop (←) in de chat-header brengt de sidebar terug
*/

/* Terug-knop standaard verborgen totdat een chat geopend wordt */
#tcBackBtn {
  display: none;
}

/* Sidebar — vloeiende breedte-transitie */
#tcSidebar {
  transition: width .28s ease, min-width .28s ease, transform .28s ease, opacity .28s ease;
  overflow: hidden;
  flex-shrink: 0;
}

/* Chatpaneel rechts — vloeiende transitie */
#tcLayout > div:last-child {
  transition: transform .28s ease;
}

/* ── Chat open: sidebar inklappen ── */
#tcLayout.tc-chat-open #tcSidebar {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  pointer-events: none;
  border: none !important;
}

/* ── Terug-knop tonen zodra chat open is ── */
#tcLayout.tc-chat-open #tcBackBtn {
  display: flex !important;
}

/* ── Mobiel: standaard sidebar volledige breedte, chat verborgen achter het scherm ── */
@media (max-width: 700px) {
  #tcLayout {
    position: relative;
    height: calc(100vh - 160px) !important;
  }

  #tcSidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-right: none !important;
  }

  #tcLayout > div:last-child {
    position: absolute !important;
    inset: 0;
    transform: translateX(100%);
    z-index: 2;
    width: 100% !important;
  }

  #tcLayout.tc-chat-open > div:last-child {
    transform: translateX(0) !important;
  }

  /* Zoekbalk iets smaller op heel smal scherm */
  #tcNavSearch {
    width: 140px !important;
  }
}

/* Dag-aanwezig toggle (legacy compatibility) */
.dag-toggle-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #f8fafc; border-radius: 10px; margin-bottom: 4px;
}
.dag-toggle-row label { font-size: .8rem; flex: 1; }
.dag-aanwezig  { color: var(--green); }
.dag-afwezig   { color: var(--red); }

/* Legacy team-chat-row (backwards compat) */
.tc-badge.voorman { background: #fef3c7; color: #92400e; }
.tc-badge.team    { background: #eff6ff; color: var(--blue); }

/* ════════════════════════════════════════════════════════════
   MARKTPLAATS MODULE — v1.0
   ════════════════════════════════════════════════════════════ */

/* Marktplaats nav-badge */
#navMarktBadge {
  background: #e30613;
  color: white;
  font-size: .58rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 2px;
  vertical-align: middle;
  line-height: 1.4;
}

/* Marktplaats kaart hover */
#sec-marktplaats .section-header h2 i { margin-right: 8px; color: #e30613 !important; }

/* Opdracht kaart animatie bij hover (via inline style) */
.mkt-card-enter {
  animation: mktFadeIn .25s ease forwards;
}
@keyframes mktFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Marktplaats modal overlay ── */
.mkt-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;                /* Volledig scherm zodat modal altijd zichtbaar is */
  z-index: 9500;            /* Hoger dan bottom-nav (z-index 200) */
  background: rgba(0,0,0,.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Sheet zelf */
.mkt-modal-sheet {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  /* Laat ruimte voor bottom-nav + safe-area */
  max-height: calc(100dvh - var(--topbar-h, 56px) - 16px);
  max-height: calc(100vh - var(--topbar-h, 56px) - 16px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,.28);
  overflow: hidden;
  align-self: flex-end;
  /* Zorg dat de sheet de bottom-nav overlapt */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ══════════════════════════════════════════════
   VISIE & ROADMAP — Pijler kaarten
══════════════════════════════════════════════ */
.visie-pijler-card {
  background: white;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.visie-pijler-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }

/* Header van elke pijler */
.vp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  flex-wrap: wrap; gap: 8px;
}
.vp-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.1); color: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; flex-shrink: 0;
}
.vp-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.vp-title-wrap { flex: 1; min-width: 0; }
.vp-title { font-size: .95rem; font-weight: 900; color: #0f172a; line-height: 1.2; }
.vp-sub   { font-size: .72rem; color: #64748b; margin-top: 2px; }

/* Status badges */
.vp-status {
  padding: 4px 10px; border-radius: 20px;
  font-size: .68rem; font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.vp-status-actief { background: #dcfce7; color: #166534; }
.vp-status-bouw   { background: #fef3c7; color: #b45309; }
.vp-status-plan   { background: rgba(227,6,19,.08); color: #9b0000; }

/* Body */
.vp-body { padding: 14px 16px; }

/* Feature grid (pijler 1) */
.vp-feature-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.vp-feature {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0;
}
.vp-feature > i { margin-top: 2px; font-size: .95rem; width: 18px; flex-shrink: 0; }
.vp-feature strong { display: block; font-size: .82rem; color: #0f172a; margin-bottom: 2px; }
.vp-feature p { font-size: .74rem; color: #475569; margin: 0; line-height: 1.5; }

/* Country tags */
.vp-countries { display: flex; gap: 6px; flex-wrap: wrap; }
.vp-country {
  padding: 3px 8px; border-radius: 20px;
  background: #f1f5f9; color: #475569;
  font-size: .7rem; font-weight: 600; border: 1px solid #e2e8f0;
}

/* 3-staps flow (pijler 2) */
.vp-flow { display: flex; flex-direction: column; gap: 8px; }
.vp-flow-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  background: #f8fafc;
}
.vp-flow-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; flex-shrink: 0;
}
.vp-flow-step strong { display: block; font-size: .82rem; color: #0f172a; margin-bottom: 2px; }
.vp-flow-step p { font-size: .74rem; color: #475569; margin: 0; line-height: 1.5; }

/* Factuur preview (pijler 3) */
.vp-invoice-preview {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
}
.vp-doc {
  flex: 1; min-width: 140px; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid #e2e8f0;
}
.vp-doc-invoice { background: #faf5ff; border-color: #ddd6fe; }
.vp-doc-spec    { background: #f0f9ff; border-color: #bae6fd; }

/* Incasso flow (pijler 4) */
.vp-incasso-flow {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; justify-content: center;
}
.vp-incasso-step { display: flex; flex-direction: column; align-items: center; min-width: 70px; flex: 1; }
.vp-incasso-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.vp-incasso-arrow { font-size: 1rem; color: #94a3b8; flex-shrink: 0; }

/* Boekhoud grid (pijler 5) */
.vp-boekhoud-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
}
.vp-boekhoud-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: 12px;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  text-align: center; font-size: .75rem; font-weight: 700; color: #0f172a;
}
.vp-boekhoud-item i { font-size: 1.1rem; }
.vp-boekhoud-badge {
  font-size: .6rem; font-weight: 800; padding: 2px 7px;
  border-radius: 20px; margin-top: 2px;
}

/* Responsive */
@media (max-width: 480px) {
  .vp-boekhoud-grid { grid-template-columns: repeat(2,1fr); }
  .vp-incasso-arrow { display: none; }
  .vp-incasso-flow { gap: 8px; }
}

/* Header — sticky bovenaan */
.mkt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
  flex-shrink: 0;
}
.mkt-modal-header strong {
  font-size: .95rem;
  color: #111111;
}

/* Sluit-knop */
.mkt-modal-close {
  background: #f0f0f0;
  border: none;
  font-size: 1.2rem;
  color: #555555;
  cursor: pointer;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 8px;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mkt-modal-close:hover { background: #e0e0e0; color: #111111; }
.mkt-modal-close:active { background: #ccc; }

/* Body — scrollbaar */
.mkt-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 18px 20px;
  background: #ffffff;
}

/* Desktop: modal gecentreerd ipv bottom-sheet */
@media (min-width: 600px) {
  .mkt-modal-overlay {
    align-items: center;
    padding: 16px;
  }
  .mkt-modal-sheet {
    border-radius: 18px;
    max-height: 90dvh;
    max-height: 90vh;
  }
}

/* ── Marktplaats kaart klinken-knop ── */
[id^="mktKlink_"],
[id^="mktKlinkModal_"] {
  min-width: 44px;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
[id^="mktKlink_"]:active,
[id^="mktKlinkModal_"]:active {
  transform: scale(.92);
}

/* ── Marktplaats kaart — klik-zone uitbreiden ── */
[id^="mktKaart_"] {
  user-select: none;
  -webkit-user-select: none;
}
[id^="mktKaart_"] > div:first-of-type {
  /* Vergroot klikgebied voor touch */
  min-height: 48px;
}

/* ── Vault tab knoppen ── */
#vaultTabBar button {
  transition: background .15s, color .15s, font-weight .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
#vaultTabBar button:active {
  transform: scale(.96);
}

/* ════════════════════════════════════════════════════════════
   UNIVERSELE NOTIFICATIE INDEX — SGNotifUI
   ════════════════════════════════════════════════════════════ */

/* Notificatie tabs in sec-notifications */
#notifTabInbox, #notifTabInstellingen {
  transition: background .15s, color .15s, font-weight .15s;
}

/* Compacte notificatie-index in instellingen-kaart */
#sgNotifIndexPanelSettings .toggle-switch {
  width: 40px;
  height: 22px;
}
#sgNotifIndexPanelSettings .toggle-slider:before {
  height: 16px;
  width: 16px;
}
#sgNotifIndexPanelSettings .toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* ============ PERSOON PLAN MODAL ============ */
#personPlanModal .modal-content { max-width: 480px; }

/* ============ CAO KAART ============ */
#pdCaoCard { background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%); border-left: 4px solid var(--blue) !important; }

/* ============ ACCOMMODATIE PENDEL ============ */
.acc-pendel-badge { background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 10px; padding: 8px 12px; font-size: .82rem; color: #92400e; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ============ OVERVIEW ACTIONS ============ */
.section-header .btn-small { flex-shrink: 0; }

/* ============================================================
   v3.6 — GLOBAL UX IMPROVEMENTS
   ============================================================ */

/* Soepelere knoppen overal */
button { transition: all .18s ease !important; }
button:active { transform: scale(.97) !important; }

/* Betere hover op stat-cards */
.stat-card {
  border: 1.5px solid transparent;
  transition: transform .18s, box-shadow .18s, border-color .18s !important;
}
.stat-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
  border-color: rgba(0,0,0,.06) !important;
}

/* Project kaarten betere hover */
.project-card {
  border: 1.5px solid transparent;
  transition: transform .18s, box-shadow .18s, border-color .18s !important;
}
.project-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.14) !important;
  border-color: rgba(0,0,0,.08) !important;
}

/* Team chat rijen betere animatie */
.team-chat-row {
  transition: background .18s, border-color .18s, transform .18s !important;
}
.team-chat-row:hover {
  transform: translateX(3px) !important;
}

/* Filter buttons mooier */
.filter-btn {
  transition: all .18s !important;
}
.filter-btn:hover:not(.active) {
  background: #f4f4f5;
  border-color: #d4d4d8;
  transform: translateY(-1px);
}

/* Planning view-switcher: hide scrollbar but keep scroll */
#sec-planning .filter-btn,
#sec-agenda  .filter-btn { flex-shrink: 0; }

/* Hide scrollbar in pill-switcher */
div[style*="scrollbar-width:none"]::-webkit-scrollbar { display: none; }

/* Project status-option buttons in dropdown */
.pd-status-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  text-align: left;
  transition: background .12s;
  font-family: inherit;
}
.pd-status-opt:hover { background: var(--bg, #f8fafc); }
.pd-status-opt i { width: 16px; text-align: center; color: var(--sc, #64748b); flex-shrink:0; }

/* Project filter bar — new status buttons */
.proj-status-btn.active {
  background: var(--sc-bg, #fef3c7) !important;
  color: var(--sc-clr, #b45309) !important;
  border-color: var(--sc-border, #f59e0b) !important;
}

/* Tab buttons betere hover */
.tab-btn {
  transition: all .15s !important;
}
.tab-btn:hover:not(.active) {
  background: #f4f4f5;
  color: var(--text) !important;
}

/* ── Chat overlay animatie ── */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   VOORBEREIDING FASE — Info-selector toggles & rows
   ═══════════════════════════════════════════════════════════ */
.prep-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
}
.prep-info-row:last-child {
  border-bottom: none;
}
.prep-info-icon {
  width: 36px;
  height: 36px;
  background: #f0f9ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0891b2;
  font-size: .9rem;
}
.prep-info-body {
  flex: 1;
  min-width: 0;
}
.prep-info-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.prep-info-desc {
  font-size: .72rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* Toggle switch */
.prep-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.prep-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.prep-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.prep-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.prep-toggle input:checked + .prep-toggle-slider {
  background: #0891b2;
}
.prep-toggle input:checked + .prep-toggle-slider::before {
  transform: translateX(20px);
}

/* Last-minute modal */
#lastMinuteWijzigingModal {
  animation: fadeIn .25s ease;
}

/* Chat overlay zichtbaar */
#tcChatOverlay.tc-open {
  display: flex !important;
  animation: slideInRight .22s ease;
}

/* ── Gesprekkenlijst items ── */
.tc-conv-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  background: white;
  transition: background .12s;
}
.tc-conv-item:hover { background: #f8fafc; }
.tc-conv-item.active { background: #fff8f8; border-left: 3px solid var(--accent); }
.tc-conv-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 800; color: white; flex-shrink: 0;
}
.tc-conv-avatar.round { border-radius: 50%; }
.tc-conv-info { flex: 1; min-width: 0; }
.tc-conv-name { font-size: .88rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-conv-preview { font-size: .74rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tc-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tc-conv-time { font-size: .66rem; color: #94a3b8; }
.tc-conv-badge { background: var(--accent); color: white; font-size: .62rem; font-weight: 800; border-radius: 10px; padding: 2px 6px; min-width: 18px; text-align: center; }

/* nav-item hover/active: beheerd door regel 652 — geen duplicaten */

/* Chips in netwerk betere hover */
.chip {
  transition: all .15s !important;
}
.chip:hover:not(.active) {
  background: #f4f4f5;
  transform: translateY(-1px);
}

/* Modal animatie */
.modal-content {
  animation: modalSlideUp .25s ease !important;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Section header subtitle */
.section-header > div p {
  font-size: .74rem;
  color: var(--text-light);
  margin: 2px 0 0;
  line-height: 1.4;
}

/* ============================================================
   v4.0 — PROFESSIONELE UI & TOOLTIP SYSTEEM
   ============================================================ */

/* ── Universeel Tooltip systeem ── */
/* Gebruik: data-tooltip="Uitleg tekst" op elk element */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  font-size: .71rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: pre-wrap;
  max-width: 200px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, transform .18s;
  transform: translateX(-50%) translateY(4px);
  z-index: 99999;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* Pijltje */
[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s;
  z-index: 99999;
}
[data-tooltip]:hover::before,
[data-tooltip]:focus::before {
  opacity: 1;
  visibility: visible;
}
/* Tooltip links uitlijnen voor knoppen aan de rechterkant */
[data-tooltip-left]::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}
[data-tooltip-left]:hover::after {
  transform: translateX(0) translateY(0);
}

/* ── Topbar tooltips — omlaag ipv omhoog (topbar zit bovenaan scherm) ── */
.topbar-right [data-tooltip]::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
.topbar-right [data-tooltip]:hover::after,
.topbar-right [data-tooltip]:focus::after {
  transform: translateX(-50%) translateY(0);
}
/* Pijltje omlaag */
.topbar-right [data-tooltip]::before {
  bottom: auto;
  top: calc(100% + 3px);
  border-top-color: transparent;
  border-bottom-color: #1e293b;
}
/* Laatste knoppen rechts: tooltip naar links uitlijnen zodat hij niet buiten beeld valt */
.topbar-right [data-tooltip]:last-child::after,
.topbar-right [data-tooltip]:nth-last-child(-n+2)::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-4px);
}
.topbar-right [data-tooltip]:last-child:hover::after,
.topbar-right [data-tooltip]:nth-last-child(-n+2):hover::after {
  transform: translateX(0) translateY(0);
}

/* ── Chat sectie knoppen label verbergen op smal ── */
@media (max-width: 420px) {
  .tc-btn-label { display: none; }
}

/* ── Zoekbalk wis-knop tonen als input gevuld ── */
#tcSearchInput:not(:placeholder-shown) ~ #tcSearchClear { display: block !important; }

/* ── Chat header (overlay) donkere stijl — actieknopjes wit ── */
#tcNavChatActions .icon-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
}
#tcNavChatActions .icon-btn:hover {
  background: rgba(255,255,255,.2);
  color: white;
}

/* ── Dashboard Timer Widget animaties ── */
#dashTimerWidget {
  transition: box-shadow .3s ease;
}
#dashTimerWidget:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.24) !important;
}

/* Timer dot pulserende animatie als actief */
#dashTimerDot.active {
  background: #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,.2), 0 0 0 8px rgba(34,197,94,.08) !important;
  animation: timerPulse 2s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,.2), 0 0 0 8px rgba(34,197,94,.06); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,.3), 0 0 0 12px rgba(34,197,94,.1); }
}

/* Timer display glow als actief */
#dashTimerDisplay.running {
  color: #4ade80 !important;
  text-shadow: 0 0 20px rgba(74,222,128,.4);
}

/* Start knop pulse als timer actief is */
#dashTimerStartBtn.running {
  background: rgba(227,6,19,.35) !important;
  box-shadow: 0 4px 14px rgba(227,6,19,.35) !important;
  border: 1.5px solid rgba(227,6,19,.6) !important;
}
#dashTimerStartBtn.running:active {
  transform: scale(.96) !important;
}

/* Actie knoppen hover effect */
#dashTimerWidget button:hover {
  opacity: .9;
  transform: translateY(-1px) !important;
}

/* ── Verbeterde sectie-titels ── */
.section-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -.3px;
  color: #0f172a;
}

/* ── Verbeterde card hover ── */
.card {
  transition: box-shadow .2s !important;
}
.card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1) !important;
}

/* ── Bottom nav actief teken verbeterd ── */
.bottom-nav-item.active {
  position: relative;
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}

/* ── Knop ripple effect ── */
.btn-primary, .btn-xs, button[class*="btn"] {
  overflow: hidden;
  position: relative;
}

/* ── Info-badge (i knopje naast labels) ── */
.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: .67rem;
  font-weight: 800;
  cursor: help;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  vertical-align: middle;
  margin-left: 4px;
}
.info-badge:hover {
  background: #e30613;
  color: white;
}

/* ── Sectie animate bij tonen ── */
.section {
  animation: sectionIn .22s ease;
}
@keyframes sectionIn {
  from { opacity: .6; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Quick-action grid verbeterd ── */
.quick-action-btn {
  border-radius: 14px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}
.quick-action-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
}

/* ── Tag / badge verbeterd ── */
.badge, [class*="-badge"] {
  letter-spacing: .02em;
}

/* ── GPS bar dashboard verbeterd ── */
#dashboardGPSBar, #dashboardPushBar {
  transition: box-shadow .2s, border-color .2s;
}
#dashboardGPSBar:hover, #dashboardPushBar:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1) !important;
  border-color: #cbd5e1 !important;
}

/* ── Scrollbare lijsten mooier ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.25);
}

/* ── Input focus ring verbeterd ── */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(227,6,19,.12) !important;
  border-color: #e30613 !important;
  transition: box-shadow .18s, border-color .18s;
}

/* ── Skeleton loader voor laden kaarten ── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Betere card header */
.card-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 14px !important;
}

/* Snelle acties in dashboard */
.dashboard-quick-btn {
  background: var(--card, #fff);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  text-align: left;
  color: var(--text, #0f172a);
}
.dashboard-quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Betere btn-xs hover */
.btn-xs {
  transition: all .15s !important;
}
.btn-xs:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
}

/* Betere btn-small hover */
.btn-small {
  transition: all .18s !important;
}
.btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

/* Betere btn-primary hover */
.btn-primary {
  transition: all .18s !important;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(227,6,19,.3);
}

/* Beschikbaarheid rijen verbeterd */
.besch-row {
  transition: border-color .2s, box-shadow .2s !important;
}
.besch-row:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Toast verbeterd */
#appToast {
  border-radius: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -.2px;
}

/* Agenda maand cellen hover */
#agendaFullContent [onclick*="_addAfspraakOnDate"] {
  transition: transform .15s, box-shadow .15s !important;
}
#agendaFullContent [onclick*="_addAfspraakOnDate"]:hover {
  transform: scale(1.04) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
  z-index: 2 !important;
  position: relative !important;
}

/* Zelf plannen weekdag knoppen */
#zpWeekdagenGrid button {
  transition: all .18s !important;
}
#zpWeekdagenGrid button:hover {
  transform: scale(1.06) !important;
}

/* Beschikbaarheid knop animatie */
#beschikbaarheidGrid .btn-xs {
  transition: all .18s !important;
}

/* Progress bar animatie */
@keyframes progressGrow {
  from { width: 0; }
}
.compliance-fill {
  animation: progressGrow .6s ease !important;
}

/* ── Agenda project slide-panel ─────────────────────────────── */
#agendaProjectPanel {
  border-radius: 0 0 12px 0;
}
#agendaProjectPanel::-webkit-scrollbar { width: 5px; }
#agendaProjectPanel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ── Pen / stift modus knopbalk ─────────────────────────────── */
#beschikbaarheidPenBar button {
  transition: background .18s, color .18s, transform .12s !important;
}
#beschikbaarheidPenBar button:hover {
  transform: scale(1.04) !important;
}
#penModusHint {
  transition: all .2s !important;
  animation: penHintIn .25s ease;
}
@keyframes penHintIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Agenda content blur when project panel is open */
#agendaFullContent {
  transition: filter .25s ease !important;
}

/* Scrollbar styling voor modals */
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }

/* ── Planning tiles verbeterd ─────────────────────────────────── */
#planningContent [onmouseenter] {
  will-change: box-shadow, transform;
}

/* Dag-info panel animation */
#planningDayPanel {
  animation: fadeIn .18s ease;
}
#planningProjectPanel {
  animation: fadeIn .18s ease;
}

/* Planning project panel scroll */
#planningProjectPanel {
  max-height: 80vh;
  overflow-y: auto;
}
#planningProjectPanel::-webkit-scrollbar { width: 4px; }
#planningProjectPanel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* Annotatie textarea focus */
textarea[id^="planAnnotText"]:focus,
textarea#pdAnnotNewText:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}

/* Annotatie type knoppen hover */
#pdAnnotationsContent button[onclick^="pdAnnotSetType"]:hover {
  transform: scale(1.05) !important;
}

/* Planning-kalender dag actief ring */
#planningCalendar [data-planday] {
  transition: background .12s, border-color .12s, outline .12s;
}

/* Week-grid items puls bij laden */
@keyframes planWeekIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
#planningContent > div:first-child {
  animation: planWeekIn .2s ease;
}

/* ── Document Scanner Modal ────────────────────────── */
#docScannerModal .modal.xlarge {
  max-width: 680px;
  width: 98vw;
  max-height: 96vh;
  height: 96vh;
}

/* Camera video vulling */
#scanVideo {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #000;
  border-radius: 14px;
}

/* Scan knop pulse */
#scanBtn {
  animation: scanPulse 2.2s ease infinite;
}
@keyframes scanPulse {
  0%,100% { box-shadow: 0 4px 16px rgba(59,130,246,.5); }
  50%      { box-shadow: 0 4px 28px rgba(59,130,246,.85), 0 0 0 8px rgba(59,130,246,.15); }
}

/* Camera status pulse voor actief-indicatie */
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Scan filter knoppen */
.scan-filter-btn { transition: all .15s ease; }
.scan-filter-btn:hover { transform: translateY(-1px); }

/* Scan stap-indicator */
.scanner-step { transition: all .2s ease; cursor: default; }

/* Result canvas - document-look */
#scanResult {
  image-rendering: pixelated;
  background: white;
}

/* SG-Bot FAB pulsatie */
#sgBotFab {
  animation: fabPulse 3s ease infinite !important;
}
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(227,6,19,.35); }
  50% { box-shadow: 0 4px 28px rgba(227,6,19,.55), 0 0 0 6px rgba(227,6,19,.08); }
}

/* SG-Bot window animatie */
#sgBotWindow {
  animation: botSlideUp .3s ease !important;
}
@keyframes botSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Input focus verbeterd globaal */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(52,152,219,.1) !important;
}

/* Leesbaardere labels */
.form-group label {
  letter-spacing: .3px;
}

/* Compliance badge animatie bij alert */
.compliance-alert-bar {
  animation: alertPulse 2s ease infinite !important;
}
@keyframes alertPulse {
  0%, 100% { background: #fff3cd; }
  50% { background: #fef9c3; }
}

/* Status badges scherper */
.status-badge {
  font-weight: 600 !important;
  letter-spacing: .2px;
}

/* Betere scrollbar voor sidebar */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

/* Keurmerk badge in profiel */
.sg-keurmerk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 700;
  color: #92400e;
}

/* Section header met twee regels */
.section-header.two-line {
  align-items: flex-start;
}

/* Knipperende indicator voor ongelezen meldingen */
@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes vaultScanAnim {
  0%   { top: 4px;  opacity: 1; }
  48%  { top: calc(100% - 6px); opacity: 1; }
  50%  { top: calc(100% - 6px); opacity: 0; }
  52%  { top: 4px;  opacity: 0; }
  54%  { top: 4px;  opacity: 1; }
  100% { top: 4px;  opacity: 1; }
}
.nav-badge {
  animation: blinkDot 2s ease infinite;
}

/* Verloopwaarschuwing animatie */
.expired-badge {
  animation: blinkDot 1.5s ease infinite !important;
}

/* ── Team Chat sidebar badge animatie ── */
@keyframes tcBadgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
#navTeamChatBadge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  line-height: 1;
}
#navTeamChatBadge[style*="display: inline"],
#navTeamChatBadge[style*="display:inline"] {
  animation: tcBadgePop .4s ease, blinkDot 2.5s ease 1s infinite;
}

/* ════════════════════════════════════════════════════════════
   APP-BREDE VERBETERINGEN v4.0 — Consistentie & UX-polish
   ════════════════════════════════════════════════════════════ */

/* ── Bottom nav: hoogte/overflow via #sgBottomNavFix (index.html) ── */
/* Hier alleen tap-feedback animatie */
.bottom-nav-btn:active { transform: scale(.90); }
.bottom-nav-btn.active i { transform: scale(1.06); }

/* Planning knop in bottom nav — extra aandacht */
.bottom-nav-planning i { font-size: .95rem !important; }

/* ── Topbar: iPhone notch safe area ── */
.topbar {
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}

/* ── Main content: safe-area bewust ── */
.main-content {
  bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
}

/* ── Stats grid verbetering ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  border: 1.5px solid #f1f5f9;
  transition: all .18s;
  cursor: pointer;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  border-color: #e2e8f0;
}
.stat-card:active { transform: scale(.97); }
.stat-icon { 
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.stat-value { font-size: 1.65rem; font-weight: 900; display: block; line-height: 1; }
.stat-label { font-size: .72rem; color: var(--text-light); margin-top: 3px; font-weight: 600; }

/* ── Dashboard planning bar uitgebreid ── */
#dashPlanningBar {
  transition: transform .18s, box-shadow .18s !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#dashPlanningBar:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(227,6,19,.5) !important;
}
#dashPlanningBar:active { transform: scale(.98) !important; }

/* ── Cards verbetering ── */
.card {
  border-radius: 16px !important;
  box-shadow: 0 1px 6px rgba(0,0,0,.06) !important;
  border: 1.5px solid #f1f5f9;
  margin-bottom: 12px !important;
}
.card-header {
  margin-bottom: 10px !important;
}
.card-title { font-size: .9rem; font-weight: 700 !important; }

/* ── Quick action knoppen in dashboard ── */
.quick-action-btn {
  border-radius: 14px !important;
  transition: all .18s !important;
  border-color: #e8ecf0 !important;
}
.quick-action-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
  border-color: #c7d2fe !important;
}
.quick-action-btn:active { transform: scale(.97) !important; }
.quick-action-icon {
  width: 38px; height: 38px;
  border-radius: 10px !important;
}

/* ── Section headers consistenter ── */
.section-header {
  margin-bottom: 14px;
}
.section-header h2 {
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #0f172a;
}
.section-header p {
  font-size: .75rem !important;
  color: #64748b !important;
}

/* ── Filter knoppen beter ── */
.filter-btn {
  font-size: .78rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  transition: all .15s !important;
  white-space: nowrap;
}
.filter-btn.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── Project kaarten verbetering ── */
.project-card {
  border-radius: 16px !important;
  box-shadow: 0 1px 8px rgba(0,0,0,.07) !important;
  border: 1.5px solid #f1f5f9;
  transition: all .18s !important;
}
.project-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
.project-card:active { transform: scale(.98) !important; }

/* ── Modals verbeterd ── */
.modal {
  border-radius: 20px 20px 0 0 !important;
}
@media (min-width: 600px) {
  .modal { border-radius: 20px !important; }
}
.modal-overlay {
  backdrop-filter: blur(2px);
}

/* ── Formulieren ── */
.form-group input, .form-group textarea, .form-group select {
  border-radius: 10px !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: #e30613 !important;
  box-shadow: 0 0 0 3px rgba(227,6,19,.1) !important;
}

/* ── Buttons ── */
.btn-primary {
  border-radius: 10px !important;
  font-weight: 700 !important;
  transition: all .18s !important;
}
.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
}
.btn-primary:active { transform: scale(.97) !important; }

.btn-small {
  border-radius: 9px !important;
  font-weight: 600 !important;
  transition: all .15s !important;
}
.btn-small:active { transform: scale(.95) !important; }

.btn-xs {
  border-radius: 7px !important;
  font-weight: 600 !important;
  transition: all .12s !important;
}
.btn-xs:active { transform: scale(.94) !important; }

/* nav-item actief: beheerd door regel 652 — geen duplicaten */

/* ── Toast verbetering ── */
.toast {
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.2) !important;
  font-weight: 600 !important;
  padding: 12px 18px !important;
}

/* ── Agenda kaart ── */
#agendaTodayCard .card-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

/* ── Dashboard greeting mooier ── */
#dashboardGreeting {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -.3px;
}
#dashboardSubGreeting {
  font-size: .8rem !important;
  color: #64748b !important;
  margin-top: 3px !important;
}

/* ── Search bar (globaal) ── */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar i {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: .85rem;
  pointer-events: none;
  z-index: 1;
}
.search-bar input {
  width: 100%;
  padding: 9px 12px 9px 36px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-size: .85rem !important;
  background: white !important;
  transition: border-color .15s, box-shadow .15s !important;
  box-sizing: border-box;
}
.search-bar input:focus {
  border-color: #e30613 !important;
  box-shadow: 0 0 0 3px rgba(227,6,19,.1) !important;
  outline: none;
}

/* ── Scroll gedrag verbeterd ── */
* { -webkit-overflow-scrolling: touch; }
.main-content { scroll-behavior: smooth; }

/* ── Lege-staat containers mooier ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 20px;
  text-align: center;
  color: #94a3b8;
}
.empty-state i { font-size: 2.2rem; opacity: .3; }
.empty-state p { font-size: .85rem; font-weight: 600; margin: 0; }
.empty-state small { font-size: .74rem; color: #cbd5e1; }

/* ── Planning knop balk extra mooi ── */
#dashPlanningBar {
  position: relative;
  overflow: hidden;
}
#dashPlanningBar::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 70% 50%, rgba(255,255,255,.08), transparent 60%);
  pointer-events: none;
}

/* ── Project detail tabs ── */
.tab-btn {
  font-weight: 600 !important;
  font-size: .8rem !important;
  border-radius: 8px;
  transition: all .15s !important;
}
.tab-btn.active {
  font-weight: 800 !important;
}

/* ── Verbeterde animaties voor secties ── */
.section {
  animation: sectionFadeIn .2s ease-out;
}
@keyframes sectionFadeIn {
  from { opacity: .6; transform: translateY(4px); }
  to   { opacity: 1;  transform: translateY(0); }
}

/* ── Verbeterde scrollbar voor main content ── */
.main-content::-webkit-scrollbar { width: 4px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { 
  background: rgba(0,0,0,.12); 
  border-radius: 4px;
}

/* ── Inline notificatie bar verbeterd ── */
#dashboardPushBar, #dashboardGPSBar {
  border-radius: 14px !important;
  transition: box-shadow .18s !important;
}
#dashboardPushBar:hover, #dashboardGPSBar:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
}

/* ── Chips in planning sectie ── */
.chip, [class*="-chip"] {
  -webkit-tap-highlight-color: transparent;
}

/* ════════════════════════════════════════════════════════════
   SGWATCH — Smartwatch meldingen instellingen UI
   ════════════════════════════════════════════════════════════ */

/* Kaart container */
.sgw-card {
  background: #fff;
  border: 1.5px solid #e8ecf0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* Kaart header (watch-preview + tekst) */
.sgw-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

/* ── Gesimuleerde smartwatch ── */
.sgw-watch-preview {
  flex-shrink: 0;
}
.sgw-watch-face {
  position: relative;
  width: 76px;
  height: 90px;
  background: linear-gradient(160deg, #1c1c1e, #2c2c2e);
  border-radius: 22px;
  border: 2.5px solid #3a3a3c;
  box-shadow: 0 4px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sgw-watch-screen {
  width: 62px;
  height: 76px;
  border-radius: 16px;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.sgw-watch-time {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.sgw-watch-notif {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(37,99,235,.9);
  border-radius: 8px;
  margin: 2px 4px 0;
  width: 100%;
}
.sgw-watch-notif-icon {
  font-size: .8rem;
  flex-shrink: 0;
}
.sgw-watch-notif-text {
  min-width: 0;
}
.sgw-watch-notif-title {
  font-size: .42rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sgw-watch-notif-body {
  font-size: .38rem;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sgw-watch-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sgw-watch-btn-r {
  position: absolute;
  right: -5px;
  top: 22px;
  width: 4px;
  height: 18px;
  background: #3a3a3c;
  border-radius: 2px;
}
.sgw-watch-crown {
  position: absolute;
  right: -5px;
  top: 46px;
  width: 4px;
  height: 12px;
  background: #48484a;
  border-radius: 2px;
}
/* Watch notificatie animatie */
@keyframes watchNotifIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sgw-watch-notif {
  animation: watchNotifIn .22s ease;
}

/* ── Hoe werkt het strip ── */
.sgw-info-strip {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #e8ecf0;
}
.sgw-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .77rem;
  color: #475569;
}
.sgw-info-item i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Instellingen rij ── */
.sgw-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.sgw-setting-row:last-child { border-bottom: none; }
.sgw-setting-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  font-weight: 600;
  color: #1e293b;
  flex-shrink: 0;
}
.sgw-setting-label i {
  color: #64748b;
  width: 14px;
  text-align: center;
}

/* ── Toggle switch (compact) ── */
.sgw-toggle-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.sgw-toggle-label input[type="checkbox"] {
  display: none;
}
.sgw-toggle-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 11px;
  transition: background .2s;
  flex-shrink: 0;
}
.sgw-toggle-track.small {
  width: 32px;
  height: 18px;
  border-radius: 9px;
}
.sgw-toggle-label input:checked + .sgw-toggle-track { background: #e30613; }
.sgw-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: left .2s;
}
.sgw-toggle-track.small .sgw-toggle-thumb {
  width: 14px;
  height: 14px;
}
.sgw-toggle-label input:checked + .sgw-toggle-track .sgw-toggle-thumb { left: 20px; }
.sgw-toggle-track.small .sgw-toggle-thumb { top: 2px; }
.sgw-toggle-label input:checked + .sgw-toggle-track.small .sgw-toggle-thumb { left: 16px; }

/* ── Kanaal rij ── */
.sgw-channel-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
  cursor: default;
}
.sgw-channel-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.sgw-channel-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .82rem;
}

/* ── Pill knoppen (trilpatroon) ── */
.sgw-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: .73rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.sgw-pill:hover { background: #e8ecf0; }
.sgw-pill.active {
  background: #e30613;
  border-color: #e30613;
  color: #fff;
}

/* ── iOS install banner ── */
#sgIOSInstallBanner {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, #1c1c1e, #2c2c2e);
  color: #fff;
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: none;
  align-items: center;
  gap: 14px;
  max-width: 360px;
  width: calc(100% - 32px);
  font-size: .82rem;
  border: 1px solid rgba(255,255,255,.1);
}
#sgIOSInstallBanner .ios-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
#sgIOSInstallBanner .ios-banner-text {
  flex: 1;
  line-height: 1.5;
}
#sgIOSInstallBanner .ios-banner-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PROFESSIONELE UI v5 — SCHOONGENOEG PLATFORM
   Volledig doorgelicht & geprofessionaliseerd
   ════════════════════════════════════════════════════════════ */

/* ── Topbar verbetering ── */
/* GEEN background override hier — wordt bepaald door sg-whitelabel-reset.css per thema */
.topbar {
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
html.sg-theme-dark .topbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.topbar-logo span {
  font-size: .9rem !important;
  font-weight: 700 !important;
  letter-spacing: -.2px;
}
.icon-btn {
  transition: background .15s, transform .12s !important;
  border-radius: 10px !important;
}
/* Donker thema: witte hover; licht thema: donkere hover */
html.sg-theme-dark .icon-btn:hover  { background: rgba(255,255,255,.12) !important; }
html.sg-theme-light .icon-btn:hover { background: rgba(15,23,42,.07) !important; }
.icon-btn:active { transform: scale(.9) !important; }

/* ── Sidebar verbeteringen ── */
/* sidebar/brand: beheerd door regels 583+604 — geen duplicaten */
/* nav-item flex/hover/active: beheerd door regel 652 — geen duplicaten */

/* ── Dashboard stats verbetering ── */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 100%;
  background: radial-gradient(circle at 100% 50%, rgba(0,0,0,.03), transparent 70%);
  pointer-events: none;
}

/* ── Kaart secties in dashboard ── */
.card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.card-title {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* ── Sectie koptekst met info-badge inline ── */
.section-header h2 .info-badge {
  margin-left: 6px;
}

/* ── Verbeterde info-badge — groot genoeg voor mobiel ── */
.info-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #3b82f6 !important;
  color: #fff !important;
  font-size: .75rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: background .15s, transform .1s !important;
  vertical-align: middle !important;
  margin-left: 6px !important;
  line-height: 1 !important;
  box-shadow: 0 1px 4px rgba(59,130,246,.35) !important;
  -webkit-tap-highlight-color: transparent !important;
}
.info-badge:hover, .info-badge:focus, .info-badge:active {
  background: #1d4ed8 !important;
  transform: scale(1.15) !important;
  outline: none !important;
}
/* Tooltip popup op mobiel via JS — zie sg-ui-enhancements */

/* topbarTimerPill verwijderd — SGTimer floating pill vervangt dit */

/* ── Dashboard timer widget extra polish ── */
#dashTimerWidget {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#dashTimerWidget button:active {
  transform: scale(.95) !important;
}
#dashTimerWidget > div[style*="background:rgba(255,255,255,.065)"] {
  transition: background .18s;
}
#dashTimerWidget > div[style*="background:rgba(255,255,255,.065)"]:hover {
  background: rgba(255,255,255,.1) !important;
}

/* ── Timer progressbar kleuren ── */
#dashTimerBarTravel {
  background: linear-gradient(90deg, #e30613, #f43f5e) !important;
}
#dashTimerBarWork {
  background: linear-gradient(90deg, #16a34a, #22c55e) !important;
}

/* ── Uren sectie header ── */
#sec-tijden .section-header {
  background: transparent;
}

/* ── Team sectie: gesprekken lijst verbeterd ── */
#tcConvList {
  border-top: none !important;
}
#tcConvList .conv-item {
  transition: background .15s !important;
}
#tcConvList .conv-item:hover {
  background: #f0f9ff !important;
}
#tcConvList .conv-item:active {
  background: #e0f2fe !important;
}

/* ── Planning header ── */
.tp-header {
  box-shadow: 0 4px 20px rgba(0,0,0,.08) !important;
}

/* ── Compliance sectie verbeterd ── */
#sec-compliance .card {
  border-left-width: 3px !important;
}

/* ── Vault sectie ── */
#sec-vault .card {
  transition: all .18s !important;
}
#sec-vault .card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.1) !important;
}

/* ── E-learning kaarten ── */
.elearning-card {
  transition: all .18s !important;
  border-radius: 16px !important;
}
.elearning-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.1) !important;
}

/* ── Contracten sectie ── */
.contract-row {
  transition: background .15s !important;
}
.contract-row:hover {
  background: #f8fafc !important;
}

/* ── Marktplaats kaarten ── */
.markt-card {
  transition: all .18s !important;
}
.markt-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.1) !important;
}

/* ── Profiel pagina ── */
.profile-avatar {
  transition: transform .2s, box-shadow .2s !important;
}
.profile-avatar:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18) !important;
}

/* ── Instellingen sectie ── */
#sec-settings .card {
  border-left-width: 3px !important;
}

/* ── Notificaties kaart ── */
.notif-item {
  transition: background .14s !important;
}
.notif-item:hover {
  background: #f8fafc !important;
}
.notif-item:active {
  background: #f1f5f9 !important;
}

/* ── Actie knoppen met icoon tooltips ── */
[title]:not([data-tooltip]):not(a):not(input):not(textarea) {
  cursor: pointer;
}

/* ── Onboarding / empty state animaties ── */
.empty-icon {
  animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ── Micro-interactie: knopje druk-effect ── */
@keyframes btnPress {
  0%   { transform: scale(1); }
  40%  { transform: scale(.94); }
  100% { transform: scale(1); }
}
button:active { animation: btnPress .12s ease; }

/* ── Sectie-filters chipbar  ── */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 0 2px;
}

/* ── Alert banner animatie ── */
@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
[id*="AlertBanner"] {
  animation: alertSlideIn .22s ease;
}

/* ── Missend oproepen badge puls ── */
#headerCallBadge {
  animation: blinkDot 1.4s ease infinite;
}

/* timerTickAnim verwijderd — was voor topbarTimerPill */

/* ── Mobile: grotere touch targets ── */
@media (max-width: 640px) {
  .btn-primary, .btn-small, .btn-xs {
    min-height: 40px;
  }
  .stat-card {
    padding: 12px 10px !important;
  }
}

/* ── Sectie-iconen in header ── */
.section-title i {
  margin-right: 6px;
  opacity: .8;
}

/* ── Planning snelkoppeling balk labels ── */
#dashPlanningBar .tp-section-sub {
  font-size: .72rem;
  opacity: .75;
}

/* ═══════════════════════════════════════════════════════════
   TRIBUNE CONFIGURATOR — SGTribune v1.0
   Inmeter / Verkoop workflow: 5-stappen tribune-ontwerp
═══════════════════════════════════════════════════════════ */

.trib-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 12px 80px;
}

/* ── Header ── */
.trib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.trib-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 2px;
}
.trib-subtitle {
  font-size: .78rem;
  color: #64748b;
  margin: 0;
}

/* ── Buttons ── */
.trib-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #e30613, #b50010);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  text-decoration: none;
}
.trib-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,130,246,.35); }
.trib-btn-primary:active { transform: scale(.96); }

.trib-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  color: #374151;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.trib-btn-ghost:hover { background: #f1f5f9; border-color: #cbd5e1; }
.trib-btn-ghost--sm { padding: 6px 12px; font-size: .76rem; }

.trib-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #374151;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: .73rem;
  font-weight: 600;
  cursor: pointer;
}
.trib-btn-sm--green { background: #f0fdf4; color: #16a34a; border-color: #86efac; }
.trib-btn-sm--red   { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }

/* ── API bar ── */
.trib-api-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.trib-api-bar--on   { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.trib-api-bar--demo { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.trib-api-bar span { flex: 1; }
.trib-api-btn {
  background: rgba(0,0,0,.06);
  border: none;
  border-radius: 7px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
}
.trib-api-panel {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

/* ── Form elements ── */
.trib-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: .82rem;
  color: #1e293b;
  background: #fff;
  transition: border-color .15s;
  box-sizing: border-box;
}
.trib-input:focus { outline: none; border-color: #e30613; box-shadow: 0 0 0 3px rgba(227,6,19,.12); }
.trib-label {
  display: block;
  font-size: .73rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.trib-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.trib-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.trib-field { display: flex; flex-direction: column; }
@media (max-width: 480px) {
  .trib-form-grid, .trib-form-row { grid-template-columns: 1fr; }
}

/* ── Tribune type cards ── */
.trib-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 420px) {
  .trib-type-grid { grid-template-columns: 1fr 1fr; }
}
.trib-type-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  text-align: center;
  background: #fff;
}
.trib-type-card:hover { border-color: var(--trib-color); transform: translateY(-1px); }
.trib-type-card.selected {
  border-color: var(--trib-color);
  background: color-mix(in srgb, var(--trib-color) 8%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--trib-color) 18%, transparent);
}
.trib-type-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.trib-type-label { font-weight: 700; font-size: .82rem; color: #1e293b; margin-bottom: 2px; }
.trib-type-desc  { font-size: .67rem; color: #64748b; line-height: 1.3; }

/* ── Projects grid ── */
.trib-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.trib-project-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.trib-project-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.09); }
.trib-project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 8px;
  border-top: 3px solid #e2e8f0;
}
.trib-project-badge, .trib-project-status {
  font-size: .68rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.trib-project-name {
  font-weight: 800;
  color: #1e293b;
  padding: 0 12px 4px;
  font-size: .9rem;
}
.trib-project-meta {
  display: flex;
  gap: 12px;
  padding: 0 12px 8px;
  font-size: .72rem;
  color: #64748b;
}
.trib-project-seats {
  padding: 0 12px 8px;
  font-size: .73rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}
.trib-project-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
  border-top: 1px solid #f1f5f9;
}

/* ── Empty state ── */
.trib-empty {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
}
.trib-empty i { font-size: 2.4rem; margin-bottom: 12px; display: block; opacity: .5; }
.trib-empty div { font-size: .95rem; font-weight: 700; color: #64748b; margin-bottom: 6px; }
.trib-empty p { font-size: .78rem; color: #94a3b8; margin-bottom: 16px; }

/* ── Wizard ── */
.trib-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 16px;
}
.trib-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 0 4px;
}
.trib-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  flex-shrink: 0;
}
.trib-step--done { cursor: pointer; }
.trib-step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all .2s;
}
.trib-step--active .trib-step-dot {
  border-color: #e30613;
  background: #e30613;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(227,6,19,.2);
}
.trib-step--done .trib-step-dot {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}
.trib-step-label {
  font-size: .62rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
  white-space: nowrap;
}
.trib-step--active .trib-step-label { color: #e30613; }
.trib-step--done .trib-step-label   { color: #10b981; }
.trib-step-line {
  width: 24px; height: 2px;
  background: #e2e8f0;
  margin: 0 2px;
  margin-bottom: 18px;
  flex-shrink: 0;
  transition: background .2s;
}
.trib-wizard-body { padding-bottom: 12px; }
.trib-wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid #f1f5f9;
  padding: 14px 0 0;
  margin-top: 16px;
}
.trib-step-title {
  font-size: .95rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.trib-step-desc {
  font-size: .78rem;
  color: #64748b;
  margin: -10px 0 16px;
  line-height: 1.5;
}

/* ── Rule cards ── */
.trib-rule-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.trib-rule-header { display: flex; align-items: center; gap: 10px; }
.trib-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.trib-toggle-label input[type="checkbox"] { display: none; }
.trib-toggle-switch {
  width: 44px; height: 24px;
  border-radius: 12px;
  background: #cbd5e1;
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
}
.trib-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: left .2s;
}
.trib-toggle-label input:checked ~ .trib-toggle-switch { background: #10b981; }
.trib-toggle-label input:checked ~ .trib-toggle-switch::after { left: 23px; }

/* ── Upload zone ── */
.trib-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  transition: border-color .15s, background .15s;
  margin-bottom: 12px;
}
.trib-upload-zone:hover { border-color: #e30613; background: rgba(227,6,19,.04); }

/* ── Moasure result card ── */
.trib-moasure-card {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.trib-moasure-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: .82rem;
}
.trib-moasure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 400px) { .trib-moasure-grid { grid-template-columns: repeat(2, 1fr); } }
.trib-moasure-stat { text-align: center; }
.trib-moasure-val { font-size: .95rem; font-weight: 800; color: #166534; }
.trib-moasure-lbl { font-size: .62rem; color: #64748b; }
.trib-obstakels { background: #fffbeb; border-radius: 8px; padding: 8px 10px; }
.trib-obstakel-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .73rem;
  color: #374151;
  padding: 3px 0;
}

/* ── Solving screen ── */
.trib-solving-screen {
  text-align: center;
  padding: 32px 20px;
}
.trib-solving-spinner {
  font-size: 2.5rem;
  color: #e30613;
  margin-bottom: 16px;
}
.trib-solving-screen h3 { font-size: 1rem; color: #1e293b; margin-bottom: 6px; }
.trib-solving-screen p  { font-size: .78rem; color: #64748b; margin-bottom: 20px; }
.trib-solving-steps { display: flex; flex-direction: column; gap: 8px; max-width: 260px; margin: 0 auto; }
.trib-solving-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  transition: all .3s;
}
.trib-solving-step--active { color: #e30613; background: rgba(227,6,19,.06); font-weight: 700; }
.trib-solving-step--done   { color: #10b981; background: #f0fdf4; }

/* ── Result screen ── */
.trib-result {}
.trib-result-hero {
  border-radius: 16px;
  color: #fff;
  text-align: center;
  padding: 24px 20px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.trib-result-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.trib-result-hero-icon { font-size: 1.8rem; margin-bottom: 6px; opacity: .9; }
.trib-result-hero-count { font-size: 3rem; font-weight: 900; line-height: 1; }
.trib-result-hero-label { font-size: .88rem; opacity: .88; margin-top: 4px; font-weight: 600; }
.trib-result-hero-sub   { font-size: .72rem; opacity: .72; margin-top: 6px; }
.trib-simulatie-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 3px 10px;
  margin-top: 8px;
}

.trib-checks { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.trib-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  padding: 9px 12px;
  border-radius: 9px;
}
.trib-check--ok   { background: #f0fdf4; color: #166534; }
.trib-check--warn { background: #fffbeb; color: #92400e; }

.trib-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 420px) { .trib-result-grid { grid-template-columns: repeat(2, 1fr); } }
.trib-result-stat {
  text-align: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 6px;
}
.trib-result-stat-val { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.trib-result-stat-lbl { font-size: .63rem; color: #64748b; margin-top: 2px; }

.trib-prijs-card {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  text-align: center;
}
.trib-prijs-label { font-size: .72rem; opacity: .7; margin-bottom: 4px; }
.trib-prijs-val   { font-size: 1.6rem; font-weight: 900; }
.trib-prijs-sub   { font-size: .7rem; opacity: .65; margin-top: 4px; }

.trib-3d-preview {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}

.trib-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Parts list panel ── */
.trib-parts-panel {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.trib-parts-title {
  font-size: .82rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trib-parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .74rem;
}
.trib-parts-table th {
  text-align: left;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1.5px solid #f1f5f9;
  padding: 6px 4px;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.trib-parts-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #f8fafc;
  color: #374151;
  vertical-align: middle;
}
.trib-parts-table tr:last-child td { border-bottom: none; }
.trib-parts-total {
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
  padding: 8px 12px;
  font-size: .76rem;
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  border-top: 1.5px solid #e2e8f0;
  margin-top: 4px;
}

/* ── Field row ── */
.trib-field-row {
  margin-bottom: 12px;
}

/* ── Role badge for inmeter ── */
.role-badge--inmeter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .68rem;
  font-weight: 700;
}


/* ── Responsive stats grid ── */
@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ── GPS tracker widget op dashboard ── */
.gpt-dash-widget {
  background: var(--card, #fff);
  border-radius: 16px !important;
  border: 1.5px solid var(--border, #f1f5f9);
  box-shadow: 0 1px 6px rgba(0,0,0,.06) !important;
  overflow: hidden;
  transition: box-shadow .2s !important;
}
.gpt-dash-widget:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1) !important;
}
.gpt-dash-widget-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  background: var(--card, #fff);
}
.gpt-dash-widget-title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text, #0f172a);
  display: flex;
  align-items: center;
  gap: 7px;
}
.gpt-dash-widget-link {
  background: none;
  border: none;
  color: #e30613;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .14s;
}
.gpt-dash-widget-link:hover {
  background: rgba(59,130,246,.1);
}
.gpt-dash-widget-body {
  padding: 10px 14px 14px;
  background: var(--card, #fff);
}
.gpt-dash-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-light, #94a3b8);
  font-size: .8rem;
}
.gpt-dash-empty i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: .3;
}

/* ── Vault sectie verbeterd ── */
#vaultList .vault-item {
  transition: transform .15s, box-shadow .15s !important;
}
#vaultList .vault-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
}

/* ── Page transition smooth ── */
.section.hidden {
  display: none !important;
}
.section:not(.hidden) {
  display: block;
}

