/* --------------------------------------------------- */
/* GŁÓWNE STYLE GLOBALNE - używane we wszystkich szablonach */
/* --------------------------------------------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f6f8;
    color: #333;
    font-size: 16px; /* Bazowy rozmiar czcionki */
    overflow-x: hidden; /* Zapobiega poziomemu przewijaniu na urządzeniach mobilnych */
}

/* Nagłówek strony - używany na każdej stronie */
header {
    background: #007BFF;
    color: white;
    padding: 1.5em 1em; /* Zmniejszone boczne marginesy na urządzeniach mobilnych */
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.system-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.system-title h1 {
    margin: 0;
    font-size: 1.6em; /* Zmniejszony rozmiar nagłówka */
    letter-spacing: 1px;
    margin-bottom: 0.2em;
    color: white;
}

.system-title h2 {
    margin: 0;
    font-size: 1.1em; /* Zmniejszony rozmiar podtytułu */
    font-weight: normal;
    font-style: italic;
    color: #f0f0f0;
}

/* Główny kontener treści - używany na każdej stronie */
.container {
    width: 95%;
    max-width: 1200px;
    margin: 1em auto; /* Zmniejszony margines górny i dolny */
    background: white;
    padding: 1em; /* Zmniejszone wypełnienie */
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow-x: hidden; /* Zapobiega przewijaniu poziomemu */
}

/* Style nagłówków - używane na większości stron */
h1, h2, h3 {
    color: #007BFF;
    margin-top: 0;
    word-wrap: break-word; /* Zapewnia zawijanie długich tytułów */
}

/* --------------------------------------------------- */
/* STYLE FORMULARZY - używane przy logowaniu, rezerwacji, edycji danych */
/* --------------------------------------------------- */
form {
    margin-top: 1em;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    font-size: 0.95em; /* Nieco mniejszy rozmiar na mobilnych */
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="file"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    margin-bottom: 1em;
    box-sizing: border-box;
    max-width: 100%; /* Zapobiega wychodzeniu poza kontener */
}

.form-control {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    margin-bottom: 1em;
    box-sizing: border-box;
    height: auto;
    line-height: 1.5;
    max-width: 100%; /* Zapobiega wychodzeniu poza kontener */
}

/* Zapewnienie spójnego wyglądu dla pól typu password */
input[type="password"].form-control {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.1em;
}

textarea {
    height: 100px;
    resize: vertical;
    max-width: 100%; /* Zapobiega wychodzeniu poza kontener */
}

.required:after {
    content: " *";
    color: #dc3545;
}

.form-group {
    margin-bottom: 1em;
    width: 100%;
}

/* Zmniejszone odstępy w formularzu rezerwacji */
#reservationModal .form-group {
    margin-bottom: 0.5em;
}

#reservationModal label {
    margin-bottom: 0.2em;
}

#reservationModal input {
    margin-bottom: 0.3em;
    padding: 0.3em 0.5em;
}

/* --------------------------------------------------- */
/* STYLE PRZYCISKÓW - używane w całej aplikacji */
/* --------------------------------------------------- */
.btn, 
button[type="submit"],
input[type="submit"], 
.button-link,
.generate-button,
.view-button,
.delete-button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    font-size: 0.95rem; /* Nieco mniejszy rozmiar */
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: normal; /* Umożliwienie zawijania tekstu w przyciskach */
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%; /* Zapobiega wychodzeniu poza kontener */
}

/* Przyciski główne - używane do akcji zatwierdzających */
.btn-primary,
button[type="submit"],
input[type="submit"],
.button-link {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.button-link:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Przyciski zielone - używane do akcji pozytywnych */
.btn-zielony {
    color: #fff !important;
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.btn-zielony:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #fff;
}

/* Przyciski czerwone - używane do akcji negatywnych/usuwania */
.btn-czerwony,
.btn-danger {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-czerwony:hover,
.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #fff !important;
}

/* Przyciski drugorzędne - używane do akcji alternatywnych */
.btn-secondary,
.back-link {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover,
.back-link:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Warianty przycisków */
.btn-block {
    display: block;
    width: 100%;
}

.btn-disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Małe przyciski w tabelach */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 0.2rem;
    margin-right: 2px;
    margin-bottom: 2px; /* Dodano odstęp na dole dla układania w pionie */
}

/* Przyciski nieaktywne */
.btn-secondary[disabled] {
    background-color: #cccccc !important;
    border-color: #bbbbbb !important;
    color: #888888 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Mały przycisk w pasku stanu użytkownika */
.btn-small {
    display: inline-block;
    padding: 0.2em 0.5em;
    margin-left: 0.5em;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 0.2em; /* Dodany odstęp w pionie dla układu mobilnego */
}

.btn-small:hover {
    background-color: #0069d9;
}

.btn-logout {
    background-color: #dc3545;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Przyciski kopiowania i generowania */
.copy-button {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s;
    margin-bottom: 0.5em; /* Dodajemy odstęp w pionie dla układu mobilnego */
}

.copy-button:hover {
    background-color: #218838;
}

.copy-button i {
    font-size: 1.1em;
}

.generate-button,
.view-button,
.delete-button {
    display: inline-block;
    padding: 0.25em 0.75em;
    font-size: 0.85em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 0.25em 0;
    text-decoration: none;
    white-space: normal; /* Zmieniono na normal zamiast nowrap */
    word-wrap: break-word;
    text-align: center;
    margin-right: 0.25em; /* Dodany odstęp z prawej strony */
    margin-bottom: 0.25em; /* Dodany odstęp z dołu */
}

.generate-button {
    background-color: #28a745;
    color: white;
}

.generate-button:hover {
    background-color: #218838;
}

.view-button {
    background-color: #007BFF;
    color: white;
}

.view-button:hover {
    background-color: #0056b3;
}

.view-button[style*="background-color: #0033A0"] {
    background-color: #0033A0;
    color: white;
}

.view-button[style*="background-color: #0033A0"]:hover {
    background-color: #002880;
}

.delete-button {
    background-color: #dc3545;
    color: white;
}

.delete-button:hover {
    background-color: #c82333;
}

/* --------------------------------------------------- */
/* STYLE KOMUNIKATÓW - używane do powiadomień użytkownika */
/* --------------------------------------------------- */
.flash-messages {
    list-style: none;
    padding: 0;
    margin: 1em 0;
    width: 100%;
}

.flash-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75em 1.25em;
    margin-bottom: 1em;
    border: 1px solid #c3e6cb;
    border-radius: 0.25em;
    font-weight: 700;
    word-wrap: break-word; /* Umożliwia zawijanie długich komunikatów */
    width: 100%;
    box-sizing: border-box;
}

/* Style dla stałych komunikatów flash */
.permanent-message {
    border-left: 4px solid #007BFF;
    font-weight: bold;
    background-color: #e8f4ff;
}

/* Komunikat o pomyślnym anulowaniu */
.success-message {
    border-left: 6px solid #28a745;
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
    font-size: 1.1em;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

/* Komunikat ostrzegawczy */
.warning-message {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
    border-left: 4px solid #ffc107;
}

/* Komunikat o błędzie */
.error-message {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
    border-left: 4px solid #dc3545 !important;
    font-weight: bold;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

/* Komunikat informacyjny */
.info-message {
    background-color: #cce5ff;
    color: #004085;
    border-left: 4px solid #007bff;
    font-weight: bold;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

/* Specyficzny styl dla komunikatu o braku możliwości anulowania */
.cancel-limit-warning {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
}

/* Komunikat ostrzegawczy (czerwony) - dodatkowa klasa */
.cancel-warning {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
    border-left: 4px solid #dc3545 !important;
    font-weight: bold !important;
}

/* --------------------------------------------------- */
/* STYLE TABEL - używane przy wyświetlaniu danych */
/* --------------------------------------------------- */
.table-container {
    width: 100%;
    overflow-x: auto; /* Umożliwia przewijanie poziome tabeli */
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch; /* Płynne przewijanie na iOS */
    box-sizing: border-box;
    margin-bottom: 1em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    font-size: 0.85em; /* Zmniejszony rozmiar czcionki na mobilnych */
    min-width: 650px; /* Minimalna szerokość zapewniająca czytelność */
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 0.5em; /* Zmniejszone wypełnienie */
    text-align: left;
    white-space: nowrap;
}

th {
    background-color: #007BFF;
    color: white;
    position: sticky; /* Przyklejone nagłówki tabeli */
    top: 0;
    z-index: 10;
}

/* Ukrycie kolumny ID w tabelach edycji */
.edit-table th:first-child,
.edit-table td:first-child {
    display: none;
}

/* Zmniejszenie wysokości wierszy w tabeli rezerwacji */
.admin-wyniki-rezerwacji-table tr {
    height: 30px;
    line-height: 1.2;
}

.admin-wyniki-rezerwacji-table td {
    padding: 3px 6px;
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Specjalne style dla kolumny status */
.admin-wyniki-rezerwacji-table th:nth-child(2),
.admin-wyniki-rezerwacji-table td:nth-child(2) {
    width: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    white-space: nowrap;
    text-align: center;
    padding: 2px;
}
/* Dodajemy do static/style.css */

/* --------------------------------------------------- */
/* STYLOWANIE TABELI WYNIKÓW REZERWACJI */
/* --------------------------------------------------- */

/* Kolumna Status (wąska, ikona) */
.admin-wyniki-rezerwacji-table th:nth-child(1),
.admin-wyniki-rezerwacji-table td:nth-child(1) {
    width: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    white-space: nowrap;
    text-align: center;
    padding: 2px;
}

/* Kolumna Przedmiot (szersza) */
.admin-wyniki-rezerwacji-table th:nth-child(2),
.admin-wyniki-rezerwacji-table td:nth-child(2) {
    width: 20% !important;
    min-width: 140px !important;
    white-space: normal; /* Pozwala na zawijanie tekstu */
    word-break: break-word; /* Łamie długie słowa jeśli to konieczne */
}

/* Kolumna Sala (minimalna szerokość) */
.admin-wyniki-rezerwacji-table th:nth-child(6),
.admin-wyniki-rezerwacji-table td:nth-child(6) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 60px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kolumna Akcje (wąska, optymalna dla buttonów) */
.admin-wyniki-rezerwacji-table th:nth-child(10),
.admin-wyniki-rezerwacji-table td:nth-child(10) {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 90px !important;
    white-space: nowrap;
}

/* Mniejsze przyciski w kolumnie Akcje */
.admin-wyniki-rezerwacji-table .action-buttons {
    display: flex;
    flex-wrap: nowrap; /* Zapobiega zawijaniu przycisków */
    justify-content: flex-start;
    gap: 2px;
}

.admin-wyniki-rezerwacji-table .action-buttons .btn-xs {
    padding: 0.1rem 0.3rem; /* Mniejsze wypełnienie */
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Dla urządzeń mobilnych - usuwanie mniej ważnych kolumn */
@media (max-width: 767px) {
    .admin-wyniki-rezerwacji-table th:nth-child(6),
    .admin-wyniki-rezerwacji-table td:nth-child(6) {
        display: none; /* Ukrycie kolumny Sala */
    }
    
    .admin-wyniki-rezerwacji-table th:nth-child(9),
    .admin-wyniki-rezerwacji-table td:nth-child(9) {
        display: none; /* Ukrycie kolumny Telefon */
    }
}
/* Style dla przycisków z ikonami w kolumnie Akcje */
.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-icon i {
    font-size: 14px;
}

/* Style dla tooltip'ów przy hover nad przyciskami */
.btn-icon:hover:after {
    content: attr(title);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

/* Trójkąt pod tooltipem */
.btn-icon:hover:before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    z-index: 100;
    pointer-events: none;
}

/* Poprawiona szerokość kolumny Akcje */
.admin-wyniki-rezerwacji-table th:nth-child(10),
.admin-wyniki-rezerwacji-table td:nth-child(10) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    white-space: nowrap;
}
/* Ikony statusu */
.status-icon-confirmed {
    color: #28a745;
    font-size: 1.2em;
}

.status-icon-cancelled {
    color: #dc3545;
    font-size: 1.2em;
}

/* Style dla akcji w tabelach */
.action-buttons {
    display: flex;
    white-space: normal; /* Zmienione z nowrap dla umożliwienia zawijania */
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap; /* Dodano, aby przyciski mogły się zawijać */
    gap: 2px;
    margin-top: 0; /* Usunięcie górnego marginesu */
}

/* Przyciski w tabelach edycji */
.edit-table .action-buttons a {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 0.2rem;
    margin-right: 2px;
    margin-bottom: 2px; /* Dodany margines dolny dla układu mobilnego */
    color: #fff !important;
    text-decoration: none;
    display: inline-block;
}

.edit-table .action-buttons a:first-child {
    background-color: #007bff;
    border-color: #007bff;
}

.edit-table .action-buttons a:first-child:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.edit-table .action-buttons a:last-child {
    background-color: #dc3545;
    border-color: #dc3545;
}

.edit-table .action-buttons a:last-child:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Style dla sortowania tabel */
.sortable {
    cursor: pointer;
    position: relative;
}

.sortable:hover {
    background-color: #0056b3;
}

.sortable::after {
    content: "⇕";
    position: absolute;
    right: 8px;
    opacity: 0.5;
}

.sortable.sort-asc::after {
    content: "↑";
    opacity: 1;
}

.sortable.sort-desc::after {
    content: "↓";
    opacity: 1;
}

/* Podświetlenie posortowanej kolumny */
.admin-wyniki-rezerwacji-table td.sorted {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Status w tabeli rezerwacji */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-oczekujaca {
    background-color: #fff3cd;
    color: #856404;
}

.status-potwierdzona {
    background-color: #d4edda;
    color: #155724;
}

.status-anulowana {
    background-color: #f8d7da;
    color: #721c24;
}

.anulowanie-info {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    white-space: nowrap;
    display: inline-block;
    padding: 2px 5px;
}

/* --------------------------------------------------- */
/* STYLE DLA MENU NAWIGACYJNEGO - używane w panelu admina i dla użytkowników */
/* --------------------------------------------------- */
/* Kontenery menu */
.admin-nav {
    max-width: 1200px;
    width: 95%;
    margin: 1em auto; 
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1em;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.user-status-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5em 0;
    width: 100%;
}

.user-status-bar p {
    margin: 0;
    text-align: center; /* Zmieniono na center dla mobilnych */
    padding: 0 1em;
    word-wrap: break-word;
}

.user-status-bar .container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 0.75em;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

/* Styl dla nazwy użytkownika */
.admin-nav .username {
    color: #3498db;
    font-weight: 600;
}

.admin-nav .user-info {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    margin-bottom: 0.75em;
    width: 100%;
}

/* Style dla linków w menu */
.admin-nav .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    flex-wrap: wrap; /* Umożliwia zawijanie linków na wąskich ekranach */
    width: 100%;
}

.admin-nav .nav-links a {
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    padding: 0.5em 0.7em;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    font-size: 0.85em; /* Mniejszy rozmiar czcionki */
    text-align: center;
    margin-bottom: 0.35em; /* Dodano dla lepszego układu na mobilnych */
    flex-grow: 1; /* Rozciągnięcie na całą szerokość na małych ekranach */
    max-width: 120px; /* Maksymalna szerokość przycisku */
}

.admin-nav .nav-links a:hover {
    background-color: #f0f4f8;
    color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-nav .nav-links a.active {
    background-color: #e6f3fb;
    color: #2980b9;
    border-color: #c6e2f7;
    font-weight: 600;
}

/* Wyróżnienie przycisku wylogowania */
.admin-nav .nav-links a.logout-link {
    background-color: #f8f4f7;
    color: #e74c3c;
    border-color: #fde1e1;
}

.admin-nav .nav-links a.logout-link:hover {
    background-color: #fde1e1;
    color: #c0392b;
}

/* Style dla zakładek panelu administracyjnego */
.tabs {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin: 1em 0;
    flex-wrap: wrap;
    width: 100%;
}

.tab-button {
    padding: 0.5em 0.7em;
    font-size: 0.9em;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 0.25em; /* Dodano dla lepszego układu na mobilnych */
    flex-grow: 1;
    text-align: center;
    max-width: 120px; /* Maksymalna szerokość przycisku */
}

.tab-button:hover {
    background-color: #0056b3;
}

.tab-button.active {
    background-color: #0056b3;
    font-weight: bold;
}

.tab-content {
    display: none;
    width: 100%;
}

/* --------------------------------------------------- */
/* STYLE DLA FILTROWANIA - używane na stronach z listą spotkań i rezerwacji */
/* --------------------------------------------------- */
.filter-container {
    margin-bottom: 1.5em;
    padding: 0.75em;
    background-color: #fff;
    border-radius: 8px;
    border: 3px solid #0069d9;
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.filter-left {
    flex: 1;
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    align-items: flex-start;
    width: 100%;
    margin-bottom: 0.5em;
}

.filter-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0; /* Usunięto auto dla lepszego układu mobilnego */
    width: 100%;
    gap: 0.5em;
}

.filter-form {
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    gap: 0.5em;
    margin-bottom: 1em;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
}

.filter-form select, 
.filter-form input {
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 0.5em;
    width: 100%;
    box-sizing: border-box;
}

.filter-group {
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    align-items: flex-start;
    margin-bottom: 0.5em;
    width: 100%;
}

.filter-label {
    font-weight: bold;
    margin-right: 0.5em;
    margin-bottom: 0.25em; /* Dodano dla układu kolumnowego */
    width: auto;
}

.filter-select {
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------- */
/* STYLE DLA MODALI - używane w oknach dialogowych */
/* --------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 60px auto 0; /* Zmniejszono z 80px na 60px */
    padding: 15px; /* Zmniejszone wypełnienie */
    border-radius: 8px;
    max-width: 90%; /* Zmienione z 500px na 90% */
    width: 100%;
    max-width: 480px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    border-top: 3px solid #007BFF;
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-buttons {
    display: flex;
    flex-direction: column; /* Zmiana na kolumnowy układ dla małych ekranów */
    gap: 10px;
    margin-top: 0.5em;
    width: 100%;
}

.btn-reserve {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
    flex: 1;
}

.btn-reserve:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

.btn-cancel {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    flex: 1;
}

.btn-cancel:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Style dla modalu potwierdzenia kopiowania */
.copy-confirmation-modal .modal-content {
    max-width: 90%;
    width: 100%;
    max-width: 380px;
}

.copy-success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.copy-message {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
}

.copy-submessage {
    margin-top: 5px;
    color: #666;
}

/* --------------------------------------------------- */
/* STYLE DLA REZERWACJI SLOTÓW - używane na stronie rezerwacji slotów */
/* --------------------------------------------------- */
/* Główne elementy dla slotów spotkań */
.spotkanie-grupa {
    margin-bottom: 1em;
    border: 2px solid #0069d9;
    border-radius: 8px;
    padding: 0;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.spotkanie-naglowek {
    padding: 0.5em;
    background-color: #f8f9fa;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
}

/* Style dla minionych spotkań */
.past-meeting {
    border-color: #dee2e6;
    opacity: 0.85;
    background-color: #f8f9fa;
}

/* Układ informacji o spotkaniu w jednej linii */
.spotkanie-info-grid {
    display: flex;
    flex-wrap: wrap; /* Zmiana na wrap dla małych ekranów */
    justify-content: flex-start;
    align-items: flex-start;
    font-size: 0.85em; /* Zmniejszony rozmiar czcionki */
    gap: 0.5em;
    width: 100%;
}

.spotkanie-info-item {
    flex: 1;
    min-width: 45%; /* Minimum szerokość dla telefonów - 2 kolumny */
    padding: 0 0.25em;
    margin-bottom: 0.25em;
}

.spotkanie-info-label {
    font-weight: bold;
    color: #6c757d;
    font-size: 0.85em;
    white-space: nowrap;
    margin-bottom: 0.1em;
}

.spotkanie-info-value {
    font-size: 0.95em;
    white-space: normal; /* Zmieniono z nowrap aby tekst mógł się zawijać */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Siatka slotów czasowych */
.sloty-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    margin: 0.25em;
    padding: 0.25em;
    width: 100%;
    box-sizing: border-box;
}
.slot {
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 120px;
    width: calc((100% - 11 * 0.25em) / 12);
    /* reszta właściwości bez zmian */
}

.slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.slot-time {
    font-weight: bold;
    margin-bottom: 0.1em;
    font-size: 0.7em;
    white-space: nowrap;
}

.slot-reserved {
    opacity: 0.6;
    background-color: #f5f5f5;
    pointer-events: none;
}

/* Style dla wygaśniętych slotów */
.slot-expired {
    opacity: 0.6;
    background-color: #f1f1f1;
    pointer-events: none;
}

.expired-info {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.5em;
    margin: 0.5em;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    width: auto;
    box-sizing: border-box;
}

/* Separator między dostępnymi a niedostępnymi terminami */
.expired-separator {
    margin: 1.5em 0;
    padding: 0.5em;
    background-color: #f8d7da;
    border-radius: 4px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.expired-separator h3 {
    margin: 0;
    color: #721c24;
    font-size: 1em; /* Zmniejszono z 1.1em */
    word-wrap: break-word; /* Umożliwia zawijanie długiego tekstu */
}


/* Poprawka dla stylów przycisków w slotach dla widoku mobilnego */

/* Zwiększenie wysokości przycisków w slotach */
.slot-button {
    display: block;
    width: 100%;
    padding: 0.25em 0.1em !important; /* Zwiększone wypełnienie w pionie */
    margin-top: 0.1em;
    font-size: 0.75em !important; /* Zwiększony rozmiar czcionki */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    min-height: 24px !important; /* Minimalna wysokość przycisku */
    line-height: 1.2 !important; /* Większy odstęp między liniami tekstu */
}

.btn-primary.slot-button, 
.btn-secondary.slot-button {
    padding: 0.2em 0.1em !important; /* Zwiększone wypełnienie */
    height: auto !important; /* Automatyczna wysokość zamiast stałej */
    min-height: 24px !important; /* Minimalna wysokość */
    line-height: 1.2 !important; /* Większa wysokość linii */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
    vertical-align: middle;
    display: flex !important; /* Zmiana na flexbox */
    align-items: center;
    justify-content: center;
}


.btn-secondary.slot-button {
    font-size: 0.65em;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}




/* Styl dla informacji o godzinie granicznej rezerwacji */
.reservation-time-info {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
    padding: 0.5em;
    border-radius: 4px;
    margin-bottom: 1.5em;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em; /* Dodane dla lepszej czytelności na mobilnych */
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------- */
/* STYLE DLA STRON STATUSU - używane w status rezerwacji */
/* --------------------------------------------------- */
.reservation-status {
    margin: 1.5em 0; /* Zmniejszony z 2em */
    padding: 1.2em; /* Zmniejszony z 1.5em */
    border-radius: 8px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.status-icon {
    font-size: 2.5em; /* Zmniejszony z 3em */
    margin-bottom: 0.5em;
}

.status-oczekujaca .status-icon {
    color: #ffc107;
}

.status-potwierdzona .status-icon {
    color: #28a745;
}

.status-anulowana .status-icon {
    color: #dc3545;
}

/* --------------------------------------------------- */
/* STYLE DLA SZCZEGÓŁÓW REZERWACJI - używane na stronie statusu i potwierdzenia anulowania */
/* --------------------------------------------------- */
.reservation-details {
    margin: 1.5em 0; /* Zmniejszony z 2em */
    padding: 1.2em; /* Zmniejszony z 1.5em */
    background-color: #f8f9fa;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.detail-row {
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5em;
    margin-bottom: 0.5em; /* Dodane dla układu kolumnowego */
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    font-weight: bold;
    width: 100%; /* Zmienione z 150px dla układu mobilnego */
    flex-shrink: 0;
    margin-bottom: 0.25em; /* Dodane dla układu kolumnowego */
}

.detail-value {
    flex-grow: 1;
    word-wrap: break-word; /* Umożliwia zawijanie długiego tekstu */
}

.confirmation-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1em;
    border-radius: 8px;
    margin: 1.5em 0; /* Zmniejszony z 2em */
    text-align: center;
    font-weight: bold;
    font-size: 1em; /* Zmniejszony z 1.1em */
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------- */
/* STYLE DLA USTAWIEŃ - używane w panelu ustawień */
/* --------------------------------------------------- */
.ustawienia-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Zmienione z 400px na 280px */
    gap: 1em;
    margin-top: 1em;
    width: 100%;
}

.ustawienia-item {
    background-color: #f8f9fa;
    padding: 1em;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
}

.ustawienia-item label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.ustawienia-item input {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.ustawienia-item small {
    display: block;
    margin-top: 0.5em;
    color: #6c757d;
    font-size: 0.8em;
}

/* Styl dla informacji o restarcie */
.restart-info {
    margin-top: 1.5em; /* Zmniejszony z 2em */
    padding: 1em;
    background-color: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    border-left: 4px solid #0c5460;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------- */
/* STYLE DLA STRONY GŁÓWNEJ I LOGOWANIA */
/* --------------------------------------------------- */
/* Styl dla formularza logowania */
.login-form {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5em;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-sizing: border-box;
}

.password-reset-link {
    display: inline-block;
    color: #007BFF;
    text-decoration: none;
    margin-top: 10px;
    font-size: 0.9em;
}

.password-reset-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Style dla strony głównej */
.search-box {
    margin: 1.5em 0; /* Zmniejszone z 2em */
    padding: 1.2em; /* Zmniejszone z 1.5em */
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.search-form {
    display: flex;
    flex-direction: column; /* Zmiana na układ kolumnowy dla mobilnych */
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.search-input {
    flex-grow: 1;
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px; /* Zmienione dla układu kolumnowego */
    font-size: 1em;
    margin-bottom: 0.5em; /* Dodane dla układu kolumnowego */
    width: 100%;
    box-sizing: border-box;
}

.search-button {
    padding: 0.5em 1em;
    background-color: #007BFF;
    border: 1px solid #007BFF;
    border-radius: 4px; /* Zmienione dla układu kolumnowego */
    color: white;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

.search-button:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Zmienione z 250px */
    gap: 1.5em; /* Zmniejszone z 2em */
    margin-top: 2em; /* Zmniejszone z 3em */
    width: 100%;
}

.feature-card {
    text-align: center;
    padding: 1.2em; /* Zmniejszone z 1.5em */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    color: #007BFF;
}

/* Inne elementy strony głównej */
.message {
    text-align: center;
    margin-top: 1em;
    font-weight: bold;
    color: green;
}

.footer {
    text-align: center;
    padding: 1.5em; /* Zmniejszone z 2em */
    margin-top: 2em; /* Zmniejszone z 3em */
    color: #6c757d;
    font-size: 0.9em;
}

/* --------------------------------------------------- */
/* STYLE DLA ARCHIWUM */
/* --------------------------------------------------- */
.fa-archive {
    color: #6c757d;
}

.admin-archiwum-header {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 8px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.archive-badge {
    background-color: #6c757d;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-left: 5px;
}

/* Komunikat informacyjny */
.info-message {
    background-color: #cce5ff;
    color: #004085;
    border-left: 4px solid #007bff;
    font-weight: bold;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* Stylizacja dla zakazu anulowania */
.btn-disabled.limit-message {
    cursor: not-allowed;
    background-color: #6c757d;
    color: #f8f9fa;
    position: relative;
}

.btn-disabled.limit-message:hover::after {
    content: "Nie można anulować na mniej niż 60 minut przed pierwszym spotkaniem nauczyciela w danym dniu";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    padding: 8px;
    background-color: #343a40;
    color: #fff;
    border-radius: 4px;
    font-size: 0.85em;
    pointer-events: none;
    z-index: 100;
    margin-bottom: 5px;
}

/* Stylizacja dla przycisku powrotu */
.btn-return {
    display: inline-block;
    padding: 8px 15px;
    margin-top: 15px;
    margin-bottom: 5px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-return:hover {
    background-color: #5a6268;
    color: white;
}

/* Animacja przekierowania */
.redirect-countdown {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #5a6268;
}

.countdown-number {
    font-weight: bold;
    font-size: 1.2em;
    color: #dc3545;
}

/* Poprawki dla przycisków na stronie anulowania */
.button-pair {
  display: flex;
  flex-direction: row !important; /* Wymuszenie poziomego układu */
  justify-content: center;
  gap: 1em;
  margin-top: 1.5em;
  flex-wrap: wrap;
  width: 100%;
}

.button-pair form {
  margin: 0;
  padding: 0;
}

.button-pair .btn,
.button-pair form .btn {
  min-width: 180px;
  margin-bottom: 0.5em;
  white-space: nowrap;
}

/* Poprawki dla przycisków w tabelach */
.admin-wyniki-rezerwacji-table .action-buttons {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  max-width: 70px !important; /* Ograniczenie szerokości kolumny akcji */
}

.admin-wyniki-rezerwacji-table th:nth-child(10),
.admin-wyniki-rezerwacji-table td:nth-child(10) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  white-space: nowrap !important;
  padding: 2px !important;
}

.admin-wyniki-rezerwacji-table .action-buttons .btn-xs {
  padding: 0.15rem 0.3rem !important;
  font-size: 0.7rem !important;
  line-height: 1.2 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  white-space: nowrap !important;
}

/* Poprawka dla przycisków w kolumnie akcji w edycji rekordów */
.edit-table .action-buttons {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 2px !important;
  width: auto !important;
  max-width: 70px !important;
}

.edit-table th:nth-child(2),
.edit-table td:nth-child(2) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  white-space: nowrap !important;
  padding: 2px !important;
}

/* Wspólne style dla wszystkich przycisków akcji */
.btn-icon {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Media queries dla małych ekranów */
@media (max-width: 767px) {
  .button-pair {
    flex-direction: column !important;
    align-items: center;
  }
  
  .button-pair .btn,
  .button-pair form .btn {
    width: 100%;
    max-width: 250px;
  }
}

/* Dodaj na końcu pliku style.css */

/* --------------------------------------------------- */
/* STYLE DLA KOLUMNY SALA W TABELACH REZERWACJI */
/* --------------------------------------------------- */

/* Specyficzne style dla kolumny Sala - zmniejszona szerokość i tooltip na hover */
.admin-wyniki-rezerwacji-table th:nth-child(6),
.admin-wyniki-rezerwacji-table td:nth-child(6) {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative; /* Potrzebne dla pozycjonowania tooltipa */
}

/* Tooltip pokazujący pełną zawartość komórki na hover */
.admin-wyniki-rezerwacji-table td:nth-child(6):hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: -30px;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 100;
    white-space: nowrap;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    pointer-events: none; /* Zapobiega "migotaniu" tooltipa */
}

/* Strzałka pod tooltipem */
.admin-wyniki-rezerwacji-table td:nth-child(6):hover::before {
    content: "";
    position: absolute;
    left: 20px;
    top: -10px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    z-index: 100;
    pointer-events: none;
}

/* Poprawka dla zachowania przy zwijaniu się tabeli na małych ekranach */
@media (max-width: 767px) {
    .admin-wyniki-rezerwacji-table th:nth-child(6),
    .admin-wyniki-rezerwacji-table td:nth-child(6) {
        /* Wciąż ukrywaj kolumnę na bardzo małych ekranach */
        display: none;
    }
}

/* Poprawka dla większych ekranów - pokazuj tooltip tylko gdy zawartość jest obcięta */
@media (min-width: 1200px) {
    /* Pokazuj tooltip tylko gdy tekst jest ucięty (overflow) */
    .admin-wyniki-rezerwacji-table td:nth-child(6):hover::after {
        max-width: 300px; /* Maksymalna szerokość tooltipa */
    }
}

/* --------------------------------------------------- */
/* RESPONSYWNOŚĆ - style dla różnych rozmiarów ekranu */
/* --------------------------------------------------- */
@media (min-width: 768px) {
    /* Przywrócenie poziomego układu dla form filtrowania na większych ekranach */
    .filter-container {
        flex-direction: row;
        align-items: center;
    }
    
    .filter-form {
        flex-direction: row;
    }
    
    .filter-group {
        flex-direction: row;
        align-items: center;
    }
    
    .filter-left {
        flex-direction: row;
        margin-bottom: 0;
    }
    
    .filter-right {
        margin-left: auto;
    }
    
    /* Przywrócenie poziomego układu dla menu */
    .admin-nav {
        flex-direction: row;
    }
    
    .admin-nav .user-info {
        text-align: left;
        margin-bottom: 0;
        width: auto;
    }
    
    .admin-nav .nav-links {
        justify-content: flex-end;
        width: auto;
    }
    
    .admin-nav .nav-links a {
        flex-grow: 0;
    }
    
    /* Przywrócenie poziomego układu dla szczegółów rezerwacji */
    .detail-row {
        flex-direction: row;
    }
    
    .detail-label {
        width: 150px;
        margin-bottom: 0;
    }
    
    /* Poziomy układ dla przycisków modalu */
    .modal-buttons {
        flex-direction: row;
    }
    
    /* Przywrócenie poziomego układu dla formularzy wyszukiwania */
    .search-form {
        flex-direction: row;
    }
    
    .search-input {
        border-radius: 4px 0 0 4px;
        margin-bottom: 0;
    }
    
    .search-button {
        border-radius: 0 4px 4px 0;
        width: auto;
    }
    
    /* Przywrócenie poziomego układu dla paska statusu użytkownika */
    .user-status-bar p {
        text-align: right;
    }
    
    /* Dostosowanie wizualne do większych ekranów */
    .system-title h1 {
        font-size: 1.8em;
    }
    
    .system-title h2 {
        font-size: 1.3em;
    }
    
    .container {
        padding: 2em;
        margin: 2em auto;
    }
    
    .expired-separator h3 {
        font-size: 1.1em;
    }
    
    /* Układ przycisków akcji na większych ekranach */
    .action-buttons {
        flex-wrap: nowrap;
    }
}

@media (min-width: 992px) {
    /* Siatka slotów na większych ekranach - więcej kolumn */
    .sloty-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    /* Informacje o spotkaniu - 4 kolumny na większych ekranach */
    .spotkanie-info-item {
        min-width: 0;
    }
    
    .spotkanie-info-grid {
        flex-wrap: nowrap;
    }
    
    /* Większe odstępy w menu na dużych ekranach */
    .admin-nav .nav-links {
        gap: 0.8em;
    }
    
    .admin-nav .nav-links a {
        padding: 0.6em 1em;
        font-size: 0.95em;
    }
    
    /* Większy rozmiar czcionki dla tabel na dużych ekranach */
    table {
        font-size: 0.875em;
    }
}

@media (min-width: 1200px) {
    /* Maksymalna liczba kolumn slotów na bardzo dużych ekranach */
    .sloty-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

@media (max-width: 767px) {
    /* Specjalne dostosowania dla bardzo małych ekranów */
    
    /* Jeszcze mniejsza siatka slotów na telefonach */
    .sloty-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Większe przyciski na telefonach dla łatwiejszego dotykania */
    .btn, 
    button[type="submit"],
    input[type="submit"] {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    /* Pełna szerokość przycisków akcji na telefonach */
    .action-buttons a,
    .action-buttons button {
        width: 100%;
        margin-bottom: 0.5em;
        text-align: center;
    }
    
    /* Mniejszy nagłówek i uproszczone menu */
    header {
        padding: 1em 0.5em;
    }
    
    /* Bardziej kompaktowe formularze na telefonach */
    label {
        font-size: 0.9em;
    }
    
    /* Mniejszy odstęp dla przycisku w modalach na telefonach */
    .modal-content {
        padding: 10px;
        margin-top: 40px;
    }
    
    /* Większa interakcja dla przycisków na ekranach dotykowych */
    .btn:active, 
    button[type="submit"]:active,
    input[type="submit"]:active {
        transform: scale(0.98);
    }
    
    /* Ukrywanie mniej istotnych elementów w tabelach */
    .admin-wyniki-rezerwacji-table th:nth-child(6),
    .admin-wyniki-rezerwacji-table td:nth-child(6) {
        display: none; /* Ukrycie kolumny Sala */
    }
}

@media (max-width: 480px) {
    /* Specjalne dostosowania dla najmniejszych ekranów */
    
    /* Jeszcze mniejsze fonty */
    body {
        font-size: 14px;
    }
    
    /* Bardziej kompaktowy nagłówek */
    .system-title h1 {
        font-size: 1.4em;
    }
    
    .system-title h2 {
        font-size: 1em;
    }
    
    /* Tylko najpotrzebniejsze informacje w tabelach */
    .admin-wyniki-rezerwacji-table th:nth-child(8),
    .admin-wyniki-rezerwacji-table td:nth-child(8) {
        display: none; /* Ukrycie kolumny Email */
    }
    
    /* Większe przyciski dla łatwiejszego dotykania */
    .btn, 
    button[type="submit"],
    input[type="submit"] {
        padding: 0.6rem;
    }
    
    /* Bardziej kompaktowe menu */
    .admin-nav .nav-links a {
        font-size: 0.8em;
        padding: 0.5em;
    }
}
/* --------------------------------------------------- */
/* STYLE DLA ARCHIWUM */
/* --------------------------------------------------- */
.fa-archive {
    color: #6c757d;
}

.admin-archiwum-header {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 8px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.archive-badge {
    background-color: #6c757d;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-left: 5px;
}

.past-meeting-row {
    background-color: #f9f9f9;
    color: #6c757d;
}

/* Dodanie specjalnych stylów dla małych ekranów */
@media (max-width: 767px) {
    .slot-button {
        font-size: 0.8em !important; /* Jeszcze większy tekst na małych ekranach */
        padding: 0.3em 0.2em !important; /* Większe wypełnienie */
        min-height: 28px !important; /* Większa minimalna wysokość */
    }
    
    .btn-primary.slot-button, 
    .btn-secondary.slot-button {
        min-height: 28px !important; /* Większa minimalna wysokość */
    }
    
    /* Zwiększymy wysokość slota, żeby przyciski miały więcej miejsca */
    .slot {
        padding: 0.4em 0.2em !important;
        min-height: 60px !important; /* Minimalna wysokość slotu */
    }
    
    /* Zmiana układu slotów dla lepszej czytelności na telefonach */
    .sloty-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Zawsze 2 kolumny na telefonach */
        gap: 0.5em !important; /* Większy odstęp między slotami */
    }
}
