:root {
    --primary-color: #5E72E4;
    --secondary-color: #2DCE89;
    --dark-color: #172b4d; 
    --light-gray: #f7fafc;
    --border-color: #dee2e6;
    --text-muted: #8898aa;
    --font-family: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-family);
    overflow: auto;
}

.login-page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f7f6;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

.login-page-wrapper form {
    width: 100%;
    
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Sfondo con gradiente animato */
.background-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        -45deg,
        rgba(23, 43, 77, 0.9)     /* --dark-color */
    );
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: 1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* Card di Login */
.login-container {
    position: relative;
    z-index: 2; /* Sopra lo sfondo */
    background: rgba(255, 255, 255, 0.95); /* Leggermente trasparente */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Header del Form */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header .logo-image {
    height: 50px;
    width: auto;
    margin-bottom: 15px;
}

.container {
  width: 350px;
  height: 100px;
  background-image: url("../images/Contabile365_logo_trasparente.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  margin: auto;
}

.login-header h1 {
    color: var(--dark-color);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 5px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 1em;
}

/* Messaggi di Errore */
.login-message.error {
    background-color: #fdd;
    color: #c00;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.9em;
    border: 1px solid #fbb;
}

/* Gruppo Input */
.input-group {
    position: relative;
    margin-bottom: 20px;
}
.input-group .icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.input-group input {
    width: 100%;
    height: 50px;
    padding: 0 20px 0 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--light-gray);
    transition: all 0.3s ease;
}
.input-group input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.2);
}
.input-group input:focus + .icon, .input-group:focus-within .icon { /* cambia colore icona quando l'input è in focus */
    color: var(--primary-color);
}

/* Opzioni di Login */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9em;
}
.login-options a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}
.login-options a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.login-options .remember-me { /* Stile per "Ricordami" */
    display: flex;
    align-items: center;
}
.login-options .remember-me label {
    margin-left: 5px;
    color: #333;
}


/* Bottone Login */
.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-color), #8a6ef8); /* Gradiente per il bottone */
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(94, 114, 228, 0.4);
}
.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(94, 114, 228, 0.5);
}
.btn-login:active {
    transform: translateY(0);
}

/* Footer del Form */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95em;
    color: var(--text-muted);
}
.login-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.login-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 25px;
    }
}

/* ======================= Stili Cookie Banner GDPR ======================= */
:root {
    --cookie-banner-bg: #ffffff;
    --cookie-banner-text-color: #333333;
    --cookie-banner-title-color: #000000;
    --cookie-primary-color: #007bff; /* Blu primario per il bottone Accetta */
    --cookie-primary-hover-color: #0056b3;
    --cookie-secondary-bg: #f0f0f0;
    --cookie-secondary-text: #555555;
    --cookie-secondary-hover-bg: #e0e0e0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1100px;
    background-color: var(--cookie-banner-bg);
    color: var(--cookie-banner-text-color);
    padding: 25px;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: none; /* Nascosto di default */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    animation: slideUp 0.5s ease-out forwards;
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cookie-banner-icon {
    flex-shrink: 0;
    color: var(--cookie-primary-color);
}

.cookie-banner-text-wrapper {
    flex-grow: 1;
}

.cookie-banner-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--cookie-banner-title-color);
}

.cookie-banner-text {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.cookie-policy-link {
    color: var(--cookie-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.cookie-policy-link:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.cookie-btn-accept {
    background-color: var(--cookie-primary-color);
    color: white;
}
.cookie-btn-accept:hover {
    background-color: var(--cookie-primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cookie-btn-decline {
    background-color: var(--cookie-secondary-bg);
    color: var(--cookie-secondary-text);
}
.cookie-btn-decline:hover {
    background-color: var(--cookie-secondary-hover-bg);
}

/* Adattabilità per schermi piccoli */
@media (max-width: 900px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    .cookie-banner-icon {
        display: none; /* Nasconde l'icona per risparmiare spazio */
    }
    .cookie-banner-text-wrapper {
        text-align: left;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
}

.recaptcha-container {
    display: flex; /* Attiva Flexbox */
    flex-direction: column; /* Impila gli elementi verticalmente (reCAPTCHA sopra, messaggio di errore sotto) */
    justify-content: center; /* Centra orizzontalmente il contenuto */
    align-items: center; /* Centra gli elementi lungo l'asse trasversale (in questo caso, orizzontalmente) */
    margin-top: 15px; /* Aggiunge un po' di spazio sopra */
    margin-bottom: 15px; /* Aggiunge un po' di spazio sotto */
}

/* Stile opzionale per il messaggio di errore per allinearlo */
#recaptcha-error-message {
    text-align: center; /* Assicura che anche il testo di errore sia centrato */
    width: 100%; /* Occupa tutta la larghezza per un centraggio corretto */
}