        :root {
            --bg-color: #000000;
            --sidebar-bg: #111111;
            --panel-bg: #191919;
            --sino-red: #a61b29;
            --sino-red-hover: #8a1521;
            --text-white: #ffffff;
            --text-gray: #888888;
            --border-color: #333333;
        }

        /* ================= SPLASH SCREEN ================= */
#splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Zawsze na samej górze */
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out; /* Płynne znikanie */
}

#splash-logo {
    width: 120px; /* Zmień, jeśli logo będzie za małe/za duże */
    height: auto;
    border-radius: 20px; /* W razie jakby to był JPG z tłem, zrobimy mu zaokrąglone rogi */
    animation: pulsate 1.5s infinite alternate ease-in-out; /* Animacja oddychania */
}

/* Klatki kluczowe dla "oddychania" i delikatnej poświaty */
@keyframes pulsate {
    0% { transform: scale(0.9); opacity: 0.8; filter: drop-shadow(0 0 5px rgba(166, 27, 41, 0.2)); }
    100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 25px rgba(166, 27, 41, 0.8)); }
}
        
        /* ================= FULLCALENDAR DARK THEME ================= */
        .fc { font-family: 'Montserrat', sans-serif; background-color: var(--panel-bg); border-radius: 12px; padding: 20px; border: 1px solid var(--border-color); }
        .fc-theme-standard th { background-color: #111; color: #888; border-color: var(--border-color); padding: 10px 0; font-size: 13px; text-transform: uppercase; }
        .fc-theme-standard td { border-color: var(--border-color); }
        .fc-daygrid-day { background-color: #1a1a1a; transition: 0.2s; }
        .fc-daygrid-day:hover { background-color: #222; }
        .fc-daygrid-day-number { color: #ccc; font-weight: 600; font-size: 14px; padding: 10px; }
        .fc-day-today { background-color: rgba(166, 27, 41, 0.1) !important; }
        
        .fc .fc-toolbar-title { font-weight: 800; color: white; font-size: 20px; text-transform: uppercase; letter-spacing: 1px; }
        .fc .fc-button-primary { background-color: #111; border: 1px solid var(--border-color); color: #ccc; text-transform: uppercase; font-weight: 700; font-family: 'Montserrat'; transition: 0.2s; }
        .fc .fc-button-primary:hover { background-color: #333; color: white; border-color: #555; }
        .fc .fc-button-primary:not(:disabled).fc-button-active { background-color: var(--sino-red); border-color: var(--sino-red); color: white; }
        
        /* Paski wydarzeń */
        .fc-event { border: none; border-radius: 4px; padding: 3px 5px; font-size: 11px; font-weight: 700; cursor: pointer; transition: 0.2s; }
        .fc-event:hover { transform: scale(1.02); }
        .sino-event-approved { background-color: var(--sino-red); color: white; }
        .sino-event-pending { background-color: #f39c12; color: #000; }

        body { font-family: 'Montserrat', sans-serif; background-color: var(--bg-color); color: var(--text-white); margin: 0; padding: 0; height: 100vh; overflow: hidden; display: flex; }

        /* LOGOWANIE */
        #login-screen { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; position: absolute; top: 0; left: 0; z-index: 100; background: var(--bg-color); }
        .login-box { background-color: var(--panel-bg); padding: 40px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.7); border-top: 5px solid var(--sino-red); width: 100%; max-width: 400px; text-align: center; }
        .logo { font-size: 36px; font-weight: 800; letter-spacing: 3px; margin-bottom: 5px; }
        .logo span { color: var(--sino-red); }
        .subtitle { font-size: 14px; font-weight: 400; letter-spacing: 4px; color: var(--text-gray); text-transform: uppercase; margin-bottom: 40px; }
        input[type="text"], input[type="password"], input[type="number"], input[type="date"] { width: 100%; padding: 18px; margin-bottom: 25px; background-color: #0a0a0a; border: 1px solid var(--border-color); color: white; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 14px; box-sizing: border-box; outline: none; transition: 0.3s; }
        input:focus { border-color: var(--sino-red); background-color: #111; }
        button.btn-primary { width: 100%; padding: 18px; background-color: var(--sino-red); color: white; border: none; border-radius: 8px; font-weight: 700; font-size: 16px; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; font-family: 'Montserrat'; text-transform: uppercase; }
        button.btn-primary:hover { background-color: var(--sino-red-hover); transform: translateY(-2px); }
        #error-msg { color: #ff4d4d; font-size: 14px; font-weight: 600; margin-bottom: 20px; display: none; padding: 10px; background-color: rgba(255, 77, 77, 0.1); border-radius: 6px; border: 1px solid rgba(255, 77, 77, 0.3); }

        /* DASHBOARD LAYOUT */
        #dashboard-screen { display: none; width: 100vw; height: 100vh; flex-direction: column; }
        header { height: 70px; background-color: var(--panel-bg); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
        .header-logo { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
        .header-logo span { color: var(--sino-red); }
        .header-right { display: flex; align-items: center; gap: 20px; }
        .welcome-text { font-size: 13px; font-weight: 600; color: #ccc; }
        .btn-logout { background: transparent; color: var(--text-gray); border: 1px solid var(--border-color); padding: 8px 15px; border-radius: 6px; cursor: pointer; font-family: 'Montserrat'; font-size: 12px; font-weight: 600; transition: 0.3s; }
        .btn-logout:hover { background: #333; color: white; }

        .main-wrapper { display: flex; flex: 1; overflow: hidden; }
        .sidebar { width: 250px; background-color: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 20px 0; overflow-y: auto; }
        .nav-btn { background: transparent; color: var(--text-gray); border: none; padding: 15px 30px; text-align: left; font-size: 14px; font-weight: 600; font-family: 'Montserrat'; cursor: pointer; transition: 0.3s; border-left: 3px solid transparent; width: 100%; box-sizing: border-box; }
        .nav-btn:hover { background-color: #1a1a1a; color: white; }
        .nav-btn.active { background-color: #1a1a1a; color: white; border-left-color: var(--sino-red); }
        .sidebar-title { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 1px; margin: 25px 30px 5px; font-weight: 700; display: none; }

        .content-area { flex: 1; background-color: var(--bg-color); padding: 40px; overflow-y: auto; }
        .view-section { display: none; } 
        .view-section.active { display: block; }

        /* WSPÓLNE STYLE */
        .top-action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; background: var(--panel-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); }
        .top-action-bar h2 { margin: 0; font-size: 22px; font-weight: 800; color: white; }
        .btn-add-action { background: var(--sino-red); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; transition: 0.2s; font-family: 'Montserrat'; }
        .btn-add-action:hover { background: var(--sino-red-hover); transform: translateY(-2px); }

        .date-selectors { background: var(--panel-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 20px; }
        .selector-row { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
        .selector-row:last-child { margin-bottom: 0; }
        .date-pill { background: transparent; color: #888; border: none; font-size: 12px; font-weight: 600; font-family: 'Montserrat'; cursor: pointer; padding: 6px 10px; transition: 0.2s; border-radius: 6px; text-transform: uppercase;}
        .date-pill:hover { color: white; }
        .date-pill.active { background: var(--sino-red); color: white; }
        .divider { color: #444; font-size: 14px; margin: 0 -2px; }

        .items-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }
        .items-table th { background: #111; padding: 15px; text-align: left; color: #888; font-size: 11px; text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
        .items-table td { padding: 15px; border-bottom: 1px solid #222; color: #ddd; }
        .items-table td.amount { color: var(--sino-red); font-weight: 800; }
        .no-data { padding: 40px; text-align: center; color: var(--text-gray); font-style: italic; background: var(--panel-bg); border-radius: 12px; border: 1px solid var(--border-color); }
        .sum-text { font-size: 16px; font-weight: 800; color: var(--sino-red); }

        .status-badge { font-size: 10px; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; font-weight: 800; display: inline-block; }
        .status-Paid { color: #2ecc71; background: rgba(46, 204, 113, 0.1); }
        .status-Unpaid { color: #f39c12; background: rgba(243, 156, 18, 0.1); }
        .status-Contested { color: #e74c3c; background: rgba(231, 76, 60, 0.1); }

        input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; margin: 0; accent-color: var(--sino-red); }

        /* WIDOK DZIELONY (LEWA I PRAWA KOLUMNA) */
        .split-layout { display: flex; gap: 20px; height: calc(100vh - 220px); }
        .split-left { width: 300px; background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
        .split-search { padding: 15px; border-bottom: 1px solid var(--border-color); }
        .split-search input { margin-bottom: 0; padding: 12px; font-size: 13px; }
        
        .split-tabs { display: flex; border-bottom: 1px solid var(--border-color); }
        .split-tab-btn { flex: 1; padding: 12px; background: transparent; color: #666; border: none; cursor: pointer; font-family: 'Montserrat'; font-weight: 700; font-size: 12px; text-transform: uppercase; transition: 0.2s; border-bottom: 2px solid transparent; }
        .split-tab-btn.active { color: white; border-bottom-color: var(--sino-red); background: rgba(166, 27, 41, 0.1); }

        .split-list { flex: 1; overflow-y: auto; padding: 10px; }
        .spec-item { padding: 12px 15px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 13px; font-weight: 600; color: #ccc; margin-bottom: 5px; }
        .spec-item:hover { background: #222; }
        .spec-item.active { background: var(--sino-red); color: white; }
        .split-right { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding-right: 5px; }

        /* ZAKŁADKI WEWNĘTRZNE (HR TABS) */
        .tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
        .tab-sub-btn { background: transparent; color: var(--text-gray); border: none; font-size: 14px; font-weight: 600; font-family: 'Montserrat'; cursor: pointer; transition: 0.3s; padding: 5px 10px; }
        .tab-sub-btn.active { color: var(--sino-red); border-bottom: 2px solid var(--sino-red); }

        /* AKORDEONY HR */
        .accordion { margin-bottom: 10px; }
        .accordion-header { background: #0a0a0a; padding: 15px 20px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border-color); transition: 0.2s; font-weight: 600; font-size: 15px; }
        .accordion-header:hover { border-color: #555; }
        .accordion-content { display: none; padding-bottom: 10px; }
        .arrow { font-size: 12px; transition: transform 0.3s; color: var(--sino-red); }
        .open > .arrow { transform: rotate(180deg); }

        .approve-action-btn { background: #2ecc71; color: #000; border: none; padding: 10px 20px; border-radius: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; cursor: pointer; font-family: 'Montserrat'; transition: 0.2s; box-shadow: 0 4px 10px rgba(46,204,113,0.2); }
        .approve-action-btn:hover { background: #27ae60; transform: translateY(-2px); }

        /* MODAL */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(5px); }
        .modal-box { background: #1a1a1a; padding: 40px; border-radius: 12px; border-top: 4px solid var(--sino-red); text-align: center; max-width: 450px; width: 90%; }
        .modal-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; color: white; }
        .modal-buttons { display: flex; gap: 15px; justify-content: center; margin-top: 30px; }
        .btn-modal { padding: 12px 20px; border-radius: 6px; font-weight: 700; border: none; cursor: pointer; font-family: 'Montserrat'; flex: 1; }
        .btn-tak { background: #2ecc71; color: black; }
        .btn-tak:hover { background: #27ae60; }
        .btn-nie { background: #333; color: white; }
        .btn-nie:hover { background: #555; }

        /* ANIMACJA WIP */
        .wip-container { background: var(--panel-bg); border: 1px dashed var(--border-color); border-radius: 12px; height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
        .wip-animation { font-size: 60px; margin-bottom: 20px; }
        .hammer { display: inline-block; animation: hammering 0.6s infinite alternate; transform-origin: bottom right; }
        .nail { display: inline-block; position: relative; top: -10px; margin-left: -10px; }
        @keyframes hammering { 0% { transform: rotate(20deg); } 100% { transform: rotate(-30deg); } }

        /* ================= RESPONSIVE DESIGN (MOBILE) ================= */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow: auto; /* Pozwalamy na naturalne przewijanie na telefonie */
    }

    #dashboard-screen {
        height: auto;
        min-height: 100vh;
    }

    /* Ukrywamy sidebar na start i robimy z niego nakładkę */
    .sidebar {
        position: fixed;
        left: -260px; /* Schowany poza ekranem */
        top: 70px;
        bottom: 0;
        width: 250px; /* Szerokość menu */
        background-color: #111; /* Musi mieć tło, żeby nie było przezroczyste! */
        z-index: 9999; /* Musi być na samym wierzchu */
        transition: 0.3s;
        box-shadow: 10px 0 20px rgba(0,0,0,0.5);
    }

    .sidebar.active {
        left: 0;
    }

    /* Obszar treści - zajmuje teraz 100% szerokości */
    .main-wrapper {
        flex-direction: column;
        overflow: visible;
    }

    .content-area {
        padding: 15px;
        overflow: visible;
    }

    /* Split Layout (Specjaliści/HR) - zamiast obok siebie, to pod spodem */
    .split-layout {
        flex-direction: column;
        height: auto;
    }

    .split-left {
        width: 100%;
        max-height: 300px; /* Lista osób na górze, krótka */
        margin-bottom: 20px;
    }

    .split-right {
        width: 100%;
    }

    /* Tabele - dodajemy przewijanie poziome, żeby nie rozwalały ekranu */
    .items-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Header - dopasowanie */
    header {
        padding: 0 15px;
    }

    .header-logo {
        font-size: 16px;
    }

    .welcome-text {
        display: none; /* Ukrywamy powitanie, by zrobić miejsce na przycisk menu */
    }

    /* Przycisk Menu (Hamburger) */
    .menu-toggle {
        display: block !important;
        background: var(--sino-red);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 6px;
        margin-right: 10px;
        font-weight: bold;
    }

    /* Selektory daty - pionowo lub zawijanie */
    .date-selectors {
        padding: 10px;
    }
    .selector-row {
        justify-content: center;
    }
}

/* Ukryty przycisk menu na desktopie */
.menu-toggle {
    display: none;
}
/* KALKULATORY */
.calc-container { background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 30px; margin-top: 20px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.calc-field { display: flex; flex-direction: column; gap: 8px; }
.calc-field label { font-size: 12px; font-weight: 700; color: var(--text-gray); text-transform: uppercase; }
.calc-field select, .calc-field input[type="number"] { padding: 15px; background: #0a0a0a; border: 1px solid var(--border-color); color: white; border-radius: 8px; font-family: 'Montserrat'; outline: none; transition: 0.3s; width: 100%; box-sizing: border-box;}
.calc-field select:focus, .calc-field input:focus { border-color: var(--sino-red); }
.calc-checkbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #ccc; font-weight: 600; cursor: pointer; margin-bottom: 10px; }
.calc-result-box { background: #0a0a0a; border-left: 4px solid var(--sino-red); padding: 20px; border-radius: 8px; margin-top: 20px; font-size: 14px; line-height: 1.6; }
.calc-result-box span.highlight { color: var(--sino-red); font-weight: 800; font-size: 18px; }