/* Główny plik stylów - style.css */

/* Importowanie stylów dla poszczególnych modułów/podstron */
@import url('style-lista-admin.css');
@import url('style-panel-klienta.css');  /* panel klienta */
/* Tutaj mogą pozostać Twoje dotychczasowe ogólne style strony, nagłówka, stopki itp. */

/* ==========================================================================
   1. SPERSONALIZOWANE USTAWIENIA I BAZA STRONY
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   2. NOWY, POTĘŻNY BANER GŁÓWNY (HEADER)
   ========================================================================== */
.main-header {
    background: #0f172a !important; /* Głęboka, czysta, nowoczesna ciemna barwa */
    padding: 0px 40px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 4px solid #2563eb !important; /* Wyraziste niebieskie odcięcie */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
}

/* Efekt delikatnej poświaty w tle nagłówka */
.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* POTĘŻNY NAPIS FAN PAGE W 3D */
.text-3d-header {
    font-size: 52px !important; /* Bardzo duży i wyraźny */
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    text-decoration: none !important;
    letter-spacing: 4px !important;
    display: inline-block !important;
    font-family: 'Arial Black', Impact, sans-serif !important;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    text-shadow: 
        0 1px 0 #cbd5e1, 
        0 2px 0 #94a3b8, 
        0 3px 0 #64748b, 
        0 4px 0 #475569, 
        0 5px 0 #334155, 
        0 6px 8px rgba(0, 0, 0, 0.5) !important;
}

.text-3d-header:hover {
    transform: scale(1.03);
    text-shadow: 
        0 1px 0 #ffffff, 
        0 2px 0 #3b82f6, 
        0 3px 0 #2563eb, 
        0 4px 0 #1d4ed8, 
        0 5px 12px rgba(59, 130, 246, 0.6) !important;
}

/* ==========================================================================
   3. PANEL BOCZNY PO PRAWEJ (DATA, CZAS, KAFTELKI)
   ========================================================================== */
/* Zmniejszenie przerw między kafelkami w nagłówku */
/* Przesunięcie całego prawego panelu w dół nagłówka */
/* Ostateczne pozycjonowanie i odstępy prawego panelu */
.header-right-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;              /* Małe, zwarte odstępy między kafelkami */
    margin-top: 3px !important;       /* Odstęp od góry nagłówka */
    margin-bottom: 8px !important;    /* BEZPIECZNY ODSTĘP OD DOLNEJ BIAŁEJ LINII */
    align-self: flex-end !important;   /* Wyrównanie całości do dolnej krawędzi */
}

/* Wspólny styl kafelków (pastylek) rozdzielających dane */
.header-tile {
    background: #1e293b !important; /* Jasniejsze, grafitowe tło kafelka */
    border: 1px solid #334155 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important; /* Ładne zaokrąglenie */
    color: #f1f5f9 !important;
    font-size: 14px !important;
    font-family: monospace, sans-serif !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-width: 200px !important; /* Równa szerokość wszystkich kafelków */
    text-align: right !important;
}

/* Etykiety tekstowe w kafelkach */
.tile-label {
    color: #94a3b8 !important;
    font-weight: bold !important;
    margin-right: 5px !important;
}

/* Wyróżniony, świecący niebieski zegarek */
#clock {
    color: #38bdf8 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    font-family: monospace !important;
}

/* Kafelek z powitaniem admina */
.tile-welcome {
    border-left: 4px solid #38bdf8 !important; /* Jasnoniebieski pasek boczny */
    font-family: 'Segoe UI', sans-serif !important;
}
.tile-welcome strong {
    color: #38bdf8 !important;
}

/* Kafelek wylogowania - wyróżniona czerwona pastylka */
.tile-logout {
    background: #991b1b !important; /* Głęboka czerwień */
    border: 1px solid #7f1d1d !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    text-align: center !important;
    transition: background 0.2s, transform 0.1s !important;
    display: block !important;
}

.tile-logout:hover {
    background: #dc2626 !important; /* Rozjaśnienie po najechaniu */
}
.tile-logout:active {
    transform: scale(0.97);
}

/* ==========================================================================
   4. KONTENER GŁÓWNY I ZAWARTOŚĆ (INDEX / STRONA GŁÓWNA)
   ========================================================================== */
.main-container {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    flex: 1;
}

.content-section {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.content-section h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #0f172a;
    font-weight: 700;
}

.highlight { color: #3b82f6; }

.content-section p {
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 25px;
}

.content-section h2 {
    font-size: 22px;
    margin: 30px 0 20px 0;
    color: #1e293b;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

.content-section ul { list-style: none; }

.content-section li {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    color: #334155;
}

.icon {
    margin-right: 15px;
    font-size: 20px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.welcome {
    font-weight: 600;
    color: #0f172a !important;
    margin-top: 35px;
    font-size: 18px !important;
}

/* ==========================================================================
   5. OKIENKO LOGOWANIA (SIDEBAR)
   ========================================================================== */
.login-sidebar {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.login-sidebar h3 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #0f172a;
    text-align: center;
    font-weight: 600;
}

.input-group { margin-bottom: 18px; }

.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.my-button {
    width: 100%;
    padding: 14px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.my-button:hover { background-color: #2563eb; }
.my-button:active { transform: scale(0.98); }

.btn-link {
    background-color: #f1f5f9;
    color: #475569;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    text-align: center;
    text-decoration: none;
    display: block;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.btn-link:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.error-msg {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   6. PODSTRONY PANELU ADMINISTRATORA
   ========================================================================== */
.admin-container {
    max-width: 1200px;
    width: 95%; 
    margin: 10px auto; 
    padding: 20px 20px 20px 20px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    align-items: center;
}

.nav-button {
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-button:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.nav-button.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.select-style {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #1e293b;
    color: white;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.section-title {
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 20px;
    font-weight: 700;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

/* KARTY Z LINKAMI */
.link-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.card-number {
    background: #f1f5f9;
    color: #475569;
    font-weight: bold;
    font-size: 18px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.card-body h4 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 8px;
}

.card-body p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
}

.card-badge {
    background-color: #e2e8f0;
    color: #334155;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.card-actions {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.action-edit { background-color: #eff6ff; color: #2563eb; }
.action-delete { background-color: #fef2f2; color: #dc2626; }

/* ==========================================================================
   7. MANUALNA ZMIANA HASŁA / OKIENKO ODZYSKIWANIA
   ========================================================================== */
.password-box { 
    background: #ffffff; 
    padding: 35px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    max-width: 450px; 
    width: 100%; 
    text-align: center; 
    box-sizing: border-box; 
    margin: 60px auto; /* Centrowanie marginesem, nie psuje body */
}

.password-box h2 { color: #1e293b; margin-top: 0; margin-bottom: 10px; font-size: 24px; font-weight: bold; }
.password-box p { color: #64748b; font-size: 14px; margin-bottom: 25px; line-height: 1.5; }

.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; text-align: left; line-height: 1.5; }
.alert-danger { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background-color: #dcfce7; color: #166534; border: 1px solid #86efac; }

.input-field { width: 100%; padding: 12px 15px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; margin-bottom: 20px; box-sizing: border-box; outline: none; }
.input-field:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.2); }

.submit-btn { width: 100%; background-color: #2563eb; color: #fff; padding: 13px; border: none; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer; text-transform: uppercase; }
.submit-btn:hover { background-color: #1d4ed8; }
.login-link { display: inline-block; margin-top: 20px; color: #2563eb; text-decoration: none; font-size: 14px; font-weight: 600; }

/* ==========================================================================
   8. STOPKA STRONY
   ========================================================================== */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 25px;
    font-size: 14px;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}

/* RESPONSIVENESS (SMARTFONY I TABLETY) */
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 20px auto;
    }
    .main-header {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
        padding: 25px 20px !important;
    }
    .text-3d-header { font-size: 38px !important; }
    .header-right-box { align-items: center !important; width: 100% !important; }
    .header-tile { text-align: center !important; width: 100% !important; max-width: 260px; }
    
    .link-card { grid-template-columns: 1fr; text-align: center; }
    .card-number { margin: 0 auto; }
    .card-actions { position: relative; top: 0; right: 0; margin-top: 15px; justify-content: center; }
}

/* Wymuszenie wyglądu przycisku Zaloguj się */
.login-sidebar .my-button:not(.btn-link) {
    background-color: #2563eb !important; 
    color: #ffffff !important;            
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2) !important;
    border: none !important;
    opacity: 1 !important;                 
}

.login-sidebar .my-button:not(.btn-link):hover {
    background-color: #1d4ed8 !important; 
    box-shadow: 0 6px 12px rgba(29, 78, 216, 0.3) !important;
}

/* Kontener linku łączący logo i tekst obok siebie */
.header-left .header-logo-link {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important; /* Odstęp między okrągłym logo a napisem */
    text-decoration: none !important;
}

/* Stylizacja samego obrazka logo */
.header-logo-img {
    width: 65px !important;       /* Odpowiednia wysokość i szerokość do nagłówka */
    height: 65px !important;
    border-radius: 50% !important; /* Wycięcie kwadratowego obrazka w idealne koło */
    object-fit: cover !important;  /* Zabezpieczenie przed zniekształceniem */
    border: 2px solid #2563eb !important; /* Niebieska ramka pasująca do paska pod headerem */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important; /* Delikatna poświata */
}

/* Dopasowanie marginesów samych kafelków */
/* Upewnienie się, że kafelki nie mają starych, rozpychających marginesów */
/* Kafelki bez zmian, smukłe i równe */
.header-right-box .header-tile {
    margin: 0 !important;
    padding: 5px 10px !important;
}

/* Dopasowanie marginesu dla przycisku wylogowania */
/* Przycisk wylogowania dopasowany szerokością i wysokością */
.header-right-box .btn-logout-tile {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #991b1b !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    text-align: center !important;
    border: 1px solid #7f1d1d !important;
    margin-top: 2px !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    cursor: pointer !important;
}

/* Efekt hover pozostaje bez zmian */
/* Efekt po najechaniu myszką */
.header-right-box .btn-logout-tile:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

// Lista użytkowników lista-admin.php
/* Kontener całej sekcji */
.users-list-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin: 20px auto;
    max-width: 1200px;
}

/* Nagłówek nad tabelą */
.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 12px;
}

.table-header-flex h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
}

/* Przycisk dodawania nowego admina */
.btn-add-user {
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 640;
    transition: background 0.2s;
}
.btn-add-user:hover { background-color: #1d4ed8; }

/* Struktura tabeli */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    background-color: #f8fafc;
    color: #64748b;
    padding: 12px 16px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
    padding: 14px 16px;
    color: #334155;
    border-bottom: 1px solid #edf2f7;
}

/* Podświetlenie wiersza po najechaniu myszką */
.admin-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Wygląd nazwy użytkownika */
.user-name-badge {
    font-weight: 600;
    color: #0f172a;
}

/* Przyciski Akcji: Edycja i Usuń */
.btn-action {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Przycisk Edycji (Niebieski/Neutralny) */
.btn-edit {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.btn-edit:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* Przycisk Usuń (Czerwony - ostrzegawczy) */
.btn-delete {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.btn-delete:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Komunikat o braku danych */
.empty-table-msg {
    text-align: center;
    color: #94a3b8;
    padding: 30px !important;
    font-style: italic;
}