/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #4a7c6f;
    --primary-hover: #3d6a5e;
    --primary-dark: #2d5249;
    --primary-rgb: 74, 124, 111;
    --accent-blue: #1e40af;
    --secondary-color: #64748b;
    --success-color: var(--color-success);
    --warning-color: var(--color-warning);
    --danger-color: var(--color-danger);
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Login kleuren */
    --login-bg-start: #e8ddd3;
    --login-bg-end: #c8d6d0;
    --login-accent: #5a7d6a;

    /* Team kleuren */
    --team-vlot1: #3b82f6;
    --team-vlot1-dark: #2563eb;
    --team-vlot1-darker: #1d4ed8;
    --team-vlot2: #8b5cf6;
    --team-vlot2-dark: #7c3aed;
    --team-vlot2-darker: #6d28d9;
    --team-cargo: #10b981;
    --team-cargo-dark: #059669;
    --team-cargo-darker: #047857;
    --team-overkoepelend: #f59e0b;
    --team-overkoepelend-dark: #d97706;
    --team-overkoepelend-darker: #b45309;
    --team-jobstudent: #ec4899;
    --team-jobstudent-dark: #db2777;
    --team-jobstudent-darker: #be185d;

    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;

    /* Typography scale (rem) */
    --text-xl: 1.75rem;     /* 28px - view titles */
    --text-lg: 1.25rem;     /* 20px - card headers */
    --text-md: 1rem;        /* 16px - subheaders */
    --text-sm: 0.875rem;    /* 14px - body */
    --text-xs: 0.8125rem;   /* 13px - meta/hints */

    /* Spacing scale (rem) */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */

    /* Semantic color tokens */
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-danger-light: #fef2f2;
    --color-danger-bg: #fee2e2;
    --color-danger-border: #fecaca;
    --color-warning: #f59e0b;
    --color-warning-hover: #d97706;
    --color-warning-light: #fef3c7;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-success-bg: #d1fae5;
    --color-success-light: #ecfdf5;
}

/* ===== LUCIDE ICON SIZING ===== */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
}

/* Fallback when Lucide CDN is unavailable: show data-lucide attribute as text */
.no-lucide [data-lucide] {
    font-size: 0;
    width: auto;
    height: auto;
}
.no-lucide [data-lucide]::before {
    font-size: 12px;
    content: attr(data-lucide);
    font-family: var(--font-family);
    font-style: normal;
    opacity: 0.6;
}

.lucide-xs { width: 12px; height: 12px; }
.lucide-sm { width: 16px; height: 16px; }
.lucide-md { width: 20px; height: 20px; }
.lucide-lg { width: 24px; height: 24px; }

.lucide-inline {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.modal-close [data-lucide] {
    width: 20px;
    height: 20px;
}

.swap-arrow [data-lucide] {
    width: 24px;
    height: 24px;
}

/* ===== UTILITY CLASSES ===== */
.d-none { display: none; }
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mr-auto { margin-right: auto; }
.ml-sm { margin-left: var(--space-sm); }
.ml-auto { margin-left: auto; }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.my-sm { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-md { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.self-end { align-self: flex-end; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-muted { color: var(--text-secondary); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-nowrap { white-space: nowrap; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.w-full { width: 100%; }
.w-auto { width: auto; }
.col-span-full { grid-column: 1 / -1; }
.cursor-pointer { cursor: pointer; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-90 { opacity: 0.9; }

/* Modal width variants */
.modal-content--xs { max-width: 400px; }
.modal-content--sm { max-width: 450px; }
.modal-content--md { max-width: 500px; }

/* Choice cards (shift afstaan modal) */
.choice-stack { display: flex; flex-direction: column; gap: 12px; }
.btn-choice {
    padding: var(--space-md);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.btn-choice-title { font-weight: 600; font-size: var(--text-md); }
.btn-choice-desc { font-size: var(--text-xs); opacity: 0.9; }

/* Inline icon helper (for icons in text) */
.icon-inline {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* Info/hint box */
.info-box {
    margin-top: var(--space-md);
    padding: 0.75rem;
    background: var(--color-warning-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}

/* Modal intro text */
.modal-intro-text {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* Warning banner (yellow left border) */
.warning-banner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 3px solid var(--color-warning);
}

/* Code/pre block */
.code-block {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
}

/* Onboarding checklist */
.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}
.onboarding-title { font-weight: 600; }
.onboarding-dismiss {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}
.onboarding-counter {
    font-size: 0.75rem;
    background: var(--primary-color);
    color: white;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
}

/* Shift list items (home view) */
.shift-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}
.shift-badge-today {
    font-size: 0.75rem;
    background: var(--primary-color);
    color: white;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
}
.shift-badge-upcoming {
    font-size: 0.7rem;
    background: var(--color-warning);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

/* Settings form groups */
.form-row-inline {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 32px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}
.empty-state p {
    font-size: 15px;
    margin: 0;
}
.empty-state small {
    font-size: 13px;
    opacity: 0.7;
}
.empty-state-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-sm);
    opacity: 0.4;
    color: var(--text-secondary);
    display: block;
}

/* ===== CUSTOM TOOLTIPS (JavaScript-based) ===== */
.custom-tooltip {
    position: fixed;
    z-index: 10000;
    padding: 8px 12px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 300px;
    pointer-events: none;
    white-space: pre-line;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== LOGIN SCHERM ===== */
#login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--login-bg-start) 0%, var(--login-bg-end) 100%);
}

.login-box {
    background: var(--surface-color);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    border-top: 4px solid var(--login-accent);
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 32px;
    color: var(--login-accent);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo .subtitle {
    color: var(--text-secondary);
    font-size: var(--text-md);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.select-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.2s;
    background: var(--surface-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.employee-profile-fields {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.checkbox-group label:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    white-space: nowrap;
}

.btn:active:not(:disabled) {
    transform: translateY(0px) scale(0.98);
    transition-duration: 0.1s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.3);
}

.btn-primary-lg {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    gap: 6px;
    display: inline-flex;
    align-items: center;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--text-xs);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Focus-visible: keyboard focus rings (accessibility) */
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.nav-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.info-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 24px;
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.app-title {
    font-size: var(--text-lg);
    color: var(--primary-color);
    white-space: nowrap;
}

.nav-center {
    display: flex;
    gap: var(--space-xs);
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.nav-btn:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Role Switcher for Testing */
.role-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 4px 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
}

.role-switcher-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.role-switcher select {
    padding: 4px 8px;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-sm);
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

.role-switcher select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ===== USER MENU (Avatar Dropdown) ===== */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 4px 8px 4px 4px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: var(--bg-color);
    border-color: var(--border-color);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1;
}

.user-menu-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.user-menu.open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 4px 0;
    animation: dropdown-fade-in 0.15s ease;
}

@keyframes dropdown-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-menu.open .user-menu-dropdown {
    display: block;
}

.user-menu-header {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu-header-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-header-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.user-menu-item:hover {
    background: var(--bg-color);
}

.user-menu-item i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.user-menu-item-danger {
    color: var(--color-danger);
}

.user-menu-item-danger:hover {
    background: var(--color-danger-light);
}

.user-menu-item-danger i {
    color: var(--color-danger);
}

/* Nav groups */
.nav-group-primary,
.nav-group-admin {
    display: flex;
    gap: var(--space-xs);
}

.nav-group-primary {
    gap: 6px;
}

.nav-group-admin {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

/* Legacy .user-badge (kept for backward compat but hidden) */
.user-badge {
    display: none;
}

/* ===== VIEWS ===== */
.view {
    display: none;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
    position: relative;
}

.view.active {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.employees-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.employees-filters .filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.view-header h2 {
    font-size: var(--text-xl);
    color: var(--text-primary);
}

.view-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: -16px;
    margin-bottom: 16px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== HOME DASHBOARD ===== */
#home-view {
    padding: 0;
}

.home-welcome {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark, #2d5249) 100%);
    color: white;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.home-welcome h2 {
    font-size: 1.5rem;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.home-welcome-sub {
    opacity: 0.85;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home-role-badge {
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 500;
}

.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

.home-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.home-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Onboarding checklist */
.onboarding-checklist {
    border-left: 4px solid var(--primary-color);
    padding: 20px 24px;
}
.onboarding-checklist:hover { transform: none; }
.onboarding-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s;
}
.onboarding-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}
.onboarding-steps li {
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 14px;
    flex-wrap: wrap;
}
.onboarding-hint {
    width: 100%;
    margin: 2px 0 4px 28px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.onboarding-steps li.done { color: var(--text-secondary); }
.onboarding-steps li.done a { text-decoration: line-through; color: var(--text-secondary); }
.onboarding-steps a { color: var(--text-color); text-decoration: none; }
.onboarding-steps a:hover { color: var(--primary-color); }
.step-check { width: 20px; text-align: center; font-size: 14px;
    border-color: rgba(var(--primary-rgb), 0.2);
}

.home-card-full {
    grid-column: 1 / -1;
}

.home-card-shifts {
    grid-row: span 2;
}

.home-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 2px solid var(--bg-color);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    background: linear-gradient(to bottom, white, var(--bg-color));
}

.home-card-header .card-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.home-card-body {
    padding: 20px 24px;
}

.home-card-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 24px 16px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.home-card-empty .empty-state-icon {
    width: 32px;
    height: 32px;
    opacity: 0.35;
    color: var(--text-secondary);
}

/* Shifts list */
.home-shift-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.home-shift-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.home-shift-item:last-child {
    margin-bottom: 0;
}

.home-shift-date {
    min-width: 80px;
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.home-shift-date-num {
    display: block;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.home-shift-date .day-name {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.home-shift-time {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.home-shift-team {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.home-shift-today {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.12));
    border-color: var(--primary-color);
    border-width: 2px;
}

.home-shift-today .home-shift-date {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.home-shift-today .home-shift-date-num,
.home-shift-today .home-shift-date .day-name {
    color: white;
}

/* Quick actions */
.home-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.home-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: 18px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.home-action-btn:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.08));
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.home-action-btn:active {
    transform: translateY(-1px);
}

.home-action-icon {
    font-size: 1.8rem;
    filter: grayscale(0.2);
    transition: filter 0.2s ease;
}

.home-action-btn:hover .home-action-icon {
    filter: grayscale(0);
}

/* Requests list */
.home-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.home-request-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.home-request-item:last-child {
    margin-bottom: 0;
}

.home-request-info {
    flex: 1;
    min-width: 0;
}

.home-request-type {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.home-request-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-request-status {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    white-space: nowrap;
}

.home-request-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.home-request-status.needs-action {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-attention 2s ease-in-out infinite;
}

@keyframes pulse-attention {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Team coverage */
.home-team-section {
    margin-bottom: 16px;
}

.home-team-section:last-child {
    margin-bottom: 0;
}

.home-team-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.home-team-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.home-coverage-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.home-coverage-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 70px;
}

.home-coverage-track {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.home-coverage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.home-coverage-count {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-card-shifts {
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .home-welcome {
        padding: 20px 16px;
        margin-bottom: 16px;
    }

    .home-welcome h2 {
        font-size: 1.25rem;
    }

    .home-card-header {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .home-card-body {
        padding: 16px;
    }

    .home-quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .home-shift-item {
        gap: 12px;
        padding: 12px;
    }

    .home-shift-date {
        min-width: 65px;
        padding: 6px;
    }

    .home-shift-date-num {
        font-size: 1.1rem;
    }

    .home-shift-time {
        font-size: 0.9rem;
    }

    .home-shift-team {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* ===== PLANNING VIEW ===== */
.planning-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    gap: 10px;
}

.planning-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.planning-controls-row:first-child {
    justify-content: space-between;
}

.planning-filter-buttons {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.date-navigation {
    display: flex;
    gap: var(--space-sm);
}

.period-display {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Mobile day navigation (hidden by default, shown on mobile) */
.mobile-day-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: 12px;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.mobile-day-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    position: relative;
    cursor: pointer;
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.mobile-day-display:hover,
.mobile-day-display:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.mobile-day-display:hover .mobile-day-name,
.mobile-day-display:hover .mobile-day-date,
.mobile-day-display:active .mobile-day-name,
.mobile-day-display:active .mobile-day-date {
    color: white;
}

.mobile-day-name {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-day-date {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
}

/* Date picker - minimal styling, triggered by click */
.mobile-date-picker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    cursor: pointer;
    z-index: 10;
    -webkit-appearance: none;
    border: none;
    background: transparent;
}

.calendar-view-toggle {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-color);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calendar-view-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.calendar-view-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.calendar-view-btn .btn-icon {
    font-size: var(--text-md);
}

.calendar-view-btn .btn-text {
    font-size: 13px;
}

/* Team toggle buttons */
.team-toggles {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.team-toggles .toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}

.team-toggle {
    padding: 6px 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.team-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.team-toggle:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.team-toggle.active {
    color: white;
    border-color: transparent;
}

.team-toggle[data-team="vlot1"].active {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
}

.team-toggle[data-team="vlot2"].active {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-dark) 100%);
}

.team-toggle[data-team="cargo"].active {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-dark) 100%);
}

.team-toggle[data-team="overkoepelend"].active {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-dark) 100%);
}

.team-toggle[data-team="jobstudent"].active {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-dark) 100%);
}

.view-toggle-controls {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-color);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.view-toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 80px;
}

.view-toggle-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* ===== DESKTOP DAY VIEW ===== */
/* Hide all day columns in day mode, show only selected */
body[data-view-mode="day"] .timeline-scale,
body[data-view-mode="day"] .timeline-day-cell {
    display: none !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="0"] .timeline-scale:nth-child(2),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="0"] .timeline-day-cell:nth-child(2) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="1"] .timeline-scale:nth-child(3),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="1"] .timeline-day-cell:nth-child(3) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="2"] .timeline-scale:nth-child(4),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="2"] .timeline-day-cell:nth-child(4) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="3"] .timeline-scale:nth-child(5),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="3"] .timeline-day-cell:nth-child(5) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="4"] .timeline-scale:nth-child(6),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="4"] .timeline-day-cell:nth-child(6) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="5"] .timeline-scale:nth-child(7),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="5"] .timeline-day-cell:nth-child(7) {
    display: block !important;
}

body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="6"] .timeline-scale:nth-child(8),
body[data-view-mode="day"] .timeline-view-wrapper[data-mobile-day="6"] .timeline-day-cell:nth-child(8) {
    display: block !important;
}

/* In day mode, adjust grid to give more space to the single day column */
body[data-view-mode="day"] .timeline-scale-row,
body[data-view-mode="day"] .timeline-row {
    grid-template-columns: 140px 1fr !important;
}

/* Hide the header row (day names) in day mode since period display shows the day */
body[data-view-mode="day"] .timeline-header {
    display: none !important;
}

/* ===== ALERTS ===== */
.alerts-container {
    margin-bottom: 16px;
}

.validation-summary {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.validation-summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.validation-summary-item.validation-error {
    background: #eff6ff;
    color: var(--accent-blue);
    cursor: pointer;
}

.validation-summary-item.validation-error:hover {
    background: #dbeafe;
    box-shadow: var(--shadow-sm);
}

.validation-summary-item.validation-warning {
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

.validation-summary-item.validation-warning:hover {
    background: #f1f5f9;
    box-shadow: var(--shadow-sm);
}

.validation-icon {
    font-size: var(--text-md);
}

.validation-text {
    font-size: 13px;
}

.validation-summary-note {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.issue-details-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fffaf0;
    margin-bottom: 12px;
}

.issue-details-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.issue-details-rule {
    font-weight: 600;
    color: #92400e;
}

.issue-details-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.issue-details-example {
    font-size: 13px;
    color: #78350f;
    margin-bottom: 8px;
}

.issue-details-messages ul {
    margin: 0 0 12px;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
}

.issue-details-dates ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
}

.issue-details-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #92400e;
}


.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.alert-warning {
    background: var(--color-warning-light);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background: var(--color-danger-bg);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: var(--accent-blue);
    border-left: 4px solid var(--primary-color);
}

/* ===== CALENDAR ===== */
.calendar-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: visible; /* Allow sticky positioning */
}

.calendar-grid {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    border: 1px solid var(--border-color);
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.calendar-header.time-col {
    background: var(--accent-blue);
}

.calendar-day-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.calendar-day-name {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day-date {
    font-size: 12px;
    opacity: 0.9;
}

.calendar-cell {
    min-height: 120px;
    padding: 12px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.calendar-cell.time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.calendar-cell.weekend {
    background: #fafafa;
}

.calendar-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 10px,
        #e5e5e5 10px,
        #e5e5e5 20px
    );
    position: relative;
}

.calendar-cell.closed::after {
    content: 'GESLOTEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-weight: 600;
    font-size: 11px;
}

.calendar-cell.staffing-warning {
    border-left: 3px solid var(--warning-color);
}

.staffing-warnings-badge {
    margin-bottom: 8px;
}

.staffing-warning-item {
    background: var(--color-warning-light);
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: help;
}

/* ===== GOOGLE CALENDAR STYLE ===== */
.calendar-wrapper {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
}

.calendar-time-gutter {
    background: var(--accent-blue);
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-day-header.weekend {
    background: rgba(0,0,0,0.1);
}

.calendar-day-header.closed {
    background: rgba(0,0,0,0.25);
    opacity: 0.7;
}

.calendar-day-header .day-name {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.calendar-day-header .day-date {
    font-size: 12px;
    opacity: 0.9;
}

.calendar-body {
    display: grid;
    grid-template-columns: 80px 1fr;
    position: relative;
}

.calendar-time-column {
    background: #f8fafc;
    border-right: 2px solid var(--border-color);
}

.time-slot-label {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid #e2e8f0;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-column {
    position: relative;
    border-right: 1px solid var(--border-color);
}

.calendar-day-column:last-child {
    border-right: none;
}

.time-cells-background {
    position: relative;
    z-index: 1;
}

.time-cell {
    height: 60px;
    border-bottom: 1px solid #e2e8f0;
    background: var(--surface-color);
}

.time-cell.weekend {
    background: #fafafa;
}

.time-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 8px,
        #e8e8e8 8px,
        #e8e8e8 16px
    );
    position: relative;
}

.shifts-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}

.shift-block {
    position: absolute;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease, background 0.2s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.shift-block:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 100;
    background: #f1f5f9;
}

.shift-block.team-vlot1 {
    background: #f8fafc;
    border-left: 4px solid var(--team-vlot1);
    color: var(--text-primary);
}

.shift-block.team-vlot2 {
    background: #f8fafc;
    border-left: 4px solid var(--team-vlot2);
    color: var(--text-primary);
}

.shift-block.team-cargo {
    background: #f8fafc;
    border-left: 4px solid var(--team-cargo);
    color: var(--text-primary);
}

.shift-block.team-overkoepelend {
    background: #f8fafc;
    border-left: 4px solid var(--team-overkoepelend);
    color: var(--text-primary);
}

.shift-block.team-jobstudent {
    background: #f8fafc;
    border-left: 4px solid var(--team-jobstudent);
    color: var(--text-primary);
}

.shift-block.shift-nacht {
    background: #f1f5f9;
    border-left: 4px solid #1e293b;
    color: var(--text-primary);
}

.shift-block.shift-error {
    border: 2px solid var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.shift-block.shift-warning {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Absent conflict - highest priority styling */
.shift-block.shift-absent-conflict,
.shift-block.team-vlot1.shift-absent-conflict,
.shift-block.team-vlot2.shift-absent-conflict,
.shift-block.team-cargo.shift-absent-conflict,
.shift-block.team-overkoepelend.shift-absent-conflict,
.shift-block.team-jobstudent.shift-absent-conflict {
    background: repeating-linear-gradient(
        45deg,
        #fee2e2,
        #fee2e2 8px,
        #fecaca 8px,
        #fecaca 16px
    ) !important;
    border: 3px solid var(--color-danger) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3) !important;
    animation: pulse-absent 1.5s infinite !important;
}

.shift-block.shift-absent-conflict .shift-employee-name,
.shift-block.shift-absent-conflict .shift-time {
    color: #7f1d1d !important;
    text-shadow: 0 0 1px white;
}

.shift-block.shift-absent-conflict .shift-availability-indicator {
    background: var(--color-danger) !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    margin-top: 2px;
}

@keyframes pulse-absent {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.01);
    }
}

.shift-block-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
}

.shift-block .shift-employee-name {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.shift-block .shift-time {
    font-size: 11px;
    opacity: 0.7;
}

.shift-block .shift-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.15);
    color: var(--text-secondary);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--text-md);
    line-height: 1;
    opacity: 0;
    transition: all 0.2s;
}

.shift-block:hover .shift-delete-btn {
    opacity: 1;
}

.shift-block .shift-delete-btn:hover {
    background: var(--color-danger);
    transform: scale(1.1);
}

/* Stacked shifts styling */
.shift-block.shift-stacked {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.3);
}

.shift-block.shift-stacked:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.shift-count-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
}

/* ===== EMPLOYEE GRID VIEW ===== */
.employee-grid-wrapper {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.employee-grid-header {
    display: grid;
    grid-template-columns: 180px repeat(7, 1fr);
    background: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.employee-grid-name-header {
    background: var(--accent-blue);
    padding: 16px 12px;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.employee-grid-day-header {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.employee-grid-day-header:last-child {
    border-right: none;
}

.employee-grid-day-header.weekend {
    background: rgba(0,0,0,0.1);
}

.employee-grid-day-header.closed {
    background: rgba(0,0,0,0.25);
    opacity: 0.7;
}

.employee-grid-day-header .day-name {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.employee-grid-day-header .day-date {
    font-size: 12px;
    opacity: 0.9;
}

.employee-grid-body {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.employee-grid-row {
    display: grid;
    grid-template-columns: 180px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.employee-grid-row:hover {
    background: #f8fafc;
}

.employee-grid-row:last-child {
    border-bottom: none;
}

.employee-name-cell {
    padding: 12px;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: #f8fafc;
}

.employee-name-cell .employee-name-text {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.employee-name-cell .team-badge-mini {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.team-badge-mini.vlot1 {
    background: #dbeafe;
    color: var(--accent-blue);
}

.team-badge-mini.vlot2 {
    background: #ede9fe;
    color: #6b21a8;
}

.team-badge-mini.cargo {
    background: var(--color-success-bg);
    color: #065f46;
}

.team-badge-mini.overkoepelend {
    background: var(--color-warning-light);
    color: #92400e;
}

.team-badge-mini.jobstudent {
    background: #fce7f3;
    color: #9f1239;
}

.employee-day-cell {
    padding: 8px;
    border-right: 1px solid var(--border-color);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
}

.employee-day-cell:last-child {
    border-right: none;
}

.employee-day-cell.weekend {
    background: #fafafa;
}

.employee-day-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 6px,
        #e8e8e8 6px,
        #e8e8e8 12px
    );
    cursor: not-allowed;
}

.employee-day-cell:not(.closed):hover {
    background: #f1f5f9;
}

.employee-day-cell.weekend:not(.closed):hover {
    background: #e2e8f0;
}

.shift-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.shift-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.shift-badge.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
}

.shift-badge.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-dark) 100%);
}

.shift-badge.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-dark) 100%);
}

.shift-badge.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-dark) 100%);
}

.shift-badge.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-dark) 100%);
}

.shift-badge.shift-nacht {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.shift-badge.shift-error {
    border: 2px solid var(--color-danger);
}

.shift-badge.shift-warning {
    border: 2px solid #f59e0b;
}

.shift-badge-time {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 2px;
}

.shift-badge-team {
    display: block;
    font-size: 10px;
    opacity: 0.9;
}

.shift-badge-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
}

.empty-day-hint {
    color: var(--text-secondary);
    font-size: 11px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.employee-day-cell:hover .empty-day-hint {
    opacity: 1;
}

.hours-summary-cell {
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== TEAM VIEW ===== */
.team-view-wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.team-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: 12px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.team-tab {
    padding: 10px 20px;
    border: none;
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.team-tab:hover {
    background: #e2e8f0;
}

.team-tab.active {
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.team-tab.active.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
}

.team-tab.active.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-dark) 100%);
}

.team-tab.active.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-dark) 100%);
}

.team-tab.active.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-dark) 100%);
}

.team-tab.active.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-dark) 100%);
}

.team-schedule-wrapper {
    overflow-x: auto;
}

.team-schedule-header {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 60px;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.team-schedule-name-header {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.team-header-title {
    font-weight: 700;
    font-size: 14px;
}

.team-member-count {
    font-size: 11px;
    opacity: 0.8;
}

.team-schedule-day-header {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-schedule-day-header .day-name {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.team-schedule-day-header .day-num {
    font-size: 18px;
    font-weight: 700;
}

.team-schedule-day-header.weekend {
    background: rgba(0,0,0,0.15);
}

.team-schedule-day-header.closed {
    background: rgba(0,0,0,0.3);
    opacity: 0.7;
}

.team-schedule-body {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

.team-schedule-row {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 60px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.team-schedule-row:hover {
    background: #f8fafc;
}

.team-schedule-row.alt {
    background: #fafafa;
}

.team-schedule-row.alt:hover {
    background: #f1f5f9;
}

.team-employee-cell {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-right: 1px solid var(--border-color);
    background: #f8fafc;
}

.team-employee-cell .employee-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.extra-team-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 6px;
    border-radius: var(--radius-md);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.team-day-cell {
    padding: 6px;
    border-right: 1px solid var(--border-color);
    min-height: 50px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.team-day-cell.weekend {
    background: #fafafa;
}

.team-day-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 4px,
        #e8e8e8 4px,
        #e8e8e8 8px
    );
}

.team-shift-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.team-shift-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.team-shift-badge.nacht {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.team-shift-badge.error {
    border: 2px solid var(--color-danger);
}

.team-shift-badge.warning {
    border: 2px solid #f59e0b;
}

.team-shift-badge .time {
    font-size: 11px;
}

.empty-slot {
    width: 32px;
    height: 32px;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.5;
}

.team-day-cell:hover .empty-slot {
    opacity: 1;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.empty-slot:hover {
    background: #e0e7ff;
    border-color: var(--primary-color);
}

.team-hours-cell {
    padding: 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    background: #f8fafc;
}

.no-employees-message {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== TIMELINE VIEW (NEW) ===== */
.timeline-view-wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: visible; /* Allow sticky positioning to work */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-width: 100%;
}

.timeline-view-wrapper > * {
    min-width: 0;
}

.timeline-header {
    display: grid;
    grid-template-columns: 140px repeat(7, minmax(0, 1fr));
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1e3a8a 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
}

@media (max-width: 1400px) {
    .timeline-view-wrapper > * {
        min-width: 0;
    }

    .timeline-header {
        grid-template-columns: 120px repeat(7, minmax(0, 1fr));
    }

    .timeline-scale-row {
        grid-template-columns: 120px repeat(7, minmax(0, 1fr));
    }

    .timeline-row {
        grid-template-columns: 120px repeat(7, minmax(0, 1fr));
    }

    .timeline-name-header {
        font-size: 12px;
    }

    .timeline-day-header .day-name {
        font-size: 11px;
    }

    .timeline-day-header .day-num {
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .timeline-header {
        grid-template-columns: 110px repeat(7, minmax(0, 1fr));
    }

    .timeline-scale-row {
        grid-template-columns: 110px repeat(7, minmax(0, 1fr));
    }

    .timeline-row {
        grid-template-columns: 110px repeat(7, minmax(0, 1fr));
    }
}

.timeline-name-header {
    padding: 14px 12px;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.timeline-day-header {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.timeline-day-header .day-name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
}

.timeline-day-header .day-num {
    font-size: var(--text-lg);
    font-weight: 700;
}

.timeline-day-header.weekend {
    background: rgba(0,0,0,0.15);
}

.timeline-day-header.closed {
    background: rgba(0,0,0,0.3);
    opacity: 0.7;
}

.timeline-day-header.holiday {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    position: relative;
}

.timeline-day-header.holiday::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0z' fill='none'/%3E%3Ccircle cx='10' cy='10' r='1' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.holiday-badge {
    display: inline-block;
    margin-left: 4px;
    font-size: 14px;
    vertical-align: middle;
    animation: gentle-bounce 2s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.timeline-scale-row {
    display: grid;
    grid-template-columns: 140px repeat(7, minmax(0, 1fr));
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px; /* Exact height of .timeline-header (measured: 72px) */
    z-index: 15; /* Below header (20), above content */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.timeline-scale-label {
    padding: 4px 12px;
    border-right: 1px solid var(--border-color);
}

.timeline-scale {
    position: relative;
    height: 20px;
    border-right: 1px solid var(--border-color);
    overflow: visible;
}

.scale-marker {
    position: absolute;
    font-size: 9px;
    color: var(--text-secondary);
    top: 4px;
    white-space: nowrap;
    transform: translateX(-50%);
}

.scale-marker:first-child {
    transform: translateX(0);
}

.scale-marker:last-child {
    transform: translateX(-100%);
}

.timeline-body {
    /* No max-height, no overflow - let page scroll naturally */
}

/* Team group headers */
.timeline-team-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10; /* Below header, above rows and shift blocks */
}

.timeline-team-header.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-darker) 100%);
}

.timeline-team-header.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-darker) 100%);
}

.timeline-team-header.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-darker) 100%);
}

.timeline-team-header.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-darker) 100%);
}

.timeline-team-header.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-darker) 100%);
}

/* Geen Team - employees without team assignment (warning style) */
.timeline-team-header.team-no-team {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    border: 2px dashed #475569;
}

.timeline-team-header.team-no-team .team-header-name::after {
    content: " \26A0";
    font-size: 12px;
}

.timeline-team-header .team-header-name {
    font-size: 14px;
    font-weight: 700;
}

.timeline-team-header .team-header-count {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 500;
}

.timeline-row {
    display: grid;
    grid-template-columns: 140px repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-color);
    min-height: 44px;
    overflow: visible; /* Nodig voor nachtblokken die over meerdere dagen lopen */
}

.timeline-row:hover {
    background: #f8fafc;
}

.timeline-row.alt {
    background: #fafafa;
}

.timeline-row.alt:hover {
    background: #f1f5f9;
}

.timeline-employee-cell {
    padding: 8px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    border-right: 1px solid var(--border-color);
    background: #f8fafc;
}

.timeline-employee-cell .emp-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Weekend verantwoordelijke highlighting */
.timeline-employee-cell.is-responsible {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 3px solid #f59e0b;
}

.timeline-employee-cell .responsible-badge {
    font-size: 14px;
    flex-shrink: 0;
}

.timeline-employee-cell .emp-team {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.timeline-employee-cell .emp-team.team-vlot1 {
    background: #dbeafe;
    color: var(--accent-blue);
}

.timeline-employee-cell .emp-team.team-vlot2 {
    background: #ede9fe;
    color: #6b21a8;
}

.timeline-employee-cell .emp-team.team-cargo {
    background: var(--color-success-bg);
    color: #065f46;
}

.timeline-employee-cell .emp-team.team-overkoepelend {
    background: var(--color-warning-light);
    color: #92400e;
}

.timeline-employee-cell .emp-team.team-jobstudent {
    background: #fce7f3;
    color: #9f1239;
}

.timeline-day-cell {
    position: relative;
    border-right: 1px solid var(--border-color);
    min-height: 40px;
    background: linear-gradient(90deg,
        transparent 0%,
        transparent 16.66%,
        #f8fafc 16.66%,
        #f8fafc 16.67%,
        transparent 16.67%,
        transparent 33.33%,
        #f8fafc 33.33%,
        #f8fafc 33.34%,
        transparent 33.34%,
        transparent 50%,
        #f8fafc 50%,
        #f8fafc 50.01%,
        transparent 50.01%,
        transparent 66.66%,
        #f8fafc 66.66%,
        #f8fafc 66.67%,
        transparent 66.67%,
        transparent 83.33%,
        #f8fafc 83.33%,
        #f8fafc 83.34%,
        transparent 83.34%
    );
}

.timeline-day-cell.weekend {
    background-color: #fafafa;
}

.timeline-day-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0,
        #f0f0f0 4px,
        #e5e5e5 4px,
        #e5e5e5 8px
    );
}

/* Dag cellen moeten overflow visible hebben zodat nachtblokken kunnen overlopen */
.timeline-day-cell {
    overflow: visible;
}

/* In dagweergave: clip nachtshift overflow (geen volgende kolom om in te lopen) */
body[data-view-mode="day"] .timeline-day-cell {
    overflow: hidden !important;
}

.timeline-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 20px;
}

/* Activity chips inside timeline blocks - compact inline style */
.timeline-block .activity-chips-row {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.timeline-block .activity-chip {
    padding: 0 3px;
    font-size: 7px;
    border-left-width: 2px;
    border-radius: 2px;
    line-height: 12px;
}

.timeline-block:hover {
    transform: scaleY(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 10;
}

.timeline-block.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
}

.timeline-block.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-dark) 100%);
}

.timeline-block.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-dark) 100%);
}

.timeline-block.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-dark) 100%);
}

.timeline-block.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-dark) 100%);
}

/* Nachtdienst - loopt over naar volgende dag als 1 blok */
.timeline-block.nacht {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    z-index: 5; /* Boven andere blokken zodat het goed zichtbaar is */
    border-radius: 4px; /* Normale afronding aan beide kanten */
}

.timeline-block.error {
    border: 2px solid var(--color-danger);
}

.timeline-block.warning {
    border: 2px solid #f59e0b;
}

/* Absent conflict - highest priority - red stripes animation */
/* Override all team colors when there's an absence conflict */
.timeline-block.absent-conflict,
.timeline-block.team-vlot1.absent-conflict,
.timeline-block.team-vlot2.absent-conflict,
.timeline-block.team-cargo.absent-conflict,
.timeline-block.team-overkoepelend.absent-conflict,
.timeline-block.team-jobstudent.absent-conflict {
    background: repeating-linear-gradient(
        45deg,
        #fecaca,
        #fecaca 4px,
        #dc2626 4px,
        #dc2626 8px
    ) !important;
    border: 2px solid #7f1d1d !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6) !important;
    animation: pulse-conflict 1s infinite !important;
}

.timeline-block.absent-conflict .block-time {
    background: rgba(127, 29, 29, 0.9);
    padding: 1px 4px;
    border-radius: 2px;
    color: white;
}

.timeline-block.absent-conflict .absent-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

@keyframes pulse-conflict {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

.timeline-block .block-time {
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 0 4px;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* ===== DRAG & DROP STATES ===== */
/* Note: Drag & drop styles have been moved to the bottom of this file (around line 6200) */

/* Valid drop target highlighting */
.timeline-day-cell.drop-target-valid {
    background-color: rgba(16, 185, 129, 0.1) !important;
    outline: 2px dashed #10b981;
    outline-offset: -2px;
}

.timeline-day-cell.drop-target-invalid {
    background-color: rgba(239, 68, 68, 0.1) !important;
    outline: 2px dashed var(--color-danger);
    outline-offset: -2px;
}

/* Resize handles (invisible but interactive) */
.timeline-block .resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    z-index: 10;
    cursor: ew-resize;
}

.timeline-block .resize-handle-start {
    left: 0;
}

.timeline-block .resize-handle-end {
    right: 0;
}

/* Hover effect for resize handles */
.timeline-block .resize-handle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Clickable empty cell hover effect (+ icon) */
.timeline-day-cell:not(.has-shifts):not(.closed):hover::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--text-secondary);
    opacity: 0.3;
    pointer-events: none;
    font-weight: 300;
}

/* Hide + icon when dragging */
.timeline-day-cell.drop-target-valid::after,
.timeline-day-cell.drop-target-invalid::after {
    display: none;
}

/* Shift block indicator */
.shift-block-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 14px;
    opacity: 0.6;
    z-index: 5;
    cursor: help;
    transition: opacity 0.2s ease;
}

.shift-block-indicator:hover {
    opacity: 1;
}

.no-shifts-message {
    padding: 60px 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== MONTH VIEW ===== */
.month-view-wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-width: 100%;
}

/* Month header - sticky date headers */
.month-header {
    display: flex;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1e3a8a 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 2px solid var(--border-color);
}

.month-name-header {
    width: 160px;
    min-width: 160px;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    border-right: 2px solid rgba(255,255,255,0.2);
    position: sticky;
    left: 0;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1e3a8a 100%);
    z-index: 21;
}

.month-week-header {
    display: flex;
    flex: 1;
}

.month-day-header {
    flex: 1;
    min-width: 120px;
    padding: 8px 4px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.month-day-header .day-name {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: 500;
}

.month-day-header .day-num {
    font-size: var(--text-md);
    font-weight: 700;
    margin-top: 2px;
}

.month-day-header.weekend {
    background: rgba(0, 0, 0, 0.1);
}

.month-day-header.closed {
    background: rgba(0, 0, 0, 0.2);
    opacity: 0.6;
}

.month-day-header.holiday {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.month-day-header.other-month {
    opacity: 0.4;
}

/* Month body - scrollable content */
.month-body {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* Team headers */
.month-team-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    position: sticky;
    left: 0;
    z-index: 10;
}

.month-team-header .team-header-name {
    flex: 1;
}

.month-team-header .team-header-count {
    font-size: 11px;
    opacity: 0.8;
}

/* Employee rows */
.month-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
    min-height: 80px;
}

.month-row:hover {
    background: #f8fafc;
}

.month-row.alt {
    background: #f9fafb;
}

.month-row.alt:hover {
    background: #f1f3f5;
}

.month-employee-cell {
    width: 160px;
    min-width: 160px;
    padding: 12px;
    border-right: 2px solid var(--border-color);
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 5;
}

.month-week-cells {
    display: flex;
    flex: 1;
}

.month-day-cell {
    flex: 1;
    min-width: 120px;
    padding: 6px 4px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: stretch;
}

.month-day-cell.weekend {
    background: rgba(100, 116, 139, 0.05);
}

.month-day-cell.closed {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.03) 10px,
        rgba(0, 0, 0, 0.03) 20px
    );
    pointer-events: none;
}

.month-day-cell.other-month {
    opacity: 0.3;
}

/* Shift badges in month cells */
.month-shift-badge {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-shift-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.month-shift-badge.has-error {
    border: 2px solid var(--danger-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.month-shift-badge.has-warning {
    border: 1px solid var(--warning-color);
}

.month-shift-more {
    padding: 4px 6px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-radius: 4px;
    cursor: pointer;
}

.month-shift-more:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== SHIFT CARDS ===== */
.shift-card {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
    color: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.shift-card:hover {
    box-shadow: var(--shadow-md);
    opacity: 0.95;
}

.shift-card.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-dark) 100%);
}

.shift-card.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-dark) 100%);
}

.shift-card.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-dark) 100%);
}

.shift-card.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-dark) 100%);
}

.shift-card.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-dark) 100%);
}

.shift-card.shift-nacht {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.shift-employee-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shift-time {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 4px;
}

.shift-team-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 11px;
    font-weight: 500;
}

/* Activity chips within shift blocks */
.shift-activities-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 2px;
}

.activity-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    border-left: 3px solid;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: filter 0.15s;
}

.activity-chip:hover {
    filter: brightness(0.9);
}

.activity-chip-time {
    opacity: 0.75;
    font-weight: 500;
}

.activity-type-oudergesprek {
    background: rgba(251, 191, 36, 0.7);
    border-color: #d97706;
    color: #78350f;
}
.activity-type-vorming {
    background: rgba(196, 181, 253, 0.7);
    border-color: #7c3aed;
    color: #4c1d95;
}
.activity-type-overleg {
    background: rgba(110, 231, 183, 0.7);
    border-color: #059669;
    color: #064e3b;
}
.activity-type-afspraak {
    background: rgba(147, 197, 253, 0.7);
    border-color: #2563eb;
    color: #1e3a5f;
}
.activity-type-vergadering {
    background: rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
    color: #92400e;
}
.activity-type-andere {
    background: rgba(209, 213, 219, 0.7);
    border-color: #6b7280;
    color: #1f2937;
}

/* Add activity button on shift block */
.add-activity-btn {
    position: absolute;
    bottom: 2px;
    right: 22px;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: none;
    background: rgba(255,255,255,0.3);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 6;
}

.shift-block:hover .add-activity-btn {
    opacity: 0.7;
}

.add-activity-btn:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,0.5);
}

/* Activities section in shift modal */
.shift-activities-section {
    margin: 8px 0;
    padding: 8px 10px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 6px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.shift-activities-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 13px;
}

.shift-activity-item {
    font-size: 12px;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: background 0.15s;
}

.shift-activity-item:hover {
    background: var(--bg-hover, #edf2f7);
}

/* Activity count badge for card/month view */
.activity-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.25);
    color: inherit;
}

.shift-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.shift-delete-btn {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.shift-delete-btn:hover {
    background: var(--danger-color);
}

.shift-availability-indicator {
    font-size: 14px;
    margin-left: auto;
    cursor: help;
}

.shift-availability-indicator.unavailable {
    opacity: 0.9;
}

.shift-availability-indicator.partial {
    opacity: 0.8;
}

.shift-warning {
    border: 2px solid var(--warning-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.shift-error {
    border: 2px solid var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ===== EMPLOYEES VIEW ===== */
.employees-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Team sectie in employees view */
.employees-team-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.employees-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
}

.employees-team-header .team-header-name {
    font-size: 15px;
    font-weight: 700;
}

.employees-team-header .team-header-count {
    font-size: 12px;
    opacity: 0.85;
}

.employees-team-header.team-vlot1 {
    background: linear-gradient(135deg, var(--team-vlot1) 0%, var(--team-vlot1-darker) 100%);
}

.employees-team-header.team-vlot2 {
    background: linear-gradient(135deg, var(--team-vlot2) 0%, var(--team-vlot2-darker) 100%);
}

.employees-team-header.team-cargo {
    background: linear-gradient(135deg, var(--team-cargo) 0%, var(--team-cargo-darker) 100%);
}

.employees-team-header.team-overkoepelend {
    background: linear-gradient(135deg, var(--team-overkoepelend) 0%, var(--team-overkoepelend-darker) 100%);
}

.employees-team-header.team-jobstudent {
    background: linear-gradient(135deg, var(--team-jobstudent) 0%, var(--team-jobstudent-darker) 100%);
}

.employees-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    padding: 16px;
}

@media (max-width: 1400px) {
    .employees-team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .employees-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .employees-team-grid {
        grid-template-columns: 1fr;
    }
}

.employee-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.employee-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.employee-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-status {
    padding: 2px 8px 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.employee-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.employee-status.active {
    background: var(--color-success-bg);
    color: #065f46;
}

.employee-status.active::before {
    background: var(--color-success);
}

.employee-status.inactive {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.employee-status.inactive::before {
    background: #94a3b8;
}

.employee-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 8px;
}

.employee-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 12px;
    color: var(--text-secondary);
}

.employee-hours-compact {
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.hours-bar-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.hours-bar-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 80px;
}

.overtime-chip-sm {
    display: inline-block;
    font-size: 11px;
    color: var(--color-danger);
    font-weight: 500;
    margin-top: 4px;
}

.employee-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: 12px;
}

.employee-info-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.employee-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.team-badge {
    padding: 4px 10px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 500;
}

.team-badge.vlot1 {
    background: #dbeafe;
    color: var(--accent-blue);
}

.team-badge.vlot2 {
    background: #e9d5ff;
    color: #6b21a8;
}

.team-badge.cargo {
    background: var(--color-success-bg);
    color: #065f46;
}

.team-badge.overkoepelend {
    background: var(--color-warning-light);
    color: #92400e;
}

.team-badge.jobstudent {
    background: #fce7f3;
    color: #9f1239;
}

/* ===== FOOTER (verwijderd in redesign) ===== */
.app-footer {
    display: none;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: modalOverlayIn 0.2s ease-out;
}

@keyframes modalOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalContentIn 0.25s ease-out;
}

/* Bredere modal voor medewerker formulier */
#employee-modal .modal-content {
    max-width: 720px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.modal-close {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
}

.modal-close:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.08);
    transform: scale(1.1);
}

.modal-content form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.modal-actions-split {
    justify-content: space-between;
}
.modal-actions-left, .modal-actions-right {
    display: flex;
    gap: 12px;
}

.modal-content > .modal-actions {
    padding: 16px 24px 24px;
}

.modal-body {
    padding: 24px;
}


.btn-warning {
    background: var(--color-warning);
    color: white;
}

.btn-warning:hover {
    background: var(--color-warning-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 4px 8px;
}
.btn-ghost:hover {
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-primary);
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover {
    background: var(--color-success-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.validation-errors {
    margin-bottom: 16px;
}

.validation-errors:empty {
    display: none;
}

.validation-errors ul {
    margin-left: 20px;
    color: #991b1b;
    font-size: 14px;
}

/* Validation messages in shift modal */
.validation-error {
    background: var(--color-danger-bg);
    border: 1px solid #f87171;
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.validation-error strong {
    color: #991b1b;
}

.validation-error ul {
    margin: 8px 0 0 20px;
    padding: 0;
    color: #991b1b;
    font-size: 13px;
}

.validation-warning {
    background: var(--color-warning-light);
    border: 1px solid #fbbf24;
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.validation-warning strong {
    color: #92400e;
}

.validation-warning ul {
    margin: 8px 0 0 20px;
    padding: 0;
    color: #92400e;
    font-size: 13px;
}

.validation-warning.absence {
    background: var(--color-warning-light);
    border-color: #f59e0b;
}

/* Shift source info in modal */
.shift-source-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 13px;
}

.shift-source-info .source-icon {
    font-size: var(--text-md);
}

.shift-source-info.shift-source-auto {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
}

.shift-source-info.shift-source-manual {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    color: #065f46;
}

/* ===== SETTINGS VIEW ===== */

/* Settings Tabs Navigation */
.settings-tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    padding: 0 16px;
    background: var(--surface-color);
}

.settings-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.settings-tab:hover {
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--text-primary);
    border-bottom-color: rgba(var(--primary-rgb), 0.3);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

@media (max-width: 768px) {
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 8px;
        gap: 0;
        scroll-behavior: smooth;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-tab {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.settings-content {
    padding: 0 16px 16px;
    max-width: 800px;
}

.settings-content .settings-card {
    margin-bottom: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.settings-header h2 {
    margin: 0;
    font-size: var(--text-lg);
    color: var(--text-primary);
}

.settings-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.settings-jump-btn {
    font-size: 12px;
    padding: 6px 10px;
}

@media (max-width: 900px) {
    .settings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-jump {
        justify-content: flex-start;
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.settings-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.settings-card.collapsed .settings-card-body { display: none; }
.collapse-indicator { transition: transform 0.2s; color: var(--text-secondary); width: 16px; height: 16px; flex-shrink: 0; }
.settings-card.collapsed .collapse-indicator { transform: rotate(-90deg); }

.settings-card-title {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.settings-card-header h3 {
    margin: 0;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.settings-card-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-card-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
}

/* Ensure buttons inside cards have consistent spacing */
.settings-card .btn,
.employee-card .btn {
    margin: 4px 0;
}

.settings-icon {
    font-size: 18px;
}

.settings-card-body {
    padding: 20px;
}

.settings-card.is-collapsible.is-collapsed .settings-card-body {
    display: none;
}

.settings-toggle-btn {
    min-width: 70px;
}

.static-field {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    font-size: 14px;
    color: var(--text-primary);
}

/* Accountbeheer */
.admin-users-intro {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.admin-user-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 18px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.admin-user-row + .admin-user-row {
    margin-top: 12px;
}

.admin-user-main {
    min-width: 160px;
}

.admin-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-user-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 12px 16px;
    align-items: end;
}

.admin-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.admin-user-role-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-transform: capitalize;
}

.admin-user-row:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.admin-user-row {
    position: relative;
}

.admin-user-inactive {
    opacity: 0.55;
}

.admin-user-row > .status-badge.inactive {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-danger-border);
    color: #991b1b;
    font-size: 10px;
    font-weight: 600;
    z-index: 1;
}

.admin-field label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.admin-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.role-pill-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.role-pill-btn {
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.role-pill-btn.active {
    background: #1f2937;
    color: #ffffff;
    border-color: #1f2937;
}

.role-select-hidden {
    display: none;
}

.admin-filter-bar {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.admin-user-row.is-collapsed .admin-user-details {
    display: none;
}

.admin-user-details {
    padding: 12px 12px 8px;
    border-top: 1px dashed #e2e8f0;
}

.admin-user-controls {
    padding: 4px;
}

.admin-field {
    margin-bottom: 4px;
}

.admin-actions {
    margin-top: 4px;
}

.admin-user-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-user-row.is-hidden {
    display: none;
}

@media (max-width: 900px) {
    .admin-user-controls {
        grid-template-columns: 1fr;
    }

    .admin-filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .admin-user-row {
        flex-direction: column;
    }

    .admin-user-controls {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        justify-content: flex-start;
    }
}

/* Profile view */

/* Hero header */
.profile-hero {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.profile-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.profile-hero-info {
    flex: 1;
    min-width: 0;
}

.profile-hero-name {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.2;
}

.profile-hero-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.profile-hero-role {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
}
.profile-hero-role.role-admin { background: var(--color-danger-bg); color: #991b1b; }
.profile-hero-role.role-roosterverantwoordelijke { background: #dbeafe; color: #1e3a8a; }
.profile-hero-role.role-medewerker { background: #ecfdf3; color: #166534; }

.profile-hero-team {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.profile-hero-email {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.profile-hero-actions {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }
    .profile-hero-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
    .profile-hero-meta { justify-content: center; }
}

/* Profile cards grid */
.profile-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 1000px) {
    .profile-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Legacy profile-grid (kept for backward compat) */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 1000px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    gap: 12px;
}

.profile-meta-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-meta-value.role-admin,
.profile-meta-value.role-roosterverantwoordelijke,
.profile-meta-value.role-medewerker {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    background: #e2e8f0;
}

.profile-meta-value.role-admin {
    background: var(--color-danger-bg);
    color: #991b1b;
}

.profile-meta-value.role-roosterverantwoordelijke {
    background: #dbeafe;
    color: #1e3a8a;
}

.profile-meta-value.role-medewerker {
    background: #ecfdf3;
    color: #166534;
}

.form-actions {
    margin-top: 12px;
}

.form-message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.4;
}

.form-message.info {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.form-message.success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background: var(--color-danger-light);
    color: var(--color-danger-hover);
    border: 1px solid var(--color-danger-border);
}

/* Info boxes */
.info-box {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}

.info-box p {
    margin: 0 0 4px 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--accent-blue);
}

.info-box.neutral {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.info-box.info-box-danger {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
}

.validation-hint {
    margin-top: 0.5rem;
}

.info-box .current-setting {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* Form elements for settings */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.15s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:read-only {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.form-input.readonly,
.form-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
    color: var(--text-secondary);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.input-with-button {
    display: flex;
    gap: var(--space-sm);
}

.input-with-button .form-input {
    flex: 1;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.input-with-unit .form-input {
    width: 100px;
}

.input-with-unit .unit {
    font-size: 13px;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-row .form-group {
    flex: 1;
}

/* Data stats */
.data-stats {
    display: flex;
    gap: var(--space-md);
    margin-bottom: 20px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stat-value {
    display: block;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Button groups */
.button-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.btn-icon {
    margin-right: 4px;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: var(--color-danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

/* Danger zone */
.danger-zone {
    margin-top: 20px;
    padding: 16px;
    background: var(--color-danger-light);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius-md);
}

.danger-zone h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--color-danger);
}

.danger-zone p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #7f1d1d;
}

/* Teams list */
.teams-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.team-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.team-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-info {
    flex: 1;
    min-width: 0;
}

.team-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.settings-team-toggles {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.team-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.team-toggle-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary-color);
}

.team-legend {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.team-legend-item {
    white-space: nowrap;
}

.team-id {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: monospace;
}

.team-actions {
    display: flex;
    gap: var(--space-sm);
}

.color-picker {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

/* Templates list */
.templates-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.template-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.15s;
}

.template-config-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.template-icon {
    font-size: var(--text-lg);
    width: 32px;
    text-align: center;
}

.template-info {
    flex: 1;
    min-width: 0;
}

.template-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.template-times {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.template-actions {
    display: flex;
    gap: var(--space-xs);
}

.template-icon-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-top: 4px;
}

.template-icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: 10px 4px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary, #f8fafc);
    cursor: pointer;
    transition: all 0.15s;
}

.template-icon-option:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.template-icon-option.selected {
    border-color: var(--primary-color);
    background: #dbeafe;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.template-icon-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-icon-only:hover {
    background: var(--border-color);
}

.btn-icon-only.danger:hover {
    background: var(--color-danger-bg);
}

/* App info */
.app-info {
    text-align: center;
    padding: 16px 0;
}

.app-logo {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.app-version {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.app-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Legacy support */
.settings-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.settings-section h3 {
    font-size: var(--text-lg);
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ===== VAKANTIEWERKING ===== */
.holiday-rules-section,
.holiday-periods-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.holiday-rules-section h4,
.holiday-periods-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.holiday-periods-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Holiday status banner */
.holiday-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border: 2px solid;
}
.holiday-status-banner.active {
    background: var(--color-success-light);
    border-color: var(--primary-color);
    color: #065f46;
}
.holiday-status-banner.upcoming {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}
.holiday-status-icon {
    font-size: var(--text-xl);
    flex-shrink: 0;
}
.holiday-status-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.holiday-status-text strong {
    font-size: 15px;
}
.holiday-status-text span {
    font-size: 13px;
    opacity: 0.8;
}

.holiday-period-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.holiday-period-item.active {
    background: var(--color-success-light);
    border-color: #a7f3d0;
}

.holiday-period-item.past {
    opacity: 0.6;
}

.holiday-period-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.holiday-period-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.holiday-period-dates {
    font-size: 12px;
    color: var(--text-secondary);
}

.holiday-period-days {
    color: var(--text-tertiary);
}

.holiday-weeks-responsible {
    margin-top: 4px;
}

.holiday-weeks-list {
    display: none;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: 6px;
    padding: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.holiday-weeks-list.open {
    display: flex;
}

.holiday-week-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.holiday-week-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.no-items-text {
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

/* Quick select buttons */
.quick-select-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.quick-select-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.quick-select-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== WEEKROOSTER FORM ===== */
.form-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.form-help-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.week-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.week-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-bottom: -2px;
}

.week-tab:hover {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.06);
    border-bottom-color: rgba(var(--primary-rgb), 0.3);
}

.week-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.week-schedule-tabs-content {
    position: relative;
}

.week-content {
    display: none;
}

.week-content.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#week-schedule-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.week-schedule-day {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.week-schedule-day:last-child {
    margin-bottom: 0;
}

.week-schedule-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 110px;
}

.week-schedule-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.week-schedule-label .day-name {
    user-select: none;
    font-size: 13px;
}

.week-schedule-template,
.week-schedule-team,
.week-schedule-start,
.week-schedule-end {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

.week-schedule-template {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.week-schedule-team {
    min-width: 100px;
    max-width: 140px;
}

.week-schedule-times {
    display: flex;
    align-items: center;
    gap: 6px;
}

.week-schedule-start,
.week-schedule-end {
    width: 85px;
    min-width: 85px;
}

.week-schedule-start:read-only,
.week-schedule-end:read-only {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.week-schedule-template:disabled,
.week-schedule-team:disabled,
.week-schedule-start:disabled,
.week-schedule-end:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.time-separator {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
}

/* ===== PROFILE SCHEDULE SUMMARY (read-only) ===== */
.profile-week-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 10px;
}

.profile-week-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}

.profile-week-btn:hover {
    color: var(--text-primary);
}

.profile-week-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.profile-meta-inline {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.profile-meta-inline .profile-meta-row {
    flex: 1;
    min-width: 120px;
}

.profile-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: 10px;
}

.profile-schedule-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid var(--border-color, #e2e8f0);
}

.profile-schedule-day {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    min-width: 22px;
}

.profile-schedule-detail {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-schedule-off {
    opacity: 0.5;
}

.profile-schedule-off .profile-schedule-detail {
    font-style: italic;
    color: var(--text-tertiary, #94a3b8);
}

.profile-schedule-active {
    background: white;
    border-color: var(--primary-color, #3b82f6);
    border-left: 3px solid var(--primary-color, #3b82f6);
}

.profile-schedule-active .profile-schedule-day {
    color: var(--primary-color, #3b82f6);
}

.profile-schedule-active .profile-schedule-detail {
    color: var(--text-primary);
    font-weight: 500;
}

.profile-schedule-badge {
    background: var(--primary-light, #eff6ff);
    color: var(--primary-color, #3b82f6);
    padding: 1px 7px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== AVAILABILITY VIEW ===== */
.availability-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.availability-controls .date-navigation {
    display: flex;
    gap: var(--space-sm);
}

.availability-controls .period-display {
    font-weight: 600;
    font-size: var(--text-md);
    color: var(--text-primary);
}

.availability-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.availability-legend-inline {
    display: flex;
    gap: var(--space-sm);
}

.legend-chip {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.legend-chip.available {
    background: var(--color-success-light);
    color: var(--color-success-hover);
}

.legend-chip.absent {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.legend-chip.has-shift {
    background: #dbeafe;
    color: #2563eb;
}

.availability-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.availability-table {
    min-width: 100%;
}

.availability-header-row {
    display: grid;
    grid-template-columns: 180px repeat(7, 1fr);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.availability-employee-col {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.availability-header-row .availability-employee-col {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.availability-day-col {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.availability-day-col:last-child {
    border-right: none;
}

.availability-header-row .availability-day-col .day-name {
    font-size: 13px;
    font-weight: 600;
}

.availability-header-row .availability-day-col .day-date {
    font-size: 11px;
    opacity: 0.8;
}

.availability-header-row .availability-day-col.weekend {
    background: rgba(0, 0, 0, 0.15);
}

.availability-header-row .availability-day-col.closed {
    background: rgba(0, 0, 0, 0.3);
}

/* Team headers */
.availability-team-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.availability-team-header.vlot1 {
    background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
    color: var(--accent-blue);
}

.availability-team-header.vlot2 {
    background: linear-gradient(90deg, #ede9fe 0%, #f5f3ff 100%);
    color: #6b21a8;
}

.availability-team-header.cargo {
    background: linear-gradient(90deg, #d1fae5 0%, #ecfdf5 100%);
    color: #065f46;
}

.availability-team-header.overkoepelend {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
    color: #92400e;
}

.availability-team-header.jobstudent {
    background: linear-gradient(90deg, #fce7f3 0%, #fdf2f8 100%);
    color: #9f1239;
}

.availability-team-header .team-name {
    font-weight: 700;
}

.availability-team-header .team-count {
    font-weight: 400;
    opacity: 0.7;
    font-size: 12px;
}

/* Employee rows */
.availability-employee-row {
    display: grid;
    grid-template-columns: 180px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.availability-employee-row:last-child {
    border-bottom: none;
}

.availability-employee-row:hover {
    background: #f8fafc;
}

.availability-employee-row.current-user {
    background: rgba(37, 99, 235, 0.05);
    border-left: 3px solid var(--primary-color);
}

.availability-employee-row.current-user .emp-name {
    font-weight: 600;
}

.availability-employee-row .availability-employee-col {
    background: #fafbfc;
    border-right: 1px solid var(--border-color);
}

.availability-employee-row .emp-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

/* Day cells in rows */
.availability-employee-row .availability-day-col {
    padding: 8px;
    border-right: 1px solid var(--border-color);
    min-height: 56px;
}

.availability-employee-row .availability-day-col:last-child {
    border-right: none;
}

.availability-employee-row .availability-day-col.weekend {
    background: #f8fafc;
}

.availability-employee-row .availability-day-col.closed {
    background: #e2e8f0;
}

/* Cell content */
.availability-cell-content {
    width: 100%;
    height: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
}

.availability-cell-content.available {
    background: var(--color-success-light);
    border: 1px dashed #a7f3d0;
}

.availability-cell-content.available:hover {
    background: var(--color-success-bg);
    border-color: #6ee7b7;
}

.availability-cell-content.absent {
    background: var(--color-danger-light);
    border: 1px solid var(--color-danger-border);
}

.availability-cell-content.absent:hover {
    background: var(--color-danger-bg);
}

.availability-cell-content.has-shift {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.availability-cell-content.has-shift:hover {
    background: #dbeafe;
}

/* Niet ingepland volgens weekrooster - vrije dag */
.availability-cell-content.not-scheduled {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.availability-cell-content.not-scheduled:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.availability-cell-content.not-scheduled .status-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.availability-cell-content .status-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.availability-cell-content.absent .status-label {
    color: var(--color-danger);
}

.availability-cell-content.has-shift .status-label {
    color: #2563eb;
}

.availability-cell-content .status-check {
    color: #10b981;
    font-size: var(--text-md);
    font-weight: bold;
}

/* Conflict styling - afwezig maar nog dienst */
.availability-cell-content.conflict {
    background: linear-gradient(135deg, #fef2f2 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    animation: pulse-conflict 2s infinite;
}

.availability-cell-content.conflict:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fde68a 100%);
}

.availability-cell-content.conflict .status-label {
    color: #b45309;
}

.conflict-icon {
    margin-right: 4px;
}

@keyframes pulse-conflict {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

/* Date range info in modal */
.date-range-info {
    padding: 8px 12px;
    margin-bottom: 16px;
    border-radius: 6px;
    text-align: center;
}

.date-range-info .info-badge {
    background: #dbeafe;
    color: var(--accent-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.date-range-info .error-text {
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 500;
}

/* Add absence button */
.btn-add-absence {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.2s;
}

.btn-add-absence:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-nav {
        flex-wrap: wrap;
    }

    .nav-center {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .calendar-grid {
        grid-template-columns: 80px repeat(7, minmax(100px, 1fr));
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .view {
        padding: 16px;
    }

    .planning-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-grid {
        grid-template-columns: 60px repeat(7, minmax(90px, 1fr));
        font-size: 12px;
    }

    .employees-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
    }
}

/* ===== EMPLOYEE HOURS TRACKING ===== */
.employee-hours {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.hours-week-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 8px;
}

.week-pill {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.week-range {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.hours-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.hours-week-nav {
    display: flex;
    gap: 6px;
}

.week-nav-btn {
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.week-nav-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.week-nav-btn[data-direction="today"] {
    font-weight: 900;
    padding: 4px 7px;
}

.month-only {
    display: none;
}

.employee-card.show-month .month-only {
    display: block;
}

.hours-section {
    margin-bottom: 12px;
}

.hours-section:last-child {
    margin-bottom: 0;
}

.hours-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 4px;
}

.hours-toggle-btn {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.hours-toggle-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.admin-user-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-user-row:last-child {
    border-bottom: none;
}

.admin-user-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.admin-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-user-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    justify-content: flex-end;
}

.admin-role-select,
.admin-team-select {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface-color);
    font-size: 12px;
}

.overtime-summary {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.overtime-chip {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ===== WEEKEND/VAKANTIE VERANTWOORDELIJKE ===== */
.responsible-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 16px;
}

.responsible-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.responsible-icon {
    font-size: var(--text-md);
}

.responsible-label {
    font-weight: 600;
    color: #92400e;
    font-size: 14px;
}

.responsible-name {
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.responsible-warning {
    color: #b45309;
    font-weight: 500;
    font-style: italic;
    font-size: 14px;
}

/* Upcoming responsibles list */
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.upcoming-item-clickable {
    cursor: pointer;
    transition: background 0.15s;
}
.upcoming-item-clickable:hover {
    background: #eef2f7;
}

.upcoming-date {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    font-size: 13px;
}

.upcoming-name {
    font-weight: 500;
    font-size: 14px;
    flex: 1;
}

.upcoming-manual-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.upcoming-edit-icon {
    opacity: 0;
    transition: opacity 0.15s;
    color: var(--text-secondary);
}
.upcoming-item-clickable:hover .upcoming-edit-icon {
    opacity: 0.6;
}

/* Weekend responsible picker modal */
.weekend-picker-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 320px;
    overflow-y: auto;
}

.weekend-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}
.weekend-picker-option:hover {
    background: #f1f5f9;
}
.weekend-picker-option.selected {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary-color);
}
.weekend-picker-option input[type="radio"] {
    display: none;
}

.weekend-picker-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.weekend-picker-label {
    font-size: 14px;
    font-weight: 500;
}

.weekend-picker-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 4px;
}

.responsible-history {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.responsible-history h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.responsible-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.responsible-history-list li {
    padding: 4px 0;
    color: var(--text-secondary);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
}

/* Compact rotation settings */
.rotation-status {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #166534;
}

.form-row.compact {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-row.compact .form-group {
    flex: 1;
    min-width: 120px;
}

.form-row.compact label {
    font-size: 12px;
    margin-bottom: 4px;
}

.eligible-teams-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.eligible-teams-compact .checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.upcoming-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Verantwoordelijke Settings */
.responsible-settings-section {
    margin-top: 16px;
}

.responsible-settings-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.eligible-teams-checkboxes {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
}

.assignments-table {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.assignment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.assignment-week {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
}

.assignment-name {
    flex: 1;
    font-weight: 500;
}

@media (max-width: 640px) {
    .app-title {
        font-size: var(--text-md);
    }

    .nav-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .calendar-cell {
        min-height: 80px;
        padding: 6px;
    }

    .shift-card {
        padding: 8px;
        font-size: 12px;
    }
}

/* ===== SIDEBAR TOGGLE (CSS-only) ===== */
.sidebar-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.sidebar-toggle-label {
    display: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    flex-shrink: 0;
}

.sidebar-toggle-label:hover {
    background: var(--bg-color);
}

.sidebar-toggle-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    position: relative;
    transition: all 0.3s;
}

.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    left: 0;
    transition: all 0.3s;
}

.sidebar-toggle-icon::before { top: -6px; }
.sidebar-toggle-icon::after { top: 6px; }

/* Rotate icon when sidebar is collapsed */
.sidebar-toggle-input:checked ~ .main-nav .sidebar-toggle-icon {
    background: transparent;
}
.sidebar-toggle-input:checked ~ .main-nav .sidebar-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}
.sidebar-toggle-input:checked ~ .main-nav .sidebar-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ===== DESKTOP SIDEBAR LAYOUT ===== */
@media (min-width: 901px) {
    .sidebar-toggle-label {
        display: flex;
    }

    #app-container {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .main-nav {
        flex-direction: column;
        align-items: stretch;
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        min-height: 100vh;
        height: 100vh;
        position: sticky;
        top: 0;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        padding: 16px;
        gap: var(--space-sm);
        overflow-y: auto;
        overflow-x: hidden;
        transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
        justify-content: flex-start;
        box-shadow: none;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 8px;
    }

    .nav-center {
        flex-direction: column;
        flex: 0 1 auto;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-group-primary,
    .nav-group-admin {
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .nav-group-admin {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }

    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 10px 14px;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
        overflow: hidden;
        transition: all 0.2s, font-size 0s;
    }

    /* Nav button icons via Lucide SVGs */
    .nav-btn .nav-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    /* Nav icons are now Lucide SVGs inside .nav-icon elements */

    .nav-right {
        margin-top: auto;
        flex-direction: column;
        gap: 12px;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }

    /* User menu in sidebar: stack vertically */
    .user-menu-trigger {
        width: 100%;
        justify-content: center;
    }

    .user-menu-name {
        display: none;
    }

    .user-menu-chevron {
        display: none;
    }

    .user-menu-dropdown {
        position: fixed;
        left: var(--sidebar-width);
        right: auto;
        top: auto;
        bottom: 16px;
        margin-left: 8px;
    }

    .sidebar-toggle-input:checked ~ .main-nav .user-menu-dropdown {
        left: var(--sidebar-collapsed-width);
    }

    .nav-right .role-switcher {
        flex-direction: column;
        width: 100%;
    }

    .nav-right .role-switcher select {
        width: 100%;
    }

    /* Content area fills remaining space */
    .view {
        max-width: none;
        margin: 0;
        flex: 1;
        min-width: 0;
    }

    .view.active {
        display: block;
    }

    /* ---- Collapsed sidebar state ---- */
    .sidebar-toggle-input:checked ~ .main-nav {
        width: var(--sidebar-collapsed-width);
        min-width: var(--sidebar-collapsed-width);
        padding: 16px 8px;
    }

    .sidebar-toggle-input:checked ~ .main-nav .app-title {
        display: none;
    }

    .sidebar-toggle-input:checked ~ .main-nav .nav-btn {
        font-size: 0;
        padding: 10px;
        justify-content: center;
        gap: 0;
    }

    .sidebar-toggle-input:checked ~ .main-nav .nav-btn .nav-icon {
        width: 20px;
        height: 20px;
    }

    .sidebar-toggle-input:checked ~ .main-nav .user-menu-name {
        display: none;
    }

    .sidebar-toggle-input:checked ~ .main-nav .user-menu-chevron {
        display: none;
    }

    .sidebar-toggle-input:checked ~ .main-nav .user-menu-trigger {
        padding: 2px;
    }

    .sidebar-toggle-input:checked ~ .main-nav .role-switcher {
        display: none;
    }
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile breakpoint */
@media (max-width: 900px) {
    /* Hide sidebar toggle on mobile */
    .sidebar-toggle-label {
        display: none !important;
    }

    /* Reset to horizontal layout on mobile */
    #app-container {
        flex-direction: column;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-nav {
        flex-wrap: wrap;
        flex-direction: row;
        width: 100% !important;
        min-width: 100% !important;
        height: auto;
        min-height: auto;
        position: relative;
        z-index: 1100;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 12px;
        justify-content: space-between;
        overflow: visible;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        min-width: 0;
        flex: 0 1 auto;
    }

    .nav-left .app-title {
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 120px;
    }

    .nav-center {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: var(--space-xs);
        padding: 12px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
        order: 3;
    }

    .nav-center.open {
        display: flex;
    }

    .nav-group-primary,
    .nav-group-admin {
        flex-direction: column;
        gap: 2px;
    }

    .nav-group-admin {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }

    .nav-center .nav-btn {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        font-size: 14px;
    }

    /* Hide sidebar icons on mobile */
    .nav-btn::before {
        display: none !important;
    }

    .nav-center .nav-btn.active {
        background: var(--primary-color);
        color: white;
    }

    .nav-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
        flex: 0 0 auto;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    /* Hide name in avatar trigger on mobile, just show avatar */
    .user-menu-name {
        display: none;
    }

    .user-menu-chevron {
        display: none;
    }

    .user-menu-trigger {
        padding: 2px;
    }

    .main-nav {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Reset view for mobile (undo sidebar flex layout) */
    .view {
        max-width: 100%;
        margin: 0 auto;
    }

    .view.active {
        display: block;
    }
}

/* Tablet breakpoint */
@media (max-width: 768px) {
    .timeline-view-wrapper > * {
        min-width: 0 !important;
    }

    .timeline-header,
    .timeline-scale-row,
    .timeline-row {
        grid-template-columns: 70px repeat(7, 1fr) !important;
    }

    .timeline-name-header {
        padding: 8px 4px;
        font-size: 10px;
    }

    .timeline-day-header .day-name {
        font-size: 9px;
    }

    .timeline-day-header .day-num {
        font-size: 13px;
    }

    .timeline-name-col {
        font-size: 10px;
    }

    .timeline-shift {
        font-size: 8px;
    }

    .timeline-day-cell {
        min-height: 32px;
    }

    /* Month view mobile styles */
    .view-toggle-controls {
        width: 100%;
        justify-content: stretch;
    }

    .view-toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .month-name-header {
        width: 80px;
        min-width: 80px;
        font-size: 12px;
        padding: 8px 4px;
    }

    .month-employee-cell {
        width: 80px;
        min-width: 80px;
        font-size: 11px;
        padding: 8px 4px;
    }

    .month-day-header {
        min-width: 80px;
        padding: 6px 2px;
    }

    .month-day-header .day-name {
        font-size: 9px;
    }

    .month-day-header .day-num {
        font-size: 13px;
    }

    .month-day-cell {
        min-width: 80px;
        padding: 4px 2px;
        gap: 2px;
    }

    .month-shift-badge {
        font-size: 9px;
        padding: 3px 4px;
    }

    .month-row {
        min-height: 60px;
    }
}

/* Smaller mobile */
@media (max-width: 480px) {
    /* ULTRA NUCLEAR: Force everything to fit and only vertical scroll */
    *, *::before, *::after {
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overscroll-behavior-x: none !important;
    }

    html {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        position: fixed !important;
        overscroll-behavior: contain !important;
    }

    .container, #app-container, .view, main, #planning-view,
    .main-nav, .view-header, .header-actions, .planning-controls {
        overflow-x: visible !important; /* Allow sticky positioning */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .view {
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .main-nav {
        padding: 6px 8px;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .nav-left {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex: 0 1 auto !important;
        order: 1 !important;
    }

    .nav-left .app-title {
        font-size: 12px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-right {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        order: 2 !important;
    }

    .user-menu-trigger {
        padding: 2px !important;
    }

    .user-menu-name,
    .user-menu-chevron {
        display: none !important;
    }

    .avatar-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    .nav-center {
        order: 3 !important;
        width: 100% !important;
    }

    .view-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .view-header h2 {
        font-size: 18px;
    }

    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        max-width: 100% !important;
        width: 100% !important;
    }

    .header-actions .btn {
        width: 100% !important;
        font-size: 11px !important;
        padding: 10px 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .planning-controls {
        flex-direction: column;
        gap: 12px;
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* Allow sticky positioning on planning view */
    #planning-view {
        overflow-x: visible !important;
    }

    #team-toggles, #employee-team-toggles {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100% !important;
    }

    /* Hide week navigation on mobile - day nav handles this */
    .date-navigation {
        display: none !important;
    }

    .period-display {
        display: none !important;
    }

    /* Settings tabs mobile scroll */
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Modal full screen on mobile */
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }

    .modal-body {
        max-height: calc(100vh - 140px);
    }

    /* Touch-friendly inputs */
    input, select, textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    /* Employee cards compact */
    .employee-card {
        padding: 12px;
    }

    .employee-name {
        font-size: 14px;
    }

    /* ===== MOBILE DAY VIEW FOR PLANNING ===== */

    /* Show mobile day navigation */
    .mobile-day-nav {
        display: flex !important;
    }

    /* Hide the full header - mobile shows day in separate nav */
    .timeline-header {
        display: none !important;
    }

    /* Timeline: show only employee name + 1 selected day */
    .timeline-view-wrapper {
        overflow: visible !important; /* Allow sticky positioning */
        width: 100% !important;
        max-width: 100% !important;
    }

    .timeline-view-wrapper > * {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Allow sticky positioning on calendar container */
    .calendar-container {
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .timeline-body {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .timeline-scale-row,
    .timeline-row {
        display: grid !important;
        grid-template-columns: 80px calc(100% - 80px) !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Hide all day columns by default */
    .timeline-scale,
    .timeline-day-cell {
        display: none !important;
    }

    /* Show only the selected day column based on data attribute */
    .timeline-view-wrapper[data-mobile-day="0"] .timeline-scale:nth-child(2),
    .timeline-view-wrapper[data-mobile-day="0"] .timeline-day-cell:nth-child(2) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="1"] .timeline-scale:nth-child(3),
    .timeline-view-wrapper[data-mobile-day="1"] .timeline-day-cell:nth-child(3) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="2"] .timeline-scale:nth-child(4),
    .timeline-view-wrapper[data-mobile-day="2"] .timeline-day-cell:nth-child(4) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="3"] .timeline-scale:nth-child(5),
    .timeline-view-wrapper[data-mobile-day="3"] .timeline-day-cell:nth-child(5) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="4"] .timeline-scale:nth-child(6),
    .timeline-view-wrapper[data-mobile-day="4"] .timeline-day-cell:nth-child(6) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="5"] .timeline-scale:nth-child(7),
    .timeline-view-wrapper[data-mobile-day="5"] .timeline-day-cell:nth-child(7) {
        display: block !important;
    }

    .timeline-view-wrapper[data-mobile-day="6"] .timeline-scale:nth-child(8),
    .timeline-view-wrapper[data-mobile-day="6"] .timeline-day-cell:nth-child(8) {
        display: block !important;
    }

    /* Day cell should fill available space and maintain positioning */
    .timeline-day-cell {
        position: relative;
        min-height: 40px;
        overflow: hidden !important;
    }

    /* Scale styling */
    .timeline-scale {
        position: relative;
        height: 20px;
        overflow: hidden !important;
    }

    .scale-marker {
        font-size: 9px;
    }

    /* Employee name column */
    .timeline-employee-cell {
        font-size: 11px;
        padding: 8px 6px;
        display: flex !important;
        align-items: center;
        overflow: hidden !important;
    }

    .timeline-employee-cell .emp-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 70px !important;
    }

    /* Timeline blocks (shifts) - keep absolute positioning for time-based layout */
    .timeline-block {
        font-size: 10px;
        padding: 2px 4px;
        min-height: 32px;
        overflow: hidden !important;
    }

    .timeline-block .block-time {
        font-size: 9px;
        overflow: hidden !important;
    }

    /* Team header on mobile */
    .timeline-team-header {
        display: flex !important;
        padding: 8px 12px;
        overflow: hidden !important;
    }

    .timeline-team-header .team-header-count {
        display: none;
    }

    /* Scale label should be visible */
    .timeline-scale-label {
        display: block !important;
    }

    /* Team toggles compact */
    #team-toggles, #employee-team-toggles {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .team-toggle {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* View toggle buttons */
    .view-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Validation alerts compact */
    .validation-alerts {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .validation-alert {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* ===== MEDEWERKERS VIEW MOBILE ===== */
    .employees-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .employee-card {
        padding: 12px !important;
    }

    .employee-card .employee-name {
        font-size: 14px;
    }

    .employee-card .employee-info {
        font-size: 12px;
    }

    .employees-filters {
        margin-bottom: 12px;
    }

    /* ===== PROFIEL VIEW MOBILE ===== */
    #profile-view .view-header {
        margin-bottom: 12px;
    }

    #profile-content {
        overflow-x: hidden !important;
    }

    .profile-card {
        padding: 12px !important;
    }

    .profile-info-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* ===== BESCHIKBAARHEID VIEW MOBILE ===== */
    .availability-controls {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Hide week navigation on mobile - use day nav instead */
    .availability-controls .date-navigation,
    .availability-controls .period-display {
        display: none !important;
    }

    /* Show mobile day navigation for availability */
    .availability-mobile-nav {
        display: flex !important;
    }

    .availability-container {
        overflow: hidden !important;
    }

    .availability-table {
        min-width: 0;
        width: 100%;
    }

    /* Hide header row on mobile - day shown in nav */
    .availability-header-row {
        display: none !important;
    }

    /* Show employee name + only selected day */
    .availability-employee-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .availability-employee-col {
        min-width: 0 !important;
        font-size: 12px;
    }

    /* Hide all day columns by default */
    .availability-employee-row .availability-day-col {
        display: none !important;
    }

    /* Show only selected day based on data attribute */
    .availability-container[data-mobile-day="0"] .availability-employee-row .availability-day-col:nth-child(2) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="1"] .availability-employee-row .availability-day-col:nth-child(3) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="2"] .availability-employee-row .availability-day-col:nth-child(4) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="3"] .availability-employee-row .availability-day-col:nth-child(5) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="4"] .availability-employee-row .availability-day-col:nth-child(6) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="5"] .availability-employee-row .availability-day-col:nth-child(7) {
        display: flex !important;
    }
    .availability-container[data-mobile-day="6"] .availability-employee-row .availability-day-col:nth-child(8) {
        display: flex !important;
    }

    .availability-day-col {
        min-width: 0 !important;
        font-size: 12px;
    }

    .availability-cell-content {
        padding: 8px !important;
        font-size: 11px;
        width: 100%;
        justify-content: center;
    }

    .availability-team-header {
        display: flex !important;
        padding: 8px 12px;
    }

    .availability-team-header .team-count {
        display: none;
    }

    .availability-legend-inline {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .availability-legend-inline span {
        font-size: 10px;
        padding: 4px 8px;
    }

    .availability-actions {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }

    .btn-add-absence {
        width: 100%;
    }

    /* ===== RUILEN VIEW MOBILE ===== */
    #swaps-view .view-description {
        font-size: 12px;
    }

    .swap-card {
        padding: 12px !important;
    }

    .swap-details {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .swap-arrow {
        transform: rotate(90deg);
    }

    /* ===== INSTELLINGEN VIEW MOBILE ===== */
    .settings-tabs {
        gap: var(--space-xs);
        padding: 4px;
    }

    .settings-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .settings-content {
        padding: 12px !important;
    }

    .settings-section {
        padding: 12px !important;
        margin-bottom: 12px;
    }

    .settings-section h3 {
        font-size: 14px;
    }

    .admin-user-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-sm);
        padding: 12px !important;
    }

    .admin-user-info {
        width: 100%;
    }

    .admin-user-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /* Admin user details (expanded) */
    .admin-user-details {
        width: 100% !important;
        padding: 12px 0 !important;
        overflow: hidden !important;
    }

    .admin-user-controls {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .admin-field {
        width: 100% !important;
    }

    .admin-field label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .admin-field select {
        width: 100% !important;
    }

    /* Role pill buttons - make them wrap */
    .role-pill-group {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .role-pill-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        flex: 0 0 auto !important;
    }

    .admin-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 8px;
    }

    .admin-actions .btn {
        width: 100% !important;
    }

    .admin-user-header {
        width: 100%;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .admin-user-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .form-group {
        width: 100% !important;
    }
}

/* ===== AUTO/MANUAL SHIFT STYLING ===== */
/* Visual distinction between automatically generated and manually edited shifts */

.shift-block.shift-auto,
.timeline-block.shift-auto {
    border-right: 3px solid #f59e0b; /* Orange accent for auto-generated */
}

.shift-block.shift-manual,
.timeline-block.shift-manual {
    border-right: 3px solid #10b981; /* Green accent for manually edited */
}

/* Source indicator badge (optional, shown on hover) */
.shift-source-badge {
    font-size: 0.7em;
    margin-left: 4px;
    opacity: 0.7;
}

/* Shift modal source info */
.shift-source-info {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.shift-source-info.auto {
    background: var(--color-warning-light);
    border: 1px solid #f59e0b;
    color: #92400e;
}

.shift-source-info.manual {
    background: var(--color-success-bg);
    border: 1px solid #10b981;
    color: #065f46;
}

.shift-source-info .btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 0.85em;
}

.shift-source-info .btn-link:hover {
    color: #1d4ed8;
}

/* ===== SWAP REQUEST MODALS ===== */

.swap-shifts-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
}

.swap-shift-card {
    flex: 1;
    padding: 1rem;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
}

.swap-shift-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

.swap-shift-card p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #475569;
}

.swap-shift-card strong {
    color: #1e293b;
}

.swap-arrow {
    font-size: 2rem;
    color: #3b82f6;
    font-weight: bold;
    flex-shrink: 0;
}

.swap-request-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

.swap-request-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.swap-request-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.swap-request-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
}

.swap-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
}

.swap-status-badge.status-pending {
    background: var(--color-warning-light);
    color: #92400e;
}

.swap-status-badge.status-approved {
    background: var(--color-success-bg);
    color: #065f46;
}

.swap-status-badge.status-rejected {
    background: var(--color-danger-bg);
    color: #991b1b;
}

.swap-status-badge.status-cancelled {
    background: #f1f5f9;
    color: #475569;
}

.swap-status-badge.status-available {
    background: var(--color-success-bg);
    color: #065f46;
}

.swap-request-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.swap-request-shift {
    flex: 1;
    padding: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
}

.swap-request-shift strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.swap-request-arrow {
    font-size: 1.5rem;
    color: #3b82f6;
}

.swap-request-message {
    background: #f8fafc;
    padding: 0.75rem;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
    font-style: italic;
}

.swap-accepted-info {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
}

.swap-request-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.swap-request-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.swaps-team-filter {
    margin-bottom: 1rem;
    padding: 10px 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Swap groups (collapsible type sections) */
.swap-group {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.swap-group-header {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.swap-group-header:hover { background: #f8fafc; }

.swap-group-header h3 {
    margin: 0;
    font-size: var(--text-md);
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
}

.swap-group-chevron {
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}
.swap-group.collapsed .swap-group-chevron { transform: rotate(-90deg); }

.swap-group-body {
    padding: 0 var(--space-md) var(--space-md);
}
.swap-group-body .swap-request-card:last-child,
.swap-group-body .takeover-card:last-child { margin-bottom: 0; }
.swap-group.collapsed .swap-group-body { display: none; }

/* Action-required group highlight */
.swap-group-action {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.02);
}
.swap-group-action-header { cursor: default; }
.swap-group-action-header:hover { background: transparent; }

/* Expired group */
.swap-group-expired { opacity: 0.7; }
.swap-group-expired .swap-request-card,
.swap-group-expired .takeover-card { opacity: 0.7; }

.swap-count-muted { background: #94a3b8; }

.swap-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.5rem;
}

/* Legacy swap-section (kept for backward compat) */
.swap-section {
    margin-bottom: 2rem;
}

.swap-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.swap-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.swap-empty-state .empty-state-icon {
    width: 36px;
    height: 36px;
    opacity: 0.35;
    color: var(--text-secondary);
}

.swap-empty-state p {
    margin: 0;
    font-size: 1rem;
}

.message-display {
    background: #f8fafc;
    padding: 0.75rem;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #475569;
    font-style: italic;
}

/* Takeover request specific styles */
.takeover-card {
    border-left: 4px solid #10b981;
}

.takeover-shift-info {
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid var(--color-success-bg);
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.takeover-shift-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.takeover-shift-info em {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.swap-section-available .swap-section-count {
    background: #10b981;
}

.swap-section-expired .swap-request-card,
.swap-section-expired .takeover-card {
    opacity: 0.6;
}

.swap-status-badge.status-expired {
    background: #94a3b8;
    color: white;
}

#swap-validation-display,
#swap-review-validation {
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
}

#swap-validation-display.has-errors,
#swap-review-validation.has-errors {
    background: var(--color-danger-bg);
    border: 1px solid #fca5a5;
}

#swap-validation-display.has-warnings,
#swap-review-validation.has-warnings {
    background: var(--color-warning-light);
    border: 1px solid #fcd34d;
}

#swap-validation-display.is-valid,
#swap-review-validation.is-valid {
    background: var(--color-success-bg);
    border: 1px solid #86efac;
}

#swap-validation-display ul,
#swap-review-validation ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

#swap-validation-display li,
#swap-review-validation li {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.validation-errors {
    color: #991b1b;
}

.validation-warnings {
    color: #92400e;
}

.validation-success {
    color: #065f46;
}

/* ===== DRAG & DROP STYLES ===== */

/* Dragging shift block - moves with cursor */
.timeline-block.is-dragging {
    opacity: 0.7;
    z-index: 10000;
    position: fixed !important;
    pointer-events: none;
    cursor: grabbing !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Dimensions will be set via JavaScript to preserve original size */
}

/* Ghost/placeholder in original position */
.timeline-block.drag-ghost {
    opacity: 0.3;
    border: 2px dashed #64748b;
    background: transparent !important;
    pointer-events: none;
}

/* Resizing shift block - live feedback */
.timeline-block.is-resizing {
    transition: none !important; /* Disable transition for instant feedback */
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(59, 130, 246, 0.5);
    z-index: 100;
}

.timeline-block.is-resizing .block-time {
    font-weight: 600;
    color: var(--accent-blue);
}

/* Valid drop target highlighting */
.timeline-day-cell.drop-target-valid {
    background-color: rgba(16, 185, 129, 0.15);
    outline: 2px solid #10b981;
    outline-offset: -2px;
}

/* Invalid drop target highlighting */
.timeline-day-cell.drop-target-invalid {
    background-color: rgba(239, 68, 68, 0.15);
    outline: 2px solid var(--color-danger);
    outline-offset: -2px;
}

/* ===== TOAST NOTIFICATION SYSTEM ===== */

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-width: 400px;
}

/* Toast Card */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid currentColor;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Types */
.toast-success {
    color: #10b981;
    border-left-color: #10b981;
}

.toast-error {
    color: var(--color-danger);
    border-left-color: var(--color-danger);
}

.toast-warning {
    color: #f59e0b;
    border-left-color: #f59e0b;
}

.toast-info {
    color: #3b82f6;
    border-left-color: #3b82f6;
}

/* Toast Content */
.toast-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #1f2937;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }
}

/* ===== CONFIRMATION MODAL ===== */

#confirm-modal,
#input-prompt-modal {
    z-index: 1100;
}

.confirm-modal-content {
    max-width: 500px;
}

.confirm-modal-content .modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap; /* Preserve newlines in confirmation messages */
}

.confirm-modal-content .modal-actions {
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

.input-prompt-content {
    max-width: 340px !important;
    padding: 20px !important;
}

.input-prompt-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-prompt-content .form-input {
    margin-bottom: 12px;
}

.input-prompt-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.confirm-modal-content #confirm-modal-ok {
    min-width: 100px;
}

.confirm-modal-content #confirm-modal-cancel {
    min-width: 100px;
}

/* ===== ROOSTERBOUWER (Schedule Builder) ===== */

/* Builder settings panels (collapsible) */
.builder-settings-panels {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: 16px;
}
.builder-settings-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    overflow: hidden;
}
.builder-settings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.builder-settings-header:hover {
    background: var(--bg-color);
}
.builder-settings-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}
.builder-settings-summary {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}
.builder-settings-chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}
.builder-settings-panel.expanded .builder-settings-chevron {
    transform: rotate(180deg);
}
.builder-settings-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--border-color);
}
.builder-settings-panel.expanded .builder-settings-body {
    display: block;
}
.builder-settings-body .form-group {
    margin-top: 12px;
}
.builder-settings-body .form-group:first-child {
    margin-top: 4px;
}
.builder-weekend-responsible {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

.builder-controls {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.builder-controls-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.builder-controls-row + .builder-controls-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.builder-week-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.builder-week-btn {
    position: relative;
}
.builder-week-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    margin-left: 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.builder-week-remove:hover {
    opacity: 1;
    background: rgba(0,0,0,0.15);
}

.builder-week-display {
    font-weight: 600;
    font-size: 14px;
    min-width: 280px;
    text-align: center;
}

.builder-load-options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    align-items: center;
}

.builder-loaded-draft {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-blue);
    margin-left: auto;
}

.builder-draft-unsaved {
    color: #92400e;
    font-weight: 400;
    font-style: italic;
}

.builder-team-label-static {
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

/* Grid Layout */
.builder-grid-wrapper {
    overflow-x: auto;
    margin-bottom: 16px;
}

.builder-vakantie-bar {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 14px;
}

/* Concept type selection modal */
.concept-type-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.concept-type-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.15s;
}
.concept-type-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
}
.concept-type-option.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
}
.concept-type-option input[type="radio"] { display: none; }
.concept-type-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-color);
}
.concept-type-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.concept-type-info strong { font-size: 14px; }
.concept-type-info span { font-size: 12px; color: var(--text-secondary); }

.builder-grid {
    min-width: 0;
    overflow-x: auto;
}

.builder-grid-header {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 90px;
    gap: 2px;
    margin-bottom: 4px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.builder-name-header,
.builder-day-header,
.builder-hours-header {
    padding: 10px 4px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
}

.builder-day-header .day-name {
    display: block;
    font-weight: 700;
}

.builder-day-header .day-num {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.builder-day-header.weekend {
    background: var(--primary-dark, #1a5c4a);
}

.builder-day-header.closed {
    background: var(--text-secondary);
    opacity: 0.7;
}
.builder-day-toggle {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.builder-day-toggle:hover {
    filter: brightness(1.15);
}
.day-lock-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    opacity: 0.7;
}

.builder-day-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 2px 12px 4px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.7;
}

.builder-vakantie-responsible {
    display: flex;
    align-items: center;
}

.builder-day-header .closed-label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

/* Team section headers */
.builder-team-section {
    display: grid;
    grid-template-columns: 1fr;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
    border-left: 4px solid var(--primary-color);
    margin: 8px 0 2px 0;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.builder-team-section.team-vlot1 { border-left-color: var(--team-vlot1); }
.builder-team-section.team-vlot2 { border-left-color: var(--team-vlot2); }
.builder-team-section.team-cargo { border-left-color: var(--team-cargo); }
.builder-team-section.team-overkoepelend { border-left-color: var(--team-overkoepelend); }
.builder-team-section.team-jobstudent { border-left-color: var(--team-jobstudent); }

/* Employee rows */
.builder-row {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 90px;
    gap: 2px;
    margin-bottom: 2px;
}

.builder-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.builder-name-cell {
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface-color);
    border-radius: var(--radius-sm);
}

.builder-name-cell .emp-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.builder-name-cell .emp-contract {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Day cells */
.builder-cell {
    min-height: 52px;
    padding: 4px 0;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    overflow: visible;
}

.builder-cell:hover:not(.closed):not(.absent) {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.builder-cell.closed {
    background: var(--color-danger-bg);
    cursor: default;
    opacity: 0.5;
}

.builder-cell.absent {
    background: var(--color-warning-light);
    cursor: default;
}

.builder-cell.has-error {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.builder-cell.has-warning {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.builder-cell.has-existing {
    border-style: dashed;
    border-color: var(--text-secondary);
}

.cell-empty {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    opacity: 0.3;
}

.cell-absence {
    font-weight: 700;
    font-size: 14px;
    color: var(--warning-color);
}

.cell-closed {
    color: var(--text-secondary);
}

/* Timeline blocks inside builder cells (proportionally positioned) */
.builder-timeline-block {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    transition: opacity 0.15s ease;
    min-width: 0;
}

.builder-timeline-block:hover {
    opacity: 0.85;
}

.builder-timeline-block.nacht {
    background: var(--primary-dark, #1a5c4a);
    z-index: 2;
    overflow: visible;
}

.builder-timeline-block.team-vlot1 { background: var(--team-vlot1); }
.builder-timeline-block.team-vlot2 { background: var(--team-vlot2); }
.builder-timeline-block.team-cargo { background: var(--team-cargo); }
.builder-timeline-block.team-overkoepelend { background: var(--team-overkoepelend); }
.builder-timeline-block.team-jobstudent { background: var(--team-jobstudent); }

.btb-label {
    display: block;
    font-weight: 600;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

.btb-time {
    display: block;
    font-size: 9px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

/* Resize handles on builder timeline blocks */
.builder-timeline-block::before,
.builder-timeline-block::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    cursor: ew-resize;
    z-index: 2;
}

.builder-timeline-block::before { left: 0; }
.builder-timeline-block::after { right: 0; }

/* Drag visual feedback */
.builder-timeline-block.is-dragging {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.builder-timeline-block.is-resizing {
    opacity: 0.9;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.builder-cell.drop-target-valid {
    border-color: var(--success-color) !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.builder-cell.drop-target-invalid {
    border-color: var(--danger-color) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.builder-existing-shift {
    width: 100%;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 10px;
    border: 1px dashed var(--text-secondary);
    color: var(--text-secondary);
}

.builder-existing-badge {
    display: block;
    font-size: 9px;
    opacity: 0.7;
    font-style: italic;
}

/* Hours column */
.builder-hours-cell {
    padding: 8px 4px;
    text-align: center;
    background: var(--surface-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.builder-hours-cell .planned-hours {
    font-weight: 700;
    font-size: 14px;
}

.builder-hours-cell .contract-hours {
    font-size: 11px;
    color: var(--text-secondary);
}

.builder-hours-cell.over-hours .planned-hours { color: var(--danger-color); }
.builder-hours-cell.under-hours .planned-hours { color: var(--warning-color); }
.builder-hours-cell.exact-hours .planned-hours { color: var(--success-color); }

/* Staffing summary row */
.builder-staffing-row {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 90px;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid var(--border-color);
}

.builder-staffing-label {
    padding: 8px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.builder-staffing-cell {
    padding: 8px 4px;
    text-align: center;
    border-radius: var(--radius-sm);
}

.builder-staffing-cell.staffing-ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.builder-staffing-cell.staffing-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    font-weight: 600;
}

.builder-staffing-cell .staffing-count {
    display: block;
    font-weight: 700;
    font-size: var(--text-md);
}

.builder-staffing-cell .staffing-min {
    display: block;
    font-size: 10px;
    opacity: 0.7;
}

/* Staffing heatmap (per-hour bezetting) */
.builder-heatmap-row {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 90px;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid var(--border-color);
}

.builder-heatmap-label {
    padding: 4px 8px;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.builder-heatmap-cell {
    position: relative;
    height: 24px;
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    overflow: visible;
}

.builder-heatmap-cell.closed {
    opacity: 0.3;
}

.builder-heatmap-end {
    /* empty spacer for hours column */
}

.heatmap-seg {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.1s, z-index 0s;
    cursor: default;
}

.heatmap-seg:hover {
    transform: scaleX(2.5) scaleY(1.8);
    z-index: 10;
    border: 1px solid var(--text-color);
    border-radius: 2px;
}

.heatmap-seg.seg-ok { background: rgba(16, 185, 129, 0.5); }
.heatmap-seg.seg-warn { background: rgba(245, 158, 11, 0.6); }
.heatmap-seg.seg-danger { background: rgba(239, 68, 68, 0.6); }
.heatmap-seg.seg-none { background: var(--surface-color); }

/* Bezettingsregels editor */
.builder-staffing-editor-wrapper {
    margin: 0 0 8px;
}

.builder-staffing-editor {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

/* Staffing editor: 7-column layout with stacked rule cards */
.staffing-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-xs);
}

.staffing-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.staffing-col.closed {
    opacity: 0.3;
}

.staffing-col-header {
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.staffing-rule-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px;
    position: relative;
}

.staffing-rule-times,
.staffing-rule-min {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.staffing-rule-times {
    margin-bottom: 4px;
}

.staffing-rule-times span,
.staffing-rule-min span {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.staffing-rule-card select,
.staffing-rule-card .form-input.staffing-min-input {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 3px 2px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
}

.staffing-min-input::-webkit-inner-spin-button,
.staffing-min-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.staffing-rule-card .form-input.staffing-min-input {
    font-weight: 600;
}

.staffing-rule-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.staffing-rule-card:hover .staffing-rule-remove {
    opacity: 0.6;
}

.staffing-rule-remove:hover {
    opacity: 1 !important;
}

.staffing-rule-add {
    width: 100%;
    font-size: 12px;
    padding: 4px;
}

.staffing-editor-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* Meetings editor */
.meetings-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.meetings-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.meetings-col-header {
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}

.meeting-rule-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: relative;
}

.meeting-rule-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.meeting-rule-card select {
    font-size: 12px;
    padding: 3px 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
    flex: 1;
    min-width: 0;
}

.meeting-sep {
    font-size: 11px;
    color: var(--text-secondary);
}

.meeting-rule-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: auto;
}

.meeting-rule-card:hover .meeting-rule-remove {
    opacity: 0.6;
}

.meeting-rule-remove:hover {
    opacity: 1 !important;
}

.meeting-rule-add {
    width: 100%;
    font-size: 12px;
    padding: 4px;
}

/* Meeting overlay on builder timeline */
.builder-meeting-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(255, 140, 0, 0.3);
    border: 2px dashed rgba(255, 100, 0, 0.7);
    border-radius: var(--radius-sm);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.builder-meeting-overlay .meeting-label {
    color: #b35c00;
    opacity: 0.8;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
}

[data-theme="dark"] .builder-meeting-overlay {
    background: rgba(255, 160, 40, 0.25);
    border-color: rgba(255, 160, 40, 0.6);
}

[data-theme="dark"] .builder-meeting-overlay .meeting-label {
    color: #ffb84d;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* 11-hour rule warnings */
.builder-11h-warnings {
    margin: 12px 0;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
}
.builder-11h-warnings-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #856404;
}
.builder-11h-warnings ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #856404;
}
.builder-11h-warnings li {
    margin-bottom: 4px;
}

/* Action buttons */
.builder-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 0;
}

/* Schedule pattern settings */
.schedule-pattern-week {
    margin-bottom: 12px;
}
.schedule-pattern-days {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: 4px;
}
.schedule-day-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.schedule-day-checkbox:hover {
    background: var(--bg-color);
}
.schedule-day-checkbox input:checked + span {
    font-weight: 600;
    color: var(--danger-color);
}
.schedule-day-checkbox input {
    margin: 0;
}

/* Builder drafts list */
.builder-drafts {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.builder-drafts h3 {
    font-size: 1rem;
    margin: 0 0 12px 0;
    color: var(--text-primary, #333);
}

.builder-drafts-empty {
    color: var(--text-secondary, #888);
    font-size: 0.9rem;
    font-style: italic;
}

.builder-drafts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.builder-draft-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-color, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-md);
    gap: var(--space-md);
    transition: all 0.25s ease;
}

.builder-draft-card:hover {
    border-color: var(--primary-color, #4a7c6f);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.12);
    transform: translateY(-1px);
}

.builder-draft-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.builder-draft-info strong {
    font-size: 0.95rem;
}

.builder-draft-meta {
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
}

.builder-draft-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Builder template buttons (in modal) */
.builder-template-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.builder-template-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    font-size: 14px;
}

.builder-template-btn:hover {
    border-color: var(--primary-color);
}

.builder-template-btn.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.08);
}

.builder-template-btn .template-name {
    font-weight: 600;
}

.builder-template-btn .template-time {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Summary bar */
.builder-summary {
    display: flex;
    gap: var(--space-md);
    padding: 12px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.builder-summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.builder-summary-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.builder-summary-dot.error { background: var(--danger-color); }
.builder-summary-dot.warning { background: var(--warning-color); }
.builder-summary-dot.ok { background: var(--success-color); }

/* Radio group for apply modal */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.radio-label:hover {
    background: var(--bg-color);
}

/* Apply summary */
.builder-apply-summary p {
    margin: 4px 0;
}

/* Builder empty state */
.builder-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

/* Delete template button */
.builder-template-delete-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    opacity: 0.7;
    transition: opacity 0.15s;
}

.builder-template-delete-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.1);
}

/* ===== RESPONSIVE: BUILDER ===== */

@media (max-width: 768px) {
    .builder-grid {
        min-width: 600px;
        font-size: 11px;
    }

    .builder-grid-header,
    .builder-row,
    .builder-staffing-row,
    .builder-heatmap-row {
        grid-template-columns: 100px repeat(7, 1fr) 60px;
    }

    .builder-name-cell .emp-name {
        font-size: 11px;
    }

    .builder-cell {
        min-height: 40px;
        padding: 2px;
    }

    .btb-label {
        font-size: 8px;
    }

    .btb-time {
        font-size: 7px;
    }

    .builder-controls-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .builder-week-display {
        min-width: auto;
        font-size: 12px;
    }

    .builder-actions {
        flex-direction: column;
    }

    .builder-actions .btn {
        width: 100%;
    }

    .builder-draft-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .builder-draft-actions {
        width: 100%;
    }

    .builder-draft-actions .btn {
        flex: 1;
    }
}

/* ===== ENHANCED HOVER & TRANSITION EFFECTS ===== */

/* Login button enhancement */
#login-form .btn-primary {
    width: 100%;
    padding: 12px 20px;
    font-size: var(--text-md);
    transition: all 0.25s ease;
}

#login-form .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
    transform: translateY(-2px);
}

#login-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
    transition-duration: 0.1s;
}

/* Login box subtle interaction */
.login-box {
    transition: box-shadow 0.3s ease;
}

.login-box:focus-within {
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.12);
}

/* Settings card hover */
.settings-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.settings-card:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Calendar day column hover indicator */
.calendar-day-column:hover .time-cell:not(.closed) {
    background: rgba(var(--primary-rgb), 0.02);
}

/* Form input focus transitions */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.select-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
    border-color: var(--primary-color);
}

/* Sidebar toggle label hover */
.sidebar-toggle-label {
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-toggle-label:hover {
    transform: scale(1.05);
}

/* Checkbox group label hover enhancement */
.checkbox-group label {
    transition: all 0.2s ease;
}

.checkbox-group label:hover {
    background: rgba(var(--primary-rgb), 0.04);
    border-color: var(--primary-color);
    transform: translateX(2px);
}

/* Home welcome card subtle hover */
.home-welcome {
    transition: box-shadow 0.3s ease;
}

.home-welcome:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Date navigation buttons */
.date-navigation .btn {
    transition: all 0.2s ease;
}

.date-navigation .btn:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
}

/* Staffing warning item hover */
.staffing-warning-item {
    transition: all 0.2s ease;
}

.staffing-warning-item:hover {
    background: #fef08a;
    transform: translateX(2px);
}

/* ===== DRAFT BADGES ===== */
.builder-draft-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}
.draft-badge-active {
    background: #065f46;
    color: #fff;
}
.draft-badge-applied {
    background: var(--color-success-bg);
    color: #065f46;
}
.draft-badge-scheduled {
    background: var(--color-warning-light);
    color: #92400e;
}
.draft-badge-expired {
    background: #f3f4f6;
    color: #6b7280;
}
.draft-badge-activatable {
    background: #dbeafe;
    color: var(--accent-blue);
}
.draft-active {
    border-color: #065f46 !important;
    box-shadow: 0 0 0 2px #065f46;
}
.draft-activatable {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Builder notification for activatable drafts */
.builder-notification {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}
.builder-notification.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--accent-blue);
}

/* ===== CONCEPT CARDS OVERVIEW ===== */
.builder-overview {
    padding: 0;
}
.builder-overview-header {
    margin-bottom: 20px;
}
.builder-overview-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.builder-overview-title-row h3 {
    margin: 0;
    font-size: 1.2rem;
}
.builder-overview-filter-row {
    display: flex;
    gap: var(--space-sm);
}
.builder-overview-filter-row select {
    max-width: 180px;
    font-size: 0.85rem;
    padding: 4px 8px;
}
.builder-active-section {
    margin-bottom: 20px;
}
.builder-active-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981;
    margin-bottom: 8px;
}
.builder-active-section .builder-concept-card {
    border-left-width: 5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}
.builder-other-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.builder-no-results {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 20px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.builder-no-results .empty-state-icon,
.builder-empty .empty-state-icon {
    width: 36px;
    height: 36px;
    opacity: 0.35;
    color: var(--text-secondary);
}
.builder-concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}
.builder-concept-card {
    background: var(--surface-color, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.builder-concept-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.draft-status-active {
    border-left: 4px solid #10b981;
}
.draft-status-scheduled {
    border-left: 4px solid #3b82f6;
}
.draft-status-expired {
    border-left: 4px solid #9ca3af;
}
.draft-status-activatable {
    border-left: 4px solid #f59e0b;
}
.builder-concept-new {
    border: 2px dashed var(--border-color, #d1d5db);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 120px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s;
}
.builder-concept-new:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}
.concept-new-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 500;
}
.concept-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}
.concept-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}
.concept-card-badges {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}
.concept-card-badge {
    padding: 2px 10px;
    border-radius: var(--radius-lg);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active {
    background: #065f46;
    color: #fff;
}
.badge-scheduled {
    background: #dbeafe;
    color: var(--accent-blue);
}
.badge-expired {
    background: #f3f4f6;
    color: #6b7280;
}
.badge-applied {
    background: var(--color-success-bg);
    color: #065f46;
}
.badge-activatable {
    background: var(--color-warning-light);
    color: #92400e;
}
.badge-draft {
    background: #f3f4f6;
    color: #6b7280;
}
.badge-vakantie {
    background: #f59e0b;
    color: #fff;
}
.concept-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.concept-card-period {
    font-weight: 500;
    color: var(--text-primary);
}
.concept-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.concept-card-actions .btn {
    font-size: 0.8rem;
    padding: 4px 10px;
}
.concept-card-menu {
    position: relative;
    margin-left: auto;
}
.concept-card-menu-trigger {
    background: none;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.concept-card-menu-trigger:hover {
    background: var(--bg-secondary, #f3f4f6);
}
.concept-card-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 50;
    min-width: 160px;
    padding: 4px 0;
}
.concept-card-menu.open .concept-card-menu-dropdown {
    display: block;
}
.concept-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.concept-menu-item:hover {
    background: var(--bg-secondary, #f3f4f6);
}
.concept-menu-item.danger {
    color: var(--danger-color, #dc2626);
}
.concept-card-menu-dropdown hr {
    margin: 4px 0;
    border: none;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

/* Editor topbar */
.builder-editor-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.builder-editor-title {
    font-weight: 600;
    font-size: 1.1rem;
}
.builder-dirty-badge {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .builder-concept-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== READ-ONLY WEEK SCHEDULE ===== */
.read-only-schedule {
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ro-week-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.ro-week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}
.ro-week-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.ro-week-hours {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 10px;
}
.ro-week-grid {
    display: flex;
    flex-direction: column;
}
.ro-day-row {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.ro-day-row:last-child {
    border-bottom: none;
}
.ro-day-name {
    width: 32px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}
.ro-day-time {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.ro-day-off .ro-day-name {
    color: var(--text-secondary);
    font-weight: 400;
}
.ro-day-off .ro-day-time {
    color: #d1d5db;
}

/* Profile hours section */
.profile-hours-section {
    display: flex;
    flex-direction: column;
}
.profile-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.profile-hours-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.profile-hours-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ===== TEAM COVERAGE HEATMAP ===== */
.coverage-heatmap {
    margin: 12px 0;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.heatmap-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.heatmap-grid { display: grid; gap: 2px; }
.heatmap-row {
    display: grid;
    grid-template-columns: 140px repeat(7, 1fr);
    gap: 2px;
}
.heatmap-header .heatmap-day-cell {
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    padding: 6px 4px;
    color: var(--text-secondary);
}
.heatmap-team-cell {
    font-size: 13px;
    font-weight: 500;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.heatmap-team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* Planning heatmap cell — half-hour segments (same style as builder heatmap) */
.coverage-heatmap-cell {
    position: relative;
    height: 24px;
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    overflow: visible;
    cursor: pointer;
}
.coverage-heatmap-cell.closed {
    opacity: 0.3;
}

/* Legacy heatmap-cell (kept for backward compat) */
.heatmap-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s;
}
.heatmap-cell:hover { transform: scale(1.08); }
.heatmap-red { background: #fee2e2; color: #991b1b; }
.heatmap-orange { background: #ffedd5; color: #9a3412; }
.heatmap-yellow { background: #fef3c7; color: #92400e; }
.heatmap-green { background: #d1fae5; color: #065f46; }
.heatmap-closed { background: #f1f5f9; color: #94a3b8; }

/* Legend swatches matching heatmap-seg colors */
.seg-ok-swatch { background: rgba(16, 185, 129, 0.5); }
.seg-warn-swatch { background: rgba(245, 158, 11, 0.6); }
.seg-danger-swatch { background: rgba(239, 68, 68, 0.6); }

.heatmap-legend {
    display: flex;
    gap: var(--space-md);
    margin-top: 12px;
    flex-wrap: wrap;
}
.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 12px;
    color: var(--text-secondary);
}
.heatmap-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

#heatmap-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .heatmap-row { grid-template-columns: 100px repeat(7, 1fr); }
    .heatmap-team-cell { font-size: 11px; padding: 6px 4px; }
    .heatmap-cell { font-size: 12px; padding: 6px 2px; }
}

/* ===== CONFLICT RESOLUTION ===== */
.conflict-resolution { margin-top: 8px; }
.conflict-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-md);
    background: var(--color-danger-light);
}
.conflict-error {
    font-weight: 500;
    color: #991b1b;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.conflict-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.suggestions-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-right: 2px;
}
.suggestion-btn {
    font-size: 12px !important;
    padding: 4px 10px !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: white !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: all 0.15s;
}
.suggestion-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
}
.suggestion-applied {
    animation: suggestion-flash 1.5s ease-out;
    box-shadow: 0 0 0 2px var(--primary-color);
}
@keyframes suggestion-flash {
    0%, 40% { box-shadow: 0 0 0 3px var(--primary-color); }
    100% { box-shadow: none; }
}
.conflict-item:has(.conflict-warning) {
    border-color: var(--warning-color, #f59e0b);
    background: #fffbeb;
}
.conflict-warning {
    font-weight: 500;
    color: #92400e;
    font-size: 13px;
    line-height: 1.4;
}

/* ===== UNDO/REDO ===== */
.undo-redo-controls {
    display: flex;
    gap: var(--space-xs);
    margin-right: 8px;
}
.undo-redo-controls .btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== AUDIT LOG ===== */
.audit-filters { margin-bottom: 16px; }
.audit-filter-row {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
}
.audit-filter-row .form-group { min-width: 130px; flex: 1; }

.audit-log-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.audit-log-table th {
    text-align: left; padding: 10px 12px; font-weight: 600; font-size: 12px;
    color: var(--text-secondary); border-bottom: 2px solid var(--border-color);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.audit-log-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.audit-log-table tbody tr:hover { background: #f8fafc; }
.audit-time { white-space: nowrap; color: var(--text-secondary); font-size: 12px; }
.audit-details { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-secondary); }

.audit-action-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.audit-create { background: #d1fae5; color: #065f46; }
.audit-update { background: #dbeafe; color: var(--accent-blue); }
.audit-delete { background: #fee2e2; color: #991b1b; }
.audit-approve { background: #d1fae5; color: #065f46; }
.audit-reject { background: #fee2e2; color: #991b1b; }
.audit-cancel { background: #fef3c7; color: #92400e; }
.audit-login { background: #f1f5f9; color: #475569; }

.audit-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 16px 0 0;
}
.audit-page-info { font-size: 13px; color: var(--text-secondary); }

.audit-date-group { margin-bottom: var(--space-lg); }
.audit-date-group-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    margin-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
}
/* Reduced motion - respect user preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ===== DATA LOADING OVERLAY ===== */

.data-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: all;
    backdrop-filter: blur(1px);
}

.data-loading-overlay.hidden {
    display: none;
}

.data-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border-color, #ccc);
    border-top-color: var(--primary-color, #4a90d9);
    border-radius: 50%;
    animation: data-loading-spin 0.6s linear infinite;
}

@keyframes data-loading-spin {
    to { transform: rotate(360deg); }
}

.data-loading-text {
    font-size: 14px;
    color: var(--text-secondary, #666);
    font-weight: 500;
}

/* Per-section loading overlay */
.section-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 100;
    border-radius: var(--radius-md);
    min-height: 120px;
    pointer-events: all;
}
.section-loading-overlay.hidden {
    display: none;
}
.section-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border-color, #ccc);
    border-top-color: var(--primary-color, #4a90d9);
    border-radius: 50%;
    animation: data-loading-spin 0.6s linear infinite;
}
.section-loading-text {
    font-size: 14px;
    color: var(--text-secondary, #666);
    font-weight: 500;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    vertical-align: middle;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--primary, #1a73e8);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
    background: #e0e0e0;
    cursor: not-allowed;
}

/* Toggle switch with label (planning filters) */
.toggle-switch-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.toggle-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-switch-slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch-input:checked + .toggle-switch-slider {
    background: var(--primary-color);
}

.toggle-switch-input:checked + .toggle-switch-slider::before {
    transform: translateX(16px);
}

.toggle-switch-input:checked ~ .toggle-switch-text {
    color: var(--text-primary);
}

/* Email Settings */
.email-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: var(--space-md);
}
.email-setting-row:last-of-type {
    border-bottom: none;
}
.email-setting-global {
    padding: 16px 0;
}
.email-setting-row.email-disabled {
    opacity: 0.45;
    pointer-events: none;
}
.email-setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.email-setting-label {
    font-size: 14px;
    color: var(--text-primary, #333);
}
.email-setting-desc {
    font-size: 12px;
    color: var(--text-secondary, #666);
}
