/* GŁÓWNE TŁO APLIKACJI Z GRAFIKĄ I ROZMYCIEM */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Eleganckie tło z Unsplash + domyślne przejście tonalne */
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.6), rgba(42, 82, 152, 0.6)), 
                url(../images/appBackground.jpg) no-repeat center center fixed;
    background-size: cover;
}

/* KONTENER W STYLU "GLASSMORPHISM" (SZKŁO IPHONE) */
.glass-panel {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 25px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* KONTENER DLA DASHBOARDU */
.dashboard-container {
    width: 320px;
    position: relative;
    text-align: center;
}

/* NAGŁÓWEK KARTY Z PRZYCISKIEM WYLOGUJ U GÓRY */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* UNIWERSALNE PRZYCISKI I KAFELKI MENU */
.btn-tile, .btn-primary, .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s ease-in-out;
    box-sizing: border-box;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Kafelki w dashboardzie */
.btn-tile {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 16px;
    margin: 12px 0;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-tile:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* Przycisk wylogowania u góry */
.btn-logout {
    background: rgba(255, 77, 77, 0.3);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 12px;
    border-color: rgba(255, 77, 77, 0.5);
}

.btn-logout:hover {
    background: rgba(255, 77, 77, 0.7);
}

/* POLA FORMULARZA (INPUTS) */
.glass-panel input[type="email"],
.glass-panel input[type="password"],
.glass-panel input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
}

.glass-panel input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.glass-panel input:focus {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* PRZYCISK GŁÓWNY (SUBMIT) */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 16px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ODNOŚNIKI W DOWOLNYM PANELU GLASS */
.glass-panel a.link-glass {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: inline-block;
}

.glass-panel a.link-glass:hover {
    opacity: 1;
    text-decoration: underline;
}

/* KOMUNIKATY SUKCESU I BŁĘDÓW W STYLU GLASS */
.glass-panel .success {
    background: rgba(40, 167, 69, 0.35);
    border: 1px solid rgba(40, 167, 69, 0.6);
    color: #ffffff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

.glass-panel .error {
    background: rgba(220, 53, 69, 0.35);
    border: 1px solid rgba(220, 53, 69, 0.6);
    color: #ffffff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

/* ==========================================
   ELEMENTY PANELU ADMINISTRACYJNEGO (ADMIN.PHP)
   ========================================== */

/* Nawigacja i nagłówek */
.glass-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
}

.glass-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.glass-nav-info {
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 15px;
}

.glass-nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Układ kafelków menu */
.dashboard-menu {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.menu-tile-glass {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 25px;
    width: 280px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.menu-tile-glass:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.menu-tile-glass img {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
    margin-bottom: 15px;
}

.menu-tile-glass h3 {
    margin: 10px 0;
    color: #fff;
    font-size: 18px;
}

.menu-tile-glass p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    margin: 0;
}

/* Szklane okna modalne - POPRAWIONE STEROWANIE WIDOCZNOŚCIĄ I POZYCJĄ */
.modal {
    display: none; /* Domyślnie ukrywamy okna modalne */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content.glass-modal {
    position: relative;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    max-width: 800px;
    margin: 5% auto; /* Wyśrodkowanie okna na ekranie */
    padding: 25px;
}

.modal-content.glass-modal section {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff;
}

.modal-content.glass-modal table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    margin-top: 15px;
}

.modal-content.glass-modal th, 
.modal-content.glass-modal td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.modal-content.glass-modal select, 
.modal-content.glass-modal input[type="text"],
.modal-content.glass-modal input[type="file"] {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    outline: none;
}

.modal-content.glass-modal select option {
    background: #2c3e50;
    color: #fff;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    opacity: 0.8;
}

.close:hover {
    color: #fff;
    opacity: 1;
}