/* Oricoms auth page — reference mockup backgrounds & styling */

html,
body {
    overflow-x: hidden;
}

html:has(.auth-page),
body:has(.auth-page) {
    height: 100%;
    overflow: hidden;
    background: #f8f9fb;
}

/*
 * Spacing tokens mirrored from the landing hero
 * (resources/views/landpage/index.blade.php):
 *   max-w-7xl · px-5 / sm:px-8 / lg:px-10
 *   gap-12 / lg:gap-16 · grid-cols-2 · items-center
 *   mt-6 / mt-5 / mt-8 / mt-10 vertical rhythm
 */
.auth-page {
    --landing-max: 80rem;          /* max-w-7xl */
    --landing-px: 1.25rem;         /* px-5 */
    --landing-py: 2rem;
    --landing-gap: 3rem;           /* gap-12 */
    --auth-brand-max: 36rem;       /* max-w-xl companion */
    --auth-card-max: 30rem;        /* 480px */
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: #f8f9fb;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .auth-page {
        --landing-px: 2rem;        /* sm:px-8 */
        --landing-py: 2.5rem;
    }
}

/* Mobile: stacked; login card first (brand panel hidden) */
@media (max-width: 767.98px) {
    .auth-page {
        display: flex !important;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
        max-width: none;
        padding: var(--landing-py) var(--landing-px);
    }

    .auth-page .auth-brand-panel {
        display: none !important;
    }

    .auth-page .auth-form-panel {
        order: 1;
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 !important;
        width: 100%;
    }
}

/* Tablet + desktop: same 50/50 + gap as landing hero
   Outer inset matches max-w-7xl + px-* so bg stays full-bleed */
@media (min-width: 768px) {
    .auth-page {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        align-items: center;                 /* landing: items-center */
        column-gap: var(--landing-gap);
        row-gap: var(--landing-gap);
        width: 100%;
        max-width: none;
        margin: 0;
        padding-top: var(--landing-py);
        padding-bottom: var(--landing-py);
        padding-left: max(var(--landing-px), calc((100vw - var(--landing-max)) / 2 + var(--landing-px)));
        padding-right: max(var(--landing-px), calc((100vw - var(--landing-max)) / 2 + var(--landing-px)));
    }

    .auth-page .auth-brand-panel {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .auth-page .auth-form-panel {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        width: 100%;
        height: auto;
        min-height: 0;
    }
}

@media (min-width: 1024px) {
    .auth-page {
        --landing-px: 2.5rem;      /* lg:px-10 */
        --landing-gap: 4rem;       /* lg:gap-16 */
        --landing-py: 3rem;
        --auth-card-max: 30rem;
    }
}

@media (min-width: 1280px) {
    .auth-page {
        --landing-py: 3.5rem;
        --auth-card-max: 31.25rem; /* 500px */
    }
}

.auth-brand-panel,
.auth-form-panel {
    box-sizing: border-box;
}

.auth-brand-content {
    width: 100%;
    max-width: var(--auth-brand-max);
    margin-left: 0;
    margin-right: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
}

.auth-form-inner {
    width: 100%;
    max-width: var(--auth-card-max);
    margin-left: auto;
    margin-right: auto;
}

.auth-form-panel {
    align-content: center;
}

.auth-mobile-logo {
    margin-bottom: 1.5rem; /* mt-6 */
}

.auth-card {
    width: 100%;
    max-width: var(--auth-card-max);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.auth-card__head {
    margin-bottom: 1.5rem;
}

.auth-card__footer {
    margin-top: 2rem;
}

/* Brand vertical rhythm — landing mt-6 / mt-5 / mt-8 / mt-10 */
.auth-brand-intro {
    max-width: none;
    margin-top: 1.5rem !important; /* mt-6 */
}

.auth-brand-intro h1 {
    font-size: clamp(2.25rem, 3.2vw, 3.25rem) !important; /* text-4xl → lg:text-[3.25rem] */
    line-height: 1.1 !important;
    letter-spacing: -0.025em;
}

.auth-brand-intro p {
    margin-top: 1.25rem !important; /* mt-5 */
    max-width: 36rem;               /* max-w-xl */
    font-size: 1.125rem;            /* text-lg */
    line-height: 1.625;             /* leading-relaxed */
}

.auth-brand-features {
    max-width: 36rem;
    margin-top: 2rem !important;    /* mt-8 */
}

.auth-brand-features.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;               /* space-y-4 */
}

.auth-illustration {
    width: 100%;
    max-width: min(100%, 36rem);
    margin-top: 2.5rem !important;  /* mt-10 */
    padding-top: 0;
    align-self: flex-start;
}

.auth-illustration__image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(420px, 46vh);
    object-fit: contain;
    object-position: left center;
    animation: auth-illustration-float 6s ease-in-out infinite;
    transform-origin: center center;
}


/* Base off-white canvas */
.auth-bg-base {
    position: absolute;
    inset: 0;
    background: #f8f9fb;
    pointer-events: none;
    z-index: 0;
}


/* Large soft pink swoosh — upper-right / center divider */
.auth-bg-swoosh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    opacity: 0.55;
}

.auth-bg-swoosh svg {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 50%;
    max-width: 50%;
}

/* Secondary pink wash on right panel upper area */
.auth-bg-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 58%;
    background: radial-gradient(
        ellipse at 65% 18%,
        rgba(252, 231, 243, 0.45) 0%,
        rgba(253, 242, 248, 0.28) 38%,
        rgba(248, 249, 251, 0) 72%
    );
    pointer-events: none;
    z-index: 0;
}


/* Dot patterns — top-right & bottom-right */
.auth-dots {
    background-image: radial-gradient(circle, #d4d8e0 1.1px, transparent 1.1px);
    background-size: 15px 15px;
    opacity: 0.55;
}


/* Feature icon boxes — distinct pastel shades per reference */
.auth-feature-icon {
    border-radius: 12px;
}

.auth-feature-icon--purple {
    background: #ede9fe;
}

.auth-feature-icon--pink {
    background: #fce7f3;
}

.auth-feature-icon--lavender {
    background: #f3e8ff;
}




/* Form inputs */
.auth-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #ec2a7b;
    box-shadow: 0 0 0 3px rgba(236, 42, 123, 0.1);
}


/* Primary button — solid brand pink */
.auth-btn-primary {
    background: #ec2a7b;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn-primary:hover:not(:disabled) {
    background: #d41f6a;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(236, 42, 123, 0.4);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn-primary:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.auth-btn-primary.is-loading .auth-btn-text {
    opacity: 0;
}

.auth-btn-primary.is-loading .auth-btn-spinner {
    opacity: 1;
}

.auth-btn-spinner {
    opacity: 0;
}

/* Alerts */
.auth-alert {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}


.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}


.auth-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}


.auth-alert-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}


.auth-alert-warning__icon {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-password-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border-radius: 10px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #5b21b6;
}


#pwd-error-block.has-error .auth-input {
    border-color: #f87171;
}

#pwd-error-block.has-error .auth-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.login_yes_no {
    color: #ec2a7b;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login_yes_no:hover {
    color: #d41f6a;
}

/* Remember me (login form) */
.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.auth-remember__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-remember__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.auth-remember__icon {
    width: 12px;
    height: 12px;
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.auth-remember__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-muted);
    line-height: 1.2;
}

.auth-remember:hover .auth-remember__box {
    border-color: var(--color-placeholder);
}

.auth-remember__input:checked + .auth-remember__box {
    background: #ec2a7b;
    border-color: #ec2a7b;
    box-shadow: 0 2px 6px rgba(236, 42, 123, 0.22);
}

.auth-remember__input:checked + .auth-remember__box .auth-remember__icon {
    opacity: 1;
    transform: scale(1);
}

.auth-remember__input:focus-visible + .auth-remember__box {
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 42, 123, 0.18);
}

/* Shared checkbox UI (matches list-bulk-check in style.css) */
:root {
    --ui-checkbox-accent: #6366f1;
    --ui-checkbox-accent-light: #818cf8;
    --ui-checkbox-gradient: linear-gradient(180deg, var(--ui-checkbox-accent-light) 0%, var(--ui-checkbox-accent) 100%);
    --ui-checkbox-shadow: 0 2px 6px rgba(99, 102, 241, 0.22);
    --ui-checkbox-focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.list-bulk-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.list-bulk-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.list-bulk-check__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.list-bulk-check__icon {
    width: 12px;
    height: 12px;
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.list-bulk-check__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-muted);
    line-height: 1.2;
}


.list-bulk-check:hover .list-bulk-check__box {
    border-color: var(--color-placeholder);
}

.list-bulk-check input:checked + .list-bulk-check__box {
    background: var(--ui-checkbox-gradient);
    border-color: var(--ui-checkbox-accent);
    box-shadow: var(--ui-checkbox-shadow);
}

.list-bulk-check input:checked + .list-bulk-check__box .list-bulk-check__icon {
    opacity: 1;
    transform: scale(1);
}

.list-bulk-check input:focus-visible + .list-bulk-check__box {
    outline: none;
    box-shadow: var(--ui-checkbox-focus-ring);
}

/* ── Full-screen background decor (network / orbit motif) ── */
.auth-bg-decor {
    color: #a5b4fc;
    opacity: 0.7;
}


.auth-bg-orbit {
    position: absolute;
    opacity: 0.14;
}

.auth-bg-orbit svg {
    width: 100%;
    height: 100%;
}

.auth-bg-orbit--primary {
    top: auto;
    bottom: -12%;
    left: -14%;
    width: min(340px, 34vw);
    height: min(340px, 34vw);
    opacity: 0.07;
    animation: auth-orbit-spin-plain 90s linear infinite;
}

.auth-bg-orbit--secondary {
    top: 12%;
    right: -6%;
    width: min(380px, 42vw);
    height: min(380px, 42vw);
    opacity: 0.1;
    animation: auth-orbit-spin-reverse 70s linear infinite;
}

.auth-bg-orbit--accent {
    bottom: -8%;
    right: 18%;
    width: min(260px, 30vw);
    height: min(260px, 30vw);
    opacity: 0.09;
    animation: auth-orbit-spin-plain 55s linear infinite;
}

.auth-bg-node {
    position: absolute;
    border-radius: 50%;
    background: #7b61ff;
    opacity: 0.22;
    animation: auth-node-pulse 4s ease-in-out infinite;
}

.auth-bg-node--1 { display: none; }
.auth-bg-node--2 { display: none; }
.auth-bg-node--3 { top: 72%; left: 6%; width: 5px; height: 5px; animation-delay: 1.4s; opacity: 0.18; }
.auth-bg-node--4 { top: 24%; right: 28%; width: 7px; height: 7px; animation-delay: 0.4s; }
.auth-bg-node--5 { bottom: 22%; right: 12%; width: 6px; height: 6px; animation-delay: 1.8s; }
.auth-bg-node--6 { bottom: 38%; left: 48%; width: 5px; height: 5px; animation-delay: 2.2s; }


.auth-bg-avatar {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(199, 210, 254, 0.4);
    color: #6366f1;
    animation: auth-avatar-float 7s ease-in-out infinite;
}

.auth-bg-avatar svg {
    width: 55%;
    height: 55%;
}

.auth-bg-avatar--1 { display: none; }
.auth-bg-avatar--2 { top: 44%; right: 22%; width: 34px; height: 34px; animation-delay: 1.2s; }
.auth-bg-avatar--3 { bottom: 28%; right: 32%; width: 24px; height: 24px; animation-delay: 2.4s; }


.auth-bg-bubble {
    position: absolute;
    border-radius: 999px 999px 999px 4px;
    background: rgba(59, 130, 246, 0.12);
    animation: auth-bubble-pulse 5s ease-in-out infinite;
}

.auth-bg-bubble--1 { display: none; }
.auth-bg-bubble--2 { bottom: 30%; right: 24%; width: 18px; height: 14px; animation-delay: 2s; }


/* ── Left brand panel ── */
.auth-brand-panel {
    overflow: hidden;
}

.auth-brand-glow {
    background: radial-gradient(
        ellipse 90% 70% at 20% 88%,
        rgba(199, 210, 254, 0.22) 0%,
        rgba(248, 249, 251, 0) 68%
    );
}

/* Compact height — keep landing rhythm, shrink illustration only */
@media (max-height: 820px) and (min-width: 768px) {
    .auth-page {
        --landing-py: 2rem;
    }

    .auth-illustration__image {
        max-height: min(300px, 34vh);
    }
}

@media (max-height: 700px) and (min-width: 768px) {
    .auth-illustration__image {
        max-height: min(220px, 28vh);
    }

    .auth-brand-intro h1 {
        font-size: clamp(1.875rem, 2.4vw, 2.5rem) !important;
    }
}


@keyframes auth-orbit-spin-reverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes auth-orbit-spin-plain {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes auth-avatar-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.05); opacity: 1; }
}

@keyframes auth-bubble-pulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes auth-node-pulse {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(1.4); opacity: 0.65; }
}

@media (max-width: 1023px) {
    .auth-bg-orbit--primary {
        left: -22%;
        bottom: -18%;
        opacity: 0.06;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
