/* Reset i ustawienia podstawowe */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Kolory - Jasny motyw */
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #dfe6e9;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
    
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.15);
}

body.dark-theme {
    /* Kolory - Ciemny motyw */
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #eaeaea;
    --text-muted: #95a5a6;
    --border-color: #34495e;
    --sidebar-bg: #0f0f1e;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-info {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background-color: var(--sidebar-active);
    border-left: 4px solid #fff;
    padding-left: 16px;
}

.theme-switcher {
    padding: 20px;
    margin-top: auto;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #2c3e50;
    border: none;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 8px 16px rgba(44, 62, 80, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.hamburger:hover {
    background: #34495e;
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(44, 62, 80, 0.4);
}

.hamburger:active {
    transform: scale(0.95);
}

.hamburger-icon {
    display: block;
    color: white;
    line-height: 1;
    user-select: none;
    transition: all 0.3s ease;
}

.hamburger.active {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Synchronizacja z motywem ciemnym */
body.dark-theme .hamburger {
    background: linear-gradient(135deg, #4c51bf 0%, #5a67d8 100%);
    box-shadow: 0 8px 16px rgba(76, 81, 191, 0.5);
}

body.dark-theme .hamburger:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    box-shadow: 0 12px 24px rgba(76, 81, 191, 0.7);
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    max-width: 100%;
    overflow-x: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 2rem;
    color: var(--text-color);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow-x: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.3rem;
    color: var(--text-color);
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    font-size: 3rem;
    margin-right: 20px;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-form .form-row {
    align-items: end;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background-color: #6c757d;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-admin {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.badge-employee {
    background-color: #f3e5f5;
    color: #4a148c;
}

.badge-urlop {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-l4 {
    background-color: #fff3e0;
    color: #ef6c00;
}

.badge-inne {
    background-color: #e0f2f1;
    color: #00695c;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-muted);
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: var(--text-muted);
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.close:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        width: 260px;
        z-index: 1000;
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 90px;
    }
    
    .stats-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-header h1 {
        margin-bottom: 15px;
        font-size: 1.5rem;
    }
}

@media (max-width: 567px) {
    .main-content {
        padding: 15px;
        padding-top: 80px;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}


/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Mini kalendarz w dashboard */
.calendar-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.card-body:has(.calendar-container) {
    overflow-x: hidden;
    overflow-y: visible;
    padding: 1.5rem;
    max-width: 100%;
}

.card:has(.calendar-container) {
    overflow: hidden;
    max-width: 100%;
}

.calendar-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    will-change: transform;
    max-width: 100%;
}

.calendar-month {
    width: 450px;
    flex-shrink: 0;
    padding: 0 1rem;
    margin: 0 auto;
    opacity: 0.35;
    transform: scale(0.92);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.calendar-month.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Responsywność szerokości kalendarza */
@media (max-width: 992px) {
    .calendar-month {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .calendar-month {
        width: 350px;
    }
    
    .card-body:has(.calendar-container) {
        padding: 1rem;
    }
    
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .calendar-controls {
        max-width: 100% !important;
        width: 100%;
    }
    
    .card-header select.form-control {
        max-width: 100% !important;
        width: 100%;
    }
}

@media (max-width: 650px) {
    .calendar-month {
        width: 320px;
    }
    
    .calendar-container {
        max-width: 100% !important;
    }
}

@media (max-width: 577px) {
    /* UKRYJ CAŁY KALENDARZ NA MOBILE */
    .card:has(.calendar-container) {
        display: none !important;
    }
    
    /* POKAŻ MOBILE CALENDAR */
    .mobile-calendar-card {
        display: block !important;
    }
}

/* Mobile Calendar - domyślnie ukryty na desktop */
.mobile-calendar-card {
    display: none;
}

.mobile-calendar-simple {
    width: 100%;
    padding: 1rem;
}

.mobile-calendar-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.mobile-calendar-header select.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.mobile-calendar-header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-calendar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.mobile-calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.mobile-nav-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

@media (max-width: 500px) {
    .calendar-month {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 240px;
    }
    
    .card-body:has(.calendar-container) {
        padding: 0.75rem;
    }
    
    /* WYŁĄCZ SLIDER - pokazuj tylko aktywny miesiąc */
    .calendar-slider {
        transform: none !important;
        justify-content: center;
    }
    
    .calendar-month:not(.active) {
        display: none;
    }
    
    .calendar-month {
        opacity: 1 !important;
        transform: scale(1) !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 480px) {
    .calendar-month {
        width: 280px;
        padding: 0 0.5rem;
    }
    
    .card-body:has(.calendar-container) {
        padding: 0.5rem;
    }
    
    .card:has(.calendar-container) {
        margin: 0.5rem 0;
    }
    
    .calendar-controls {
        gap: 0.5rem !important;
    }
    
    .calendar-title {
        font-size: 0.9rem !important;
    }
    
    /* WYŁĄCZ SLIDER */
    .calendar-slider {
        transform: none !important;
        justify-content: center;
    }
    
    .calendar-month:not(.active) {
        display: none;
    }
    
    .calendar-month {
        opacity: 1 !important;
        transform: scale(1) !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 380px) {
    .calendar-month {
        width: 260px;
    }
    
    /* WYŁĄCZ SLIDER */
    .calendar-slider {
        transform: none !important;
        justify-content: center;
    }
    
    .calendar-month:not(.active) {
        display: none;
    }
    
    .calendar-month {
        opacity: 1 !important;
        transform: scale(1) !important;
        pointer-events: auto !important;
    }
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.calendar-controls select.form-control {
    max-width: 300px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-controls select.form-control:hover {
    border-color: var(--primary-color);
}

.calendar-controls select.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calendar-nav-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.calendar-nav-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

.calendar-title {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.mini-cal-weekday {
    text-align: center;
    font-weight: 600;
    padding: 0.4rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.mini-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1.5px solid var(--border-color);
    font-weight: 500;
    min-height: 38px;
}

.mini-cal-day:hover:not(.empty) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.mini-cal-day.empty {
    background: transparent;
    cursor: default;
    border: none;
}

.mini-cal-day.today {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    font-weight: 700;
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.9);
}

.mini-cal-day.today.has-work {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.9);
}

.mini-cal-day.today.has-absence {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.9);
}

.mini-cal-day.today.absence-l4 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.9);
}

.mini-cal-day.has-work {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    color: white;
    font-weight: 600;
}

.mini-cal-day.has-absence {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: white;
    font-weight: 600;
}

.mini-cal-day.absence-l4 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: #ea580c;
}

.mini-cal-day.absence-inne {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    border-color: #db2777;
    color: white;
    font-weight: 600;
}

.mini-cal-day.today.absence-inne {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.9);
}

.mini-cal-day.weekend {
    opacity: 0.6;
}

.mini-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.5);
}

.mini-badge.pending {
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.mini-calendar-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    max-width: 450px;
    margin: 0 auto;
}

.legend-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-dot.work {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-dot.urlop {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.legend-dot.l4 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.legend-dot.inne {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.legend-dot.pending {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.legend-dot.today {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.legend-dot.inne {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* Modal pełnego kalendarza */
.modal-large {
    max-width: 95%;
    width: 95%;
    padding: 1.5rem;
    max-height: 95vh;
    overflow-y: auto;
}

.modal-large > h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.calendar-block {
    margin-bottom: 1.5rem;
}

.details-block {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.full-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

.cal-weekday {
    text-align: center;
    font-weight: 700;
    padding: 0.5rem 0.25rem;
    background: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid var(--primary-hover);
}

.cal-weekday:last-child {
    border-right: none;
}

.cal-day {
    min-height: 75px;
    padding: 0.4rem;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

.cal-day:nth-child(7n) {
    border-right: none;
}

.cal-day:hover:not(.empty) {
    background: var(--bg-color);
    box-shadow: inset 0 0 0 2px var(--primary-color);
    cursor: pointer;
}

.cal-day.empty {
    background: var(--bg-color);
    opacity: 0.3;
}

.cal-day.today {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    box-shadow: inset 0 0 0 3px #8b5cf6;
}

.cal-day.today .day-number {
    color: #8b5cf6;
    font-size: 1.3rem;
}

.cal-day.weekend {
    background: var(--bg-color);
}

.cal-day.has-work {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
}

.cal-day.has-work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.cal-day.has-absence {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.08) 100%);
}

.cal-day.has-absence::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.day-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.day-entry {
    padding: 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.day-entry:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.day-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.day-entry-dates {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.day-entry p {
    margin: 0.5rem 0 0 0;
    color: var(--text-color);
}

.day-section {
    margin-bottom: 1.5rem;
}

.day-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.day-entry.work {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Kolory dla kalendarza admina - dni z pracą */
.cal-day-work {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%) !important;
    border-left: 4px solid #10b981 !important;
}

/* Kolory dla kalendarza admina - urlop */
.cal-day-urlop {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%) !important;
    border-left: 4px solid #f59e0b !important;
}

/* Kolory dla kalendarza admina - L4 */
.cal-day-l4 {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%) !important;
    border-left: 4px solid #ef4444 !important;
}

/* Kolory dla kalendarza admina - Inne */
.cal-day-inne {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%) !important;
    border-left: 4px solid #ec4899 !important;
}

/* Kolory dla kalendarza admina - oczekujące */
.cal-day-pending {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%) !important;
    border-left: 4px solid #3b82f6 !important;
}


.day-entry.absence {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.day-entry.absence-l4 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.day-entry.absence-inne {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

@media (max-width: 768px) {
    .mini-calendar-grid {
        gap: 0.3rem;
    }
    
    .mini-cal-day {
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    .mini-cal-weekday {
        font-size: 0.65rem;
        padding: 0.3rem;
    }
    
    .full-calendar-grid {
        gap: 0;
        font-size: 0.85rem;
    }
    
    .cal-weekday {
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 577px) {
    .mini-calendar-grid {
        gap: 0.2rem;
    }
    
    .mini-cal-day {
        font-size: 0.7rem;
        min-height: 28px;
        padding: 0.2rem;
        border-width: 1px;
    }
    
    .mini-cal-weekday {
        font-size: 0.6rem;
        padding: 0.25rem;
    }
}

@media (max-width: 500px) {
    .mini-calendar-grid {
        gap: 0.15rem;
    }
    
    .mini-cal-day {
        font-size: 0.65rem;
        min-height: 24px;
        padding: 0.15rem;
    }
    
    .mini-cal-weekday {
        font-size: 0.55rem;
        padding: 0.2rem;
    }
}

@media (max-width: 420px) {
    .mini-calendar-grid {
        gap: 0.1rem;
    }
    
    .mini-cal-day {
        font-size: 0.6rem;
        min-height: 20px;
        padding: 0.1rem;
    }
    
    .mini-cal-weekday {
        font-size: 0.5rem;
        padding: 0.15rem;
    }
}

@media (max-width: 768px) {
    .full-calendar-grid {
        font-size: 0.75rem;
    }
    
    .cal-day {
        min-height: 80px;
        padding: 0.5rem;
    }
    
    .day-number {
        font-size: 1rem;
    }
    
    .day-entry {
        font-size: 0.75rem;
        padding: 0.375rem;
    }
    
    .modal-large {
        width: 98%;
        padding: 1rem;
    }
    
    #dayDetailsPanel {
        padding: 1rem !important;
    }
}

@media (max-width: 576px) {
    .cal-weekday {
        padding: 0.5rem 0.1rem;
        font-size: 0.65rem;
    }
    
    .cal-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .day-number {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .day-entry {
        font-size: 0.65rem;
        padding: 0.15rem;
    }
}