/* =====================================================
   PerfoMail v2 — Login Page (Dark Glassmorphism)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body.login-page {
    min-height: 100vh;
    background: #080810;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Space Grotesk', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Blob viola — alto sinistra */
body.login-page::before {
    content: '';
    position: fixed;
    width: 560px; height: 560px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.16);
    filter: blur(90px);
    top: -160px; left: -140px;
    pointer-events: none;
    z-index: 0;
}

/* Blob magenta — basso destra */
body.login-page::after {
    content: '';
    position: fixed;
    width: 440px; height: 440px;
    border-radius: 50%;
    background: rgba(219, 39, 119, 0.12);
    filter: blur(80px);
    bottom: -100px; right: -100px;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ── */
.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* ── Card glassmorphism ── */
.login-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 44px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Brand / logo ── */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.5);
    flex-shrink: 0;
}

.brand-text {
    text-align: left;
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    font-family: 'Space Grotesk', sans-serif;
}

.brand-name span {
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-claim {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.30);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-top: 2px;
    font-family: 'Space Grotesk', sans-serif;
}

.login-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

/* ── Form groups ── */
.login-card .form-group {
    margin-bottom: 14px;
}

.login-card .form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    margin-bottom: 6px;
    font-family: 'Space Grotesk', sans-serif;
}

/* ── Inputs ── */
.login-card .form-control {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    padding: 11px 14px;
    font-size: 0.92rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    height: auto;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.login-card .form-control:focus {
    border-color: rgba(139, 92, 246, 0.65);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    outline: none;
}

/* Autofill override — sfondo scuro invece del giallo browser */
.login-card .form-control:-webkit-autofill,
.login-card .form-control:-webkit-autofill:hover,
.login-card .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #130d2a inset;
    -webkit-text-fill-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}

/* ── Bottone login ── */
.login-card .btn-login {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #7c3aed 0%, #db2777 100%);
    color: #fff;
    font-size: 0.97rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 22px rgba(124, 58, 237, 0.38);
    text-decoration: none;
    text-align: center;
}

/* Shimmer su hover */
.login-card .btn-login::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transition: left 0.45s ease;
}

.login-card .btn-login:hover::before { left: 160%; }

.login-card .btn-login:hover {
    opacity: 0.94;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.48);
    color: #fff;
    text-decoration: none;
}

.login-card .btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}

.login-card .btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
    color: #fff;
}

/* ── Messaggio errore dark glass ── */
.login-card .alert-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.22) !important;
    color: #fca5a5 !important;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 16px;
    padding: 12px 16px;
    font-family: 'Space Grotesk', sans-serif;
}

/* ── Footer note quasi invisibile ── */
.login-note {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.11);
    text-align: center;
    margin-top: 22px;
    margin-bottom: 0;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.3px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 22px;
    }
}
