/* ==========================================================================
   Login — stile coerente con la homepage ("... come un soffio ...")
   Palette: verdi/teal (#2a9b8e, #1f7a6e, #15544c, #0b2b27) + glassmorphism
   Font: Caveat (corsivo) + Outfit (sans-serif)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(42, 155, 142, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(230, 175, 46, 0.12) 0%, transparent 45%),
        linear-gradient(135deg, rgba(10, 42, 38, 0.55) 0%, rgba(26, 99, 90, 0.45) 50%, rgba(14, 62, 56, 0.6) 100%),
        url('../images/hero.webp') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.45) 100%);
    z-index: 1;
}

.login-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.login-logo img {
    width: 46px;
    height: 46px;
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.6));
}

.login-logo span {
    font-family: 'Caveat', cursive;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.login-card {
    background: rgba(14, 45, 38, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 155, 142, 0.35);
    border-radius: 22px;
    padding: 40px 34px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
    animation: loginAppear 0.7s ease-out both;
}

@keyframes loginAppear {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-title {
    font-family: 'Caveat', cursive;
    font-size: 44px;
    font-weight: 700;
    font-style: italic;
    text-align: center;
    line-height: 1.15;
    margin-bottom: 6px;
    text-shadow: 0 0 22px rgba(42, 155, 142, 0.7), 0 3px 12px rgba(0, 0, 0, 0.55);
}

.login-title .heart {
    display: inline-block;
    margin: 0 6px;
    font-size: 34px;
    animation: pulseHeart 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.login-subtitle {
    font-family: 'Caveat', cursive;
    font-size: 20px;
    font-style: italic;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    padding: 13px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #ffffff;
    background: rgba(10, 40, 36, 0.65);
    border: 1px solid rgba(42, 155, 142, 0.4);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.login-input:focus {
    border-color: rgba(42, 155, 142, 0.9);
    background: rgba(10, 40, 36, 0.85);
    box-shadow: 0 0 0 3px rgba(42, 155, 142, 0.25);
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2a9b8e 0%, #1f7a6e 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(42, 155, 142, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #238075 0%, #175e55 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(42, 155, 142, 0.5);
}

.login-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.login-message {
    display: none;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.login-message.error {
    display: block;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.login-message.success {
    display: block;
    background: rgba(42, 155, 142, 0.2);
    border: 1px solid rgba(42, 155, 142, 0.6);
    color: #d1fae5;
}

.login-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Caveat', cursive;
    font-size: 17px;
}

.login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px;
    }

    .login-title {
        font-size: 36px;
    }
}
