/*
 * METAGEST v1.35.3 — accesso e scelta interfaccia
 * Foglio autonomo: non richiede Bootstrap.
 */

:root {
    --mg-primary: #0f7fa8;
    --mg-primary-dark: #075f80;
    --mg-surface: #ffffff;
    --mg-text: #10202b;
    --mg-muted: #667785;
    --mg-border: #dbe5eb;
    --mg-danger-bg: #fff1f2;
    --mg-danger-border: #fecdd3;
    --mg-danger-text: #9f1239;
}

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

html,
body {
    min-height: 100%;
}

body {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    color: var(--mg-text);
    background-color: #075f80;
    background-image:
        linear-gradient(135deg, rgba(1, 22, 64, 0.78) 0%, rgba(0, 124, 183, 0.55) 100%),
        url("../img/metagest-auth-background.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-wrap {
    display: grid;
    justify-items: center;
    gap: 18px;
    width: min(100%, 420px);
}

.login-card {
    width: 100%;
    padding: 27px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(4, 38, 54, 0.24);
    backdrop-filter: blur(8px);
}

.login-logo {
    display: block;
    width: min(238px, 72vw);
    height: auto;
    margin: 0 auto 18px;
}

.login-title {
    margin: 0 0 5px;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.login-subtitle {
    margin: 0 0 21px;
    color: var(--mg-muted);
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.45;
}

.login-form,
.choice-list {
    display: grid;
    gap: 13px;
}

.choice-list {
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: #344854;
    font-size: 0.86rem;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    color: var(--mg-text);
    background: #ffffff;
    border: 1px solid #cfd9e2;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
    border-color: var(--mg-primary);
    box-shadow: 0 0 0 4px rgba(15, 127, 168, 0.12);
}

.login-button {
    width: 100%;
    color: #ffffff;
    background: var(--mg-primary);
    border: 1px solid var(--mg-primary);
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.login-button {
    height: 44px;
    margin-top: 3px;
    font-size: 1rem;
}

.login-button:hover {
    color: #ffffff;
    background: var(--mg-primary-dark);
    border-color: var(--mg-primary-dark);
    transform: translateY(-1px);
}

.choice-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 13px 14px;
    color: var(--mg-text);
    background: #ffffff;
    border: 1px solid #cfd9e2;
    border-radius: 12px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.choice-button:hover,
.choice-button:focus-visible {
    color: var(--mg-text);
    background: #eaf5f9;
    border-color: var(--mg-primary);
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.075);
    outline: none;
    transform: translateY(-1px);
}

.choice-button strong,
.choice-button span {
    display: block;
}

.choice-button strong {
    margin-bottom: 2px;
    font-size: 0.98rem;
    font-weight: 800;
}

.choice-button span {
    color: var(--mg-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.login-alert {
    margin: 0 0 14px;
    padding: 10px 12px;
    color: var(--mg-danger-text);
    background: var(--mg-danger-bg);
    border: 1px solid var(--mg-danger-border);
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.45;
}

.login-footer {
    margin-top: 16px;
    color: var(--mg-muted);
    text-align: center;
    font-size: 0.78rem;
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 22px;
        border-radius: 18px;
    }

    .login-logo {
        width: min(220px, 72vw);
    }
}
