        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f0f0f0;
        }

        /* Notification animations */
        @keyframes slideInFromRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutToRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        @keyframes slideInFromLeft {
            from {
                transform: translateX(-100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutToLeft {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(-100%);
                opacity: 0;
            }
        }

        #api-form {
            margin: 0px;
            padding: 0px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
        }

        #api-form h2, #api-form h3 {
            color: #333;
            margin-bottom: 20px;
        }

        #api-form label {
            display: block;
            margin: 20px 0;
        }

        span.color-description {
            display: block;
            margin-bottom: 10px;
        }

        #api-form input[type="number"], #api-form input[type="text"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            margin-bottom: 20px;
        }

        #api-form button[type="submit"] {
            display: block;
            margin: 40px 0;
            padding: 10px;
            border: none;
            border-radius: 5px;
            background-color: #4CAF50;
            color: #fff;
            cursor: pointer;
        }

        #message-container {
            padding: 30px;
            color: #633;
            background-color: #f9f9f9;
            border-bottom: 1px solid #ccc;
            margin-bottom: 20px;
        }

        #json-output {
            padding: 30px;
            color: #333;
            background-color: #fff;
            border-bottom: 1px solid #ccc;
            overflow-x: auto;
            margin-bottom: 20px;
        }

        #schedule-container, #summary-container {
            padding: 40px;
            color: #333;
            background-color: #fff;
            border-bottom: 1px solid #ccc;
            margin-bottom: 20px;
        }

        h1 {
            font-size: 2.5em; /* powiększ rozmiar czcionki */
            font-weight: bold; /* dodaj pogrubienie */
            text-align: center; /* wyśrodkuj tekst */
            color: #444; /* zmień kolor czcionki na ciemnoszary */
            padding: 20px; /* dodaj wewnętrzny margines */
            margin: 40px auto; /* zwiększ zewnętrzny margines i wyśrodkuj na stronie */
            text-transform: uppercase; /* zamień wszystkie litery na wielkie */
            letter-spacing: 1.5px; /* dodaj odstęp między literami */
            background-color: #f0f0f0; /* dodaj tło */
            border-radius: 10px; /* zaokrąglij rogi */
        }


        h2 {
            margin-left: 20px;
        }


        #worker-buttons > div {
            display: flex;
            align-items: center;
            gap: 10px; /* dodaje przerwę między elementami flex */
            margin-bottom: 10px; /* dodaje trochę przestrzeni między liniami */
        }

        #worker-buttons > div > button {
            margin-right: 10px; /* dodaje trochę przestrzeni po prawej stronie przycisku */
        }

        #worker-buttons > div > input[type="number"] {
            width: 70px; /* ustawia szerokość pola input na stałą wartość, żeby nie zajmowało zbyt dużo miejsca */
        }

        button {
            background-color: #f0f0f0; /* kolor tła przycisku, gdy nie jest wybrany */
        }

        button.selected {
            background-color: green; /* kolor tła przycisku, gdy jest wybrany */
        }

        input[type="file"], button {
            display: block;
            margin: 20px 0;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            background-color: #f0f0f0;
            color: #333;
        }

        input[type="file"]:hover, button:hover {
            background-color: #e0e0e0;
        }

        button {
            background-color: #4CAF50;
            color: #fff;
            transition: background-color 0.3s ease;
        }

        button:hover {
            background-color: #45a049;
        }

        #json-controls {
            margin: 40px;
            padding: 30px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
        }

        #json-controls input[type="file"], #json-controls button {
            display: block;
            margin: 20px 0;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            background-color: #f0f0f0;
            color: #333;
        }

        #json-controls input[type="file"]:hover, #json-controls button:hover {
            background-color: #e0e0e0;
        }

        #json-controls button {
            background-color: #4CAF50;
            color: #fff;
            transition: background-color 0.3s ease;
        }

        #json-controls button:hover {
            background-color: #45a049;
        }

        #loader {
            position: fixed; /* Pozycja stała, niezależna od przewijania */
            top: 50%; /* Położenie w połowie wysokości ekranu */
            left: 50%; /* Położenie w połowie szerokości ekranu */
            transform: translate(-50%, -50%); /* Przesunięcie elementu o połowę jego szerokości i wysokości do góry i na lewo, aby centrowanie było idealne */
            z-index: 9999; /* Ustawienie na wysokim poziomie, aby element był na wierzchu */
        }

        #loader img {
            width: 25%; /* Zmniejszenie szerokości obrazu o 50% */
            height: auto; /* Zachowanie proporcji obrazu */
        }

        td.morning-shift {
            background-color: #11E700;
        }

        td.evening-shift {
            background-color: #1E90FF;
        }

        td.night-shift {
            background-color: #9370DB;
        }

        /* Override borders when shift classes are combined with cell-editing */
        td.morning-shift.cell-editing,
        td.evening-shift.cell-editing,
        td.night-shift.cell-editing,
        td.none-shift.cell-editing {
            border: 3px solid #dc3545 !important;
            border-left: 3px solid #dc3545 !important;
            border-right: 3px solid #dc3545 !important;
            border-top: 3px solid #dc3545 !important;
            border-bottom: 3px solid #dc3545 !important;
        }

        td.weekend, th.weekend {
            background-color: #ff6666 !important;
        }

        td.holiday, th.holiday {
            background-color: #ffcc00 !important;
        }

        td.free-weekend {
            background-color: #ffb6c1 !important;
            color: black;
            font-weight: bold;
        }

        /* FullCalendar styling */
        #calendar {
            max-width: 1200px;
            width: 100%;
            height: 600px;
            margin: 20px auto;
            padding: 20px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: visible !important;
        }

        #api-form #calendar {
            max-width: none;
            width: 100%;
            height: 600px;
            margin: 20px 0;
            overflow: visible !important;
        }

        .fc {
            font-size: 14px;
            height: 100% !important;
        }

        .fc-header-toolbar {
            margin-bottom: 20px;
        }

        .fc-daygrid-day {
            min-height: 80px;
            height: auto;
        }

        .fc-daygrid-body {
            width: 100% !important;
        }

        .fc-event {
            border-radius: 4px;
            padding: 2px 4px;
            font-weight: bold;
            cursor: pointer;
        }

        /* Calendar event colors for 3-shift system */
        .fc-event[style*="green"] {
            background-color: #4CAF50 !important;
            border-color: #4CAF50 !important;
            color: white !important;
        }

        .fc-event[style*="blue"] {
            background-color: #2196F3 !important;
            border-color: #2196F3 !important;
            color: white !important;
        }

        .fc-event[style*="purple"] {
            background-color: #9C27B0 !important;
            border-color: #9C27B0 !important;
            color: white !important;
        }

        .fc-event[style*="orange"] {
            background-color: #FF9800 !important;
            border-color: #FF9800 !important;
            color: white !important;
        }

        .fc-event[style*="yellow"] {
            background-color: #FFEB3B !important;
            border-color: #FFEB3B !important;
            color: black !important;
        }

        .fc-event[style*="gray"] {
            background-color: #9E9E9E !important;
            border-color: #9E9E9E !important;
            color: white !important;
        }

        /* Table border fixes for Bootstrap tables */
        .table {
            border-collapse: separate !important;
            border-spacing: 0 !important;
        }

        .table td {
            border-left: 1px solid #dee2e6 !important;
            border-right: 1px solid #dee2e6 !important;
            border-top: 1px solid #dee2e6 !important;
            border-bottom: 1px solid #dee2e6 !important;
        }

        /* Interactive schedule table cell styles */
        .clickable-cell {
            cursor: pointer;
            user-select: none;
            transition: outline-color 0.2s ease;
        }

        .clickable-cell:hover {
            outline: 3px solid #000000 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 5 !important;
        }

        /* REMOVED - moved to end of file for higher specificity */

        /* Editing states with background colors ONLY - borders handled by .cell-editing */
        .morning-editing {
            background-color: #4CAF50 !important;
            color: white !important;
            font-weight: bold;
        }

        .evening-editing {
            background-color: #2196F3 !important;
            color: white !important;
            font-weight: bold;
        }

        .night-editing {
            background-color: #9C27B0 !important;
            color: white !important;
            font-weight: bold;
        }

        .forbidden-editing {
            background-color: white !important;
            color: black !important;
            font-weight: bold;
        }

        .no-morning-editing {
            background-color: #FF9800 !important;
            color: white !important;
            font-weight: bold;
        }

        .no-evening-editing {
            background-color: #FFEB3B !important;
            color: black !important;
            font-weight: bold;
        }

        .no-night-editing {
            background-color: #9E9E9E !important;
            color: white !important;
            font-weight: bold;
        }

        /* Worker freezing functionality styles */
        .worker-frozen {
            border: 3px solid #dc3545 !important;
            background-color: #f8d7da !important;
            cursor: pointer;
        }

        .worker-frozen-cell {
            outline: 3px solid #dc3545 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 10 !important;
        }

        /* Worker preferred functionality styles */
        .worker-preferred {
            border: 3px solid #28a745 !important;
            background-color: #d4edda !important;
            cursor: pointer;
        }

        .worker-preferred-cell {
            outline: 3px solid #28a745 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 9 !important;
        }

        .worker-header {
            cursor: pointer;
            user-select: none;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .worker-header:hover {
            background-color: #f8f9fa !important;
        }

        /* Day freezing functionality styles */
        .day-frozen {
            border: 3px solid #dc3545 !important;
            background-color: #f8d7da !important;
            cursor: pointer;
        }

        .day-frozen-cell {
            outline: 3px solid #dc3545 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 10 !important;
        }

        /* Day preferred functionality styles */
        .day-preferred {
            border: 3px solid #28a745 !important;
            background-color: #d4edda !important;
            cursor: pointer;
        }

        .day-preferred-cell {
            outline: 3px solid #28a745 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 9 !important;
        }

        .day-header {
            cursor: pointer;
            user-select: none;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .day-header:hover {
            background-color: #f8f9fa !important;
        }

        /* Editing state - red border using outline instead of border */
        .cell-editing {
            outline: 3px solid #dc3545 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 10 !important;
        }

        /* Even more specific selectors to ensure red outline appears */
        td.cell-editing,
        td.clickable-cell.cell-editing,
        .schedule-cell.cell-editing,
        .clickable-cell.morning-editing.cell-editing,
        .clickable-cell.evening-editing.cell-editing,
        .clickable-cell.night-editing.cell-editing,
        .clickable-cell.forbidden-editing.cell-editing,
        .clickable-cell.no-morning-editing.cell-editing,
        .clickable-cell.no-evening-editing.cell-editing,
        .clickable-cell.no-night-editing.cell-editing {
            outline: 3px solid #dc3545 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 10 !important;
        }

        /* Preferred state - green border using outline */
        .cell-preferred {
            outline: 3px solid #28a745 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 9 !important;
        }

        /* Preferred states with background colors and green border */
        .morning-preferred {
            background-color: #66d966 !important;  /* Lighter green for preferred Morning */
            color: white !important;
            font-weight: bold;
        }

        .evening-preferred {
            background-color: #5bb3f5 !important;  /* Lighter blue for preferred Evening */
            color: white !important;
            font-weight: bold;
        }

        .night-preferred {
            background-color: #b85bc7 !important;  /* Lighter purple for preferred Night */
            color: white !important;
            font-weight: bold;
        }

        .forbidden-preferred {
            background-color: #f0f0f0 !important;  /* Light gray for preferred forbidden */
            color: black !important;
            font-weight: bold;
        }

        /* Specific selectors for green outline (preferred shifts) */
        td.cell-preferred,
        td.clickable-cell.cell-preferred,
        .schedule-cell.cell-preferred,
        .clickable-cell.morning-preferred.cell-preferred,
        .clickable-cell.evening-preferred.cell-preferred,
        .clickable-cell.night-preferred.cell-preferred,
        .clickable-cell.forbidden-preferred.cell-preferred,
        .clickable-cell.no-morning-preferred.cell-preferred,
        .clickable-cell.no-evening-preferred.cell-preferred,
        .clickable-cell.no-night-preferred.cell-preferred {
            outline: 3px solid #28a745 !important;
            outline-offset: -3px !important;
            position: relative !important;
            z-index: 9 !important;
        }

        /* Mobile responsiveness - scale down table on mobile devices */
        @media (max-width: 768px) {
            #schedule-container {
                padding: 5px !important;
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
            }

            #schedule-container table {
                transform: scale(0.5);
                transform-origin: top left;
                width: 200%;
                margin-bottom: -70% !important; /* Key: negative margin to reduce height */
            }

            /* Remove desktop padding and margins */
            #schedule-container, #summary-container {
                padding: 5px !important;
                margin-bottom: 5px !important;
            }
        }

        /* Extra small devices (phones, less than 576px) */
        @media (max-width: 575px) {
            #schedule-container {
                padding: 2px !important;
            }

            #schedule-container table {
                transform: scale(0.4);
                width: 250%;
                margin-bottom: -80% !important; /* More negative margin for smaller scale */
            }
        }

        /* Sticky (frozen) headers for table scrolling */
        .table-responsive {
            max-height: 80vh; /* Limit table height to enable vertical scrolling */
            overflow: auto;
            position: relative;
        }

        /* Sticky header row */
        .table thead th {
            position: sticky;
            top: 0;
            background-color: #f8f9fa !important;
            z-index: 100;
            border-bottom: 2px solid #dee2e6 !important;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Sticky first column for standard view (days) */
        .table tbody td:first-child,
        .table thead th:first-child {
            position: sticky;
            left: 0;
            background-color: #ffffff !important;
            z-index: 50;
            border-right: 2px solid #dee2e6 !important;
            box-shadow: 2px 0 4px rgba(0,0,0,0.1);
        }

        /* Higher z-index for intersection of sticky header and first column */
        .table thead th:first-child {
            z-index: 150;
            background-color: #e9ecef !important;
        }

        /* For transposed view - sticky worker column */
        .table.transposed tbody td:first-child,
        .table.transposed thead th:first-child {
            position: sticky;
            left: 0;
            background-color: #ffffff !important;
            z-index: 50;
            border-right: 2px solid #dee2e6 !important;
            box-shadow: 2px 0 4px rgba(0,0,0,0.1);
        }

        .table.transposed thead th:first-child {
            z-index: 150;
            background-color: #e9ecef !important;
        }

        /* Ensure proper background for weekend/holiday cells that are sticky */
        .table tbody td:first-child.weekend {
            background-color: #ff6666 !important;
        }

        .table tbody td:first-child.holiday {
            background-color: #ffcc00 !important;
        }

        /* Mobile adjustments for sticky headers */
        @media (max-width: 768px) {
            .table-responsive {
                max-height: 60vh; /* Smaller height on mobile */
            }
            
            .table thead th {
                font-size: 0.8em;
                padding: 0.25rem;
            }
            
            .table tbody td:first-child,
            .table thead th:first-child {
                min-width: 40px;
                font-size: 0.8em;
            }
        }

