/* ==========================================================================
   Tema notte per le pagine fuori dal gestionale: accesso (login, password), errori, esiti di pagamento.
   Si attiva con <html data-theme="dark"> (scelta salvata nel browser dallo script tema-script.blade.php).
   ========================================================================== */
.mlp-logo-notte { display: none !important; }
html[data-theme="dark"] .mlp-logo-chiaro { display: none !important; }
html[data-theme="dark"] .mlp-logo-notte { display: inline-block !important; }
html[data-theme="dark"] { color-scheme: dark; }

/* ---------- errori ed esiti: scheda di vetro scuro ---------- */
html[data-theme="dark"] body { background: #0e1620; color: #e6edf3; }
html[data-theme="dark"] body::before {
    background:
        radial-gradient(520px 460px at 4% 18%, rgba(31, 166, 207, .16), transparent 70%),
        radial-gradient(480px 400px at 96% 92%, rgba(31, 166, 207, .10), transparent 70%),
        radial-gradient(560px 440px at 70% 2%, rgba(0, 110, 144, .12), transparent 70%),
        linear-gradient(180deg, #0e1620 0%, #0b121a 100%);
}
html[data-theme="dark"] .box { background: rgba(22, 33, 48, .88); border-color: rgba(255, 255, 255, .08); box-shadow: 0 12px 36px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05); }
html[data-theme="dark"] .cod { background: rgba(76, 195, 230, .16); color: #5cc8ea; }
html[data-theme="dark"] h1 { color: #8ddcf4; }
html[data-theme="dark"] p, html[data-theme="dark"] p.intro { color: #aab7c5; }
html[data-theme="dark"] .nota, html[data-theme="dark"] .piede, html[data-theme="dark"] .avviso .piccolo, html[data-theme="dark"] .prossimi h3, html[data-theme="dark"] .dettagli .tot span { color: #8b9bad; }
html[data-theme="dark"] .piede a { color: #5cc8ea; }
html[data-theme="dark"] .ico { background: rgba(76, 195, 230, .16); color: #5cc8ea; }
html[data-theme="dark"] .ok .ico { background: linear-gradient(135deg, #34b36b, #1c7c3f); color: #fff; }
html[data-theme="dark"] .ko .ico { background: linear-gradient(135deg, #e5646a, #c53030); color: #fff; }
html[data-theme="dark"] .btn { background: #1c2a3b; border-color: #2c3d52; color: #e6edf3; }
html[data-theme="dark"] .btn:hover { border-color: #5cc8ea; color: #5cc8ea; }
html[data-theme="dark"] .btn-p { background: linear-gradient(135deg, #1f93b8, #146f8e); border: 0; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .btn-p:hover { color: #fff; }
html[data-theme="dark"] .chip { background: rgba(76, 195, 230, .16); color: #8ddcf4; }
html[data-theme="dark"] .chip small { background: rgba(246, 158, 3, .25); color: #f6c46a; }
html[data-theme="dark"] .avviso { background: rgba(76, 195, 230, .10); border-color: rgba(76, 195, 230, .25); color: #cfe3ec; }
html[data-theme="dark"] .prossimi, html[data-theme="dark"] .dettagli { background: #1c2a3b; border-color: #2c3d52; }
html[data-theme="dark"] .prossimi ul { color: #aab7c5; }
html[data-theme="dark"] .dettagli .r { border-top-color: #24344a; color: #aab7c5; }
html[data-theme="dark"] .dettagli .r strong { color: #e6edf3; }
html[data-theme="dark"] .dettagli .tot { border-top-color: #24344a; }
html[data-theme="dark"] .dettagli .tot b { color: #6fdc68; }

/* ---------- accesso (login, password dimenticata, reimposta, cambio password, firma, questionari) ---------- */
html[data-theme="dark"] body.mlp-auth { background-color: #06121a; }
html[data-theme="dark"] body.mlp-auth .image-overlay { background: rgba(2, 14, 22, .74); }
html[data-theme="dark"] body.mlp-auth .image-overlay::before { opacity: .22; }
html[data-theme="dark"] body.mlp-auth .image-overlay::after { opacity: .14; }
html[data-theme="dark"] body.mlp-auth .auth-card {
    background: linear-gradient(145deg, rgba(24, 38, 54, .78), rgba(12, 22, 32, .66));
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] body.mlp-auth .input-wrapper input { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); color: #fff; }
html[data-theme="dark"] body.mlp-auth .input-wrapper input:focus { border-color: #5cc8ea; background: rgba(255, 255, 255, .11); box-shadow: 0 0 0 3px rgba(92, 200, 234, .22); }
html[data-theme="dark"] body.mlp-auth .input-wrapper input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #12202e inset; }
html[data-theme="dark"] body.mlp-auth .auth-btn { background: #1f93b8; color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
html[data-theme="dark"] body.mlp-auth .auth-btn:hover:not(:disabled) { background: #28a5cc; color: #fff; }
html[data-theme="dark"] body.mlp-auth .btn-loader { border-color: #fff; border-top-color: transparent; }
html[data-theme="dark"] body.mlp-auth .req-item { background: rgba(255, 255, 255, .08); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html[data-theme="dark"] body.mlp-auth .auth-card { background: rgba(14, 24, 34, .92); }
}
