/* ===================================================
   Auth Pages - New Dark Theme (Figma Matched)
   =================================================== */

/* Base Layout */
.auth-dark-page {
    font-family: var(--font-family-base), sans-serif;
    min-height: 100vh;
    background: linear-gradient(178.13deg, var(--primary) 10%, var(--dark) 65%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 162px;
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
}

[dir="rtl"] .auth-dark-page {
    font-family: var(--font-family-rtl), sans-serif;
}

/* Background decorations */
.auth-dark-page .auth-bg-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-dark-page .auth-bg-blob {
    position: absolute;
    height: auto;
    mix-blend-mode: screen;
}

/* Top left */
.auth-dark-page .auth-bg-blob-1 {
    width: 1100px;
    height: 700px;
    top: -400px;
    left: -100px;
    opacity: 0.5;
    transform: rotate(175.7deg);
}

/* Top right */
.auth-dark-page .auth-bg-blob-2 {
    width: 1100px;
    height: 700px;
    top: -400px;
    right: -700px;
    opacity: 0.5;
    transform: rotate(175.7deg);
}

/* Middle left */
.auth-dark-page .auth-bg-blob-3 {
    width: 1100px;
    height: 700px;
    top: 250px;
    left: -450px;
    opacity: 0.5;
    transform: matrix(-1, -0.08, -0.08, 1, 0, 0);
}

/* Middle right */
.auth-dark-page .auth-bg-blob-4 {
    width: 1100px;
    height: 700px;
    top: 250px;
    right: -450px;
    opacity: 0.5;
    transform: matrix(-1, -0.08, -0.08, 1, 0, 0);
}

/* Bottom left */
.auth-dark-page .auth-bg-blob-5 {
    width: 1100px;
    height: 700px;
    bottom: -450px;
    left: -50px;
    opacity: 0.5;
    transform: matrix(-1, -0.08, -0.08, 1, 0, 0);
}

/* Bottom right */
.auth-dark-page .auth-bg-blob-6 {
    width: 1100px;
    height: 700px;
    bottom: -450px;
    right: -750px;
    opacity: 0.5;
    transform: matrix(-1, -0.08, -0.08, 1, 0, 0);
}

.auth-dark-page .auth-mascot {
    position: absolute;
    top: -12%;
    left: 50%;
    transform: translateX(-50%);
    width: 930px;
    max-width: 80%;
    opacity: 0.4;
    z-index: 2;
    pointer-events: none;
}

/* Logo */
.auth-dark-page .auth-logo {
    position: absolute;
    top: 20px;
    z-index: 10;
}

.auth-dark-page .auth-logo.logo-rtl {
    right: 40px;
}

.auth-dark-page .auth-logo.logo-ltr {
    left: 40px;
}

.auth-dark-page .auth-logo a {
    text-decoration: none;
}

.auth-dark-page .auth-logo img.auth-logo-img {
    max-height: 50px;
    width: auto;
}

.auth-dark-page .auth-logo .logo-text {
    color: var(--light);
    font-weight: 700;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-dark-page .auth-logo .logo-text .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-dark-page .auth-logo .logo-text .logo-icon img {
    height: 58px;
    width: auto;
}

.auth-dark-page .auth-logo .logo-text-box {
    display: flex;
    flex-direction: column;
}

[dir="rtl"] .auth-dark-page .auth-logo .logo-text-box {
    align-items: flex-end;
}

[dir="ltr"] .auth-dark-page .auth-logo .logo-text-box {
    align-items: flex-start;
}

.auth-dark-page .auth-logo .logo-title {
    font-family: var(--font-family-base), sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    color: var(--light);
}

.auth-dark-page .auth-logo .logo-subtitle {
    font-family: var(--font-family-base), sans-serif;
    font-weight: 200;
    font-size: 12px;
    line-height: 18px;
    color: var(--light);
}

/* Language Dropdown */
.auth-dark-page .auth-lang-dropdown {
    position: absolute;
    top: 20px;
    z-index: 10;
}

.auth-dark-page .auth-lang-dropdown.lang-ltr {
    right: 40px;
}

.auth-dark-page .auth-lang-dropdown.lang-rtl {
    left: 40px;
}

.auth-dark-page .auth-lang-dropdown .dropdown-menu {
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    min-width: 120px;
    padding: 8px 0;
    margin-top: 2px;
    transform: none !important;
    top: 100% !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.auth-dark-page .auth-lang-dropdown .dropdown-menu:after {
    display: none;
}

.auth-dark-page .auth-lang-dropdown .dropdown-item {
    color: var(--dark);
    font-family: var(--font-family-base), sans-serif;
    font-size: 13px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

[dir="rtl"] .auth-dark-page .auth-lang-dropdown .dropdown-item {
    text-align: right;
}

.auth-dark-page .auth-lang-dropdown .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.auth-dark-page .auth-lang-dropdown .dropdown-item.active {
    background: transparent;
    color: var(--primary);
    font-weight: 700;
}

.auth-dark-page .auth-lang-dropdown .dropdown-item:focus,
.auth-dark-page .auth-lang-dropdown .dropdown-item:focus-visible,
.auth-dark-page .auth-lang-dropdown .dropdown-item:active {
    outline: none;
    box-shadow: none;
}

.auth-top-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 40px;
}

[dir="rtl"] .auth-top-bar-inner {
    justify-content: flex-start;
}

.auth-lang-btn {
    background: var(--light);
    border: none;
    color: var(--dark);
    border-radius: 12px;
    padding: 8px 16px;
    width: auto;
    height: 38px;
    font-family: var(--font-family-base), sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-lang-btn::after {
    display: none;
}

.auth-lang-btn .auth-lang-arrow {
    width: 12px;
    height: 12px;
}

.auth-lang-btn span {
    flex: 1;
}

.auth-lang-btn .auth-lang-icon {
    width: 20px;
    height: 20px;
}

.auth-lang-btn:hover,
.auth-lang-btn:focus {
    background: var(--light);
    color: var(--dark);
}

.auth-top-bar .dropdown-menu {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(var(--light-rgb), 0.1);
    border-radius: 8px;
    min-width: 120px;
}

.auth-top-bar .dropdown-item {
    color: var(--light);
    font-family: var(--font-family-base), sans-serif;
    font-size: 13px;
    padding: 8px 16px;
}

.auth-top-bar .dropdown-item:hover {
    background: rgba(var(--light-rgb), 0.1);
    color: var(--light);
}

/* Card */
.auth-dark-card {
    background: rgba(var(--dark-rgb), 0.45);
    border: 1px solid rgba(var(--light-rgb), 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50px;
    padding: 40px 44px;
    width: 440px;
    max-width: 90vw;
    position: relative;
    z-index: 5;
    overflow: hidden;
    box-sizing: border-box;
}

.auth-dark-card * {
    box-sizing: border-box;
}

.auth-dark-card.auth-card-scroll {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.auth-dark-card::-webkit-scrollbar {
    width: 4px;
}

.auth-dark-card::-webkit-scrollbar-thumb {
    background: rgba(var(--light-rgb), 0.2);
    border-radius: 4px;
}

/* Separator line */
.auth-dark-card .auth-separator {
    width: calc(100% + 44px);
    height: 0px;
    border-top: 1px solid rgba(var(--light-rgb), 0.15);
    margin-bottom: 24px;
}

[dir="rtl"] .auth-dark-card .auth-separator {
    margin-left: -44px;
}

/* Title */
.auth-dark-card .auth-title {
    font-weight: 600;
    font-size: 36px;
    color: var(--light);
    margin-bottom: 10px;
    line-height: 100%;
}

[dir="rtl"] .auth-dark-card .auth-title {
    text-align: right;
}

[dir="ltr"] .auth-dark-card .auth-title,
.auth-dark-card .auth-title {
    text-align: left;
}

.auth-dark-card .auth-subtitle {
    font-weight: 200;
    font-size: 15px;
    line-height: 100%;
    color: var(--light);
    margin-bottom: 16px;
}

[dir="rtl"] .auth-dark-card .auth-subtitle {
    text-align: right;
}

[dir="ltr"] .auth-dark-card .auth-subtitle,
.auth-dark-card .auth-subtitle {
    text-align: left;
}

/* Toggle Tabs (Email/Phone) */
.auth-toggle-tabs {
    display: flex;
    align-items: center;
    padding: 4px;
    gap: 4px;
    background: rgba(var(--dark-rgb), 0.5);
    border: 1px solid rgba(var(--light-rgb), 0.25);
    border-radius: 100px;
    margin-bottom: 25px;
}

.auth-toggle-tabs .auth-tab {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    font-weight: 700;
    font-size: 14px;
    line-height: 17px;
    color: rgba(var(--light-rgb), 0.65);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.auth-toggle-tabs .auth-tab.active {
    background: rgba(var(--light-rgb), 0.25);
    color: var(--light);
    border-radius: 53px;
}

/* Form Elements */
.auth-dark-card .auth-form-group {
    margin-bottom: 30px;
    position: relative;
}

.auth-dark-card .auth-label {
    font-family: var(--font-family-base), sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 16px;
    color: var(--light);
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: var(--primary);
    border: none;
    border-radius: 100px;
    position: absolute;
    top: -10px;
    z-index: 2;
    height: 16px;
    margin-bottom: 0;
}

[dir="rtl"] .auth-dark-card .auth-label {
    right: 0px;
}

[dir="ltr"] .auth-dark-card .auth-label {
    left: 16px;
}

.auth-dark-card .auth-input {
    background: rgba(var(--dark-rgb), 0.5);
    border: 1px solid rgba(var(--light-rgb), 0.25);
    border-radius: 100px;
    padding: 14px 21px;
    padding-top: 20px;
    color: var(--light);
    font-family: var(--font-family-base), sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-dark-card .auth-input:hover {
    border-color: rgba(var(--light-rgb), 0.4);
}

.auth-dark-card .auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.auth-dark-card .auth-input::placeholder {
    color: rgba(var(--light-rgb), 0.6);
    font-weight: 400;
    font-size: 14px;
}

.auth-dark-card .auth-input.is-invalid,
.auth-dark-card .auth-input-group:has(.is-invalid),
.auth-dark-card .auth-phone-group:has(.is-invalid),
.auth-dark-card .auth-select.is-invalid,
.auth-dark-card .auth-form-group:has(.is-invalid) > .select2-container .select2-selection--single {
    border-color: var(--danger) !important;
}

/* Input group (password with eye icon) */
.auth-dark-card .auth-input-group {
    position: relative;
    background: rgba(var(--dark-rgb), 0.5);
    border: 1px solid rgba(var(--light-rgb), 0.25);
    border-radius: 100px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-dark-card .auth-input-group:hover {
    border-color: rgba(var(--light-rgb), 0.4);
}

.auth-dark-card .auth-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.auth-dark-card .auth-input-group .auth-input {
    padding-right: 50px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.auth-dark-card .auth-input-group .auth-input:focus {
    box-shadow: none;
}

[dir="rtl"] .auth-dark-card .auth-input-group .auth-input {
    padding-right: 21px;
    padding-left: 50px;
}

.auth-dark-card .auth-eye-toggle {
    position: absolute;
    top: 50%;
    right: 21px;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(var(--light-rgb), 0.65);
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

[dir="rtl"] .auth-dark-card .auth-eye-toggle {
    right: auto;
    left: 21px;
}

.auth-dark-card .auth-eye-toggle:hover {
    color: var(--light);
}

/* Phone input with country code */
.auth-dark-card .auth-phone-group {
    display: flex;
    align-items: center;
    background: rgba(var(--dark-rgb), 0.5);
    border: 1px solid rgba(var(--light-rgb), 0.25);
    border-radius: 100px;
    overflow: hidden;
    height: 56px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-dark-card .auth-phone-group:hover {
    border-color: rgba(var(--light-rgb), 0.4);
}

.auth-dark-card .auth-phone-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.auth-dark-card .auth-phone-group .auth-input {
    border: none;
    background: transparent;
    box-shadow: none;
    flex: 1;
    border-radius: 0;
    padding: 0 21px;
    height: 100%;
}

.auth-dark-card .auth-phone-group .auth-input:focus {
    box-shadow: none;
    border: none;
}

.auth-dark-card .auth-phone-group .auth-country-code {
    padding: 14px 10px 14px 16px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

[dir="rtl"] .auth-dark-card .auth-phone-group .auth-country-code {
    border-left: 1px solid rgba(var(--light-rgb), 0.1);
    padding: 14px 16px 14px 10px;
}

[dir="ltr"] .auth-dark-card .auth-phone-group .auth-country-code {
    border-right: 1px solid rgba(var(--light-rgb), 0.1);
}

.auth-dark-card .auth-phone-group .auth-country-code img {
    height: 16px;
    width: auto;
}

/* Select dropdown */
.auth-dark-card .auth-select {
    background: rgba(var(--dark-rgb), 0.5);
    border: 1px solid rgba(var(--light-rgb), 0.15);
    border-radius: 100px;
    padding: 14px 21px;
    padding-top: 20px;
    color: var(--light);
    font-family: var(--font-family-base), sans-serif;
    font-size: 14px;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.auth-dark-card .auth-select option {
    background: var(--dark);
    color: var(--light);
}

/* Button - uses admin theme color */
.auth-dark-card .auth-btn {
    width: 100%;
    height: 56px;
    padding: 14px;
    border: none;
    border-radius: 36px;
    font-family: var(--font-family-base), sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 25px;
    color: var(--light);
    background: var(--primary, #221755) url('/assets/default/img/auth/bg_blob.png') no-repeat -172px -148px;
    background-size: 696px 391px;
    background-blend-mode: screen;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-dark-card .auth-btn:hover {
    background: var(--primary) url('/assets/default/img/auth/bg_blob.png') no-repeat -172px -148px;
    background-size: 696px 391px;
    background-blend-mode: screen;
    box-shadow: none;
    transform: translateY(-1px);
}

.auth-dark-card .auth-btn:focus,
.auth-dark-card .auth-btn:focus-visible,
.auth-dark-card .auth-btn:active {
    outline: none;
    box-shadow: none;
}

.auth-dark-card .auth-btn:active {
    transform: translateY(0);
}

/* Forgot Password Link */
.auth-dark-card .auth-forgot-link {
    display: block;
    font-family: var(--font-family-base), sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 16px;
    color: var(--light);
    text-decoration: underline;
    margin-top: -22px;
    margin-bottom: 14px;
}

[dir="rtl"] .auth-dark-card .auth-forgot-link {
    text-align: right;
}

[dir="ltr"] .auth-dark-card .auth-forgot-link {
    text-align: left;
}

.auth-dark-card .auth-forgot-link:hover {
    color: var(--light);
}

/* Bottom Link */
.auth-dark-card .auth-bottom-link {
    text-align: center;
    margin-top: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-dark-card .auth-bottom-link a {
    color: var(--light);
    font-weight: 400;
    font-size: 16px;
    line-height: 16px;
    text-decoration: underline;
}

.auth-dark-card .auth-bottom-link a:hover {
    color: var(--light);
}

/* Back Button */
.auth-dark-page .auth-back-btn {
    position: absolute;
    top: 60px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--light-rgb), 0.1);
    border: 1px solid rgba(var(--light-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    text-decoration: none;
    transition: background 0.3s ease;
}

.auth-dark-page .auth-back-btn:hover {
    background: rgba(var(--light-rgb), 0.2);
    color: var(--light);
}

.auth-dark-page .auth-back-btn.back-rtl {
    left: 40px;
}

.auth-dark-page .auth-back-btn.back-ltr {
    left: 40px;
}

/* OTP Input */
.auth-otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    direction: ltr;
}

.auth-otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--light);
    background: rgba(var(--light-rgb), 0.06);
    border: 1px solid rgba(var(--light-rgb), 0.15);
    border-radius: 16px;
    font-family: var(--font-family-base), sans-serif;
}

.auth-otp-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Checkbox */
.auth-dark-card .auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 10px;
}

.auth-dark-card .auth-checkbox input[type="checkbox"] {
    accent-color: var(--primary, #221755);
    margin-top: 3px;
}

.auth-dark-card .auth-checkbox label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.auth-dark-card .auth-checkbox a {
    color: var(--light);
    font-weight: 700;
}

/* Error messages */
.auth-dark-card .invalid-feedback {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

.auth-dark-card .alert {
    background: rgba(var(--dark-rgb), 0.15);
    border: 1px solid rgba(var(--dark-rgb), 0.3);
    color: var(--danger);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 13px;
}

.auth-dark-card .alert-info {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--info);
}

.auth-dark-card .alert-success {
    background: rgba(var(--dark-rgb), 0.15);
    border-color: var(--success);
    color: var(--success);
}

/* Social Login */
.auth-dark-card .auth-social-divider {
    text-align: center;
    margin: 16px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.auth-dark-card .auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(var(--light-rgb), 0.06);
    border: 1px solid rgba(var(--light-rgb), 0.15);
    border-radius: 100px;
    color: var(--light);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: opacity 0.3s ease;
}

.auth-dark-card .auth-social-btn:hover {
    opacity: 0.9;
    color: var(--light);
}

.auth-dark-card .auth-social-btn img {
    width: 20px;
    height: 20px;
}

/* Row for side-by-side fields */
.auth-dark-card .auth-row {
    display: flex;
    gap: 16px;
    max-width: 100%;
}

.auth-dark-card .auth-row .auth-form-group {
    flex: 1;
    min-width: 0;
}

.auth-dark-card .auth-row .select2-container {
    max-width: 100% !important;
}

/* Tablet */
@media (max-width: 768px) {
    .auth-dark-card {
        width: 420px;
        padding: 36px 36px;
    }

    .auth-dark-page .auth-mascot {
        width: 700px;
        opacity: 0.3;
    }

    .auth-dark-page .auth-bg-blob {
        width: 800px;
        height: 500px;
    }

    .auth-dark-page .auth-logo {
        top: 30px;
    }

    .auth-dark-page .auth-logo.logo-rtl {
        right: 20px;
    }

    .auth-dark-page .auth-logo.logo-ltr {
        left: 20px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .auth-dark-card {
        border-radius: 30px;
        padding: 30px 24px;
        width: 100%;
        margin: 10px;
    }

    .auth-dark-card .auth-title {
        font-size: 28px;
        line-height: 40px;
    }

    .auth-dark-page .auth-mascot {
        display: none;
    }

    .auth-dark-card .auth-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .auth-dark-page .auth-bg-blob {
        width: 200px;
        height: 200px;
    }
}

/* Override all form-control inside auth card */
.auth-dark-card .form-control {
    background: transparent;
    border: none;
    color: var(--light);
    font-family: var(--font-family-base), sans-serif;
}

.auth-dark-card .form-control:focus {
    background: transparent;
    color: var(--light);
    box-shadow: none;
}

/* Country code select inside phone group */
.auth-dark-card .auth-country-code select,
.auth-dark-card .auth-country-code .select2-container {
    min-width: 100px;
}

.auth-dark-card .auth-country-code .select2-container--default .select2-selection--single {
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    height: 30px;
    padding: 0;
}

.auth-dark-card .auth-country-code .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--light);
    font-size: 13px;
    line-height: 30px;
    padding: 0 20px 0 0;
}

[dir="rtl"] .auth-dark-card .auth-country-code .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 0 0 20px;
}

.auth-dark-card .auth-country-code .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px;
}

.auth-dark-card .auth-country-code .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--light) transparent transparent transparent;
}

/* Select2 dropdown dark theme */
.select2-container--default .select2-results__option {
    color: var(--dark);
}

/* Ensure all inputs in card have dark background text */
.auth-dark-card input,
.auth-dark-card select,
.auth-dark-card textarea {
    color: var(--light);
}

.auth-dark-card input:-webkit-autofill,
.auth-dark-card input:-webkit-autofill:hover,
.auth-dark-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--light);
    -webkit-box-shadow: 0 0 0px 1000px rgba(var(--dark-rgb), 0.9) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Select2 dropdown dark theme - scoped to auth pages only */
body.auth-page .select2-container--default .select2-dropdown,
body.auth-page .select2-dropdown {
    background: var(--dark) !important;
    color: var(--light) !important;
    border-color: rgba(var(--light-rgb), 0.15) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

body.auth-page .select2-container--default .select2-results__option,
body.auth-page .select2-results__option {
    color: var(--light) !important;
    background: var(--dark) !important;
    padding: 8px 12px !important;
}

body.auth-page .select2-container--default .select2-results__option--highlighted[aria-selected],
body.auth-page .select2-container--default .select2-results__option:hover,
body.auth-page .select2-results__option:hover {
    background: rgba(var(--light-rgb), 0.15) !important;
    color: var(--light) !important;
}

body.auth-page .select2-container--default .select2-results,
body.auth-page .select2-results {
    background: var(--dark) !important;
}

body.auth-page .select2-container--default .select2-search--dropdown,
body.auth-page .select2-search--dropdown {
    background: var(--dark) !important;
    padding: 8px !important;
}

body.auth-page .select2-container--default .select2-search--dropdown .select2-search__field,
body.auth-page .select2-search__field {
    background: rgba(var(--light-rgb), 0.1) !important;
    border: 1px solid rgba(var(--light-rgb), 0.2) !important;
    color: var(--light) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
}

body.auth-page .select2-container--default .select2-results__options,
body.auth-page .select2-results__options {
    background: var(--dark) !important;
    max-height: 250px !important;
}

/* Select2 dark theme override */
.auth-dark-card .select2-container {
    width: 100% !important;
}

.auth-dark-card .auth-form-group > .select2-container--default .select2-selection--single {
    background: rgba(var(--dark-rgb), 0.5) !important;
    border: 1px solid rgba(var(--light-rgb), 0.25) !important;
    border-radius: 100px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 21px !important;
}

.auth-dark-card .auth-form-group > .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--light) !important;
    font-family: var(--font-family-base), sans-serif;
    font-size: 14px !important;
    padding: 0 !important;
    line-height: normal !important;
}

.auth-dark-card .auth-form-group > .select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    width: auto !important;
}

[dir="rtl"] .auth-dark-card .auth-form-group > .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto !important;
    left: 16px !important;
}

.auth-dark-card .auth-form-group > .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--light) transparent transparent transparent !important;
}

/* ============================================================
   Two-column split layout — form on left, image panel on right
   ============================================================ */

.auth-split-wrapper {
    display: flex;
    align-items: stretch;
    width: min(1040px, 92vw);
    max-width: 92vw;
    min-height: 560px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 5;
}

.auth-split-wrapper .auth-light-card {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
}

/* When no admin-login image is set, hide the split panel and let the
   white card take the full wrapper width — narrower wrapper, centred. */
.auth-split-wrapper.no-image {
    width: min(480px, 92vw);
    min-height: 0;
    overflow: visible;
    box-shadow: none;
    background: transparent;
}
.auth-split-wrapper.no-image .auth-light-card {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20),
        0 18px 45px rgba(0, 0, 0, 0.30);
}

.auth-split-image {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(var(--primary-rgb), 0.6);
    background-image:
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.5) 0%, rgba(var(--dark-rgb), 0.4) 100%);
    position: relative;
    opacity: 0.92;
}
.auth-split-image.has-image { opacity: 1; }
.auth-split-image.has-image::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18) 0%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
}

/* (legacy bottom-gradient overlay removed — replaced by the lighter
   135deg overlay above which gives a softer transparent feel.) */

@media (max-width: 768px) {
    .auth-split-wrapper { flex-direction: column; width: min(440px, 92vw); min-height: 0; }
    .auth-split-image { display: none; }
    .auth-split-wrapper .auth-light-card { flex: 1 1 auto; width: 100%; max-width: 100%; }
}

/* ============================================================
   Light/transparent card variant — same frosted-glass technique
   as .auth-dark-card but with a white tint and dark text.
   ============================================================ */

.auth-light-card {
    /* Match the forgot-password page (.auth-dark-card) exactly */
    background: rgba(var(--dark-rgb), 0.45);
    border: 1px solid rgba(var(--light-rgb), 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 40px 44px;
    width: 440px;
    max-width: 90vw;
    position: relative;
    z-index: 5;
    box-sizing: border-box;
    color: #ffffff;
}

.auth-light-card * { box-sizing: border-box; }

.auth-light-card .auth-title { color: #ffffff; }
.auth-light-card .auth-subtitle { color: rgba(255, 255, 255, 0.7); }
.auth-light-card .auth-separator {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.18), transparent);
    border-top: none;
}

/* Inputs in dark glass mode */
.auth-light-card .auth-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.auth-light-card .auth-input:hover { border-color: rgba(255, 255, 255, 0.30); }
.auth-light-card .auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.35);
    background: rgba(0, 0, 0, 0.35);
}
.auth-light-card .auth-input::placeholder { color: rgba(255, 255, 255, 0.45); }

/* Override Chrome/WebKit autofill — by default it forces a white background
   and dark text, which clashes with the dark glass card. */
.auth-light-card .auth-input:-webkit-autofill,
.auth-light-card .auth-input:-webkit-autofill:hover,
.auth-light-card .auth-input:-webkit-autofill:focus,
.auth-light-card .auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 45, 0.85) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
    border-color: rgba(255, 255, 255, 0.15);
}
.auth-light-card .auth-input-group .auth-input:-webkit-autofill,
.auth-light-card .auth-input-group .auth-input:-webkit-autofill:hover,
.auth-light-card .auth-input-group .auth-input:-webkit-autofill:focus,
.auth-light-card .auth-input-group .auth-input:-webkit-autofill:active {
    /* Inside the input group the wrapper supplies the border, so let the
       autofill match the wrapper's tone with no border of its own. */
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 45, 0.85) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: transparent !important;
}

/* Plain label (no chip) — white on dark glass */
.auth-light-card .auth-label {
    background: transparent !important;
    color: #ffffff !important;
}

/* Input group (password with eye toggle) */
.auth-light-card .auth-input-group {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.auth-light-card .auth-input-group:hover { border-color: rgba(255, 255, 255, 0.30); }
.auth-light-card .auth-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.35);
    background: rgba(0, 0, 0, 0.35);
}
.auth-light-card .auth-eye-toggle { color: rgba(255, 255, 255, 0.6); }
.auth-light-card .auth-eye-toggle:hover { color: #ffffff; }

/* Forgot password link — primary color lightened for readability on the dark glass card */
.auth-light-card .auth-forgot-link,
.auth-light-card .auth-forgot-link-inline {
    color: #b8aaff; /* fallback for browsers without color-mix */
    color: color-mix(in srgb, var(--primary) 35%, #ffffff);
    background: transparent;
}
.auth-light-card .auth-forgot-link:hover,
.auth-light-card .auth-forgot-link-inline:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Remember-me checkbox */
.auth-light-card .auth-checkbox label { color: rgba(255, 255, 255, 0.85); }
.auth-light-card .auth-checkbox input[type="checkbox"] {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

/* Submit button stays primary-coloured (already a strong CTA) */
.auth-light-card .auth-btn {
    background: var(--primary);
    color: #fff;
    border: none;
}
.auth-light-card .auth-btn:hover { opacity: 0.92; }

/* Validation messages */
.auth-light-card .invalid-feedback { color: #d12e34; }
.auth-light-card .auth-input.is-invalid,
.auth-light-card .auth-input-group:has(.is-invalid) {
    border-color: #d12e34 !important;
}

/* ============================================================
   Base shape (size/spacing/layout) for .auth-light-card form
   elements. The original rules in this file are scoped to
   .auth-dark-card only, so without these the light card renders
   with browser-default styling. Keep these in sync if you change
   the dark-card rules above.
   ============================================================ */

.auth-light-card .auth-separator {
    width: calc(100% + 44px);
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}
[dir="rtl"] .auth-light-card .auth-separator { margin-left: -44px; }

.auth-light-card .auth-title {
    font-weight: 600;
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 100%;
    text-align: left;
}
[dir="rtl"] .auth-light-card .auth-title { text-align: right; }

.auth-light-card .auth-subtitle {
    font-weight: 200;
    font-size: 15px;
    line-height: 100%;
    margin-bottom: 16px;
    text-align: left;
}
[dir="rtl"] .auth-light-card .auth-subtitle { text-align: right; }

.auth-light-card .auth-form-group { margin-bottom: 16px; position: relative; }

.auth-light-card .auth-label {
    font-family: var(--font-family-base), sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #ffffff !important;
    letter-spacing: normal;
    display: block;
    padding: 0;
    background: transparent !important;
    border: none;
    border-radius: 0;
    position: static;
    height: auto;
    margin: 0 0 8px;
    text-align: left;
}
[dir="rtl"] .auth-light-card .auth-label { text-align: right; }

.auth-light-card .auth-input {
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-family-base), sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: #ffffff;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.auth-light-card .auth-input::placeholder { font-size: 15px; color: rgba(255, 255, 255, 0.45); }

.auth-light-card .auth-input-group {
    position: relative;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.auth-light-card .auth-input-group .auth-input {
    padding-right: 50px;
    background: transparent;
    border: none;
    box-shadow: none;
}
[dir="rtl"] .auth-light-card .auth-input-group .auth-input { padding-right: 21px; padding-left: 50px; }
.auth-light-card .auth-input-group .auth-input:focus { box-shadow: none; }

.auth-light-card .auth-eye-toggle {
    position: absolute;
    top: 50%;
    right: 21px;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}
[dir="rtl"] .auth-light-card .auth-eye-toggle { right: auto; left: 21px; }

.auth-light-card .auth-btn {
    width: 100%;
    height: 48px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family-base), sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 0.01em;
}
.auth-light-card .auth-btn:focus,
.auth-light-card .auth-btn:focus-visible,
.auth-light-card .auth-btn:active { outline: none; box-shadow: none; }

.auth-light-card .auth-forgot-link {
    display: block;
    font-family: var(--font-family-base), sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    margin: 0;
    text-align: right;
}
[dir="rtl"] .auth-light-card .auth-forgot-link { text-align: left; }
.auth-light-card .auth-forgot-link:hover { text-decoration: underline; }

.auth-light-card .auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 10px;
}
.auth-light-card .auth-checkbox input[type="checkbox"] {
    accent-color: var(--primary, #221755);
    margin-top: 3px;
}
.auth-light-card .auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-light-card .auth-checkbox label {
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* Custom checkbox: hide native, draw an 18×18 box with primary-color tick on check */
.auth-light-card .auth-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.auth-light-card .auth-checkbox input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.65);
}
.auth-light-card .auth-checkbox input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.35);
}
.auth-light-card .auth-checkbox input[type="checkbox"]:active {
    transform: scale(0.92);
}

/* Checked state — primary fill + glowing ring + animated white tick (SVG so the
   stroke renders crisp at any DPI and animates via stroke-dashoffset). */
.auth-light-card .auth-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.18);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='4,9.5 7.5,13 14,5.5'/></svg>");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px 14px;
    animation: auth-check-pop 0.22s ease;
}

@keyframes auth-check-pop {
    0%   { transform: scale(0.85); }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.auth-light-card .invalid-feedback { font-size: 13px; font-weight: 500; margin-top: 4px; }

/* Brand block at the top of the login form */
.auth-light-card .auth-card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.auth-light-card .auth-card-brand-logo {
    height: 44px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
}
.auth-light-card .auth-card-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.auth-light-card .auth-card-brand-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}
.auth-light-card .auth-card-brand-tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
}

/* Remember me + Forgot password — same row */
.auth-light-card .auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
}
.auth-light-card .auth-options-row .auth-checkbox { margin: 0; }
.auth-light-card .auth-options-row .auth-forgot-link {
    margin: 0;
    display: inline-block;
}

/* (auth-card-heading no longer used — context now lives in the brand tagline) */

/* Page-level heading inside the light card (used by forgot/reset pages
   where a brand-only header isn't enough — needs a "what action" line). */
.auth-light-card .auth-page-heading {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.3;
}
.auth-light-card .auth-page-sub {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Bottom link ("Back to login") — same color treatment as the
   Forgot Password link on the login screen so the two pages feel symmetrical. */
.auth-light-card .auth-bottom-link {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}
.auth-light-card .auth-bottom-link a {
    color: #b8aaff; /* fallback */
    color: color-mix(in srgb, var(--primary) 35%, #ffffff);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.auth-light-card .auth-bottom-link a:hover { color: #ffffff; text-decoration: underline; }
