/* ============================================================
   1. FUNDAMENT I RESET
   ============================================================ */
:root {
    --primary: #769dc7;
    --success: #4CAF50;
    --info: #77a9b1;
    --warning: #dc8882;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
    --sidebar-bg: #2c3e50;
    --dark-header: #1a252f;
}

* { box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.5;
}

.content {
    flex-grow: 1;
    margin-left: 280px; /* Szerokość Sidebaru */
    padding: 0 30px; /* Odstęp treści głównej od krawędzi i Sidebaru */
}
.col-12.mb-4 {
    max-width: 700px;
}
.col-12.mb-5 {
    padding: 0 30px;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.container-narrow {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 0px 20px !important; 
}

/* ============================================================
   2. SYSTEM SIATKI I NARZĘDZIA (LAYOUT)
   ============================================================ */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class*="col-"] { padding: 0 15px; width: 100%; }

.container, .container-narrow {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}
.container-narrow.py-5 {
    margin-top: 50px;
}

@media (min-width: 768px) {
    .col-md-5 { flex: 0 0 41.66%; max-width: 41.66%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.33%; max-width: 58.33%; }
    .col-lg-4 { flex: 0 0 33.33%; max-width: 33.33%; }
    .col-lg-8 { flex: 0 0 66.66%; max-width: 850px; }
}

/* Flex Utilities */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Spacing Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.0rem !important; }
.mt-auto { margin-top: auto !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-3 { padding: 0.5rem 1rem 0.5rem 1rem !important; }
.p-4 { padding: 0 1.5rem 0.5rem 1.5rem !important; }

span.text-primary {
    font-weight: bold;
}


/* ============================================================
   3. KOMPONENTY (Karty, Przyciski, Formularze)
   ============================================================ */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}
.card-header { padding: 0.75rem 1.25rem; background: #f8f9fa; border-bottom: 1px solid var(--border); }
.card-body { padding: 1.25rem; }

/* Przyciski */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    /*border-radius: 0.25rem;*/
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: 0.15s;
}
.btn-primary { background: #e6e6e6; color: #fff; border-radius: 5px;}
.btn-success { background: var(--success); color: #fff; border: none;}
.btn-warning { background: var(--warning); color: #fff; border: none;}
.btn-secondary {
    background: var(--secondary);
    color: #394f63;
    letter-spacing: 1.5px;
    border: 1px solid #394f63;
    border-radius: 5px;
}
.btn-outline-secondary { color: #7a8999; background: transparent; }

a.btn.btn-sm.btn-danger.px-3 {
    border: 1px solid #6c757d;
    text-align: center;
    color: #333333;
    display: flex;
    align-items: center;
}
a.btn.btn-sm.btn-danger.px-3:hover {
    background-color: #ffffff;
}
.btn-sm { padding: 0.5rem; font-size: 0.875rem; }

/* Grupa Przycisków */
.btn-group { display: flex; border-radius: 0.25rem; overflow: hidden; }
.btn-check { position: absolute; clip: rect(0,0,0,0); pointer-events: none; }
.btn-check:checked + .btn { filter: brightness(0.95); border: 2px solid #000; }

/* Formularze */
.form-control, .form-select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.stat-box.bg-care, .stat-box.bg-past, .stat-box.bg-uw {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 600;
}

/* ============================================================
   4. TWOJE SPECYFICZNE STYLE (Kalendarz, Kafelki)
   ============================================================ */
/* Zakładki (Tabs) */
.nav-tabs { display: flex; border-bottom: 1px solid var(--border); padding-left: 0; margin-bottom: 0; list-style: none; }
.nav-link { padding: 0.5rem 1rem; border: 1px solid transparent; border-radius: 4px 4px 0 0; cursor: pointer; color: var(--primary); }
.nav-link.active { background: #fff; border-color: var(--border) var(--border) #fff; color: #000; }

/* Kafelki Daty */
.date-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 120px;
    min-height: 85px;
    padding: 8px;
    border-radius: 8px;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.date-tile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
}

.date-tile-label { font-size: 0.7rem; opacity: 0.9; text-transform: uppercase; }
.date-tile-val { font-size: 0.85rem; }

.tile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2); 
    margin: 0 -8px -8px -8px;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tile-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border:  1px solid rgba(255, 255, 255, 0.5) !important;;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.btn-flag {
    background: rgba(255, 255, 255, 0.2) !important; 
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: white;
    font-weight: 900;
    opacity: 0.6;
}

.flagged-tile .btn-flag {
    background: #FFC107 !important;
    border: none !important;
    color: #3a3a3a;
    opacity: 1;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}
.btn-flag:hover {
    opacity: 1;
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.4) !important;
}
.flagged-tile:hover .btn-flag:hover { background: #FFC107 !important; }

.tile-action-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}
.btn-trash:hover { background: #F44336 !important; border-color: #ffffff; }

/* Kalendarz - Struktura */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    font-size: 1.0em;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 5px;
}

/* Styl dla flagi "!" w kalendarzu */
.cal-day.is-flagged::after {
    content: '!';
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000000; 
    background: #FFC107;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    line-height: 1;
    /* border: 1px solid #fff; */
    z-index: 5;
}

/* Badge w nagłówku pracowników */
.badge-custom { padding: 5px 15px; border-radius: 50px; font-size: 0.9rem; }
.vacation-left { font-weight: bold; }
.vacation-limit { opacity: 0.7; font-size: 0.8em; }

/* Historia (Tabele) */
.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.table td, .table th { text-align: left; padding: 0.5rem; border: 1px solid var(--border); }

/* Notatki */
.note-area { background-color: #fff3cd; border: 1px solid #ffe69c; min-height: 120px; }

/* Autoryzacja */
.auth-card { max-width: 450px; margin: 50px auto; padding: 2rem; }
.full-height-center { min-height: 80vh; display: flex; align-items: center; }

/* UKŁAD ADMINA */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f1f5f9;
}
.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}
.admin-main {
    flex-grow: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f4f7f6;
}

/* LISTA PRACOWNIKÓW */
.user-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
}
.user-link {
    text-decoration: none;
    color: #333;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: 0.2s;
}
.user-link:hover { background-color: #f8fafc; color: #769dc7; }
.user-link.active {
    background-color: #eef2f7;
    color: #769dc7;
    border-left: 4px solid #769dc7;
    font-weight: 600;
}
.user-name { font-size: 0.95rem; font-weight: 500; }
.user-badge {
    background: #769dc7;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    min-width: 35px;
    text-align: center;
}

.user-list { flex-grow: 1; overflow-y: auto; }

.user-item-btn {
    margin: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    background-color: rgba(255, 255, 255, 0.05); /* Przezroczyste zamiast białego */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: #ecf0f1;
    gap: 8px;
    transition: 0.2s;
}
.user-item-btn:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.user-item-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.user-info-side {
    display: flex;
    flex-direction: column; 
    gap: 2px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}
.user-name-text { font-weight: 600; font-size: 0.9rem; color: #fff; text-align: left; }
.used-info-text { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.user-item-btn.active .used-info-text { color: rgba(255, 255, 255, 0.8); }

.user-status-badge {
    display: flex; flex-direction: column; align-items: center;
    background-color: rgba(0,0,0,0.2); color: #fff;
    padding: 4px 10px; border-radius: 6px; min-width: 45px;
}
.user-item-btn.active .user-status-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.rem-days-val { font-weight: 700; font-size: 1.1rem; line-height: 1; }
.user-status-badge small { font-size: 0.6rem; letter-spacing: 0.5px; }

/* PASEK BOCZNY */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg); /* #2c3e50 */
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1100;
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050; /* Tuż pod sidebarem, który ma 1100 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}
#mobile-trigger {
    display: none; /* Domyślnie ukryty na komputerze */
}


/* Kontener stopki menu */
/* Stylizacja stopki sidebaru i nowych przycisków */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: #394f63;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto; /* Pcha stopkę na sam dół */
}

.sidebar-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none !important;
    background: transparent !important;
}

/* WSPÓLNY HOVER DLA WSZYSTKICH POZYCJI */
.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 20px; /* Efekt wysunięcia */
}

/* Specjalny kolor dla wylogowania */
.sidebar-btn.logout:hover {
    background: rgba(220, 53, 69, 0.2) !important;
}

.user-nav {
    flex-grow: 1; /* Nav zajmuje dostępną przestrzeń */
    overflow-y: auto; /* Przewijanie listy pracowników */
}
.sidebar-header {
    padding: 15px;
    background: var(--dark-header);
    color: var(--primary);
    z-index: 100;
}
.header-top {
    display: flex;
    color: #769dc7;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center;
}

/* Kontener listy - kluczowe dla przewijania */
.user-nav-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Stylizacja scrollbara dla user-nav */
.user-nav-container::-webkit-scrollbar { width: 6px; }
.user-nav-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Hamburger i Dropdown */
.admin-menu-container { position: relative; }
.hamburger-btn {
    background: transparent; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px; padding: 5px;
}
.hamburger-btn span { display: block; width: 20px; height: 2px; background: #fff; transition: 0.3s; }

.admin-dropdown-content {
    /* ... twoje obecne style ... */
    display: none;
    position: absolute;
    right: 0;
    top: 45px; /* Obniżenie pod hamburgera */
    background-color: #34495e;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); /* Mocniejszy cień */
}
.admin-dropdown-content.show {
    display: block !important;
    left: 15px;
    width: 200px;
}

.admin-dropdown-content hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 5px 0;
}

.admin-dropdown-content .sidebar-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.admin-dropdown-content .sidebar-btn:hover {
    background: rgba(255,255,255,0.1) !important;
    padding-left: 25px;
}

.sidebar-header h3 { margin: 0; font-size: 1rem; letter-spacing: 1px; display: flex; justify-content: center; }

/* RWD */
@media (max-width: 768px) {
    .admin-sidebar { width: 70px; }
    .admin-main { margin-left: 70px; }
    .user-item .name, .sidebar-header h4 { display: none; }
    body { padding: 0 10px !important; }
    .row { margin-right: -10px; margin-left: -10px; }
    [class*="col-"] { padding-right: 15px; padding-left: 15px; }
}

@media (max-width: 992px) {
h2 {
    padding-left: 70px;
}
    .sidebar {
        /* Chowa pasek poza lewą krawędź ekranu */
        transform: translateX(-100%);
        
        /* Upewniamy się, że przejście jest płynne */
        transition: transform 0.3s ease-in-out;
        
        /* Szerokość musi być stała, żeby nie "pływała" */
        width: 280px !important;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1100;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    /* Przycisk Menu na mobile */
    #mobile-trigger {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        background-color: #34495e;
        color: white;
        z-index: 1000;
        border: none;
    }
    .content {
        margin-left: 0 !important;
    }
    .user-nav { padding: 10px 5px; }
    .user-item-btn { padding: 8px 5px; flex-direction: column; text-align: center; }
    .used-info-text, .user-status-badge small { display: none; }
    .user-info-side { width: 100%; align-items: center; }
    .user-name-text { text-align: center; font-size: 0.8rem; }
    .sidebar-footer .btn {
        display: flex; padding: 10px 5px; align-content: center;
        flex-wrap: wrap; flex-direction: column; align-items: center; text-align: center;
    }
    
    .admin-dropdown-content {
        position: fixed; top: 65px; left: 15px; right: 15px; width: auto;
    }
}

/* Statystyki w nagłówku */
.stat-box {
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}
.bg-uw { background-color: #769dc7; }
.bg-past { background-color: #dc8882; }
.bg-care { background-color: #77a9b1; }
.stat-box b {
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 600;
    margin: 5px 0;
    padding-right: 5px;
    color: white;
}
.stat-box .small-info {
    font-size: 1.2rem;
    opacity: 0.9;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    color: #4e4e4e !important;
}

/* User Badge Container */
.user-badge-container { display: flex; flex-direction: column; align-items: flex-end; }
.used-info { font-size: 0.75rem; color: #94a3b8; }
.user-link.active .used-info { color: #769dc7; }

/* Widoczność hasła */
input[type="text"].form-control { background-color: #fff; }

/* PANEL UŻYTKOWNIKA - POPRAWKI */
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mb-5 { margin-bottom: 1rem !important; }

/* Karty Statystyk */
.card-stat { border-bottom: 10px solid #7095bd; transition: transform 0.2s ease; }
.card.card-stat.border-warning.text-center.p-3.shadow-sm.h-100 { border-bottom: 10px solid #dc8882; }
.card.card-stat.border-info.text-center.p-3.shadow-sm.h-100 { border-bottom: 10px solid #77a9b1; }

.border-primary { background-color: #c8d9ec;}
.border-warning { background-color: #ebd5d3;}
.border-info { background-color: #cae2e6;}

.form-label { margin-bottom: 8px; display: inline-block; }
.form-control { margin-bottom: 0 !important; }
.btn-group-toggle .btn { border-width: 2px; padding: 10px 5px; font-weight: bold; transition: 0.2s; text-align: center; }
.list-item:last-child { border-bottom: none; }
.list-container { max-height: 500px; overflow-y: auto; padding-right: 5px; }
.btn-lg { padding: 15px; font-size: 1.1rem; font-weight: bold; }
.btn-lg:hover { background-color: #6e6e6e; }
.g-3 { gap: 0.5rem !important; }
.display-4 { font-size: 2.5rem; font-weight: 400; line-height: 1.2; }

/* Kolory po zaznaczeniu (Checked) */
#type_uw:checked + label { background-color: #769dc7 !important; color: white !important; border-color: #769dc7; }
#type_past:checked + label { background-color: #dc8882 !important; color: white !important; border-color: #dc8882; }
#type_care:checked + label { background-color: #77a9b1 !important; color: white !important; border-color: #77a9b1; }
.btn-outline-primary { border-color: #769dc7; color: #769dc7; }
.btn-outline-warning { border-color: #dc8882; color: #dc8882; }
.btn-outline-info {
    border-color: #77a9b1;
    color: #77a9b1;
}

#view-list .d-flex.flex-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; padding: 15px 0; }
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: #fff; border-bottom: 1px solid #eee; }
.list-item .badge { display: inline-block; width: 110px; text-align: center; padding: 8px 0; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.btn-group-toggle { display: flex; gap: 5px; }
body.bg-light { padding: 0 15px; }

/* Drobne poprawki */
.card-stat .small.text-muted { font-size: 0.7rem !important; line-height: 1.2; }
.card-stat .mt-2.pt-2.border-top { margin-top: 8px !important; padding-top: 8px !important; border-top: 1px solid rgba(0,0,0,0.05) !important; }
.bg-dark .form-control { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.d-block { display: block !important; }

.view-switcher { display: flex; background: #eee; padding: 4px; border-radius: 8px; gap: 4px; margin-top: 10px; }
.view-switcher .btn { border: none; background: transparent; color: #666; transition: all 0.3s; }
.view-switcher .btn.active { background: #fff; color: #769dc7; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}

.add-tile-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 120px; min-height: 85px; border: 2px dashed #769dc7; border-radius: 8px;
    background: #f8fafc; color: #769dc7; cursor: pointer; transition: 0.2s;
}
.add-tile-btn:hover { background: #eef2f7; border-style: solid; }
.add-tile-btn i { font-size: 1.5rem; font-style: normal; font-weight: bold; }

input[type="date"] { position: relative; }
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    color: transparent; background: transparent; cursor: pointer;
}

h2.display-4.text-primary.mb-0, h4.text-dark.mb-0 { margin-top: 5px; }
span.badge.bg-primary.text-white, span.badge.bg-warning.text-white, span.badge.bg-info.text-white { color: white; }
a.btn.btn-sm.btn-outline-secondary.px-3 { margin-right: 10px; }
button.btn.btn-sm.btn-primary.w-100 { margin-top: 10px; }

/* PRZYCISKI NOTATEK */
.btn-note {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: white; font-size: 0.9rem;
}
.btn-note:hover { background: rgba(255, 255, 255, 0.5) !important; transform: scale(1.2); }
.btn-note.has-note {
    background: #4CAF50 !important; color: #dcdcdc;
    border: none !important;
    font-size: 1.1rem;
}

/* OŁÓWEK W KALENDARZU */
.cal-day { position: relative; }
.cal-day .day-num { z-index: 1; margin-bottom: 10px; }
.cal-note-marker {
    position: absolute;
    bottom: 3px;
    left: 3px;
    font-size: 0.9rem;
    color: #ffffff;
    background: #4CAF50;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    /* border: 1px solid #fff; */
    z-index: 100;
    line-height: 1;
}
.cal-note-marker::after {
    content: attr(data-tooltip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
    background-color: #333333; color: #ffffff; padding: 8px 12px; border-radius: 6px;
    font-size: 0.85rem; font-weight: normal; line-height: 1.4; white-space: pre-wrap;
    width: max-content; max-width: 250px; min-width: 120px; text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: none; z-index: 100;
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease;
}
.cal-note-marker::before {
    content: ''; position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #333333;
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease;
}
.cal-note-marker:hover::after, .cal-note-marker:hover::before {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-5px);
}

/* Modal i Inne */

.table .text-end .btn-sm:hover { transform: scale(1.1); transition: transform 0.2s; }
button.btn.btn-sm.btn-danger { background-color: #c9625b; color: #ffffff; }

/* Przycisk L4 */
.btn-outline-sick { color: #7a7a7a; border-color: #7a7a7a; }
.btn-check:checked + .btn-outline-sick { background-color: #7a7a7a; color: white; border-color: #7a7a7a; }
small.text-muted.fw-bold { padding-left: 10px; }
.card.p-2.text-center.shadow-sm { padding: 5px; }
button.btn.btn-sm.btn-outline-secondary { font-size: 1.5rem; border: none;}

/* ============================================================
   SEKCJA GŁÓWNA: KOLORY DNI I WEEKENDÓW (BARDZO WAŻNE: NA KOŃCU PLIKU)
   ============================================================ */

/* 1. Baza: Wszystkie weekendy są szare */
.cal-day.weekend {
    background-color: #dddddd; 
    color: #999999;
}

/* 2. Nadpisywanie: Jeśli dzień ma status (Urlop/Chorobowe), musi przykryć kolor weekendu.
      Używamy !important, aby wymusić priorytet. */

/* Urlop (UW) */
.bg-primary, .type-uw {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* Zaległy */
.bg-warning, .type-past {
    background-color: var(--warning) !important;
    border-color: var(--warning) !important;
    color: #fff !important;
}

/* Opieka */
.bg-info, .type-care {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: #fff !important;
}

/* Chorobowe (L4) */
.bg-sick, .type-sick {
    background-color: #7a7a7a !important; /* Ciemnoszary/Fioletowy */
    border-color: #7a7a7a !important;
    color: #ffffff !important;
}

.bg-other, .type-other {
    background-color: #ffffff !important;
    border: 1px solid #dddddd !important;
    color: #6e6e6e !important;
}
span.badge.bg-secondary {
    color: #F44336;
    font-weight: normal;
    padding-left: 20px;
}

/* --- ZNACZNIKI TYPU URLOPU (Prawy Górny Róg) --- */
.day-marker {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    /* border-radius: 2px; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 4px;
    z-index: 10;
}

/* Kolory liter w zależności od typu (dopasowane do tła kafelka) */

/* U - Urlop (tło niebieskie -> litera niebieska) */
.marker-uw { color: #769dc7; }

/* UZ - Zaległy (tło pomarańczowe -> litera pomarańczowa) */
.marker-past { color: #dc8882; }

/* O - Opieka (tło turkusowe -> litera turkusowa) */
.marker-care { color: #77a9b1; }

/* ZL - L4 (tło szare/fioletowe -> litera ciemna) */
.marker-sick { color: #7a7a7a; }

/* i - Inne (tło czerwone -> litera czerwona) */
.marker-other {
    color: #c70000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
textarea#comment-text {
    width: 100%;
}
h6#comment-modal-date {
    font-size: 1.5em;
    margin-top: 5px;
    color: #769dc7;
}
.cal-note-marker:hover {
    background: #dcdcdc;
    color: #000000;
}
/* Wyrównanie przycisków w akcjach */
.table td.text-end {
    vertical-align: middle;
}
#add-type option { padding: 10px; }

.table .text-end .btn-sm {
    height: 32px;            /* Stała wysokość dopasowana do ikony */
    padding: 2px 8px;        /* Mniejszy padding wewnętrzny */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;       /* Bazowa wielkość dla emoji */
    margin-left: 4px;
    vertical-align: middle;
    border: none;
}

/* Zmniejszenie czcionki tylko dla tekstu potwierdzenia w przycisku usuń */
.btn-sm[data-state="counting"], 
.btn-sm[data-state="final"] {
    font-size: 10px !important;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #505050;
}
a.btn.btn-secondary.w-100.mb-2 {
    color: #394f63;
    margin-top: 20px;
}
a.btn.btn-sm.btn-secondary.w-100 {
    color: white;
}
#comment-text {
    border: 1.5px solid #769dc7; /* Twoja zmienna --primary */
    border-radius: 6px;
    outline: none; /* Usuwa domyślną poświatę systemową */
}

/* Opcjonalnie: zmiana koloru ramki, gdy administrator klika w pole */
#comment-text:focus {
    border-color: #4CAF50; /* Kolor zielony przy aktywnym pisaniu */
    box-shadow: 0 0 5px rgba(76, 157, 199, 0.3);
}

.content-header.mb-4 {
    margin-top: 15px;
}
button.btn.btn-primary.w-100 {
    border: none;
    background: #34495e;
    color: #fff;
}
.card.p-4.shadow.auth-card form {
    text-align: center;
}
input.form-control {
    /* font-size: 1.2rem; */
}
button.btn.btn-primary.flex-grow-1 {
    background: #4CAF50;
}
button.btn.btn-primary.flex-grow-1:hover {
    background: #8BC34A;
}