* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e40af, #1e293b);
    background-color: #f1f5f9;
    color: #f8fafc;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ===================== NAVBAR ===================== */

.navbar {
    background-color: #ffffff;
    padding: 10px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

.nav-links a.admin-link {
    color: #dc2626;
    font-weight: bold;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-actions span {
    color: #475569;
    font-size: 14px;
}

/* ===================== PRZYCISKI ===================== */

.btn {
    text-decoration: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.btn-login {
    background-color: #22c55e;
}

.btn-login:hover {
    background-color: #16a34a;
}

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

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

.btn-student-panel {
    background-color: #56d94f;
}

.btn-student-panel:hover {
    opacity: 0.9;
}

.btn--oceny {
    background: #2563eb;
    padding: 6px 10px;
    font-size: 11px;
    margin-left: 2px;
}

.btn--obecnosc {
    background: #f59e0b;
    padding: 6px 10px;
    font-size: 11px;
    margin-left: 2px;
}

.btn--uwagi {
    background: #ef4444;
    padding: 6px 10px;
    font-size: 11px;
    margin-left: 2px;
}

.btn-ok {
    background: #16a34a;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-usun,
.btn-delete {
    background: #dc2626;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-delete {
    padding: 5px 10px;
}

.btn-delete:hover {
    background: #b91c1c;
}

.btn-submit,
button[type="submit"] {
    margin-top: 10px;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover,
button[type="submit"]:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-submit-all {
    background: #2563eb;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-submit-all:hover {
    background: #1d4ed8;
}

/* ===================== HERO ===================== */

.hero {
    text-align: center;
    padding: 50px 20px 30px;
}

.hero img {
    max-height: 120px;
    margin-bottom: 20px;
}

.hero h1 {
    color: white;
    font-size: 36px;
    margin-bottom: 10px;
}

.hero p {
    color: #cbd5e1;
    font-size: 18px;
}

/* ===================== BANER ===================== */

.baner-wrapper {
    max-width: 1000px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.baner-slider {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.baner-slide {
    min-width: 100%;
}

.baner-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.baner-dots {
    text-align: center;
    margin: 10px 0;
}

.baner-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    margin: 0 4px;
    cursor: pointer;
    transition: 0.3s;
}

.baner-dots span.active {
    background: white;
}

/* ===================== KARTY GŁÓWNE ===================== */

.karty {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.karta {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    color: white;
    transition: 0.3s;
}

.karta:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.18);
}

.karta .ikona {
    font-size: 36px;
    margin-bottom: 12px;
}

/* ===================== INFO BAR ===================== */

.info-bar {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    margin-top: 40px;
}

.info-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 140px;
    height: 120px;
}

.info-item--szczesliwy {
    background: rgba(251, 191, 36, 0.15);
    border: 2px solid #fbbf24;
    border-radius: 15px;
}

.liczba {
    font-size: 28px;
    font-weight: bold;
    color: #60a5fa;
    display: block;
    margin: 0;
    line-height: 1;
}

.liczba--szczesliwy {
    color: #fbbf24;
}

.opis {
    font-size: 12px;
    color: #94a3b8;
}

.opis--szczesliwy {
    color: #fbbf24;
    font-weight: bold;
    margin-top: 5px;
}

/* ===================== FORMULARZ ===================== */

.form-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
}

.form-card {
    background: white;
    max-width: 400px;
    width: 600px;
    margin: auto;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    color: #1e293b;
}

.form-card h1 {
    text-align: center;
    margin-bottom: 10px;
}

.form-card p {
    text-align: center;
    color: #64748b;
    margin-bottom: 25px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-size: 14px;
    font-weight: bold;
    color: #374151;
}

input,
select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
    font-size: 14px;
    width: 100%;
    transition: 0.3s;
}

input:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
}

.form-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.form-switch a {
    color: #2563eb;
    text-decoration: none;
    font-weight: bold;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* ===================== PANEL ADMINA ===================== */

.admin-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.admin-title {
    color: white;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 5px;
}

.admin-subtitle {
    color: #cbd5e1;
    margin-bottom: 25px;
    font-size: 14px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.tab-btn:hover,
.tab-btn.active {
    background: white;
    color: #2563eb;
    font-weight: bold;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: #1e293b;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 18px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-admin {
    background: #fee2e2;
    color: #dc2626;
}

.badge-nauczyciel {
    background: #dbeafe;
    color: #2563eb;
}

.badge-uczen {
    background: #dcfce7;
    color: #16a34a;
}

/* ===================== PRZEDMIOTY ===================== */

.przedmioty-pole {
    display: none;
    flex-direction: column;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 10px 0;
}

.przedmioty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.chk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
}

.chk-item input {
    width: auto !important;
    margin: 0;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* ===================== PLAN LEKCJI (ADMIN) ===================== */

.grid-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.plan-visual-wrapper {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.timetable-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 5px;
    min-width: 700px;
}

.tt-header {
    background: #1e40af;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 4px;
}

.tt-time-col {
    background: #f1f5f9;
    padding: 10px;
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    border-right: 2px solid #cbd5e1;
}

.tt-cell {
    background: white;
    border: 1px solid #e2e8f0;
    min-height: 60px;
    padding: 5px;
    position: relative;
}

.lesson-block {
    background: #dbeafe;
    border-left: 4px solid #2563eb;
    padding: 5px;
    font-size: 11px;
    border-radius: 4px;
    margin-bottom: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.lesson-block b {
    display: block;
    color: #1e40af;
}

.plan-filters {
    display: flex;
    gap: 10px;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
}

/* ===================== ALERTY ===================== */

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-sukces {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.blad-komunikat {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #fecaca;
}

.blad-komunikat-nauczyciel {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dc2626;
}

/* ===================== BOX ===================== */

.box {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid white;
    border-radius: 15px;
    width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box h2 {
    border-bottom: 2px solid #fff;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

/* ===================== ANIMACJE ===================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ===================== SEPARATOR ===================== */

hr.sep {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 24px 0;
}

/* ===================== PANEL UCZNIA ===================== */

.uczen-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.uczen-naglowek {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #1e293b;
    padding: 30px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.uczen-naglowek__imie {
    margin: 0;
    font-size: 28px;
}

.uczen-naglowek__info {
    margin-top: 5px;
    display: flex;
    gap: 15px;
}

.uczen-naglowek__etykieta {
    color: #94a3b8;
    font-size: 16px;
}

.uczen-naglowek__wartosc {
    color: #f8fafc;
}

.uczen-naglowek__numer {
    color: #6366f1;
}

.uczen-naglowek__prawa {
    display: flex;
    gap: 20px;
    align-items: center;
}

.uczen-naglowek__data {
    text-align: right;
}

.uczen-naglowek__data-etykieta {
    display: block;
    font-size: 14px;
    color: #94a3b8;
}

.uczen-naglowek__data-wartosc {
    font-size: 20px;
}

/* ===================== SZCZĘŚLIWY NUMEREK ===================== */

.szczesliwy-numerek {
    background: #334155;
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #475569;
}

.szczesliwy-numerek--aktywny {
    background: #f59e0b;
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.szczesliwy-numerek__etykieta {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: bold;
}

.szczesliwy-numerek--aktywny .szczesliwy-numerek__etykieta {
    color: #fff;
}

.szczesliwy-numerek__liczba {
    font-size: 32px;
    color: #fbbf24;
}

.szczesliwy-numerek__liczba--aktywny {
    color: #fff;
}

.szczesliwy-kafelek {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid #f59e0b;
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.szczesliwy-kafelek__etykieta {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #f59e0b;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.szczesliwy-kafelek__liczba {
    font-size: 28px;
    color: #fbbf24;
}

.banner-szczesliwy {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.banner-szczesliwy__ikona {
    font-size: 40px;
}

.banner-szczesliwy__tytul {
    margin: 0;
    font-size: 20px;
}

.banner-szczesliwy__opis {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.wiersz-szczesliwy {
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #fbbf24;
}

.szczesliwy-etykieta {
    color: #fbbf24;
    font-weight: bold;
    margin-left: 5px;
}

/* ===================== KOMUNIKATY ===================== */

.karta-komunikaty {
    margin-bottom: 30px;
    padding: 25px;
    border-left: 6px solid #6366f1;
    background: #fdfeff;
}

.karta-komunikaty__tytul {
    margin-top: 0;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.karta-komunikaty__ikona {
    font-size: 24px;
}

.karta-komunikaty__lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.komunikat-wpis {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.komunikat-wpis__typ {
    color: white;
    padding: 15px;
    text-align: center;
    min-width: 100px;
}

.komunikat-wpis__data {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.9;
}

.komunikat-wpis__rodzaj {
    font-weight: 800;
    font-size: 13px;
}

.komunikat-wpis__tresc {
    padding: 15px;
    flex: 1;
}

.komunikat-wpis__opis {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.komunikat-wpis__ogolnoszkolny {
    color: #64748b;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.komunikaty-sekcja {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 6px solid #6366f1;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.komunikaty-sekcja__tytul {
    margin-top: 0;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.komunikaty-sekcja__ikona {
    font-size: 22px;
}

.komunikaty-siatka {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.komunikat-karta {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    overflow: hidden;
}

.komunikat-karta__bok {
    width: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
}

.komunikat-karta__data {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
}

.komunikat-karta__rok {
    font-size: 14px;
}

.komunikat-karta__tresc {
    padding: 12px;
    flex: 1;
}

.komunikat-karta__naglowek {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.komunikat-karta__typ {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.komunikat-karta__opis {
    font-size: 14px;
    color: #f1f5f9;
    font-weight: 500;
    line-height: 1.4;
}

.komunikat-karta__szkola {
    margin-top: 5px;
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

/* ===================== PLAN LEKCJI (UCZEN) ===================== */

.karta-plan {
    margin-bottom: 30px;
    padding: 25px;
}

.karta-plan__tytul {
    margin-top: 0;
    color: #6366f1;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 15px;
    font-size: 22px;
}

.plan-siatka {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.plan-dzien {
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.plan-dzien__nazwa {
    text-align: center;
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 5px;
}

.plan-dzien__brak {
    text-align: center;
    color: #cbd5e1;
    font-size: 11px;
    margin: 10px 0;
}

.plan-lekcja {
    background: white;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    border-left: 5px solid #6366f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.plan-lekcja__godzina {
    color: #64748b;
    font-weight: 800;
    margin-bottom: 2px;
}

.plan-lekcja__nazwa {
    color: #1e293b;
    font-weight: 600;
    font-size: 13px;
}

/* ===================== PLAN LEKCJI (NAUCZYCIEL) ===================== */

.plan-sekcja {
    background: rgba(30, 41, 59, 0.5);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-sekcja__naglowek {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.plan-sekcja__tytul {
    margin: 0;
}

.plan-sekcja__brak {
    color: #64748b;
    font-style: italic;
}

.plan-dni {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 10px;
}

.plan-dni__link {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.3s;
    color: #94a3b8;
}

.plan-dni__link--aktywny {
    background: #3b82f6;
    color: white;
}

.plan-lista {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.plan-kafelek {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    min-width: 180px;
    border-top: 3px solid #3b82f6;
}

.plan-kafelek__godzina {
    color: #3b82f6;
    font-weight: bold;
    font-size: 0.9rem;
}

.plan-kafelek__klasa {
    font-size: 1.1rem;
    margin: 5px 0;
}

.plan-kafelek__przedmiot {
    font-size: 0.85rem;
    color: #94a3b8;
}

.plan-kafelek__sala {
    font-size: 0.8rem;
    margin-top: 8px;
    color: #64748b;
}

/* ===================== OCENY ===================== */

.karta-oceny {
    padding: 25px;
}

.karta-oceny__tytul {
    margin-top: 0;
    color: #3b82f6;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 15px;
    font-size: 22px;
}

.tabela-oceny {
    width: 100%;
    border-collapse: collapse;
}

.tabela-oceny__naglowek {
    text-align: left;
    color: #94a3b8;
    font-size: 13px;
    border-bottom: 2px solid #f1f5f9;
}

.tabela-oceny__komorka {
    padding: 10px;
}

.tabela-oceny__komorka--centrum {
    text-align: center;
}

.tabela-oceny__wiersz {
    border-bottom: 1px solid #f8fafc;
}

.tabela-oceny__przedmiot {
    padding: 20px 10px;
    font-weight: bold;
    font-size: 16px;
    color: #1e293b;
    width: 160px;
}

.oceny-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ocena-karta {
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    border-top: 4px solid;
    min-width: 110px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ocena-karta__wartosc {
    font-size: 20px;
}

.ocena-karta__waga {
    color: #94a3b8;
    font-size: 12px;
}

.ocena-karta__opis {
    font-size: 13px;
    color: #475569;
    font-weight: 700;
    margin-top: 4px;
}

.ocena-karta__komentarz {
    font-size: 12px;
    color: #6366f1;
    font-style: italic;
    margin-top: 3px;
    line-height: 1.2;
}

.srednia-badge {
    font-size: 22px;
    font-weight: 800;
    color: #1d4ed8;
    background: #eff6ff;
    padding: 8px 15px;
    border-radius: 10px;
}

.srednia-ogolna {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.srednia-ogolna__etykieta {
    font-size: 20px;
    font-weight: 600;
}

.srednia-ogolna__wartosc {
    font-size: 38px;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===================== FREKWENCJA ===================== */

.karta-frekwencja {
    padding: 25px;
    margin-bottom: 30px;
}

.karta-frekwencja__tytul {
    margin-top: 0;
    color: #10b981;
    border-bottom: 2px solid #ecfdf5;
    padding-bottom: 15px;
}

.frekwencja-formularz {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.frekwencja-formularz__pole {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

.frekwencja-formularz__przycisk {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.tabela-frekwencja {
    width: 100%;
    border-collapse: collapse;
}

.tabela-frekwencja__wiersz {
    border-bottom: 1px solid #f1f5f9;
}

.tabela-frekwencja__komorka {
    padding: 12px 0;
}

.tabela-frekwencja__komorka--prawo {
    text-align: right;
}

.tabela-frekwencja__brak {
    text-align: center;
    color: #94a3b8;
    padding: 30px;
    font-size: 13px;
}

.frekwencja-przedmiot {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.frekwencja-lekcja {
    color: #64748b;
    font-size: 11px;
}

.frekwencja-lekcja__nr {
    color: #1e293b;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    border: 1px solid;
}

.status-select {
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 8px;
    border-radius: 6px;
    outline: none;
}

.status-select option[value="obecny"]      { color: #4ade80; }
.status-select option[value="nieobecny"]   { color: #f87171; }
.status-select option[value="spozniony"]   { color: #fbbf24; }

.frekwencja-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* ===================== UWAGI ===================== */

.karta-uwagi {
    padding: 25px;
    border-left: 6px solid #f43f5e;
}

.karta-uwagi__tytul {
    margin-top: 0;
    color: #f43f5e;
    margin-bottom: 20px;
    font-size: 20px;
}

.karta-uwagi__brak {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.uwaga-wpis {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.uwaga-wpis__naglowek {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 5px;
}

.uwaga-wpis__tresc {
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 500;
}

.uwagi-naglowek {
    margin-bottom: 25px;
}

.uwagi-naglowek__tytul {
    margin: 0;
}

.uwagi-naglowek__powrot {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

.uwagi-formularz {
    margin-bottom: 30px;
}

.uwagi-formularz__tytul {
    margin-top: 0;
}

.uwagi-formularz__siatka {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.uwagi-formularz__etykieta {
    color: #94a3b8;
    font-size: 12px;
}

.uwagi-formularz__przycisk-kontener {
    display: flex;
    align-items: flex-end;
}

.uwagi-formularz__przycisk {
    margin: 0;
}

.uwagi-formularz__textarea {
    height: 80px;
    resize: none;
}

.uwagi-historia__tytul {
    margin-top: 0;
}

.uwagi-tabela__th--uczen   { width: 150px; }
.uwagi-tabela__th--typ     { width: 120px; }

.uwagi-tabela__th--akcje {
    text-align: right;
    width: 120px;
}

.uwagi-tabela__brak {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

.uwagi-tabela__data {
    color: #64748b;
}

.uwagi-tabela__select-typ {
    padding: 2px;
    font-size: 11px;
}

.uwagi-tabela__input-tresc {
    padding: 5px;
}

.uwagi-tabela__td--akcje {
    text-align: right;
    white-space: nowrap;
}

.uwagi-tabela__btn--ok {
    background: #16a34a;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.uwagi-tabela__btn--usun {
    background: #dc2626;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===================== PANEL NAUCZYCIELA ===================== */

.teacher-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: white;
}

.card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card h3 {
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.teacher-table th {
    color: #94a3b8;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    text-transform: uppercase;
}

.teacher-table td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.teacher-table__th--centrum  { text-align: center; }
.teacher-table__th--prawo    { text-align: right; }
.teacher-table__td--centrum  { text-align: center; }

.teacher-table__td--prawo {
    text-align: right;
    white-space: nowrap;
}

.teacher-table__klasa {
    font-weight: 600;
    font-size: 1.1rem;
}

.nauczyciel-naglowek {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.nauczyciel-naglowek__imie {
    margin: 0;
}

.nauczyciel-naglowek__podtytul {
    color: #94a3b8;
}

.przedmioty-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.przedmiot-badge {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
}

/* ===================== WSPÓLNE ===================== */

.uczen-dolna-siatka {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

.grade-container {
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    color: white;
}

.grade-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.grade-history-section {
    flex: 2;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 12px;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
}

.cell-grades {
    color: #fbbf24;
    font-weight: bold;
}

.input-inline {
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 8px;
    border-radius: 6px;
    width: 100%;
}

.row-name {
    font-weight: 600;
    min-width: 200px;
}

.desc-box {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.label-szary {
    color: #94a3b8;
    font-size: 12px;
}

.nr-kolumna {
    color: #94a3b8;
    font-weight: bold;
}

.historia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brak-wpisow {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

.link-powrot {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

.btn-group {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.attendance-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.oceny-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.waga-opis-wrapper {
    display: flex;
    gap: 10px;
}

.waga-select    { width: 70px; }
.filtr-select   { width: auto; }

.historia-select {
    width: 45px;
    padding: 2px;
    font-size: 11px;
}

.historia-input {
    width: 80px;
    padding: 2px;
    font-size: 11px;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .grade-container,
    .main-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 500px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .form-card {
        padding: 20px;
    }
    .hero h1 {
        font-size: 28px;
    }
}

.uwaga-wpis {
    background: rgba(255, 255, 255, 0.06);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.uwaga-wpis__naglowek {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 5px;
}

.uwaga-wpis__tresc {
    font-size: 14px;
    color: #f1f5f9;
    line-height: 1.5;
    font-weight: 500;
}

.frekwencja-przedmiot {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 14px;
}

.frekwencja-lekcja {
    color: #94a3b8;
    font-size: 11px;
}

.frekwencja-lekcja__nr {
    color: #cbd5e1;
}

.tabela-oceny__przedmiot {
    padding: 20px 10px;
    font-weight: bold;
    font-size: 16px;
    color: #f1f5f9;
    width: 160px;
}

.btn-save {
    margin-top: 10px;
    padding: 8px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-save:hover {
    background: #1e40af !important;
}

.komunikat-wpis__typ {
    color: white;
    text-align: center;
    min-width: 100px;
    border-radius: 9px 0 0 9px;
}

@media (max-width: 768px) {
    .uczen-dolna-siatka {
        grid-template-columns: 1fr;
    }

    .plan-siatka {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .uczen-naglowek {
        flex-direction: column;
        gap: 15px;
    }

    .uczen-naglowek__prawa {
        flex-direction: column;
        gap: 10px;
    }

    .frekwencja-grid,
    .oceny-grid {
        grid-template-columns: 1fr;
    }

    .teacher-container,
    .uczen-container {
        padding: 15px;
    }

    .plan-lista {
        flex-direction: column;
    }

    .plan-kafelek {
        min-width: unset;
    }

    .komunikaty-siatka {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .admin-wrapper {
        padding: 0 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .uwagi-formularz__siatka {
        grid-template-columns: 1fr;
    }

    .info-bar {
        flex-direction: column;
        align-items: center;
    }

    .karty {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .plan-siatka {
        grid-template-columns: 1fr;
    }

    .karty {
        grid-template-columns: 1fr;
    }

    .nauczyciel-naglowek {
        flex-direction: column;
        gap: 15px;
    }

    .historia-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .teacher-table {
        font-size: 12px;
    }

    .teacher-table td,
    .teacher-table th {
        padding: 8px 5px;
    }

    .btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}

.footer {
    margin-top: 60px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px 20px;
    color: #475569;
    font-size: 13px;
}

.footer__zawiertosc {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer__logo-img {
    max-height: 26px;
    width: auto;
    opacity: 0.6;
}

.footer__logo-nazwa {
    font-weight: 800;
    color: #94a3b8;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.footer__opis {
    color: #334155;
    margin: 0;
    font-size: 12px;
}

.footer__prawa {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 12px;
}

.footer__link {
    color: #475569;
    text-decoration: none;
    transition: 0.2s;
}

.footer__link:hover {
    color: #93c5fd;
}

.footer__separator {
    color: #1e293b;
}

@media (max-width: 480px) {
    .footer__zawiertosc {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 1200px) {
  body, html {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .teacher-container, .uczen-container, .form-page, .form-wrapper, .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .uczen-naglowek {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    text-align: left !important;
  }

  .uczen-naglowek__prawa {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .uczen-naglowek__imie {
    font-size: 1.4rem !important;
  }

  .uczen-naglowek__info span {
    display: block !important;
    margin-bottom: 5px !important;
  }
}

@media (max-width: 1000px) {
  .uczen-dolna-siatka {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .plan-siatka {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }

  .plan-dzien {
    width: 100% !important;
  }

  .plan-lekcja {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  .tabela-oceny, .tabela-frekwencja {
    width: 100% !important;
    font-size: 0.85rem !important;
  }

  .tabela-oceny th, .tabela-oceny td {
    padding: 6px !important;
    text-align: left !important;
  }
}

/* ✅ Małe ekrany — telefony */
@media (max-width: 700px) {
  .uczen-naglowek__prawa {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .banner-szczesliwy {
    flex-direction: column !important;
    text-align: center !important;
  }

  .banner-szczesliwy__ikona {
    font-size: 2rem !important;
    margin-bottom: 10px !important;
  }

  .frekwencja-formularz {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .frekwencja-formularz__pole,
  .frekwencja-formularz__przycisk {
    width: 100% !important;
  }

  table, thead, tbody, th, td, tr {
    display: block !important;
    width: 100% !important;
  }

  thead {
    display: none !important;
  }

  td {
    border: none !important;
    position: relative !important;
    padding: 10px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  td::before {
    content: attr(data-label) !important;
    display: block !important;
    font-weight: bold !important;
    color: #64748b !important;
    margin-bottom: 5px !important;
  }

  .status-badge, .srednia-badge {
    font-size: 0.9em !important;
    padding: 4px 8px !important;
  }
}

@media (max-width: 600px) {
  .form-card {
    width: 95% !important;
    padding: 20px !important;
  }

  .form-card input, .form-card button {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
  }

  h1 {
    font-size: 1.5rem !important;
  }
}
