*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:    #0c2340;
    --blue:    #1a56db;
    --blue-lt: #e8f0fe;
    --teal:    #0d9488;
    --teal-lt: #ccfbf1;
    --text:    #0f172a;
    --muted:   #64748b;
    --border:  #e2e8f0;
    --bg:      #f8fafc;
    --white:   #ffffff;
    --red:     #dc2626;
    --red-lt:  #fef2f2;
    --font:    'Plus Jakarta Sans', sans-serif;
    --radius:  12px;
}

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ─── Layout split ─────────────────────────────────────── */
.login-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── Pannello sinistro (brand) ─────────────────────────── */
.panel-brand {
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 56px;
    position: relative;
    overflow: hidden;
}

.panel-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.panel-brand::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(13,148,136,0.35) 0%, rgba(26,86,219,0.15) 60%, transparent 80%);
    pointer-events: none;
}

.brand-top { position: relative; z-index: 1; }

.brand-logo {
    display: inline-flex;
    align-items: baseline;
}
.brand-logo .fuel-word {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.03em;
}
.brand-tagline {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-visual {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-headline {
    font-size: 34px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 340px;
}
.brand-headline span { color: var(--teal); }

.brand-desc {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.48);
    line-height: 1.7;
    max-width: 320px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 11.5px;
    color: rgba(255,255,255,0.22);
    font-weight: 500;
}

/* ─── Pannello destro (form) ────────────────────────────── */
.panel-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--white);
}

.form-box {
    width: 100%;
    max-width: 380px;
    animation: slideUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 10px;
}

.form-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 36px;
    line-height: 1.55;
}

/* ─── Campi ─────────────────────────────────────────────── */
.field-group { margin-bottom: 18px; }

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.field-wrap { position: relative; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.field-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-wrap input::placeholder { color: #94a3b8; font-weight: 400; }
.field-wrap input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.09);
}
.field-wrap input:focus ~ .field-icon { color: var(--blue); }

/* ─── Alert errore ──────────────────────────────────────── */
.alert-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    background: var(--red-lt);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--red);
    margin-bottom: 22px;
    animation: shake 0.38s cubic-bezier(.36,.07,.19,.97) both;
}
.alert-error i { font-size: 15px; flex-shrink: 0; }

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px);  }
    30%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px);  }
    50%      { transform: translateX(-2px); }
}

/* ─── Bottone ───────────────────────────────────────────── */
.btn-login {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--radius);
    background: var(--navy);
    color: var(--white);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.015em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,148,136,0.2) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-login:hover {
    background: #112d52;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(12,35,64,0.2);
}
.btn-login:hover::after { opacity: 1; }
.btn-login:active { transform: translateY(0); box-shadow: none; }

/* ─── Separatore ────────────────────────────────────────── */
.form-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 0;
    color: var(--border);
}
.form-sep::before,
.form-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.form-sep span { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; text-transform: uppercase; }

.form-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}
.form-footer strong { color: var(--text); font-weight: 700; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .login-wrap { grid-template-columns: 1fr; }
    .panel-brand { display: none; }
    .panel-form { padding: 32px 24px; background: var(--bg); }
}

.side-nav .side-nav-link.text-muted {
    cursor: not-allowed !important;
    background-color: rgba(0, 0, 0, 0.02); /* Sfumatura leggera per i non attivi */
    border-radius: 6px;
    margin: 2px 8px;
}

.side-nav .side-nav-link.text-muted:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Leggero feedback al passaggio del mouse anche se disattivato */
}

/* Effetto visivo pulito per i badge dei servizi non attivi */
.side-nav .badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 0.35em 0.65em;
}