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

html,
body {
    overflow-x: hidden;
}

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

.auth-page {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: #f8f9fb;
}


/* 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;
}

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

/* Secondary pink wash on right panel upper area */
.auth-bg-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 58%;
    background: radial-gradient(
        ellipse at 65% 18%,
        rgba(252, 231, 243, 0.72) 0%,
        rgba(253, 242, 248, 0.45) 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;
}


/* 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;
}

/* Login card */
.auth-card {
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.07), 0 0 0 1px rgba(16, 24, 40, 0.03);
}


/* 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: #64748b;
    line-height: 1.2;
}

.auth-remember:hover .auth-remember__box {
    border-color: #94a3b8;
}

.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: #64748b;
    line-height: 1.2;
}


.list-bulk-check:hover .list-bulk-check__box {
    border-color: #94a3b8;
}

.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;
}


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

.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.1;
    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.16;
    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.14;
    animation: auth-orbit-spin-plain 55s linear infinite;
}

.auth-bg-node {
    position: absolute;
    border-radius: 50%;
    background: #7b61ff;
    opacity: 0.35;
    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.25; }
.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.55);
    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.18);
    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.35) 0%,
        rgba(248, 249, 251, 0) 68%
    );
}


.auth-brand-content {
    max-height: 100%;
    overflow: hidden;
}

/* ── Animated illustration ── */
.auth-illustration {
    flex-shrink: 0;
}

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

@media (max-height: 860px) {
    .auth-brand-content {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }

    .auth-illustration {
        margin-top: 1.25rem;
    }

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

@media (min-width: 1280px) {
    .auth-brand-content .auth-illustration {
        max-width: 36rem;
    }

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

@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.08;
    }
}

@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;
    }
}
