/* ============================================================
   1. IMPORT CZCIONEK I BAZA (Z SB ADMIN 2)
   ============================================================ */
@import url('https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i');

body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #858796; /* Szary kolor tekstu typowy dla SB Admin */
    background-color: #f8f9fc; /* Jasne tło */
    text-align: left;
}

.logo-slot {
    position: absolute;
    top: 16px;
    left: 16px;
    height: 64px;
    width: 160px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    background: #f8f9fc;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

.logo-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.with-logo {
    padding-top: 90px;
    padding-left: 16px;
}

/* ============================================================
   2. NAGŁÓWKI (H1 - H6)
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 400;
    line-height: 1.2;
    color: #5a5c69; /* Ciemniejszy szary dla nagłówków */
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

/* Linki w stylu SB Admin */
a {
    color: #4e73df;
    text-decoration: none;
    background-color: transparent;
}
a:hover {
    color: #224abe;
    text-decoration: underline;
}

/* ============================================================
   3. TABELE (DLA PLIKÓW STUDENTS.HTML, PRZEDMIOTY.HTML)
   ============================================================ */
table {
    width: 100%;
    margin-bottom: 1rem;
    color: #858796;
    border-collapse: collapse; /* Usuwa podwójne linie */
    background-color: #fff;    /* Białe tło tabeli */
    border: 1px solid #e3e6f0; /* Delikatna ramka dookoła */
}

th, td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #e3e6f0; /* Linie poziome */
}

th {
    text-align: inherit;
    background-color: #f8f9fc; /* Lekko szare tło nagłówków tabeli */
    color: #4e73df; /* Niebieski tekst nagłówków */
    font-weight: bold;
    border-bottom: 2px solid #e3e6f0;
}

/* Efekt najechania myszką na wiersz */
tbody tr:hover {
    background-color: #f8f9fc; 
}

/* ============================================================
   4. FORMULARZE I PRZYCISKI (UNOWOCZEŚNIENIE)
   ============================================================ */
input[type="text"], 
input[type="password"], 
input[type="email"], 
select, 
textarea {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem; /* Lekkie zaokrąglenie */
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    margin-bottom: 15px; /* Odstęp pod polem */
    box-sizing: border-box; /* Żeby padding nie psuł szerokości */
}


input:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78,115,223,.25);
}

button {
    cursor: pointer;
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #4e73df;
    border: 1px solid #4e73df;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.35rem;
    transition: color .15s, background-color .15s, border-color .15s;
}

button:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn {
    cursor: pointer;
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #4e73df;
    border: 1px solid #4e73df;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.35rem;
    text-decoration: none;
}

.btn-secondary {
    background-color: #ffc853;
    border-color: #ffc853;
}

.btn-danger {
    background-color: rgb(255, 0, 0);
    border-color: rgb(255, 0, 0);
}

.btn-back {
    background-color: #ff5f5f;
    border-color: #ff5f5f;
    color: #fff;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 10px 0 20px;
}

.page-actions-left {
    justify-content: flex-start;
}

/* ============================================================
   5. TWOJE STYLE DLA LOGIN.HTML
   ============================================================ */

.container {
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

/* Centrowanie kontenera logowania - kluczowe dla login.html */
body > .container {
    padding-top: 50px; 
}

/* Obsługa komunikatów błędów z Twojego htmla */
.error-box {
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1px solid #ffecb5;
    border-radius: 0.35rem;
    color: #664d03;
    background-color: #fff3cd;
    text-align: left;
}

.error-msg {
    padding: 6px 10px;
    margin-top: -6px;
    margin-bottom: 12px;
    border: 1px solid #ffecb5;
    border-radius: 0.35rem;
    color: #664d03;
    background-color: #fff3cd;
    font-size: 0.9rem;
}

/* Etykiety formularzy */
label {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #5a5c69;
    font-weight: 600;
}

/* --- Efekty dla wszystkich przycisków --- */

/* 1. Baza: Ustawiamy płynną animację (transition) */
button, .btn, .btn-add, .btn-edit, .btn-delete, .logout {
    transition: all 0.2s ease-in-out; /* Czas trwania animacji: 0.2s */
    color: white; /* Wymuszenie białego tekstu */
}

/* 2. Hover: Przyciemnienie dowolnego tła o 15% */
button:hover, .btn:hover, .btn-add:hover, .btn-edit:hover, .btn-delete:hover, .logout:hover {
    filter: brightness(85%);       /* To robi "magiczną" robotę ściemniania */
    transform: translateY(-2px);   /* Opcjonalnie: guzik lekko unosi się do góry */
    text-decoration: none;         /* Usuwa podkreślenie linków */
}

/* --- KOLORY PRZYCISKÓW --- */
.btn-add {
    background-color: navy;
    color: white; /* Dla pewności */
}

.btn-edit {
    background-color: orange;
    color: white;
}

.btn-delete {
    background-color: rgb(255, 0, 0);
    color: white;
}
