@keyframes bg-hero-image {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 0.3;
        transform: translateY(0);
    }
}

.login-bg-image {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 125%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.88) contrast(1.08) brightness(0.48) blur(5px);
    top: 0%;
    border-radius: 0px 0px 40px 40px;
    opacity: 0.3;
    animation: bg-hero-image 0.8s ease-out forwards;
}

.auth-main {
    width: 100%;
    padding: clamp(18px, 2.6vw, 42px);
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(390px, 0.92fr) minmax(430px, 1.08fr);
    width: min(100%, 1040px);
    min-height: 620px;
    margin: auto;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(27, 32, 34, 0.9), rgba(10, 13, 14, 0.94));
    box-shadow: var(--shadow-lg);
}

/* =========================================
   Showcase
========================================= */

.auth-showcase {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    direction: rtl;
    background:
        linear-gradient(145deg,
            rgba(197, 145, 75, 0.14),
            rgba(7, 9, 10, 0.2)),
        #0d1112;
}

.auth-showcase::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(3, 5, 5, 0.05) 30%,
            rgba(3, 5, 5, 0.9) 100%);
}

.showcase-slides,
.showcase-slide {
    position: absolute;
    inset: 0;
}

.showcase-slide {
    visibility: hidden;
    opacity: 0;
    transform: scale(1.045);
    transition:
        opacity 700ms ease,
        visibility 700ms ease,
        transform 6s linear;
}

.showcase-slide.is-active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.showcase-slide::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: var(--slide-image);
    background-position: center;
    background-size: cover;
}

.showcase-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 40% 28%,
            transparent 0,
            rgba(4, 6, 6, 0.12) 40%,
            rgba(4, 6, 6, 0.68) 100%);
}

.showcase-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    /* background:
        radial-gradient(circle at 50% 35%,
            rgba(205, 159, 94, 0.17),
            transparent 33%),
        linear-gradient(145deg, #24201c, #0c1011 62%, #14191a); */
    background:
        radial-gradient(circle at 50% 35%,
            rgba(205, 159, 94, 0.17),
            transparent 33%);
}

.placeholder-logo {
    color: rgba(215, 171, 105, 0.18);
    font-family: Georgia, serif;
    font-size: 9rem;
    font-weight: 800;
    transform: skewX(-8deg);
}

.showcase-caption {
    position: absolute;
    right: clamp(24px, 5vw, 58px);
    bottom: 70px;
    left: clamp(24px, 5vw, 58px);
    z-index: 3;
    text-align: center;
}

.showcase-caption blockquote {
    margin: 0;
    color: #fff;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 500;
    line-height: 2;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.65);
}

.showcase-caption p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
}

.showcase-pagination {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    direction: ltr;
}

.slide-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
        cursor: var(--cursor-pointer);
    transition:
        width 200ms ease,
        background-color 200ms ease,
        box-shadow 200ms ease;
}

.slide-dot:hover {
    background: var(--color-gold-light);
}

.slide-dot.is-active {
    width: 22px;
    background: var(--color-gold);
    box-shadow: 0 0 12px rgba(215, 171, 105, 0.45);
}


/* =========================================
   Social auth
========================================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 23px 0 16px;
    color: var(--color-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, #e0bf79c4);
}

.auth-divider::after {
    background: linear-gradient(-90deg, transparent, #e0bf79c4);

}

.social-auth {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.social-auth-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--color-text-soft);
    font: inherit;
    font-size: 0.73rem;
    background: rgba(255, 255, 255, 0.025);
        cursor: var(--cursor-pointer);
    transition:
        color 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.social-auth-button:hover {
    border-color: var(--gold-border);
    color: var(--color-text);
    background: rgba(214, 167, 97, 0.07);
    transform: translateY(-2px);
}

.provider-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.google-icon {
    color: #e1aa55;
}

.apple-icon {
    color: #fff;
}

.facebook-icon {
    color: #6d96d7;
}

.auth-switch-prompt {
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 0.75rem;
    text-align: center;
}

.auth-switch-prompt .text-button {
    margin-right: 5px;
}

/* =========================================
   Register
========================================= */

.register-name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 8px;
    direction: ltr;
}

.password-strength span {
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 180ms ease;
}

.password-strength[data-score="1"] span:nth-child(-n + 1) {
    background: var(--color-danger);
}

.password-strength[data-score="2"] span:nth-child(-n + 2) {
    background: #e59c48;
}

.password-strength[data-score="3"] span:nth-child(-n + 3) {
    background: var(--color-gold);
}

.password-strength[data-score="4"] span:nth-child(-n + 4) {
    background: var(--color-success);
}

.password-strength-text {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 0.67rem;
}

.terms-group .form-error {
    margin-right: 25px;
}

/* =========================================
   Validation
========================================= */

.form-control.invalid {
    border-color: rgba(224, 91, 91, 0.72);
    background: rgba(224, 91, 91, 0.045);
    box-shadow: 0 0 0 3px rgba(224, 91, 91, 0.06);
}

.form-control.valid {
    border-color: rgba(74, 177, 128, 0.58);
}

.form-error {
    display: none;
    min-height: 17px;
    margin-top: 5px;
    color: var(--color-danger);
    font-size: 0.68rem;
    line-height: 1.65;
}

.form-error.is-visible {
    display: block;
}

/* end */



/* =========================================
                 General
========================================= */
.auth-input-wrap>i {
    position: absolute;
    top: 50%;
    right: 15px;
    z-index: 2;
    color: #777b79;
    font-size: 12px;
    transform: translateY(-50%);
    transition: color var(--transition);
}

.auth-input-wrap:focus-within>i {
    color: var(--color-gold);
}

.auth-input-wrap:focus-within>i {
    color: var(--color-gold);
}

.auth-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 4.5vw, 68px);
    background: radial-gradient(circle at 85% 15%, rgba(220, 169, 94, 0.07), transparent 30%), rgba(10, 13, 14, 0.84);
}

.auth-heading {
    margin-bottom: 24px;
    text-align: center;
}

.auth-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--color-gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.auth-heading h1 {
    margin: 0;
    color: var(--accent);
    font-size: clamp(1.5rem, 2.7vw, 2.15rem);
    font-weight: 800;
}

.auth-heading p {
    margin: 9px 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 24px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
}

.auth-form-tab {
    position: relative;
    min-height: 44px;
    border: 0;
    border-radius: calc(var(--radius-md) - 4px);
    color: var(--color-muted);
    font: inherit;
    background: transparent;
        cursor: var(--cursor-pointer);
    transition: color 180ms ease, background-color 180ms ease;
}

.auth-form-tab.is-active {
    color: var(--color-gold-light);
    background: linear-gradient(180deg, rgba(221, 174, 105, 0.08), rgba(221, 174, 105, 0.015));
}

.auth-form-tab::after {
    position: absolute;
    right: 18%;
    bottom: -5px;
    left: 18%;
    height: 2px;
    border-radius: 20px;
    content: "";
    background: transparent;
    transition: background-color 180ms ease;
}

.auth-form-tab.is-active::after {
    background: var(--color-gold);
    box-shadow: 0 0 8px rgba(215, 171, 105, 0.55);
}


.auth-panel {
    animation: authPanelIn 320ms ease both;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-form .form-group {
    margin: 0;
}

.form-label {
    color: var(--color-text-soft);
    font-size: 11px;
}

.auth-form .form-label {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 0.8rem;
}

.auth-form-panel {
    /* padding: 1.2rem; */
    /* border: 1px solid var(--border); */
    border-radius: var(--radius);
}

.auth-input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    z-index: 2;
    display: grid;
    place-items: center;
    color: var(--color-gold);
    font-size: 0.8rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-control {
    width: 100%;
    min-height: 45px;
    padding: 0 14px;
    color: var(--color-text);
    outline: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.035);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

button, input, textarea, select {
    color: inherit;
    font: inherit;
}

.auth-input-wrap .form-control {
    padding-right: 42px;
    padding-left: 45px;
}



.password-toggle {
    position: absolute;
    top: 50%;
    left: 8px;
    z-index: 3;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: var(--color-muted);
    background: transparent;
        cursor: var(--cursor-pointer);
    transform: translateY(-50%);
    transition: color 180ms ease, background-color 180ms ease;
}

.password-toggle:hover, .password-toggle[aria-pressed="true"] {
    color: var(--color-gold-light);
    background: rgba(216, 169, 101, 0.08);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 1px;
}

.remember-option {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text-soft);
    font-size: 0.76rem;
    line-height: 1.7;
        cursor: var(--cursor-pointer);
}

.remember-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-check {
    position: relative;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 2px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 180ms ease, background-color 180ms ease;
}

.custom-check::after {
    position: absolute;
    top: 2px;
    right: 5px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
    content: "";
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
    transition: opacity 180ms ease, transform 180ms ease;
}

.remember-option input:checked+.custom-check {
    border-color: var(--color-gold);
    background: var(--color-gold);
}

.remember-option input:checked+.custom-check::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.remember-option input:focus-visible+.custom-check {
    outline: 2px solid rgba(218, 174, 108, 0.35);
    outline-offset: 3px;
}

.remember-option a {
    color: var(--color-gold-light);
}

.auth-submit {
    position: relative;
    min-height: 48px;
    margin-top: 3px;
    overflow: hidden;
    border: 0;
    font-family: inherit;
        cursor: var(--cursor-pointer);
}

.auth-input-wrap .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Styles for OTP Input */
#otpCode {
    letter-spacing: 0.5em;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
}

#otpCode:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(215, 171, 105, 0.2);
}

/* OTP Panel Specifics */
#otpPanel {
    text-align: center;
}

#otpSubtitle {
    margin-bottom: 20px;
}

.auth-options {
    margin: 15px 0;
}

.text-muted {
    color: var(--color-muted);
}

/* Loader Animation (if not already defined) */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.button-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgb(0 0 0 / 22%);
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 1s ease-in-out infinite;
}

.auth-submit.is-loading .button-label {
    visibility: hidden;
}

.auth-submit.is-loading .button-loader {
    display: block;
    position: absolute;
    /* top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); */
}

@media (max-width: 520px) {
    .auth-card {
        grid-template-columns: unset;
        margin-top: 1rem;
        min-height: 500px;
    }

    .auth-input-wrap .form-control {
        padding-right: 42px;
        padding-left: 15px;
    }

    .login-bg-image {
        height: 100%;
    }

    .auth-showcase {
        display: none;
    }
}