/* Auth surfaces — login, register, password reset, magic link. */
@import 'tailwindcss' source(none);
@import './core/theme.css';

@source '../views/layouts/auth.blade.php';
@source '../../app/Modules/Identity/Views/auth';
@source '../../app/Modules/Identity/Views/partials';

@layer components {
    .auth-shell {
        display: grid;
        min-height: 100dvh;
        background:
            radial-gradient(90% 60% at 0% 0%, color-mix(in oklab, var(--color-sky-200) 45%, transparent), transparent 55%),
            radial-gradient(70% 50% at 100% 100%, color-mix(in oklab, var(--color-teal-200) 30%, transparent), transparent 50%),
            var(--canvas);
    }

    @media (width >= 64rem) {
        .auth-shell {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        }
    }

    .auth-shell__form-col {
        display: flex;
        flex-direction: column;
        padding: 1.25rem 1.25rem 1.5rem;
    }

    @media (width >= 40rem) {
        .auth-shell__form-col {
            padding: 1.5rem 2.5rem 1.75rem;
        }
    }

    .auth-shell__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .auth-shell__logo {
        margin-inline-start: -.25rem;
        border-radius: .5rem;
        padding: .25rem;
    }

    .auth-shell__logo:focus-visible {
        outline: 2px solid var(--color-focus, var(--color-sky-500));
        outline-offset: 2px;
    }

    .auth-shell__main {
        display: flex;
        flex: 1;
        width: 100%;
        max-width: 28rem;
        margin-inline: auto;
        flex-direction: column;
        justify-content: center;
        padding-block: 2rem;
    }

    .auth-shell__main:focus {
        outline: none;
    }

    .auth-card {
        position: relative;
        padding: 1.35rem 1.25rem 1.45rem;
        border-radius: 1.35rem;
        border: 1px solid color-mix(in oklab, var(--color-navy-900) 9%, transparent);
        background:
            radial-gradient(120% 80% at 100% 0%, color-mix(in oklab, var(--color-teal-100) 55%, transparent), transparent 52%),
            linear-gradient(165deg, var(--surface), color-mix(in oklab, var(--color-sky-50) 40%, var(--surface)));
        box-shadow:
            0 0 0 1px rgb(255 255 255 / .5) inset,
            0 1.25rem 2.75rem rgb(19 43 82 / .1);
    }

    @media (width >= 40rem) {
        .auth-card {
            padding: 1.65rem 1.55rem 1.75rem;
        }
    }

    .auth-card__eyebrow {
        margin: 0 0 .4rem;
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--color-sky-700);
    }

    .auth-card__title {
        margin: 0;
        font-size: clamp(1.45rem, 2.5vw, 1.85rem);
        font-weight: 800;
        letter-spacing: -.035em;
        line-height: 1.15;
        color: var(--ink);
    }

    .auth-card__lede {
        margin: .55rem 0 0;
        color: var(--ink-muted);
        line-height: 1.5;
        max-width: 36rem;
    }

    .auth-card__body--spaced {
        margin-top: 1.5rem;
    }

    /* Premium controls inside auth card */
    .auth-card input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
    .auth-card select,
    .auth-card textarea {
        min-height: 3rem;
        border-radius: .85rem !important;
        border-color: color-mix(in oklab, var(--color-navy-900) 12%, transparent) !important;
        background:
            linear-gradient(180deg, var(--surface), color-mix(in oklab, var(--color-sky-50) 35%, var(--surface))) !important;
        box-shadow: 0 .15rem .45rem rgb(19 43 82 / .04);
        font-weight: 500;
        transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    }

    .auth-card textarea {
        min-height: 6.5rem;
        padding-block: .85rem;
    }

    .auth-card input:not([type='checkbox']):not([type='radio']):hover,
    .auth-card select:hover,
    .auth-card textarea:hover {
        border-color: color-mix(in oklab, var(--color-sky-500) 55%, var(--line)) !important;
    }

    .auth-card input:not([type='checkbox']):not([type='radio']):focus,
    .auth-card select:focus,
    .auth-card textarea:focus {
        border-color: var(--color-sky-500) !important;
        background: var(--surface) !important;
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-sky-400) 22%, transparent) !important;
        outline: none;
    }

    .auth-card label {
        font-size: .84rem;
        letter-spacing: -.01em;
    }

    .auth-card .flex.rounded-md {
        border-radius: .85rem;
        overflow: hidden;
        box-shadow: 0 .15rem .45rem rgb(19 43 82 / .04);
    }

    .auth-card .flex.rounded-md > span:first-child {
        min-height: 3rem;
        border-color: color-mix(in oklab, var(--color-navy-900) 12%, transparent);
        background: color-mix(in oklab, var(--color-sky-50) 70%, var(--surface-sunken));
        font-weight: 700;
    }

    .auth-card .flex.rounded-md > input {
        border-radius: 0 .85rem .85rem 0 !important;
        box-shadow: none;
    }

    .auth-shell__legal {
        margin: 0;
        text-align: center;
        font-size: .8rem;
        color: var(--ink-muted);
    }

    .auth-shell__legal a {
        text-decoration: underline;
        text-underline-offset: 2px;
        color: inherit;
    }

    .auth-shell__legal a:hover {
        color: var(--ink);
    }

    .auth-shell__brand {
        position: relative;
        display: none;
        overflow: hidden;
        flex-direction: column;
        justify-content: space-between;
        padding: 3rem;
        color: #fff;
        background: linear-gradient(155deg, #040d1c 0%, #0a1e3f 45%, #0c355c 100%);
    }

    @media (width >= 64rem) {
        .auth-shell__brand {
            display: flex;
        }
    }

    .auth-shell__orb {
        pointer-events: none;
        position: absolute;
        border-radius: 999px;
        filter: blur(3rem);
    }

    .auth-shell__orb--a {
        inset-inline-end: -8rem;
        top: -8rem;
        width: 28rem;
        height: 28rem;
        background: color-mix(in oklab, var(--color-sky-400) 22%, transparent);
    }

    .auth-shell__orb--b {
        inset-inline-start: -6rem;
        bottom: -10rem;
        width: 26rem;
        height: 26rem;
        background: color-mix(in oklab, var(--color-teal-400) 18%, transparent);
    }

    .auth-shell__grain {
        pointer-events: none;
        position: absolute;
        inset: 0;
        opacity: .08;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    .auth-shell__pitch {
        position: relative;
        margin: 2.5rem 0 0;
        max-width: 28rem;
        font-size: clamp(1.35rem, 2vw, 1.7rem);
        font-weight: 700;
        line-height: 1.3;
        text-wrap: balance;
        color: #fff;
    }

    .auth-shell__stats {
        position: relative;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
        margin: 0;
        padding: 2rem 0 0;
        border-top: 1px solid rgb(255 255 255 / .16);
        list-style: none;
    }

    .auth-shell__stat {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: -.02em;
    }

    .auth-shell__stat-label {
        margin: .2rem 0 0;
        font-size: .8rem;
        color: rgb(255 255 255 / .68);
    }

    .auth-consent {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.05rem;
        border-radius: 1rem;
        border: 1px solid color-mix(in oklab, var(--color-navy-900) 10%, transparent);
        background: color-mix(in oklab, var(--color-sky-50) 55%, var(--surface));
    }
}
