/* Layout for the sign-in and account pages (Areas/Identity/Pages/_Layout.cshtml) */
.account-header {
    background-image: linear-gradient(90deg, rgb(5, 39, 103) 0%, #3a0647 100%);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}

    .account-header a, .account-header .btn-link {
        color: #fff;
        text-decoration: none;
    }

        .account-header a:hover, .account-header .btn-link:hover {
            text-decoration: underline;
        }

.account-brand {
    font-size: 1.25rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .account-brand img {
        height: 2rem;
    }

/* On phones the account pages show the address in their own header, so the top bar drops it */
@media (max-width: 575.98px) {
    .account-user {
        display: none;
    }
}

.account-main {
    padding-bottom: 3rem;
}

.authenticator-qr svg {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
}

/* DA | EN toggle in the account header */
.account-language {
    display: inline-flex;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

    .account-language a {
        padding: 0.2rem 0.55rem;
    }

        .account-language a + a {
            border-left: 1px solid rgba(255,255,255,0.4);
        }

        .account-language a:hover {
            text-decoration: none;
            background-color: rgba(255,255,255,0.15);
        }

        .account-language a.active {
            background-color: rgba(255,255,255,0.35);
        }

/* ---------------------------------------------------------------------------
   Sign-in pages (log in, register, two-factor): a centred card on the same
   gradient as the side menu, with the wizard on the left
   --------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    background-color: #1a1446;
    background-image:
        radial-gradient(60% 50% at 85% 10%, rgba(250, 204, 21, 0.10) 0%, transparent 70%),
        radial-gradient(70% 60% at 10% 100%, rgba(147, 51, 234, 0.45) 0%, transparent 70%),
        linear-gradient(160deg, #0b2463 0%, #1e1452 55%, #3a0647 100%);
    color: var(--auth-ink);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1rem 2rem;
}

.auth-topbar {
    width: 100%;
    max-width: 960px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0 0;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

    .auth-brand:hover {
        color: #fff;
    }

.auth-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    color: #3b0764;
}

.auth-brand-mark {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    margin: -0.25rem 0;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

/* Theme and language pickers, side by side */
.auth-switches {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* DA | EN pill, as in the side menu */
.auth-language {
    display: inline-flex;
    padding: 2px;
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
}

    .auth-language a {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        border-radius: 999px;
        padding: 0.2rem 0.6rem;
    }

        .auth-language a:hover {
            color: #fff;
        }

        .auth-language a.active {
            background-color: #fff;
            color: #1e1b4b;
        }

.auth-card {
    width: 100%;
    max-width: 960px;
    margin: auto 0;
    display: grid;
    grid-template-columns: 5fr 6fr;
    background-color: var(--auth-card);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(8, 4, 40, 0.55), 0 0 0 1px rgba(255,255,255,0.06);
}

/* Left panel: wizard and what an account gives you */
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.5rem 2.25rem;
    color: #fff;
    background-color: #1e1452;
    background-image:
        radial-gradient(90% 55% at 50% 30%, rgba(168, 85, 247, 0.45) 0%, transparent 70%),
        linear-gradient(180deg, #0b2463 0%, #1e1452 60%, #3a0647 100%);
}

.auth-wizard {
    display: block;
    width: 70%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 14px 32px rgba(168, 85, 247, 0.55));
    animation: auth-float 6s ease-in-out infinite;
}

@keyframes auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-wizard {
        animation: none;
    }
}

.auth-hero h2 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
}

.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.85);
}

    .auth-perks li {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

.auth-perk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background-color: rgba(255,255,255,0.1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    color: #fde047;
}

/* Right panel: the form */
.auth-form {
    padding: 2.75rem 2.75rem 2.5rem;
}

    /* Two-factor pages come from the built-in UI and use Bootstrap columns; let them fill the card */
    .auth-form .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .auth-form > h1,
    .auth-form .auth-heading h1 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--auth-heading);
        letter-spacing: -0.01em;
    }

.auth-heading {
    margin-bottom: 1.75rem;
}

    .auth-heading h1 {
        margin: 0.9rem 0 0.35rem;
    }

    .auth-heading p {
        margin: 0;
        color: var(--auth-muted);
        font-size: 0.95rem;
    }

.auth-heading-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.auth-form .form-floating > .form-control {
    border-radius: 0.85rem;
    border-color: var(--auth-line);
    background-color: var(--auth-field);
    color: var(--auth-heading);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

    .auth-form .form-floating > .form-control:focus {
        background-color: var(--auth-field-focus);
        border-color: #8b5cf6;
        color: var(--auth-heading);
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
    }

/* Browser autofill paints filled fields yellow (Chrome/Edge/Safari) or tints them (Firefox)
   until the user edits them; keep autofilled fields looking like any filled field */
.auth-form .form-control:-webkit-autofill,
.auth-form .form-control:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--auth-heading);
    caret-color: var(--auth-heading);
    box-shadow: 0 0 0 1000px var(--auth-field) inset;
    transition: background-color 600000s 0s, color 600000s 0s;
}

    .auth-form .form-control:-webkit-autofill:focus {
        box-shadow: 0 0 0 1000px var(--auth-field-focus) inset, 0 0 0 4px rgba(139, 92, 246, 0.18);
    }

.auth-form .form-control:autofill {
    filter: none;
}

.auth-form .form-floating > label {
    color: var(--auth-muted);
}

/* app.css shows placeholders on the right of the label; here the label floats up instead */
.auth-form .form-floating > .form-control::placeholder,
.auth-form .form-floating > .form-control:focus::placeholder {
    color: transparent;
}

.auth-form .form-check-input:checked {
    background-color: #6d28d9;
    border-color: #6d28d9;
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

/* Eye button inside password fields */
.auth-password {
    position: relative;
}

    .auth-password > .form-control {
        padding-right: 3.25rem;
    }

.auth-password-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.6rem;
    background: none;
    color: var(--auth-muted);
    font-size: 1.1rem;
}

    .auth-password-toggle:hover {
        background-color: var(--auth-hover);
        color: var(--auth-heading);
    }

    .auth-password-toggle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
    }

.auth-form .field-validation-error {
    display: block;
    margin: 0.35rem 0 0 0.25rem;
    font-size: 0.85rem;
}

.auth-form .form-control.input-validation-error {
    border-color: #f87171;
}

.auth-hint {
    display: flex;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
    margin-bottom: 1.5rem;
}

/* Register page bot checks: the honeypot sits off screen (not display:none, which simple bots skip) */
.auth-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-turnstile {
    margin: -0.5rem 0 1.25rem;
    min-height: 65px;
}

.auth-alert:not(.validation-summary-valid) {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.85rem;
    background-color: var(--auth-alert-bg);
    border: 1px solid var(--auth-alert-border);
    color: var(--auth-alert-text);
    font-size: 0.9rem;
}

    .auth-alert ul {
        margin: 0;
        padding-left: 1.1rem;
    }

/* Main button: the app's indigo-to-purple, built-in two-factor buttons included */
.auth-form .auth-submit,
.auth-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: 0.85rem;
    background-image: linear-gradient(135deg, #4338ca 0%, #7e22ce 100%);
    box-shadow: 0 10px 24px rgba(109, 40, 217, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .auth-form .auth-submit:hover,
    .auth-form .btn-primary:hover {
        color: #fff;
        filter: brightness(1.08);
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(109, 40, 217, 0.45);
    }

    .auth-form .auth-submit:focus-visible,
    .auth-form .btn-primary:focus-visible {
        color: #fff;
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.35);
    }

    .auth-form .auth-submit .bi-arrow-right {
        transition: transform 0.15s ease;
    }

    .auth-form .auth-submit:hover .bi-arrow-right {
        transform: translateX(3px);
    }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
    font-size: 0.85rem;
    color: var(--auth-faint);
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--auth-line);
    }

.auth-form .auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--auth-secondary-text);
    background-color: var(--auth-secondary-bg);
    border: 1px solid var(--auth-secondary-border);
    border-radius: 0.85rem;
}

    .auth-form .auth-secondary:hover {
        color: var(--auth-secondary-hover-text);
        background-color: var(--auth-secondary-hover-bg);
        border-color: var(--auth-secondary-hover-border);
    }

.auth-form a:not(.btn) {
    color: var(--auth-link);
}

.auth-back {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

    .auth-back:hover {
        color: #fff;
    }

/* Phones and narrow windows: one column, the wizard shrinks into a banner */
@media (max-width: 767.98px) {
    .auth-shell {
        padding: 0.75rem 0.75rem 1.5rem;
    }

    .auth-card {
        grid-template-columns: 1fr;
        margin: 1rem 0 0;
        border-radius: 1.25rem;
    }

    .auth-hero {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 1.25rem 1.25rem;
    }

    .auth-wizard {
        width: 72px;
        margin: 0;
        animation: none;
    }

    .auth-hero h2 {
        font-size: 1.1rem;
        margin: 0;
    }

    .auth-perks {
        display: none;
    }

    .auth-form {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .auth-heading-icon {
        display: none;
    }

    .auth-heading h1 {
        margin-top: 0;
    }
}

/* "Remember me" and "Forgot your password?" share a row */
.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    font-size: 0.95rem;
}

    .auth-options .form-check {
        margin-bottom: 0;
    }
