/*
 * auth-ui.css
 * Additive premium layer for the authentication pages.
 * Turns the centered card into a split-screen layout (branded hero panel + form).
 * Built on top of auth.css / style.css — nothing below is modified.
 */

/* ---------- Split screen shell ---------- */

.auth-body {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow: hidden;
}

.auth-split {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    width: 100%;
    min-height: 100vh;
}

/* ---------- Branded hero panel ---------- */

.auth-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(32px, 5vw, 72px);
    background:
        radial-gradient(900px 600px at 12% 0%, rgba(91, 141, 239, 0.28), transparent 60%),
        radial-gradient(700px 520px at 90% 100%, rgba(34, 193, 195, 0.18), transparent 55%),
        linear-gradient(160deg, #0a1730 0%, #0e2144 48%, #122c5c 100%);
    color: #fff;
    overflow: hidden;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, #000 40%, transparent 100%);
            mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, #000 40%, transparent 100%);
    pointer-events: none;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.auth-hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.auth-hero-brand i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, #5b8def, #7c5cff);
    box-shadow: 0 10px 26px rgba(91, 141, 239, 0.4);
}

.auth-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8fb7ff;
    margin-bottom: 16px;
}

.auth-hero-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #5b8def, #22c1c3);
}

.auth-hero-text h1 {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-hero-text h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #7fb8ff, #59e0c9);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-text p {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.68);
    max-width: 44ch;
}

.auth-hero-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth-hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.auth-hero-features li i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    color: #0e2144;
    background: linear-gradient(135deg, #7fb8ff, #59e0c9);
    flex-shrink: 0;
}

.auth-hero-quote {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.auth-hero-quote > i {
    font-size: 18px;
    color: #7fb8ff;
    margin-top: 3px;
}

.auth-hero-quote p {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
    font-style: italic;
    color: #eaf1ff;
}

.auth-hero-quote span {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Form panel ---------- */

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(24px, 5vw, 64px);
    background: var(--color-gray-50);
    position: relative;
    overflow: auto;
}

.auth-wrapper {
    max-width: 440px;
    width: 100%;
    margin: 0;
}

.auth-main .auth-brand {
    justify-content: flex-start;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.auth-main .auth-brand i {
    color: var(--color-accent);
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 24px 60px rgba(11, 26, 51, 0.14);
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover), #22c1c3);
}

.auth-card h2 {
    font-size: 24px;
    letter-spacing: -0.01em;
}

/* Inputs */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

/* Submit button — shine sweep */
.auth-form .btn-submit {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.auth-form .btn-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.auth-form .btn-submit:hover::after {
    left: 130%;
}

/* Alerts */
.auth-alert {
    border-radius: var(--radius-md);
    animation: auth-alert-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes auth-alert-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer link row */
.auth-card > p a,
.auth-footer a {
    text-decoration: none;
}

/* OTP input */
.otp-input {
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    background: var(--color-gray-50);
    padding: 14px 16px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 32px 18px;
    }

    .auth-card {
        padding: 32px 24px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .auth-form .btn-submit::after,
    .auth-alert {
        animation: none;
        transition: none;
    }
}

/* ---------- Dark mode ---------- */

[data-theme-mode="dark"] .auth-main {
    background: var(--color-bg);
}

[data-theme-mode="dark"] .auth-card {
    background: var(--color-surface);
    border-color: var(--color-gray-700);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

[data-theme-mode="dark"] .auth-main .auth-brand {
    color: var(--color-text-primary);
}
