/**
 * Modern login (admin + store): layered art background + form card.
 * Loaded only on auth/login.blade.php — scopes under .auth-login-modern.
 */

.auth-login-modern {
    --auth-navy: #0f2747;
    --auth-navy-hover: #0a1c33;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-bg-mesh-a: rgba(99, 102, 241, 0.28);
    --auth-bg-mesh-b: rgba(34, 211, 238, 0.22);
    --auth-bg-mesh-c: rgba(167, 139, 250, 0.18);
    --auth-bg-orb-a: rgba(129, 140, 248, 0.85);
    --auth-bg-orb-b: rgba(56, 189, 248, 0.75);
    --auth-bg-orb-c: rgba(244, 114, 182, 0.35);
}

/* Layered art background — mesh + dots + orbs + geometry (no bitmaps) */
.auth-page-somoo.auth-login-modern .auth-login-bg--art {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background-color: #f4f7fe;
    background-image:
        radial-gradient(ellipse 120% 90% at 95% -15%, var(--auth-bg-mesh-a) 0%, transparent 52%),
        radial-gradient(ellipse 100% 85% at -5% 105%, var(--auth-bg-mesh-b) 0%, transparent 48%),
        radial-gradient(ellipse 70% 60% at 72% 42%, var(--auth-bg-mesh-c) 0%, transparent 42%),
        radial-gradient(ellipse 55% 45% at 28% 78%, rgba(59, 130, 246, 0.14) 0%, transparent 40%),
        linear-gradient(168deg, #eef2ff 0%, #ecfeff 32%, #f0f9ff 58%, #f8fafc 100%);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__mesh {
    position: absolute;
    inset: -2px;
    opacity: 0.55;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0) 60%),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 62px,
            rgba(99, 102, 241, 0.045) 62px,
            rgba(99, 102, 241, 0.045) 63px
        ),
        repeating-linear-gradient(
            78deg,
            transparent,
            transparent 74px,
            rgba(14, 165, 233, 0.04) 74px,
            rgba(14, 165, 233, 0.04) 75px
        );
}

.auth-page-somoo.auth-login-modern .auth-login-bg__dots {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    background-image: radial-gradient(rgba(79, 70, 229, 0.22) 1.15px, transparent 1.15px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 48%, #000 8%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 48%, #000 8%, transparent 72%);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__orb--1 {
    width: min(85vw, 560px);
    height: min(85vw, 560px);
    top: -14%;
    left: -18%;
    background: radial-gradient(circle at 35% 35%, var(--auth-bg-orb-a), transparent 68%);
    opacity: 0.65;
}

.auth-page-somoo.auth-login-modern .auth-login-bg__orb--2 {
    width: min(75vw, 480px);
    height: min(75vw, 480px);
    bottom: -12%;
    right: -14%;
    background: radial-gradient(circle at 60% 55%, var(--auth-bg-orb-b), transparent 65%);
    opacity: 0.55;
}

.auth-page-somoo.auth-login-modern .auth-login-bg__orb--3 {
    width: min(55vw, 340px);
    height: min(55vw, 340px);
    top: 38%;
    left: 52%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 50% 50%, var(--auth-bg-orb-c), transparent 70%);
    opacity: 0.45;
}

.auth-page-somoo.auth-login-modern .auth-login-bg__shape {
    position: absolute;
    pointer-events: none;
}

.auth-page-somoo.auth-login-modern .auth-login-bg__shape--diamond {
    width: clamp(100px, 18vw, 200px);
    height: clamp(100px, 18vw, 200px);
    top: 14%;
    right: 10%;
    border-radius: 22%;
    transform: rotate(24deg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 12px 40px rgba(79, 70, 229, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__shape--ribbon {
    width: clamp(140px, 26vw, 280px);
    height: clamp(44px, 7vw, 72px);
    bottom: 22%;
    left: 6%;
    border-radius: 999px;
    transform: rotate(-8deg);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 36px rgba(14, 165, 233, 0.08);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__arc {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0.35;
}

.auth-page-somoo.auth-login-modern .auth-login-bg__arc--tl {
    width: min(120vw, 520px);
    height: min(120vw, 520px);
    top: -58%;
    left: -30%;
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.auth-page-somoo.auth-login-modern .auth-login-bg__arc--br {
    width: min(100vw, 440px);
    height: min(100vw, 440px);
    bottom: -48%;
    right: -28%;
    border-color: rgba(14, 165, 233, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

@media (max-width: 575.98px) {
    .auth-page-somoo.auth-login-modern .auth-login-bg__shape--diamond {
        top: 8%;
        right: -4%;
        opacity: 0.85;
    }

    .auth-page-somoo.auth-login-modern .auth-login-bg__shape--ribbon {
        bottom: 16%;
        left: -8%;
        opacity: 0.9;
    }

    .auth-page-somoo.auth-login-modern .auth-login-bg__orb--3 {
        opacity: 0.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page-somoo.auth-login-modern .auth-login-bg__mesh {
        opacity: 0.35;
    }
}

.auth-page-somoo.auth-login-modern .auth-login-center {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Card */
.auth-page-somoo.auth-login-modern .auth-modern-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 4px;
    box-shadow:
        0 4px 6px -1px rgba(15, 39, 71, 0.07),
        0 24px 48px -12px rgba(15, 39, 71, 0.12);
    border: 1px solid rgba(15, 39, 71, 0.06);
    padding: 2.25rem 2rem 2rem;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (max-width: 575px) {
    .auth-page-somoo.auth-login-modern .auth-modern-card {
        padding: 1.75rem 1.35rem 1.5rem;
    }
}

/* Hide legacy glass card inner wrapper duplication */
.auth-page-somoo.auth-login-modern .auth-wrapper-form.auth-modern-card {
    margin-left: auto;
    margin-right: auto;
}

.auth-modern-card__logo img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* Form block */
.auth-modern-card__form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-navy);
    text-align: center;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.auth-modern-card__form-sub {
    font-size: 0.875rem;
    color: var(--auth-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.45;
}

/* Icon + input rows */
.auth-modern-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-modern-field:focus-within {
    border-color: rgba(15, 39, 71, 0.35);
    box-shadow: 0 0 0 3px rgba(15, 39, 71, 0.08);
}

.auth-modern-field__icon {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 1.25rem;
    border-inline-end: 1px solid var(--auth-border);
}

.auth-modern-field__input {
    flex: 1 1 auto;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.9375rem !important;
    height: auto !important;
    min-height: 46px;
    color: var(--auth-navy);
}

.auth-modern-field__input::placeholder {
    color: #94a3b8;
}

.auth-modern-field__input:focus {
    outline: none;
}

/* Password row: icon + merge group */
.auth-modern-field--password .auth-modern-field__merge {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.auth-modern-field--password .input-group {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0 !important;
}

.auth-modern-field--password .input-group-merge .form-control {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.65rem 0.85rem !important;
    min-height: 46px;
    font-size: 0.9375rem !important;
}

.auth-modern-field--password .input-group-append .input-group-text {
    border: none !important;
    border-inline-start: 1px solid var(--auth-border) !important;
    background: #f8fafc !important;
    color: #64748b;
    padding: 0 0.75rem;
}

.auth-modern-field--password .input-group-append .input-group-text:hover {
    background: #f1f5f9 !important;
    color: var(--auth-navy);
}

/* Meta row */
.auth-page-somoo.auth-login-modern .auth-login-meta {
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
}

.auth-page-somoo.auth-login-modern .auth-login-meta .custom-control-label {
    color: var(--auth-muted) !important;
    font-size: 0.875rem;
}

.auth-page-somoo.auth-login-modern span.text-primary.text-hover--primary,
.auth-page-somoo.auth-login-modern .auth-modern-forgot {
    color: var(--auth-navy) !important;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

.auth-page-somoo.auth-login-modern span.text-primary.text-hover--primary:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Captcha */
.auth-page-somoo.auth-login-modern .auth-login-captcha-block {
    margin-top: 0.75rem;
}

/* Submit */
.auth-page-somoo.auth-login-modern .auth-login-submit {
    margin-top: 1.25rem !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background: var(--auth-navy) !important;
    border: none !important;
    color: #fff !important;
}

.auth-page-somoo.auth-login-modern .auth-login-submit:hover {
    background: var(--auth-navy-hover) !important;
    color: #fff !important;
}

.auth-page-somoo.auth-login-modern .auth-login-register__text {
    color: var(--auth-muted);
    font-size: 0.875rem;
}

.auth-page-somoo.auth-login-modern .auth-login-register__link {
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-page-somoo.auth-login-modern .auth-login-register__link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-page-somoo.auth-login-modern .auth-form-card .auto-fill-data-copy {
    margin-top: 1rem;
    border-radius: 4px;
    border: 1px dashed var(--auth-border);
    background: #f8fafc;
}

/* RTL */
html[dir="rtl"] .auth-modern-field {
    flex-direction: row-reverse;
}

html[dir="rtl"] .auth-modern-field__icon {
    border-inline-end: none;
    border-inline-start: 1px solid var(--auth-border);
}
