/**
 * EVMS — Auth Console
 * Two-column guest/auth layout: dark "events operations" identity panel on the
 * left, sign-in column on the right.
 *
 * Everything is namespaced `.auth-console*` so it cannot collide with INSPINIA.
 * The right-hand panel is built on INSPINIA's own `--ins-*` theme tokens, which
 * are already dark-aware, so `[data-bs-theme=dark]` needs no extra rules here.
 * The left panel is deliberately dark in both themes and uses fixed colours.
 */

.auth-console {
    /* Left panel gradient stops */
    --ac-ink: #0b1220;
    --ac-deep: #10322c;
    --ac-emerald: #12503f;

    /* Accents */
    --ac-accent: #34d399;
    --ac-accent-rgb: 52, 211, 153;
    --ac-sky: #38bdf8;

    /* Left panel type */
    --ac-heading: #ecfdf5;
    --ac-body: #a7c4bc;
    --ac-muted: #8aa39b;

    /* Call to action */
    --ac-cta-from: #10b981;
    --ac-cta-to: #34d399;
    --ac-cta-text: #04140f;

    --ac-display-font: "Outfit", "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--ins-secondary-bg, #fff);
}

@media (min-width: 992px) {
    .auth-console {
        grid-template-columns: minmax(0, 1.08fr) minmax(28rem, 0.92fr);
    }
}

/* ==========================================================================
   Left — identity panel
   ========================================================================== */

.auth-console__identity {
    position: relative;
    display: none;
    min-height: 100svh;
    overflow: hidden;
    padding: 2.5rem;
    color: var(--ac-heading);
    /* Two soft ambient blooms sit above the base gradient for depth — a cool
       sky highlight near the eyebrow, a larger warm emerald bloom bleeding
       off the bottom-right corner, echoing the CTA gradient on the right. */
    background-image:
        radial-gradient(60rem 60rem at 12% 6%, rgba(56, 189, 248, 0.11), transparent 55%),
        radial-gradient(70rem 70rem at 96% 108%, rgba(52, 211, 153, 0.24), transparent 55%),
        linear-gradient(145deg, var(--ac-ink) 0%, var(--ac-deep) 58%, var(--ac-emerald) 100%);
}

/* Fine film-grain texture, tiled from an inline SVG turbulence filter — adds
   tactile depth without any repeating shape that could read as an icon or
   grid. Sits above the gradient/blooms, below the copy (z-index 10). */
.auth-console__identity::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

@media (min-width: 992px) {
    .auth-console__identity {
        display: flex;
        flex-direction: column;
    }
}

@media (min-width: 1200px) {
    .auth-console__identity {
        padding: 3.5rem;
    }
}

.auth-console__copy {
    position: relative;
    z-index: 10;
    margin-top: auto;
    margin-bottom: auto;
    max-width: 36rem;
    padding-block: 4rem;
}

.auth-console__eyebrow {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ac-accent);
}

.auth-console__headline {
    margin: 1.25rem 0 0;
    font-family: var(--ac-display-font);
    font-size: clamp(2.75rem, 4.4vw, 4.5rem);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-wrap: balance;
    color: var(--ac-heading);
}

.auth-console__lede {
    margin: 1.5rem 0 0;
    max-width: 32rem;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ac-body);
}

/* ==========================================================================
   Right — sign-in panel
   ========================================================================== */

.auth-console__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 2.5rem 1.5rem;
    background-color: var(--ins-secondary-bg, #fff);
}

@media (min-width: 576px) {
    .auth-console__panel {
        padding-inline: 2.5rem;
    }
}

@media (min-width: 992px) {
    .auth-console__panel {
        padding-inline: 3rem;
        border-left: 1px solid var(--ins-border-color, #e7e9eb);
    }
}

.auth-console__col {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 26rem;
    margin-inline: auto;
}

.auth-console__brand {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-console__brand img {
    height: 32px;
    width: auto;
}

.auth-console__head {
    text-align: center;
}

.auth-console__kicker {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #0f7a63;
}

[data-bs-theme="dark"] .auth-console__kicker {
    color: #5fe3c0;
}

.auth-console__title {
    margin: 0.5rem 0 0;
    font-family: var(--ac-display-font);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--ins-emphasis-color, #313a46);
}

.auth-console__sub {
    margin: 0.5rem auto 2rem;
    max-width: 22rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ins-secondary-color, #6c757d);
}

.auth-console__footer {
    margin: 3rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--ins-secondary-color, #6c757d);
}

.auth-console__aside {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ins-secondary-color, #6c757d);
}

/* --------------------------------------------------------------------------
   Form primitives — restyled in place. Bootstrap's own class names are kept
   on the elements themselves because auth-password.js and the inline
   handlers select on them (.form-control, .two-factor, .password-bar, and the
   .is-valid / .is-invalid toggles).
   -------------------------------------------------------------------------- */

.auth-console .form-control {
    height: 2.75rem;
    border-radius: 0.5rem;
    background-color: var(--ins-secondary-bg, #fff);
    border-color: var(--ins-border-color, #e7e9eb);
}

.auth-console .form-control:focus {
    border-color: rgba(var(--ac-accent-rgb), 0.55);
    box-shadow: 0 0 0 0.2rem rgba(var(--ac-accent-rgb), 0.15);
}

/* `.input-group-append` is a Bootstrap 4 idiom that the existing auth markup
   still uses; Bootstrap 5 gives it no styles, so it renders as a plain block
   that will not stretch to the input height. Make it a flex item so the eye
   toggle lines up flush with the field. */
.auth-console .input-group .input-group-append {
    display: flex;
    align-items: stretch;
}

.auth-console .input-group .input-group-text {
    border-left: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    background-color: var(--ins-secondary-bg, #fff);
    border-color: var(--ins-border-color, #e7e9eb);
    color: var(--ins-secondary-color, #6c757d);
}

.auth-console .input-group .form-control:not(:last-child) {
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
}

/* Six-box TOTP entry */
.auth-console .two-factor .form-control {
    padding-inline: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Primary call to action. Scoped to .auth-console so the gradient cannot leak
   into the authenticated app, which keeps INSPINIA's flat .btn-primary. */
.auth-console .btn-auth-cta {
    height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--ac-cta-text);
    background-image: linear-gradient(135deg, var(--ac-cta-from), var(--ac-cta-to));
    box-shadow: 0 0.65rem 2rem rgba(16, 185, 129, 0.16);
    transition: opacity 0.15s ease-in-out;
}

.auth-console .btn-auth-cta:hover,
.auth-console .btn-auth-cta:focus {
    color: var(--ac-cta-text);
    background-image: linear-gradient(135deg, var(--ac-cta-from), var(--ac-cta-to));
    opacity: 0.9;
}

.auth-console .btn-auth-cta:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.5);
}

.auth-console .btn-auth-cta:disabled,
.auth-console .btn-auth-cta.disabled {
    color: var(--ac-cta-text);
    background-image: linear-gradient(135deg, var(--ac-cta-from), var(--ac-cta-to));
    opacity: 0.65;
}

.auth-console a {
    color: var(--ins-link-color, #1ab394);
}

.auth-console a:hover {
    color: var(--ins-link-hover-color, #16987e);
}
