body.auth-layout {
    background: #f5f7fb;
}

.auth-card-page,
.auth-left {
    background: #0b1b34;
}

.auth-card {
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.auth-card__header-wrap {
    margin: 0;
    border-bottom: 1px solid var(--exn-line, #dbe3ef);
    background: #f8fafc;
}

.auth-card__header {
    padding: 16px 18px;
}

.auth-card__icon {
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--exn-primary, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: none;
}

.auth-card__image-mask {
    position: absolute;
    inset: 0;
    background: rgba(11, 27, 52, 0.58);
    z-index: 1;
}

.auth-left__bg {
    position: relative;
    overflow: hidden;
    background: #0b1b34 !important;
    background-image: none !important;
    background-size: auto;
    background-position: center;
    filter: none !important;
}

.auth-left-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(11, 27, 52, 0.08), rgba(11, 27, 52, 0.38)),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px,
            transparent 44px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 44px
        ) !important;
}

.auth-left .sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-left__quote {
    border-color: rgba(255, 255, 255, 0.34) !important;
}

.auth-product-preview {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 22%;
}

.auth-product-preview .exn-product-frame {
    border-color: rgba(203, 213, 225, 0.2);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.26);
}

.auth-right {
    background: #ffffff;
    border-left: 1px solid var(--exn-line, #dbe3ef);
}

.auth-panel {
    width: 100%;
    max-width: 520px;
}

.auth-panel__inner {
    padding: 56px 34px;
}

.auth-panel__toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.35rem;
}

.auth-brand-dot {
    width: 10px;
    height: 10px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--exn-primary, #2563eb);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.auth-brand-dot--warn {
    background: #d97706;
    box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.13);
}

.auth-brand-dot--danger {
    background: #be123c;
    box-shadow: 0 0 0 6px rgba(190, 18, 60, 0.12);
}

.auth-title {
    margin: 0;
    color: var(--exn-ink, #0f172a);
    font-size: 2.1rem;
    line-height: 1.12;
    font-weight: 850;
    letter-spacing: 0;
}

.auth-subtitle {
    margin-top: 10px;
    color: var(--exn-muted, #64748b);
    font-size: 0.92rem;
}

.auth-field {
    margin-top: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--exn-ink, #0f172a);
    font-size: 0.82rem;
    font-weight: 800;
}

.auth-input,
.otp-box {
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: #ffffff;
    color: var(--exn-ink, #0f172a);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 0.92rem;
}

.auth-input:focus,
.otp-box:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.auth-input.is-invalid {
    border-color: rgba(190, 18, 60, 0.45);
}

.auth-error,
.auth-hint {
    margin-top: 8px;
    color: var(--exn-muted, #64748b);
    font-size: 0.82rem;
}

.auth-error,
.text-danger {
    color: #be123c !important;
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 16px;
    margin-bottom: 22px;
}

.auth-link,
.auth-backlink {
    color: var(--exn-primary, #2563eb);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-link:hover,
.auth-backlink:hover {
    color: var(--exn-primary-dark, #1d4ed8);
    text-decoration: underline;
}

.auth-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--exn-text, #334155);
    font-size: 0.88rem;
    line-height: 1;
}

.auth-switch label {
    margin: 0;
    cursor: pointer;
}

.auth-switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
}

.auth-switch input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 9px;
    transform: scale(0);
    transition: transform 0.12s ease;
    background: #ffffff;
    clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 18%, 80% 0, 40% 62%);
}

.auth-switch input[type="checkbox"]:checked {
    border-color: var(--exn-primary, #2563eb);
    background: var(--exn-primary, #2563eb);
}

.auth-switch input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.auth-button {
    width: 100%;
    height: 48px;
    border: 1px solid var(--exn-primary, #2563eb);
    border-radius: 8px;
    background: var(--exn-primary, #2563eb);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.auth-button:hover {
    background: var(--exn-primary-dark, #1d4ed8);
    border-color: var(--exn-primary-dark, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
    transform: none;
}

.auth-button--dark {
    background: #0f172a;
    border-color: #0f172a;
}

.auth-button--outline {
    background: transparent;
    color: var(--exn-primary, #2563eb);
}

.auth-button--outline:hover {
    color: #ffffff;
}

.auth-terms,
.auth-meta {
    color: var(--exn-muted, #64748b);
    font-size: 0.82rem;
    text-align: center;
}

.auth-terms {
    margin-top: 14px;
}

.auth-meta {
    margin-top: 28px;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 14px 0 18px;
    border: 1px solid transparent;
    font-size: 0.88rem;
}

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

.auth-alert--danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.auth-alert__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #ffffff;
    flex: 0 0 auto;
}

.auth-alert--success .auth-alert__icon {
    background: #15803d;
}

.auth-alert--danger .auth-alert__icon {
    background: #be123c;
}

.auth-alert__text {
    color: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

.auth-alert__close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.68;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: #f8fafc;
}

.auth-tab {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--exn-muted, #64748b);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 10px 12px;
}

.auth-tab.is-active {
    background: #ffffff;
    color: var(--exn-primary, #2563eb);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.otp-wrap {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.otp-box {
    width: 100%;
    min-width: 0;
    height: 46px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 850;
}

.auth-info,
.warn-panel,
.danger-panel,
.lock-panel {
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
}

.auth-info__text,
.warn-panel__text,
.danger-panel__text,
.lock-row__label,
.lock-panel__label {
    color: var(--exn-muted, #64748b);
    font-size: 0.85rem;
}

.warn-panel__chip,
.danger-panel__chip,
.lock-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    margin-top: 12px;
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 8px;
    background: #ffffff;
    color: var(--exn-ink, #0f172a);
    font-size: 0.82rem;
}

html[data-bs-theme="dark"] body.auth-layout {
    background: #0b1220;
}

html[data-bs-theme="dark"] .auth-right {
    background: #0b1220;
    border-left-color: #314158;
}

html[data-bs-theme="dark"] .auth-card {
    background: #111c2f;
    border-color: #314158;
    box-shadow: none;
}

html[data-bs-theme="dark"] .auth-card__header-wrap {
    background: #0f1a2c;
    border-bottom-color: #314158;
}

html[data-bs-theme="dark"] .auth-card__icon {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(147, 197, 253, 0.26);
    color: #bfdbfe;
}

html[data-bs-theme="dark"] .auth-panel__inner {
    border: 1px solid #314158;
    border-radius: 8px;
    background: #111c2f;
    box-shadow: none;
}

html[data-bs-theme="dark"] .auth-title,
html[data-bs-theme="dark"] .auth-field label,
html[data-bs-theme="dark"] .auth-switch,
html[data-bs-theme="dark"] .d-lg-none h5,
html[data-bs-theme="dark"] .warn-panel__chip,
html[data-bs-theme="dark"] .danger-panel__chip,
html[data-bs-theme="dark"] .lock-chip {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-subtitle,
html[data-bs-theme="dark"] .auth-terms,
html[data-bs-theme="dark"] .auth-meta,
html[data-bs-theme="dark"] .d-lg-none p,
html[data-bs-theme="dark"] .auth-hint,
html[data-bs-theme="dark"] .auth-info__text,
html[data-bs-theme="dark"] .warn-panel__text,
html[data-bs-theme="dark"] .danger-panel__text,
html[data-bs-theme="dark"] .lock-row__label,
html[data-bs-theme="dark"] .lock-panel__label {
    color: #a7b4c7 !important;
}

html[data-bs-theme="dark"] .auth-input,
html[data-bs-theme="dark"] .otp-box,
html[data-bs-theme="dark"] .auth-switch input[type="checkbox"],
html[data-bs-theme="dark"] .auth-tab.is-active,
html[data-bs-theme="dark"] .warn-panel__chip,
html[data-bs-theme="dark"] .danger-panel__chip,
html[data-bs-theme="dark"] .lock-chip {
    background: #0f1a2c;
    border-color: #314158;
    color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-tabs,
html[data-bs-theme="dark"] .auth-info,
html[data-bs-theme="dark"] .warn-panel,
html[data-bs-theme="dark"] .danger-panel,
html[data-bs-theme="dark"] .lock-panel {
    background: #0f1a2c;
    border-color: #314158;
}

html[data-bs-theme="dark"] .auth-input::placeholder {
    color: #718096;
}

html[data-bs-theme="dark"] .auth-alert--success {
    background: rgba(21, 128, 61, 0.16);
    border-color: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

html[data-bs-theme="dark"] .auth-alert--danger {
    background: rgba(190, 18, 60, 0.16);
    border-color: rgba(251, 113, 133, 0.28);
    color: #fecdd3;
}

@media (max-width: 991.98px) {
    .auth-panel__inner {
        padding: 40px 24px;
    }

    .auth-right {
        border-left: 0;
    }
}

@media (max-height: 820px) {
    .auth-product-preview {
        top: 16%;
    }
}
