﻿/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE — LIGHTER BLUE (Card Layout)
   Card centrata, sfondo blu più chiaro, accenti blue #2563eb
   ═══════════════════════════════════════════════════════════════════════════ */

body.login-page {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a7f 50%, #1e3a5f 100%) !important;
    min-height: 100vh;
    padding-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: 0;
}

/* Card centrata */
.login-card {
    display: flex;
    width: 1100px;
    max-width: 95vw;
    min-height: 680px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 80px rgba(30, 58, 138, 0.08);
}


/* ═══════════════════════════════════════════════════════════════════════════
   PANNELLO SINISTRO — BRAND
   ═══════════════════════════════════════════════════════════════════════════ */
.login-brand-panel {
    flex: 0 0 500px;
    background: linear-gradient(160deg, #2a4a7f 0%, #1e3a6a 35%, #1a3055 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 32px 32px;
    position: relative;
    overflow: hidden;
}

    /* Griglia decorativa */
    .login-brand-panel::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
        background-size: 32px 32px;
        pointer-events: none;
    }

/* Logo */
.login-brand-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

    .login-brand-logo img {
        max-width: 380px;
        height: auto;
        filter: drop-shadow(0 0 24px rgba(37, 99, 235, 0.2));
    }

/* Sottotitolo */
.login-brand-subtitle {
    position: relative;
    z-index: 1;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    max-width: 340px;
    line-height: 1.5;
}

/* Features */
.login-features {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 300px;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font-size: 16px;
    flex-shrink: 0;
}

.login-feature-text h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 1px 0;
}

.login-feature-text p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   PANNELLO DESTRO — FORM
   ═══════════════════════════════════════════════════════════════════════════ */
.login-form-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 44px;
    position: relative;
}

    /* Linea decorativa */
    .login-form-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #1e3a8a 100%);
    }

.login-form-header {
    margin-bottom: 32px;
}

    .login-form-header h2 {
        font-size: 1.6rem;
        font-weight: 800;
        color: #0f172a;
        margin: 0 0 6px 0;
    }

    .login-form-header p {
        font-size: 0.88rem;
        color: #64748b;
        margin: 0;
    }

/* Input */
.login-form-group {
    margin-bottom: 18px;
}

    .login-form-group label {
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #334155;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .login-input-wrapper i {
        position: absolute;
        left: 14px;
        color: #94a3b8;
        font-size: 15px;
        transition: color 0.3s ease;
        pointer-events: none;
        z-index: 1;
    }

    .login-input-wrapper input {
        width: 100%;
        padding: 12px 14px 12px 44px;
        border: 1.5px solid #e2e8f0;
        border-radius: 10px;
        font-size: 0.9rem;
        color: #0f172a;
        background: #f8fafc;
        transition: all 0.3s ease;
        outline: none;
    }

        .login-input-wrapper input.form-control {
            padding: 12px 14px 12px 44px !important;
            border: 1.5px solid #e2e8f0 !important;
            border-radius: 10px !important;
            font-size: 0.9rem !important;
            color: #0f172a !important;
            background: #f8fafc !important;
            height: auto !important;
            box-shadow: none !important;
        }

        .login-input-wrapper input::placeholder {
            color: #94a3b8;
        }

        .login-input-wrapper input:hover {
            border-color: #cbd5e1;
            background: #ffffff;
        }

        .login-input-wrapper input:focus,
        .login-input-wrapper input.form-control:focus {
            border-color: #2563eb !important;
            background: #ffffff !important;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
        }

    .login-input-wrapper:has(input:focus) i {
        color: #2563eb;
    }

/* Ricordami */
.login-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .login-remember label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.82rem;
        color: #64748b;
        cursor: pointer;
    }

    .login-remember input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #2563eb;
        cursor: pointer;
    }

.login-forgot-link {
    font-size: 0.82rem;
    color: #2563eb !important;
    text-decoration: none !important;
    font-weight: 500;
}

    .login-forgot-link:hover {
        color: #1d4ed8 !important;
        text-decoration: underline !important;
    }

/* Bottone */
.login-submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .login-submit-btn:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    }

    .login-submit-btn:active {
        transform: translateY(0);
    }

    .login-submit-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        transition: left 0.5s ease;
    }

    .login-submit-btn:hover::after {
        left: 100%;
    }

.login-version {
    text-align: center;
    margin-top: 12px;
    font-size: 0.7rem;
    color: #cbd5e1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ALERT / VALIDAZIONE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-alert i {
    font-size: 15px;
    flex-shrink: 0;
}

.login-form-panel .input-validation-error {
    border-color: #dc2626 !important;
}

.login-form-panel .field-validation-error {
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 4px;
    display: block;
}

.login-form-panel .validation-summary-errors {
    display: flex !important;
}

    .login-form-panel .validation-summary-errors ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

.login-form-panel .validation-summary-valid {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .login-card {
        flex-direction: column;
        width: 440px;
        min-height: auto;
    }

    .login-brand-panel {
        flex: none;
        padding: 32px 28px 24px;
    }

    .login-features {
        display: none;
    }

    .login-form-panel {
        padding: 36px 30px;
    }
}

@media (max-width: 480px) {
    .login-card {
        width: 100%;
        max-width: 100vw;
        min-height: 100vh;
        border-radius: 0;
    }

    .login-form-panel {
        padding: 28px 20px;
    }

    .login-brand-logo img {
        max-width: 180px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ANIMAZIONI
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-card {
    animation: loginFadeIn 0.5s ease;
}

.login-brand-logo {
    animation: loginFadeIn 0.5s ease 0.1s both;
}

.login-brand-subtitle {
    animation: loginFadeIn 0.4s ease 0.2s both;
}

.login-feature-item:nth-child(1) {
    animation: loginFadeLeft 0.4s ease 0.25s both;
}

.login-feature-item:nth-child(2) {
    animation: loginFadeLeft 0.4s ease 0.35s both;
}

.login-feature-item:nth-child(3) {
    animation: loginFadeLeft 0.4s ease 0.45s both;
}

.login-form-header {
    animation: loginFadeIn 0.4s ease 0.15s both;
}
