/* style.css - Extra Grote & Leesbare Mobiele Weergave */

:root { 
    --bg-body: #f8fafc; 
    --bg-card: #ffffff; 
    --text-main: #0f172a; 
    --text-muted: #64748b; 
    --primary: #4f46e5; 
    --primary-hover: #4338ca;
    --success: #10b981; 
    --danger: #ef4444; 
    --warning: #f59e0b;
    --border: #e2e8f0; 
    
    --cell-h: 90px; 
    --radius: 12px; 
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

/* UNIFORME BASIS TYPOGRAFIE */
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; 
    background: var(--bg-body); 
    color: var(--text-main); 
    margin: 0; 
    font-size: 14px; 
    line-height: 1.5;
    display: flex; 
    min-height: 100vh; 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased; 
}

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ALGEMENE PAGINA STIJLEN */
.page-wrapper { width: 100%; padding: 24px; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding-bottom: 40px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 15px; }
.page-title { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 12px; }

/* STANDAARD ELEMENTEN */
.btn { padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-decoration: none; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow-sm); }
.btn:hover { background: #f1f5f9; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: white; border-color: var(--primary-hover); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }

/* KAARTEN */
.card { background: var(--bg-card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid #f1f5f9; margin-bottom: 24px; }
.card h3 { margin-top: 0; margin-bottom: 16px; color: var(--text-main); font-size: 1rem; font-weight: 800; border-bottom: 2px solid #f8fafc; padding-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

/* FORMS & TABELLEN */
.tabs-nav { display: flex; gap: 8px; border-bottom: 2px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 12px 20px; border: none; background: transparent; font-weight: 700; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 0.95rem; transition: all 0.2s ease; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; animation: fadeIn 0.3s ease-out; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 0.85rem; color: var(--text-main); }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; background: #f8fafc; transition: all 0.2s ease; color: var(--text-main); font-family: inherit;}
.form-control:focus { border-color: var(--primary); background: white; outline: none; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; padding: 12px; color: var(--text-muted); font-weight: 800; text-transform: uppercase; border-bottom: 2px solid var(--border); font-size: 0.8rem;}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover { background: #f8fafc; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
@media (max-width: 1024px) { .grid-2 { grid-template-columns: 1fr; } }

/* SIDEBAR */
.sidebar { width: 260px; background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; flex-shrink: 0; }
.brand { padding: 20px 24px; font-size: 1.1rem; font-weight: 800; color: var(--text-main); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.brand span { color: var(--primary); }
.close-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.saldo-container { padding: 20px 24px; } 
.saldo-item { margin-bottom: 16px; }
.saldo-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; font-weight: 800; color: var(--text-main); }
.progress-bg { background: #f1f5f9; height: 8px; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.saldo-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

/* ZIJBALK MENU */
.sidebar-menu { padding: 0 24px 24px 24px; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sidebar-btn { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; text-decoration: none; color: var(--text-main); background: #f8fafc; border: 1px solid var(--border); transition: all 0.2s; }
.sidebar-btn:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateX(4px); }
.sidebar-btn.logout { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.sidebar-btn.logout:hover { background: var(--danger); color: white; border-color: var(--danger); }

/* MAIN CONTENT */
.main { flex: 1; display: flex; flex-direction: column; position: relative; min-width: 0; } 
.top-bar { background: var(--bg-card); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); z-index: 50; }
.left-nav { display: flex; align-items: center; gap: 16px; }
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0; margin-right: 10px; color: var(--text-main); }
.month-nav { display: flex; align-items: center; gap: 8px; background: var(--bg-body); padding: 4px; border-radius: 50px; border: 1px solid var(--border); }
.nav-btn { background: white; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--text-main); text-decoration: none; box-shadow: var(--shadow-sm); transition: all 0.2s; font-size: 1rem;}
.nav-btn:hover { background: var(--primary); color: white; }
.month-title { font-size: 0.95rem; font-weight: 800; margin: 0; min-width: 120px; text-align: center; white-space: nowrap; text-transform: uppercase;}

.salary-btn { background: #ecfdf5; color: #047857; padding: 8px 16px; border-radius: 50px; font-weight: 800; text-decoration: none; display: flex; align-items: center; gap: 8px; border: 1px solid #a7f3d0; font-size: 0.9rem; transition: all 0.2s; white-space: nowrap; }
.salary-btn:hover { background: #10b981; color: white; }

.content-scroll { padding: 24px; flex: 1; z-index: 1; } 
.alert-warning { background: #fffbeb; color: #b45309; padding: 12px 16px; border-radius: 8px; border: 1px solid #fde68a; margin-bottom: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }

/* STATS STRIP (Desktop) */
.stats-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); display: flex; flex-direction: row; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); flex: 1 1 auto; min-width: 120px; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-info { display: flex; flex-direction: column; align-items: flex-start; }
.stat-info h5 { margin: 0; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; } 
.stat-info span { font-size: 1rem; font-weight: 800; color: var(--text-main); margin-top: 2px; line-height: 1; }
.stat-block { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: 0.75rem; margin-top: 0; }

/* KALENDER GRID (Desktop) */
.calendar-wrapper { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #f8fafc; border-bottom: 1px solid var(--border); }
.day-name { padding: 10px 4px; text-align: center; font-weight: 800; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); } 

.cell { min-height: var(--cell-h); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); position: relative; padding: 6px; background: white; display: flex; flex-direction: column; min-width: 0;} 
.cell:nth-child(7n) { border-right: none; } 
.cell.weekend { background-color: #f8fafc; } 
.cell.today { background-color: #eff6ff; box-shadow: inset 0 0 0 2px var(--primary); }
.cell.block-start { box-shadow: inset 4px 0 0 0 var(--danger); }
.cell.streak-warning { background-color: #fef2f2 !important; box-shadow: inset 0 0 0 2px var(--danger); }

/* DESKTOP: DAG & DATUM */
.cell-date { display: contents; } 
.mobile-day-name { display: none; } 
.day-num { position: absolute; top: 6px; right: 8px; font-size: 0.85rem; color: var(--text-muted); font-weight: 800; z-index: 5; }
.warn-icon { position: absolute; top: 4px; right: 26px; font-size: 0.7rem; color: #b91c1c; font-weight: 800; background: #fee2e2; padding: 2px 4px; border-radius: 4px; z-index: 10; border: 1px solid #fca5a5; }

/* DESKTOP: SHIFT INPUTS & BOX */
.shift-box { flex: 1; margin-top: 18px; border-radius: 6px; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 4px 6px; border-left-width: 4px; border-left-style: solid; border-left-color: transparent; transition: all 0.2s; min-width: 0; }
.shift-input-row { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.shift-inp { flex: 1; min-width: 0; border: 1px dashed #cbd5e1; background: transparent; text-align: left; font-weight: 800; font-size: 0.9rem; color: var(--text-main); text-transform: uppercase; outline: none; padding: 2px 4px; border-radius: 4px; transition: all 0.2s; }
.shift-box:not(.c-empty) .shift-inp { border: 1px solid transparent; background: transparent; }
.shift-inp:focus { border: 1px solid var(--primary); background: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 20; position: relative; }
.shift-desc { font-size: 0.7rem; text-align: left; color: var(--text-main); font-weight: 600; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; padding-left: 4px; }
.d27-container { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.7); padding: 2px 4px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.05); flex-shrink: 0; } 
.d27-chk { transform: scale(0.85); cursor: pointer; margin: 0; accent-color: var(--danger); } 
.d27-lbl { font-size: 0.7rem; color: var(--danger); font-weight: 800; cursor: pointer; }

/* SHIFT KLEUREN */
.c-blue-l { background: #eff6ff; border-left-color: #3b82f6; } 
.c-blue-m { background: #ecfeff; border-left-color: #06b6d4; } 
.c-blue-d { background: #f1f5f9; border-left-color: #64748b; } 
.c-green { background: #ecfdf5; border-left-color: #10b981; } 
.c-red { background: #fef2f2; border-left-color: #ef4444; } 
.c-orange { background: #fff7ed; border-left-color: #f97316; } 
.c-purple { background: #faf5ff; border-left-color: #a855f7; }

/* CYCLUS CARDS */
.cyclus-grid { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.cyclus-card { background: var(--bg-card); border: 1px solid var(--border); padding: 16px; border-radius: var(--radius); flex: 1; min-width: 200px; border-left: 4px solid var(--danger); box-shadow: var(--shadow-sm); }
.cyclus-card.valid { border-left-color: var(--success); }
.cyclus-title { font-size: 0.8rem; font-weight: 800; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.cyclus-stats { display: flex; gap: 12px; font-size: 0.9rem; font-weight: 800; }
.cyclus-stat { display: flex; align-items: center; gap: 4px; }
.cyclus-stat.ok { color: var(--success); }
.cyclus-stat.fail { color: var(--danger); }

/* =========================================
   📱 MOBIEL: EXTRA GROTE LIJST WEERGAVE
   ========================================= */
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 90; backdrop-filter: blur(2px); }

@media (max-width: 1024px) { 
    /* 1. Zijbalk & Menu */
    .sidebar { position: fixed; top: 0; left: -280px; height: 100%; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 10px 0 15px rgba(0,0,0,0.1); } 
    .sidebar.active { left: 0; } 
    .overlay.active { display: block; } 
    .close-menu-btn { display: block; } 
    .hamburger { display: block; font-size: 1.8rem; } 
    
    /* 2. Top Bar (Datum & Loonbedrag Veel Groter) */
    .top-bar { padding: 16px; flex-wrap: wrap; gap: 16px; }
    .month-title { font-size: 1.2rem; min-width: 120px; }
    .nav-btn { width: 40px; height: 40px; font-size: 1.4rem; }
    .salary-btn { width: 100%; justify-content: center; font-size: 1.3rem; padding: 12px; margin-top: 4px; }
    
    .content-scroll { padding: 16px; } 

    /* 3. Statistieken Swipebaar maken */
    .stats-strip { 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        padding-bottom: 12px; 
        gap: 12px;
        scrollbar-width: none; /* Verbergt scrollbar visueel maar houdt functie */
    }
    .stats-strip::-webkit-scrollbar { display: none; }
    .stat-card { flex: 0 0 auto; min-width: 130px; padding: 16px; text-align: center; flex-direction: column; justify-content: center;}
    .stat-info { align-items: center; width: 100%; }
    .stat-info h5 { font-size: 0.9rem; margin-bottom: 4px; }
    .stat-info span { font-size: 1.4rem; }
    .stat-block { display: none; } 

    /* 4. Kalender transformeren naar Grote Lijst */
    .cal-head { display: none; } 
    .calendar-wrapper { border: none; box-shadow: none; background: transparent; overflow: visible; }
    .cal-grid { display: flex; flex-direction: column; gap: 16px; } 
    .filler { display: none !important; } 

    /* Elke dag wordt een grote kaart */
    .cell { 
        display: flex; 
        flex-direction: row; 
        padding: 16px 12px; 
        background: var(--bg-card); 
        border: 1px solid var(--border) !important; 
        border-radius: var(--radius); 
        box-shadow: var(--shadow-sm); 
        align-items: stretch;
        gap: 16px;
    } 

    /* Datum linkerkant Groot */
    .cell-date { 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: flex-start; 
        width: 50px;
        flex-shrink: 0;
        border-right: 1px solid var(--border);
        padding-right: 12px;
    }
    .day-num { position: static; font-size: 1.8rem; font-weight: 900; color: var(--text-main); line-height: 1; }
    .mobile-day-name { display: block; font-size: 1rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-top: 6px; }
    .warn-icon { position: static; margin-top: 10px; padding: 4px 8px; font-size: 0.8rem; border-radius: 4px; }

    /* Rechterkant: Code + D27 + Omschrijving */
    .shift-box { 
        margin-top: 0; 
        flex: 1; 
        padding: 4px 0 4px 12px; 
        border-radius: 0; 
        border-left-width: 4px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    /* Rij 1: Input Code (links) en D27 (rechts) */
    .shift-input-row { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        width: 100%;
        margin-bottom: 8px;
    }
    .shift-inp { 
        font-size: 1.4rem; /* Code is nu enorm! */
        width: 120px; 
        text-align: left; 
        padding: 8px;
        background: rgba(255,255,255,0.9);
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 6px;
    }
    
    /* D27 en Vinkje heel duidelijk */
    .d27-container { 
        margin-top: 0; 
        padding: 8px 12px; 
        background: rgba(255,255,255,0.9); 
        border-radius: 8px; 
    }
    .d27-lbl { display: inline-block; font-size: 1.1rem; margin-left: 6px; } 
    .d27-chk { transform: scale(1.5); }
    
    /* Rij 2: Omschrijving er mooi onder */
    .shift-desc { 
        font-size: 1.15rem; 
        font-weight: 700;
        white-space: normal; 
        color: var(--text-main); 
        padding-left: 0;
        line-height: 1.3;
    }
}

/* TOAST NOTIFICATION */
#toast { position: fixed; bottom: 30px; right: 30px; background: #0f172a; color: white; padding: 12px 24px; border-radius: 50px; font-size: 0.95rem; font-weight: 700; opacity: 0; pointer-events: none; transition: all 0.3s; transform: translateY(20px); z-index: 200; box-shadow: var(--shadow-md);}
#toast.show { opacity: 1; transform: translateY(0); }