/* =============================================================
   Auth Pages — Split-screen layout
   Brand hero (left) + Form pane (right). Built on tokens.css.
   ============================================================= */

.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
}

@media (min-width: 960px) {
    .auth-split {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }
}

/* -------------------------------------------------------------
   HERO (left brand panel)
   ------------------------------------------------------------- */
.auth-hero {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-12) var(--space-12);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--color-primary) 85%, #fff 0%) 0%, transparent 60%),
        linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 60%, #000 40%) 100%);
    isolation: isolate;
}

@media (min-width: 960px) {
    .auth-hero { display: flex; }
}

/* Platform context — deeper, more "ops console" feel */
body[data-context="platform"] .auth-hero {
    background:
        radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, var(--color-primary) 70%, #fff 0%) 0%, transparent 55%),
        linear-gradient(160deg, #0b1020 0%, #0f172a 45%, color-mix(in srgb, var(--color-primary) 40%, #0f172a 60%) 100%);
}

.auth-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.auth-hero__orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.55;
    mix-blend-mode: screen;
}

.auth-hero__orb--1 {
    width: 28rem; height: 28rem;
    top: -6rem; inset-inline-end: -6rem;
    background: color-mix(in srgb, var(--color-primary) 70%, #fff 30%);
}

.auth-hero__orb--2 {
    width: 22rem; height: 22rem;
    bottom: -4rem; inset-inline-start: -4rem;
    background: color-mix(in srgb, var(--color-primary) 50%, #a855f7 50%);
    opacity: 0.4;
}

.auth-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 75%);
    opacity: 0.6;
}

.auth-hero__top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.auth-hero__logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-hero__mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    display: grid; place-items: center;
    font-weight: 700;
    font-size: var(--text-base);
    color: #fff;
}

.auth-hero__wordmark {
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.95);
}

.auth-hero__body {
    max-width: 32rem;
}

.auth-hero__eyebrow {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin: 0 0 var(--space-4) 0;
}

.auth-hero__title {
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-4) 0;
    color: #fff;
}

.auth-hero__lede {
    font-size: var(--text-lg, 1.0625rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.8);
    margin: 0;
    max-width: 28rem;
}

.auth-hero__foot {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* -------------------------------------------------------------
   PANE (right form panel)
   ------------------------------------------------------------- */
.auth-pane {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    padding: var(--space-6);
    position: relative;
}

@media (min-width: 640px) {
    .auth-pane { padding: var(--space-10); }
}

.auth-pane__mobile-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

@media (min-width: 960px) {
    .auth-pane__mobile-brand { display: none; }
}

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

.auth-pane__mark {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: var(--color-primary);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: var(--text-sm);
}

.auth-pane__wordmark {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.auth-pane__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

.auth-pane__header {
    margin-bottom: var(--space-8);
}

.auth-pane__title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.auth-pane__subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.auth-pane__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-pane__body form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-pane__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    flex-wrap: wrap;
}

.auth-pane__copy {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
}

/* Locale switcher contrast fix for light pane */
body.auth-page .auth-pane__footer button {
    color: var(--text-secondary) !important;
}
body.auth-page .auth-pane__footer button:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

/* Small helper for inline "don't have an account" / "use different account" links */
.auth-aside {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}
.auth-aside a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}
.auth-aside a:hover { text-decoration: underline; }
