/* ==========================================================================
   AKADEMIA AI - NIEZAWODNY SYSTEM KONTRASTÓW
   Sidebar: ciemny granat | Treść: jasne tło, białe karty, czarny tekst
   ========================================================================== */

/* Fonty Poppins */
@font-face { font-family:'Poppins'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/poppins/poppins-400.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/poppins/poppins-500.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/poppins/poppins-600.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/poppins/poppins-700.woff2') format('woff2'); }

/* === GLOBAL RESET === */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Poppins', system-ui, sans-serif !important;
    margin: 0; padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === SIDEBAR (CIEMNY GRANAT) - WYMUSZONY KONTRAST === */
#main-sidebar,
aside#main-sidebar {
    background-color: #0f172a !important;
    border-right: 1px solid #1e293b !important;
    color: #e2e8f0 !important;
}

#main-sidebar * {
    color: inherit;
}

#main-sidebar .nav-link,
#main-sidebar a.nav-link {
    color: #94a3b8 !important;
    padding: 0.7rem 1rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

#main-sidebar .nav-link:hover,
#main-sidebar a.nav-link:hover {
    color: #ffffff !important;
    background-color: #1e293b !important;
}

#main-sidebar .nav-link.active,
#main-sidebar a.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
}

#main-sidebar .nav-link svg,
#main-sidebar a svg {
    color: inherit !important;
}

/* Nagłówki sekcji sidebar */
#main-sidebar div[class*="uppercase"] {
    color: #64748b !important;
}

/* Profil użytkownika w sidebarze */
.sidebar-user-card,
#main-sidebar .sidebar-user-card {
    background-color: #0b1022 !important;
    border-top: 1px solid #1e293b !important;
}

.sidebar-user-card a { color: #e2e8f0 !important; text-decoration: none !important; }
.sidebar-user-card a:hover { color: #60a5fa !important; }

/* === GŁÓWNA TREŚĆ (JASNE TŁO, CZARNY TEKST) === */
body {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

main,
main.main-canvas {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

main h1, main h2, main h3, main h4 {
    color: #0f172a !important;
}

main p, main span, main div, main td, main th, main li, main label {
    color: #1e293b;
}

/* === KARTY (ŚNIEŻNOBIAŁE) === */
.card-white {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04) !important;
    color: #0f172a !important;
}

.card-white h1, .card-white h2, .card-white h3, .card-white h4 {
    color: #0f172a !important;
}

.card-white p, .card-white span, .card-white div {
    color: #334155;
}

/* === BANNER CIEMNY (Powitanie / Nagłówek) === */
.banner-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border: 1px solid #334155 !important;
    border-radius: 1rem !important;
    color: #ffffff !important;
}

.banner-dark * {
    color: #ffffff;
}

.banner-dark p, .banner-dark .text-slate-300 {
    color: #cbd5e1 !important;
}

/* === FORMULARZE (BIAŁE, CZARNY TEKST) === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-family: 'Poppins', sans-serif !important;
}

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

::placeholder { color: #94a3b8 !important; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    border: 1px solid #2563eb !important;
}

/* === PRZYCISKI === */
.btn-blue {
    background-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.65rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.btn-blue:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important;
}

.btn-emerald {
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.65rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

.btn-emerald:hover { background-color: #059669 !important; }

.btn-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    border: none !important;
    cursor: pointer !important;
}

.btn-danger:hover { background-color: #dc2626 !important; }

/* === BADGE / ETYKIETY === */
.badge-admin {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.badge-active {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.badge-pending {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* === TABELE === */
table.table-light { width: 100%; border-collapse: collapse; }
table.table-light th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
table.table-light td {
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* === ANIMACJE === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease forwards; }

/* === MOBILE HEADER BAR (ciemna) === */
#mobile-header,
.md\:hidden.bg-slate-900 {
    background-color: #0f172a !important;
    color: #ffffff !important;
}
