/* =========================================================
   BILANCIO ROMA — PORTAL AUTH CSS
   Login / Registrazione / accesso protetto
   ========================================================= */

body.page-portal-login,
body.page-portal-register {
    background:
        radial-gradient(circle at top, rgba(143, 20, 56, 0.20) 0%, rgba(143, 20, 56, 0.00) 38%),
        linear-gradient(180deg, #120308 0%, #1b050c 100%);
    min-height: 100vh;
}

body.page-portal-login .page-wrap,
body.page-portal-register .page-wrap {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 32px 20px 56px;
    box-sizing: border-box;
}

a.site-header__auth-link {
    font-family: 'DM Serif Display';
    text-decoration: none;
    color: #e8bd68;
    padding: 0 15px;
}

.auth-shell {
    max-width: 620px;
    margin: 42px auto;
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 30px 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(38, 8, 14, 0.97) 0%, rgba(24, 5, 10, 0.97) 100%);
    border: 1px solid rgba(143, 30, 61, 0.24);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(214, 166, 50, 0.10) 0%, rgba(214, 166, 50, 0.00) 30%),
        radial-gradient(circle at bottom left, rgba(143, 20, 56, 0.10) 0%, rgba(143, 20, 56, 0.00) 34%);
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

.auth-eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rm-gold-300);
}

.auth-card h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.02;
    color: #fff7f9;
    font-family: 'DM Serif Display';
}

.auth-card p.auth-intro {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--rm-text-dim);
}

.auth-form {
    margin-top: 8px;
}

.auth-grid {
    display: grid;
    gap: 14px;
}

.auth-grid .field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-grid .field label {
    font-size: 13px;
    font-weight: 700;
    color: #f2d9df;
}

.auth-grid .field input {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    color: #fff;
    padding: 0 14px;
    box-sizing: border-box;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.auth-grid .field input:focus {
    border-color: rgba(214,166,50,.55);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 3px rgba(214,166,50,.12);
}

.auth-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--rm-gold-500), #c98a2b);
    color: #241705;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.auth-link {
    color: var(--rm-gold-300);
    text-decoration: none;
    font-weight: 700;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-note {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--rm-text-mute);
}

.alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(193,67,67,.14);
    border-color: rgba(193,67,67,.30);
    color: #ffd7df;
}

.alert-success {
    background: rgba(79,174,109,.14);
    border-color: rgba(79,174,109,.34);
    color: #d8ffe9;
}

@media (max-width: 640px) {
    body.page-portal-login .page-wrap,
    body.page-portal-register .page-wrap {
        padding: 22px 14px 40px;
    }

    .auth-shell {
        margin: 22px auto;
    }

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

    .auth-card h1 {
        font-size: 28px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-btn {
        width: 100%;
    }
}
