/* GeeGee Planning — Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent:      #7C3AED;
    --accent-dark: #5B21B6;
    --accent-light:#EDE9FE;
    --sidebar-w:   230px;
    --topbar-h:    60px;
    --radius:      10px;
    --shadow:      0 1px 4px rgba(0,0,0,.07);
    --bg:          #F5F4F1;
    --surface:     #FFFFFF;
    --border:      rgba(0,0,0,.1);
    --text:        #1a1a18;
    --text-2:      #5a5a55;
    --text-3:      #9a9990;
    --success:     #16A34A;
    --danger:      #DC2626;
    --warning:     #D97706;
    --info:        #2563EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

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

.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    overflow-y: auto;
}

.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.content { padding: 24px; flex: 1; }

/* ── Sidebar ─────────────────────────────────────── */
.logo {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}
.logo-icon {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.logo-name { font-size: 13px; font-weight: 600; }
.logo-sub  { font-size: 11px; color: var(--text-3); }

nav { padding: 12px 8px; flex: 1; }
.nav-section {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 10px 6px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    transition: background .12s, color .12s;
    margin-bottom: 1px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.nav-item .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    border-radius: 10px;
    padding: 1px 6px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-footer .user-name  { font-size: 12px; font-weight: 500; }
.sidebar-footer .user-role  { font-size: 11px; color: var(--text-3); }
.sidebar-footer .logout-btn {
    margin-left: auto;
    color: var(--text-3);
    text-decoration: none;
    font-size: 11px;
}
.sidebar-footer .logout-btn:hover { color: var(--danger); }

/* ── Topbar ─────────────────────────────────────── */
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-sub   { font-size: 12px; color: var(--text-3); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #15803d; }

/* ── Cards / Surfaces ────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h2 { font-size: 14px; font-weight: 600; }
.card-body { padding: 18px; }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat-card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; }
.stat-sub   { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.stat-value.good { color: var(--success); }
.stat-value.bad  { color: var(--danger); }

/* ── Tables ──────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #FAFAF8;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAF8; }

/* ── Badges ──────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-vast      { background: #EDE9FE; color: #5B21B6; }
.badge-nul       { background: #FEF3C7; color: #92400E; }
.badge-stagiaire { background: #DBEAFE; color: #1E40AF; }
.badge-zzp       { background: #FCE7F3; color: #9D174D; }
.badge-aangevraagd { background: #FEF3C7; color: #92400E; }
.badge-goedgekeurd { background: #DCFCE7; color: #166534; }
.badge-afgewezen   { background: #FEE2E2; color: #991B1B; }
.badge-manager     { background: var(--accent-light); color: var(--accent); }
.badge-actief      { background: #DCFCE7; color: #166534; }
.badge-inactief    { background: #F3F4F6; color: #6B7280; }

/* ── Avatars ─────────────────────────────────────── */
.avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    flex-shrink: 0;
}
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.av-0 { background:#EDE9FE; color:#5B21B6; }
.av-1 { background:#DCFCE7; color:#166534; }
.av-2 { background:#DBEAFE; color:#1E40AF; }
.av-3 { background:#FEF3C7; color:#92400E; }
.av-4 { background:#FCE7F3; color:#9D174D; }
.av-5 { background:#E0F2FE; color:#075985; }

.medewerker-cell { display: flex; align-items: center; gap: 10px; }
.medewerker-cell .naam { font-weight: 500; }
.medewerker-cell .email { font-size: 12px; color: var(--text-3); }

/* ── Forms ───────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .12s, box-shadow .12s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form-row .hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-section { font-size: 13px; font-weight: 600; margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* ── Rooster ─────────────────────────────────────── */
.roster-wrap { overflow-x: auto; }
.roster-grid {
    display: grid;
    min-width: 780px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}
.roster-grid.cols-8 { grid-template-columns: 170px repeat(7, 1fr); }
.roster-head {
    background: #FAFAF8;
    padding: 9px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-align: center;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.roster-head:first-child { text-align: left; }
.roster-head:last-child { border-right: none; }
.roster-head.today { color: var(--accent); background: var(--accent-light); }
.roster-name {
    padding: 8px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
    background: var(--surface);
}
.roster-name .nm { font-size: 12px; font-weight: 500; line-height: 1.3; }
.roster-name .ct { font-size: 10px; color: var(--text-3); }
.roster-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4px;
    min-height: 58px;
    vertical-align: top;
    cursor: pointer;
    transition: background .1s;
    position: relative;
}
.roster-cell:last-child { border-right: none; }
.roster-cell:hover { background: #FAFAF8; }
.roster-cell.today-col { background: #FDFCFF; }
.roster-row:last-child .roster-name,
.roster-row:last-child .roster-cell { border-bottom: none; }

.shift-pill {
    display: block;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.4;
    cursor: pointer;
    transition: opacity .1s;
}
.shift-pill:hover { opacity: .85; }
.shift-pill.conflict { outline: 2px solid var(--danger); outline-offset: 1px; }

.conflict-icon {
    display: inline-block;
    width: 14px; height: 14px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 14px;
    margin-right: 3px;
    vertical-align: middle;
}

/* Shift kleuren */
.prog-0 { background: #EDE9FE; color: #5B21B6; }
.prog-1 { background: #DCFCE7; color: #166534; }
.prog-2 { background: #DBEAFE; color: #1E40AF; }
.prog-3 { background: #FEF3C7; color: #92400E; }
.prog-4 { background: #E0F2FE; color: #075985; }

/* Legenda */
.legenda { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; align-items: center; font-size: 12px; color: var(--text-3); }
.leg-item { display: flex; align-items: center; gap: 5px; }
.leg-dot { width: 10px; height: 10px; border-radius: 3px; }

/* Conflict melding */
.conflict-bar {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #991B1B;
}
.conflict-bar ul { margin: 4px 0 0 16px; font-size: 12px; }

/* ── Verlof ──────────────────────────────────────── */
.verlof-list .verlof-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.verlof-list .verlof-row:last-child { border-bottom: none; }
.verlof-info { flex: 1; }
.verlof-info .vnaam  { font-size: 13px; font-weight: 500; }
.verlof-info .vdetail{ font-size: 12px; color: var(--text-3); margin-top: 2px; }
.verlof-actions { display: flex; gap: 6px; }

/* ── Uren / Saldo ────────────────────────────────── */
.saldo-bar { display: flex; align-items: center; gap: 8px; }
.bar-bg { width: 80px; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }
.saldo-plus  { color: var(--success); font-weight: 600; }
.saldo-min   { color: var(--danger);  font-weight: 600; }
.saldo-nul   { color: var(--text-3); }
.saldo-nvt   { color: var(--text-3); font-style: italic; }

/* ── Login ───────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 32px;
    width: 100%;
    max-width: 380px;
}
.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.login-logo .icon {
    width: 42px; height: 42px;
    background: var(--accent);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.login-logo .title { font-size: 18px; font-weight: 700; }
.login-logo .sub   { font-size: 12px; color: var(--text-3); }
.login-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--surface);
    border-radius: 14px;
    padding: 26px;
    width: 480px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── Toast ───────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: #1a1a18;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 200;
    transform: translateY(80px);
    opacity: 0;
    transition: transform .25s, opacity .25s;
    pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Week navigatie ──────────────────────────────── */
.week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.week-label { font-size: 14px; font-weight: 600; min-width: 200px; text-align: center; }

/* ── Utilities ───────────────────────────────────── */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.text-muted { color: var(--text-3); }
.text-small { font-size: 12px; }
.fw-500 { font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
