body {
    background: #f5f7fa;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #22304a;
    margin: 0;
    padding: 0;
}

.settings-card {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(44,62,80,0.08);
    padding: 32px;
}

.settings-card h2 {
    color: #1a5a9a;
    font-size: 2rem;
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: #1a5a9a;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #bfc9d9;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    border-color: #1a5a9a;
    outline: none;
    box-shadow: 0 0 0 2px #b3d1f7;
}

.btn-primary {
    background: linear-gradient(135deg, #1a5a9a 0%, #476A8E 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 2rem;
    border-radius: 6px;
    transition: background 0.2s;
    cursor: pointer;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #476A8E 0%, #1a5a9a 100%);
}

.alert {
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.alert-success {
    background: #e6f9e7;
    color: #217a3c;
    border: 1px solid #b6e2c1;
}
.alert-danger {
    background: #ffeaea;
    color: #a94442;
    border: 1px solid #f5c6cb;
}

@media (max-width: 700px) {
    .settings-card {
        padding: 16px;
        margin: 10px;
    }
    .settings-card h2 {
        font-size: 1.3rem;
    }
}
/* Stili principali estratti da index.php */
html, body {
    height: 100%;
    margin: 0;
}
:root{
    /* Tavolozza professionale */
    --primary-900: #0f3b66; /* blu scuro profondo */
    --primary-700: #1a5a9a; /* blu medio */
    --accent: #c59a2b;     /* oro caldo */
    --muted: #6c757d;      /* colore attenuato bootstrap */
    --glass: rgba(255,255,255,0.06);
    --footer-bg: rgba(8,13,20,0.45);
}
/* Sfondo video centrato su tutti i dispositivi */
.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -1;
    object-fit: cover;
    background: #000;
}
/* Regolazioni brand e colori */
.navbar .navbar-brand, .navbar .nav-link { color: #fff; }
.navbar .nav-link { color: rgba(255,255,255,0.85); }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: var(--accent); }
.navbar { background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.08)); }

/* Hamburger più visibile */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 0.75rem;
    background: rgba(15, 59, 102, 0.6);
    backdrop-filter: blur(5px);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(197, 154, 43, 0.4);
    border-color: var(--accent);
}

.navbar-toggler-icon {
    width: 1.75em;
    height: 1.75em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* Sovrapposizione hero: altezza piena, contenuto centrato */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    z-index: 2;
    padding: 2rem;
}
.overlay-content {
    max-width: 980px;
    text-shadow: 0 0 10px rgba(0,0,0,0.85);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}
.overlay-content.fade-in {
    opacity: 1;
    transform: translateY(0);
}
.btn-group-custom {
    margin-top: 1.25rem;
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}
/* Tema pulsanti */
.btn-primary {
    background: linear-gradient(180deg, var(--primary-700), var(--primary-900));
    border: none;
    box-shadow: 0 8px 24px rgba(15,59,102,0.18);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(180deg, var(--primary-900), var(--primary-700));
}
.btn-success { box-shadow: 0 6px 18px rgba(25,135,84,0.12); }
.btn-outline-light {
    color: #fff;
    border-color: rgba(255,255,255,0.18);
    background: transparent;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.28);
}

/* Accento per icone e piccoli evidenziamenti */
.bi { color: var(--accent); }
/* Caricatore video */
.video-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.video-loader .spinner {
    width: 56px;
    height: 56px;
    border: 6px solid rgba(255,255,255,0.15);
    border-top-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Effetto hover pulsante */
.btn:hover {
    transform: translateY(-3px);
    transition: transform .18s ease-out;
}
.navbar {
    background: transparent!important;
    z-index: 3;
}
footer {
    /* footer trasparente per mantenere focus su hero/video */
    background: transparent;
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 0.9rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 3;
}
/* Schermi piccoli: sovrapponi pulsanti verticalmente, regola dimensioni */
@media (max-width: 575.98px) {
    .btn-group-custom {
        flex-direction: column;
        gap: .5rem;
    }
    .btn-group-custom .btn {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .display-3 {
        font-size: 2.5rem;
    }
    .lead {
        font-size: 1.1rem;
    }
}

/* Perfezionamenti visivi modale */
.modal-content {
    border-radius: .75rem;
    /* Vetro satinato più morbido e leggero per migliore leggibilità */
    background: linear-gradient(180deg, rgba(250,253,255,0.96), rgba(244,249,252,0.98));
    backdrop-filter: blur(6px) saturate(110%);
    border: 1px solid rgba(6,40,80,0.06);
    box-shadow: 0 12px 30px rgba(2,12,27,0.12);
    color: #05242f; /* testo blu scuro per buon contrasto */
}
.modal-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem 0.25rem 1.5rem;
    position: relative;
    background: transparent;
}
.modal-header::before {
    /* barra di accento sottile in cima al modale per raffinatezza */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    background: linear-gradient(90deg, rgba(26,90,154,0.95), rgba(197,154,43,0.92));
    opacity: 0.95;
}
.modal-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: #f7fbfd;
}
.modal-body {
    padding: 0.75rem 1.5rem 1.25rem 1.5rem;
}
.modal-footer {
    padding: .75rem 1.5rem 1rem 1.5rem;
    border-top: none;
}
/* Input leggermente più grandi per migliori bersagli tattili */
.modal .form-control,
.modal .form-select,
.modal textarea.form-control {
    min-height: 48px;
    /* Aggiungi extra padding superiore per lasciare spazio a etichette fluttuanti */
    padding: 1.25rem .75rem 0.5rem .75rem;
    font-size: .95rem;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(6,40,80,0.08);
    color: #05242f;
}
.modal .form-control::placeholder { color: rgba(5,36,47,0.44); }
.modal .form-select { color: #05242f; }
.modal textarea.form-control { min-height: 120px; }
.modal .form-floating > label {
    color: rgba(5,36,47,0.68);
    padding-left: .75rem;
    padding-right: .75rem;
}
.modal .btn {
    min-width: 150px;
}
.modal .btn i {
    font-size: 1.05rem;
}

/* Rendi l'azione primaria più prominente */
.modal-footer .btn-primary {
    box-shadow: 0 8px 26px rgba(21,66,112,0.12);
    background: linear-gradient(180deg, rgba(26,90,154,1), rgba(197,154,43,0.95));
    border: none;
    color: #072033;
}
.modal-footer .btn-primary:hover, .modal-footer .btn-primary:focus {
    filter: brightness(0.98) saturate(1.02);
}

/* Modal header accent bar */
.modal-header > div {
    display:flex; flex-direction:column;
}
.modal-header { background: linear-gradient(90deg, rgba(15,59,102,0.06), rgba(26,90,154,0.03)); }
.modal-title { color: var(--primary-900); }
.modal .text-muted { color: #6f7b86; }

/* Rendi le etichette form-floating leggermente più scure per contrasto */
.form-floating > label { color: rgba(0,0,0,0.6); }

/* Menu hamburger che si apre sotto il pulsante */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(15, 59, 102, 0.95);
        backdrop-filter: blur(10px);
        padding: 0.5rem;
        border-radius: 0.375rem;
        margin-top: 0.5rem;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        min-width: 180px;
    }
    
    .navbar-nav {
        align-items: flex-start !important;
    }
    
    .nav-item {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        border-radius: 0.25rem;
        transition: background 0.2s;
        font-size: 0.9rem;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-item .btn {
        width: 100%;
        margin-top: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .nav-item .btn i {
        font-size: 0.9rem;
    }
}

/* Fix per input password con toggle su mobile */
.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

/* Previeni zoom automatico su iOS */
@media screen and (max-width: 768px) {
    input[type="email"],
    input[type="password"],
    input[type="text"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Migliora il bottone toggle password su touch */
#togglePasswordLogin {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    padding: 0.375rem 0.75rem;
    min-width: 42px;
}

#togglePasswordLogin:active {
    background-color: #e9ecef;
}

#togglePasswordIcon {
    pointer-events: none;
}

