﻿:root {
    --navy-950: #07111f;
    --navy-900: #0b1729;
    --navy-850: #0e1d32;
    --navy-800: #12233a;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --cyan-400: #22d3ee;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --green-500: #10b981;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --panel-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: var(--slate-50);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(560px, 1.15fr) minmax(430px, 0.85fr);
    min-height: 100vh;
}

/* =========================================================
   AREA VISUALE
   ========================================================= */

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    padding: 42px 54px 32px;
    color: var(--white);
    background: radial-gradient( circle at 76% 18%, rgba(37, 99, 235, 0.24), transparent 34% ), radial-gradient( circle at 12% 84%, rgba(45, 212, 191, 0.16), transparent 30% ), linear-gradient( 145deg, var(--navy-950) 0%, var(--navy-900) 48%, #0a2135 100% );
}

    .login-visual::before {
        position: absolute;
        inset: 0;
        pointer-events: none;
        content: "";
        opacity: 0.34;
        background-image: linear-gradient( rgba(255, 255, 255, 0.035) 1px, transparent 1px ), linear-gradient( 90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px );
        background-size: 52px 52px;
        mask-image: linear-gradient( to bottom, rgba(0, 0, 0, 0.75), transparent 88% );
    }

    .login-visual::after {
        position: absolute;
        right: -170px;
        bottom: -220px;
        width: 540px;
        height: 540px;
        pointer-events: none;
        content: "";
        border: 1px solid rgba(94, 234, 212, 0.12);
        border-radius: 50%;
        box-shadow: 0 0 0 70px rgba(94, 234, 212, 0.025), 0 0 0 140px rgba(59, 130, 246, 0.025);
    }

.visual-background {
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
}

.visual-background-one {
    top: 9%;
    right: 7%;
    width: 180px;
    height: 180px;
    background: radial-gradient( circle, rgba(59, 130, 246, 0.24), rgba(59, 130, 246, 0) );
}

.visual-background-two {
    bottom: 19%;
    left: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient( circle, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0) );
}

.brand {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 14px;
    align-items: center;
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--teal-300);
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 15px;
    background: linear-gradient( 145deg, rgba(94, 234, 212, 0.12), rgba(59, 130, 246, 0.1) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 14px 35px rgba(0, 0, 0, 0.16);
}

    .brand-mark svg {
        width: 29px;
        height: 29px;
        fill: currentColor;
    }

.brand-name {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.brand-caption {
    margin-top: 2px;
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.visual-content {
    position: relative;
    z-index: 2;
    width: min(780px, 100%);
    margin: auto 0;
    padding: 48px 0 30px;
}

.eyebrow,
.login-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--teal-300);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.17em;
}

    .eyebrow::before {
        width: 28px;
        height: 1px;
        margin-right: 10px;
        content: "";
        background: currentColor;
    }

.visual-content h1 {
    max-width: 710px;
    margin: 18px 0 18px;
    color: var(--white);
    font-size: clamp(2.7rem, 4.1vw, 4.65rem);
    font-weight: 720;
    line-height: 1.04;
    letter-spacing: -0.055em;
}

    .visual-content h1 span {
        display: block;
        color: transparent;
        background: linear-gradient( 90deg, var(--teal-300), #7dd3fc );
        background-clip: text;
        -webkit-background-clip: text;
    }

.visual-description {
    max-width: 650px;
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 1.04rem;
    line-height: 1.72;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.process-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 50px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(18px);
}

    .process-card::after {
        position: absolute;
        top: -60px;
        right: -50px;
        width: 150px;
        height: 150px;
        pointer-events: none;
        content: "";
        border-radius: 50%;
        background: radial-gradient( circle, rgba(59, 130, 246, 0.15), transparent 68% );
    }

.process-card-wide {
    grid-column: 1 / -1;
    min-height: 245px;
}

.process-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

    .process-header strong {
        display: block;
        margin-top: 5px;
        color: var(--white);
        font-size: 1.04rem;
    }

.process-label {
    display: block;
    color: rgba(203, 213, 225, 0.54);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    color: var(--teal-300);
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid rgba(94, 234, 212, 0.15);
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.08);
}

    .status-chip::before {
        width: 6px;
        height: 6px;
        margin-right: 6px;
        content: "";
        border-radius: 50%;
        background: var(--teal-300);
        box-shadow: 0 0 12px rgba(94, 234, 212, 0.72);
    }

.chart-area {
    height: 126px;
    margin-top: 12px;
}

    .chart-area svg {
        width: 100%;
        height: 100%;
        overflow: visible;
    }

.chart-grid {
    fill: none;
    stroke: rgba(148, 163, 184, 0.1);
    stroke-width: 1;
}

.chart-fill {
    fill: url("#chartFill");
}

.chart-line {
    fill: none;
    stroke: var(--teal-300);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 5px 7px rgba(94, 234, 212, 0.2));
}

.chart-point {
    fill: var(--navy-900);
    stroke: var(--teal-300);
    stroke-width: 3;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    color: rgba(148, 163, 184, 0.48);
    font-size: 0.68rem;
}

.metric-icon {
    display: grid;
    width: 41px;
    height: 41px;
    margin-bottom: 19px;
    place-items: center;
    border-radius: 13px;
}

    .metric-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.metric-icon-blue {
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.17);
    background: rgba(59, 130, 246, 0.11);
}

.metric-icon-green {
    color: var(--teal-300);
    border: 1px solid rgba(94, 234, 212, 0.17);
    background: rgba(45, 212, 191, 0.1);
}

.metric-title {
    display: block;
    margin-top: 6px;
    color: var(--white);
    font-size: 0.95rem;
}

.metric-progress {
    height: 5px;
    margin: 17px 0 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

    .metric-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient( 90deg, var(--blue-500), var(--teal-300) );
    }

.process-card small {
    color: rgba(203, 213, 225, 0.52);
    font-size: 0.75rem;
}

.visual-footer {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 9px;
    align-items: center;
    color: rgba(203, 213, 225, 0.5);
    font-size: 0.74rem;
}

.footer-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.58);
}

/* =========================================================
   PANNELLO LOGIN
   ========================================================= */

.login-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 36px 52px 24px;
    background: radial-gradient( circle at 100% 0, rgba(59, 130, 246, 0.07), transparent 28% ), var(--white);
}

.login-panel-inner {
    width: min(440px, 100%);
    margin: auto;
}

.mobile-brand {
    display: none;
    gap: 12px;
    align-items: center;
    margin-bottom: 42px;
}

    .mobile-brand .brand-mark {
        color: var(--blue-600);
        border-color: rgba(37, 99, 235, 0.13);
        background: rgba(37, 99, 235, 0.06);
        box-shadow: none;
    }

    .mobile-brand .brand-name {
        color: var(--slate-900);
    }

.login-heading {
    margin-bottom: 34px;
}

.login-kicker {
    margin-bottom: 12px;
    color: var(--blue-600);
}

.login-heading h2 {
    margin: 0;
    color: var(--slate-950);
    font-size: clamp(2.15rem, 3vw, 2.75rem);
    font-weight: 760;
    letter-spacing: -0.045em;
}

.login-heading p {
    margin: 12px 0 0;
    color: var(--slate-500);
    font-size: 0.98rem;
    line-height: 1.65;
}

.login-form {
    width: 100%;
}

.validation-summary {
    display: none;
    margin-bottom: 22px;
    padding: 13px 15px;
    color: #991b1b;
    font-size: 0.86rem;
    line-height: 1.5;
    border: 1px solid #fecaca;
    border-radius: 13px;
    background: var(--danger-light);
}

    .validation-summary.validation-summary-errors {
        display: block;
    }

    .validation-summary ul {
        margin: 0;
        padding-left: 18px;
    }

.form-field {
    margin-bottom: 21px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label {
    display: block;
    margin: 0 0 9px;
    color: var(--slate-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

.form-control {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 47px;
    color: var(--slate-900);
    font-size: 0.94rem;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    outline: none;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

    .form-control::placeholder {
        color: var(--slate-400);
    }

    .form-control:hover {
        border-color: var(--slate-300);
    }

    .form-control:focus {
        color: var(--slate-900);
        border-color: var(--blue-500);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11), 0 8px 24px rgba(15, 23, 42, 0.055);
    }

.input-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 17px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--slate-400);
    pointer-events: none;
    transform: translateY(-50%);
    transition: color 160ms ease;
}

.input-shell:focus-within .input-icon {
    color: var(--blue-600);
}

.input-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--slate-400);
    border: 0;
    border-radius: 9px;
    outline: none;
    cursor: pointer;
    background: transparent;
    transform: translateY(-50%);
    transition: color 150ms ease, background-color 150ms ease;
}

    .password-toggle:hover,
    .password-toggle:focus-visible {
        color: var(--blue-600);
        background: var(--slate-100);
    }

    .password-toggle svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.eye-closed {
    display: none;
}

.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.field-validation {
    display: block;
    min-height: 19px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 0.76rem;
    font-weight: 550;
}

    .field-validation:empty {
        min-height: 0;
        margin-top: 0;
    }

.input-validation-error {
    border-color: #f87171;
    background-color: #fffafa;
}

    .input-validation-error:focus {
        border-color: var(--danger);
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.09);
    }

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3px 0 27px;
}

.remember-option {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--slate-600);
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.custom-checkbox {
    display: grid;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    place-items: center;
    color: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: 6px;
    background: var(--white);
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

    .custom-checkbox svg {
        width: 11px;
        height: 9px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0;
        transform: scale(0.65);
        transition: opacity 120ms ease, transform 120ms ease;
    }

.remember-checkbox:checked + .custom-checkbox {
    border-color: var(--blue-600);
    background: var(--blue-600);
}

    .remember-checkbox:checked + .custom-checkbox svg {
        opacity: 1;
        transform: scale(1);
    }

.remember-checkbox:focus-visible + .custom-checkbox {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-button {
    display: flex;
    width: 100%;
    height: 56px;
    padding: 0 20px;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 720;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient( 135deg, var(--blue-700), var(--blue-500) );
    box-shadow: 0 13px 27px rgba(37, 99, 235, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

    .login-button svg {
        width: 19px;
        height: 19px;
        margin-left: 11px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform 160ms ease;
    }

    .login-button:hover {
        filter: brightness(1.04);
        box-shadow: 0 17px 32px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
        transform: translateY(-1px);
    }

        .login-button:hover svg {
            transform: translateX(3px);
        }

    .login-button:active {
        transform: translateY(0);
    }

    .login-button:focus-visible {
        outline: 3px solid rgba(59, 130, 246, 0.22);
        outline-offset: 3px;
    }

.security-note {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    color: var(--slate-400);
    font-size: 0.73rem;
}

.security-icon {
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    color: var(--green-500);
}

    .security-icon svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.login-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 35px;
    color: var(--slate-400);
    font-size: 0.68rem;
}

.footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--slate-300);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    .login-page {
        grid-template-columns: minmax(500px, 1fr) minmax(420px, 0.82fr);
    }

    .login-visual {
        padding-inline: 40px;
    }

    .visual-content h1 {
        font-size: 3.35rem;
    }

    .login-panel {
        padding-inline: 40px;
    }
}

@media (max-width: 960px) {
    .login-page {
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 36px 24px 22px;
    }

    .login-panel-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: calc(100vh - 130px);
    }

    .mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .login-panel {
        padding-inline: 20px;
    }

    .login-panel-inner {
        width: 100%;
    }

    .mobile-brand {
        margin-bottom: 34px;
    }

    .login-heading {
        margin-bottom: 28px;
    }

        .login-heading h2 {
            font-size: 2.1rem;
        }

    .form-control,
    .login-button {
        height: 52px;
    }

    .login-footer {
        flex-wrap: wrap;
        row-gap: 5px;
        text-align: center;
    }
}

@media (max-height: 790px) and (min-width: 961px) {
    .login-visual {
        padding-top: 28px;
        padding-bottom: 22px;
    }

    .visual-content {
        padding-top: 24px;
        padding-bottom: 20px;
    }

        .visual-content h1 {
            margin-top: 12px;
            margin-bottom: 12px;
            font-size: 2.85rem;
        }

    .visual-description {
        font-size: 0.92rem;
    }

    .process-grid {
        margin-top: 22px;
    }

    .process-card-wide {
        min-height: 195px;
    }

    .chart-area {
        height: 85px;
    }

    .process-card:not(.process-card-wide) {
        min-height: 145px;
    }

    .login-panel {
        padding-top: 24px;
    }

    .login-heading {
        margin-bottom: 24px;
    }

    .form-field {
        margin-bottom: 16px;
    }

    .login-options {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
