/* ------------------------------------------------------ */
/* 1. Globalne ustawienia i Layout (Flexbox Sticky Footer) */
/* ------------------------------------------------------ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
    color: #333;
    background-color: #f2f2f2;
    background-image: url('../img/main3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    
    /* Układ Flexbox dla całej strony (Sticky Footer) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Linki */
a {
    color: #2ecc71;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #27ae60;
    text-decoration: underline;
}

/* ------------------------------------------------------ */
/* 2. Nagłówek i Stopka */
/* ------------------------------------------------------ */
.header {
    /* Flex item: nie kurczy się */
    flex-shrink: 0;
    width: 100%;
    
    /* Tło i wygląd */
    background-image: 
        url('/img/banner_main.jpg'), 
        linear-gradient(90deg, #316D25 0%, #6DA03B 50%, #316D25 100%);
    background-repeat: no-repeat;
    background-position: center top, center;
    background-size: cover;
    
    /* Wysokość responsywna oparta na aspect-ratio */
    aspect-ratio: 2560 / 150; 
    
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 100;
}

.footer {
    /* Flex item: nie kurczy się, zawsze na dole */
    flex-shrink: 0;
    margin-top: auto; /* Dopycha stopkę do dołu, jeśli treść jest krótka */
    width: 100%;

    background-image: url('../img/greenkeeper_Foot.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    aspect-ratio: 1920 / 100;
    min-height: 60px;
    
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

/* ------------------------------------------------------ */
/* 3. Główny Kontener Treści (Środek ekranu) */
/* ------------------------------------------------------ */
.main-content {
    /* Flex item: zajmuje całą wolną przestrzeń */
    flex-grow: 1;
    display: flex;
    justify-content: center; /* Wyśrodkowanie w poziomie */
    align-items: center;     /* Wyśrodkowanie w pionie */
    padding: 20px;           /* Odstęp od krawędzi na telefonach */
    width: 100%;
}

/* Uniwersalny Box (Logowanie, Index, Reset) */
.central-box {
    background: rgba(255, 255, 255, 0.85); /* Lekko bardziej kryjące dla czytelności */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 40px;
    
    width: 100%;
    max-width: 500px; /* Maksymalna szerokość na desktopie */
    
    text-align: center;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px); /* Efekt rozmycia tła pod boxem (nowoczesny wygląd) */
}

/* Nagłówki wewnątrz boxa */
.central-box h1 {
    font-size: 2em; /* Bardziej responsywny rozmiar */
    color: #2ecc71;
    margin-top: 0;
    margin-bottom: 24px;
}

.central-box p {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.5;
}

/* ------------------------------------------------------ */
/* 4. Elementy Formularzy */
/* ------------------------------------------------------ */
.central-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.central-box label {
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: -10px; /* Lekka korekta, bo gap w flexie robi odstęp */
    color: #333;
}

.central-box input[type="text"],
.central-box input[type="password"],
.central-box input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #2ecc71;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.central-box input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

/* Przyciski (Button i Link jako przycisk) */
.btn-primary {
    display: inline-block;
    width: 100%;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 14px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Komunikaty błędów i sukcesów */
.message {
    margin: 10px 0;
    font-size: 14px;
    padding: 10px;
    border-radius: 4px;
}
.message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
.message.success { /* Dodałem na przyszłość lub do forgot_password */
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Linki pomocnicze (np. zapomniałem hasła) */
.helper-links {
    margin-top: 20px;
    font-size: 0.95em;
}

/* ------------------------------------------------------ */
/* 5. Responsywność (Media Queries) */
/* ------------------------------------------------------ */
@media (max-width: 600px) {
    .central-box {
        padding: 25px 20px;
        width: 100%;
    }
    
    .central-box h1 {
        font-size: 1.6em;
    }
    
    .footer {
        /* Podmiana tła na mobilne zgodnie z Twoim wcześniejszym kodem */
        background-image: url('../img/gk_mobil_stopa.png');
        aspect-ratio: 500 / 100;
    }
}