/* RESET I TYPOGRAFIA */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5; /* Bardzo jasne tło */
    color: #333;
   
}
table{
     font-size: 1em
}
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #007BFF; /* Akcent na linki */
}

/* HEADER - GÓRNY PASEK */
.main-header {
    background-color: #ffffff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Delikatny cień */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007BFF; /* Logo w kolorze akcentowym */
}

.logo i {
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.logout-btn {
    margin-left: 20px;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: #dc3545; /* Czerwony dla wylogowania */
    color: white !important;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* GŁÓWNA STRUKTURA */
.main-container {
    display: flex;
    min-height: calc(100vh - 70px); /* Cała wysokość widoku minus header */
}

/* SIDEBAR - PASEK BOCZNY */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar ul {
    list-style: none;
}

.sidebar li a {
    display: block;
    padding: 15px 25px;
    color: #555;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar li a i {
    margin-right: 10px;
    width: 20px; /* Dla lepszego wyrównania ikon */
}

.sidebar li a:hover {
    background-color: #e9ecef;
    color: #007BFF;
}

/* AKTYWNA ZAKŁADKA */
.sidebar li.active a {
    background-color: #007BFF;
    color: white;
    font-weight: 700;
    border-left: 5px solid #28a745; /* Mały akcent graficzny */
    padding-left: 20px;
}

/* CONTENT - GŁÓWNA TREŚĆ */
.content {
    flex-grow: 1; /* Zajmuje resztę dostępnej przestrzeni */
    padding: 30px;
}

.content-panel {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* STYLY DLA PRZYCISKÓW OGÓLNYCH */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007BFF;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* STYLIZACJA PRZYKŁADOWEGO FORMULARZA */
.file-upload-form {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
}

/* nauczyciel_prace.php */

        /* Kolory główne */
        :root {
            --primary-color: #555555; /* Główna szarość */
            --secondary-color: #777777;
            --background-light: #f5f5ff;
            --text-dark: #333333;
            --sidebar-bg: #444444;
            --header-bg: #333333;
        }
       
        .submissions-filter { 
            margin-bottom: 25px; 
            padding: 15px; 
            background-color: #f0f0f0; 
            border-radius: 6px; 
        }
        .submissions-filter select, .submissions-filter button { 
            padding: 10px; 
            margin-right: 15px; 
            border: 1px solid #ccc; 
            border-radius: 4px; 
        }
        .submission-group { 
            margin-bottom: 30px; 
            border: 1px solid #ddd; 
            border-radius: 6px; 
            overflow: hidden; 
        }
        .submission-group h3 { 
            background-color: #444444; 
            color: white; 
            padding: 12px 15px; 
            margin: 0; 
            font-size: 1.1em; 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
        }
        .submission-group table { 
            width: 100%; 
            border-collapse: collapse; 
            background-color: white; 
        }
        .submission-group th, .submission-group td { 
            padding: 12px 15px; 
            border-bottom: 1px solid #eee; 
            text-align: left; 
        }
        .submission-group th { 
            background-color: #f7f7f7; 
            font-weight: bold; 
        }
        .download-btn-small { 
            padding: 6px 12px; 
            font-size: 0.9em; 
        }
        .status-message { 
            padding: 15px; 
            margin-bottom: 20px; 
            border-radius: 4px; 
            font-weight: bold; 
            display: flex; 
            align-items: center; 
        }
        .success-message { 
            background-color: #d4edda; 
            color: #155724; 
            border: 1px solid #c3e6cb; 
        }
        .error-message { 
            background-color: #f8d7da; 
            color: #721c24; 
            border: 1px solid #f5c6cb; 
        }
        .status-message i { 
            margin-right: 10px; 
            font-size: 1.2em; 
        }
                /* Style specyficzne dla Zarządzania Materiałami nauczyciel_materialy.php*/
        .materials-filter { margin-bottom: 25px; padding: 15px; background-color: #f0f0f0; border-radius: 6px; display: flex; align-items: center; }
        .materials-filter select, .materials-filter button { padding: 10px; margin-right: 15px; border: 1px solid #ccc; border-radius: 4px; }
        .upload-form-panel { margin-top: 30px; border: 1px solid #ddd; padding: 20px; border-radius: 6px; }
        .upload-form-panel h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
        .upload-form-panel input[type="file"], .upload-form-panel input[type="text"] { margin-right: 15px; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
        
        .materials-list table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        .materials-list th, .materials-list td { padding: 12px 15px; border-bottom: 1px solid #eee; text-align: left; }
        .materials-list th { background-color: #f7f7f7; font-weight: bold; }
        .btn-delete { background-color: #dc3545; padding: 6px 12px; font-size: 0.9em; }
        .btn-delete:hover { background-color: #c82333; }

        /* panelucznia.php */
        /* Style dla formularza i statusów */
        .file-upload-form h4 { margin-top: 0; margin-bottom: 10px; color: #333; }
        .subject-radio-group { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; background-color: #f9f9f9; }
        .subject-radio-label { display: flex; align-items: center; cursor: pointer; font-weight: normal; }
        .subject-radio-label input[type="radio"] { margin-right: 5px; width: 15px; height: 15px; }
        .file-upload-form input[type="file"] { display: block; margin: 10px 0 20px 0; padding: 10px 0; width: 100%; box-sizing: border-box; border: none; }
        .status-message { padding: 15px; margin-bottom: 20px; border-radius: 4px; font-weight: bold; display: flex; align-items: center; }
        .success-message { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
        .error-message { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
        .status-message i { margin-right: 10px; font-size: 1.2em; }

        /* Style dla listy plików */
        .file-list-container { margin-top: 30px; }
        .subject-group { margin-bottom: 40px; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
        .subject-group h3 { background-color: #007bff; color: white; padding: 15px; margin: 0; font-size: 1.3em; display: flex; align-items: center; }
        .subject-group h3 i { margin-right: 10px; }
        .file-table { width: 100%; border-collapse: collapse; background-color: white; overflow: visible;}
        .file-table th, .file-table td { padding: 12px 15px; border-bottom: 1px solid #eee; text-align: left; }
        .file-table th { background-color: #f4f4f4; font-weight: bold; color: #333; }
        .delete-btn { background: none; border: none; color: #dc3545; cursor: pointer; font-size: 1em; }
        .delete-btn:hover { text-decoration: underline; }
        .btn-download { background-color: #28a745; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; font-size: 0.9em; text-decoration: none; display: inline-block; }  
        
        /* formularz zmiany hasła */
/*
 * Minimalistyczne style dla fragmentu formularza zmiany hasła.
 * Zapewnia stałą wysokość sekcji walidacji i płynne przejścia.
 */

.login-container {
    width: 400px;
    padding: 40px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    /* Domyślny margines po wstawieniu jako fragment */
    margin: 20px auto; 
}

.login-container h1 {
    color: #007BFF;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* Ujednolicenie stylu inputów dla hasła i tekstu jawnego (podgląd) */
.login-container input[type="password"],
.login-container input[type="text"] {
    width: 100%;
    padding: 12px;
    /* Zmniejszono odstęp, bo sekcja walidacji jest teraz na dole */
    margin-bottom: 15px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    height: 44px;
}

/* Kontener dla inputów hasła (dla ikony) */
.password-container {
    position: relative;
    /* Utrzymanie odstępu między polami */
    margin-bottom: 15px;
}

.password-container input {
    /* Mniejszy margines na dole, bo jest resetowany globalnie */
    margin-bottom: 0 !important; 
    /* Miejsce na ikonę */
    padding-right: 40px; 
}

.toggle-password {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    color: #007BFF;
}

/* --- Sekcja Komunikatów Walidacyjnych (POD PRZYCISKIEM) --- */

/* Kontener Stałej Wysokości (zapobiega skokom formularza) */
#validation-area-wrapper {
    /* Ustaw minimalną wysokość na stałą wartość */
    min-height: 140px; 
    margin-top: 15px; 
    text-align: left;
    overflow: hidden;
    
    /* DODANE: Domyślnie ukrywamy cały kontener walidacji */
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    transition: all 0.3s ease-in-out; 
}

/* Klasa do pokazywania kontenera walidacji (aktywna) */
.validation-visible {
    opacity: 1 !important;
    max-height: 140px !important; /* Maksymalna wysokość równa min-height, aby kontrolować przestrzeń */
    margin-top: 15px !important;
}

/* Tytuł listy wymagań */
#validation-area-wrapper h3 {
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* Komunikaty o błędach i sukcesie (style ogólne, mogą być na górze) */
.error-message, .success-message {
    margin-bottom: 15px;
    font-weight: 700;
    padding: 10px;
    border-radius: 4px;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
/* Styl dla błędu walidacji na dole */
#password-error.validation-output {
    margin-bottom: 10px; 
    margin-top: 5px;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Lista Wymagań Hasła */
#password-requirements {
    list-style: none;
    padding: 0;
    margin-top: 5px;
    margin-bottom: 5px; 
    text-align: left;
    font-size: 0.9em;
    
    /* Ustawienia dla animacji */
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
    transition: all 0.3s ease-in-out; 
}

/* Klasa używana do ukrywania listy z animacją (ustawiana przez JS) */
.requirements-hidden {
    opacity: 0 !important;
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

#password-requirements li {
    color: #dc3545;
    line-height: 1.6;
}

#password-requirements li.valid {
    color: #28a745;
}

.file-table td {
        vertical-align: middle; /* Wyśrodkowanie w pionie */
        padding: 12px 8px;
    }
    .download-btn-fixed {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0 !important;
        border-radius: 4px;
        background-color: #007bff;
        color: white;
        text-decoration: none;
    }
    .action-column {
        width: 60px;
        text-align: center;
    }

.submissions-filter form {
        display: grid;
        /* Trzy kolumny dla selectów i jedna dla przycisku */
        grid-template-columns: repeat(3, 1fr) auto; 
        gap: 20px;
        align-items: end;
        background: #fdfdfd;
        padding: 20px;
        border-radius: 8px;
        border: 1px solid #eee;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .filter-group label {
        font-weight: 600;
        font-size: 0.9em;
        color: #555;
    }

    .filter-group select {
        width: 100%;
        height: 42px;
        padding: 5px 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    .filter-group select:disabled {
        background-color: #f5f5f5;
        cursor: not-allowed;
    }

    .btn-filter {
        height: 42px;
        padding: 0 25px;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
    }

    /* RWD: na mniejszych ekranach przejdź do dwóch wierszy */
    @media (max-width: 992px) {
        .submissions-filter form {
            grid-template-columns: 1fr 1fr;
        }
    }
    
    .student-download-box {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
}
.btn-student-all {
    color: #28a745;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-student-all:hover {
    color: #218838;
}