/* ==========================================================================
   Page Auth Styles (Modern Emerald & Gold Theme + Template Layout Compat)
   ========================================================================== */

:root {
    --bg-dark: #030a06;
    --bg-surface: #07170e;
    --bg-card: rgba(10, 28, 18, 0.88);
    --border-glow: rgba(245, 158, 11, 0.35);
    --border-subtle: rgba(16, 185, 129, 0.22);

    --emerald-500: #10B981;
    --emerald-400: #34D399;
    --emerald-600: #059669;

    --gold-500: #F59E0B;
    --gold-400: #FBBF24;
    --gold-300: #FCD34D;
    --gold-600: #D97706;

    --text-main: #FFFFFF;
    --text-sub: #CBD5E1;
    --text-muted-custom: #94A3B8;
}

/* Base Layout & Typography */
.auth-page-body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 1rem;
    margin: 0;
    box-sizing: border-box;
}

.auth-page-body h1, 
.auth-page-body h2, 
.auth-page-body h3, 
.auth-page-body h4, 
.auth-page-body h5, 
.auth-page-body h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Ambient Glow & Grid Backgrounds */
.ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 50% 60%, rgba(5, 150, 105, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 85%, rgba(245, 158, 11, 0.12) 0%, transparent 45%);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1020px;
    margin: auto;
}

.auth-card-single {
    max-width: 520px !important;
    margin: auto;
}

/* Dual Column Auth Card */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 50px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(20px);
}

/* Left Showcase Column */
.showcase-pane {
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.2) 0%, transparent 60%),
        linear-gradient(145deg, #091F14 0%, #05130C 100%);
    border-right: 1px solid var(--border-subtle);
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.showcase-logo {
    width: 100%;
    max-width: 220px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(245, 158, 11, 0.3));
    animation: float-logo 5s ease-in-out infinite;
}

@keyframes float-logo {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.showcase-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.2rem;
}

.showcase-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.showcase-icon.gold {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-400);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.showcase-icon.emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Right Form Pane */
.form-pane {
    padding: 3.5rem 3rem;
    background: rgba(10, 28, 18, 0.6);
}

@media (max-width: 768px) {
    .form-pane {
        padding: 2.5rem 1.75rem;
    }
}

/* Typography & Helpers */
.text-gradient-gold {
    background: linear-gradient(135deg, #FFFFFF 0%, #FDE68A 25%, #F59E0B 75%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-sub {
    color: var(--text-sub) !important;
}

.badge-pill-gold {
    background: rgba(245, 158, 11, 0.15);
    color: #FCD34D !important;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Form Inputs */
.custom-form-group {
    margin-bottom: 1.4rem;
    position: relative;
}

.custom-form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.45rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    color: var(--gold-400);
    font-size: 1.05rem;
    pointer-events: none;
    z-index: 2;
}

.custom-input,
.custom-select,
.custom-textarea {
    width: 100%;
    background: rgba(6, 18, 12, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #FFFFFF !important;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 0.85rem 1.1rem 0.85rem 2.8rem;
    transition: all 0.25s ease;
    outline: none;
}

.custom-select option {
    background-color: #07170e;
    color: #FFFFFF;
}

.custom-textarea {
    padding-left: 1.1rem;
    min-height: 90px;
    resize: vertical;
}

.custom-input:focus,
.custom-select:focus,
.custom-textarea:focus {
    background: rgba(8, 26, 16, 1);
    border-color: var(--gold-400);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
    color: #FFFFFF !important;
}

.custom-input::placeholder,
.custom-textarea::placeholder {
    color: #64748B;
    font-weight: 500;
}

/* Chrome & Safari Autofill Styling Override (Scoped to Member Auth Pages) */
.auth-page-body input:-webkit-autofill,
.auth-page-body input:-webkit-autofill:hover, 
.auth-page-body input:-webkit-autofill:focus, 
.auth-page-body input:-webkit-autofill:active,
.auth-page-body select:-webkit-autofill,
.auth-page-body textarea:-webkit-autofill,
.custom-input:-webkit-autofill,
.custom-select:-webkit-autofill,
.custom-textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #06120C inset !important;
    box-shadow: 0 0 0 1000px #06120C inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #FFFFFF !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.auth-page-body input:-webkit-autofill:focus,
.custom-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #081A10 inset, 0 0 16px rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 0 0 1000px #081A10 inset, 0 0 16px rgba(245, 158, 11, 0.35) !important;
    border-color: var(--gold-400) !important;
}

.register-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    margin: auto;
}

.sponsor-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.35rem;
}

/* Dark Modal Glass */
.modal-dark-glass .modal-content {
    background: #07170e;
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    color: #FFFFFF;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.modal-dark-glass .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-dark-glass .btn-close {
    filter: invert(1);
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-sub);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: var(--gold-400);
}

/* Buttons */
.btn-gold-glow {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #000000 !important;
    font-weight: 800;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
}

.btn-gold-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.7);
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #000000 !important;
}

.btn-emerald-outline {
    background: rgba(16, 185, 129, 0.1);
    color: #34D399 !important;
    font-weight: 700;
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 8px;
    padding: 0.8rem 1.8rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    width: 100%;
}

.btn-emerald-outline:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #34D399;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

/* Checkbox & Links (Scoped to Member Auth Pages) */
.auth-page-body .form-check-input {
    background-color: rgba(6, 18, 12, 0.95);
    border-color: rgba(16, 185, 129, 0.4);
    cursor: pointer;
}

.auth-page-body .form-check-input:checked {
    background-color: var(--gold-500);
    border-color: var(--gold-400);
}

.auth-page-body .form-check-label {
    color: var(--text-sub);
    font-size: 0.9rem;
    cursor: pointer;
}

.gold-link {
    color: var(--gold-400);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.gold-link:hover {
    color: var(--gold-300);
    text-decoration: underline;
}

.divider-custom {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.8rem 0;
    color: #64748B;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.divider-custom::before,
.divider-custom::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider-custom span {
    padding: 0 12px;
}

.member-bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.member-bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 10, 6, 0.75);
}

/* ==========================================================================
   Classic Template Authentication Helpers (Preserved)
   ========================================================================== */

.authentication-wrapper {
    display: flex;
    flex-basis: 100%;
    min-height: 100vh;
    width: 100%;
}

.authentication-wrapper .authentication-inner {
    width: 100%;
}

.authentication-wrapper.authentication-basic {
    align-items: center;
    justify-content: center;
}

.authentication-wrapper .auth-cover-illustration {
    z-index: 1;
    max-inline-size: 38rem;
}

.authentication-wrapper .authentication-image {
    z-index: -1;
    inline-size: 100%;
    inset-block-end: 0%;
    position: absolute;
    inset-inline-start: 0;
}

.authentication-wrapper.authentication-cover {
    align-items: flex-start;
}

.authentication-wrapper.authentication-cover .authentication-inner {
    min-height: 100vh;
    position: relative;
}

.authentication-wrapper.authentication-cover .authentication-image {
    inline-size: 70%;
}

html:not([dir=rtl]) .authentication-wrapper.authentication-cover .authentication-image {
    inset-inline-start: unset;
}

.authentication-wrapper.authentication-basic .authentication-inner {
    max-width: 450px;
}

.authentication-inner-2 {
    max-width: 800px !important;
}

.authentication-wrapper .auth-input-wrapper .auth-input {
    max-width: 50px;
    padding-left: .4rem;
    padding-right: .4rem;
    font-size: 150%;
}

@media (max-width: 575.98px) {
    .authentication-wrapper .auth-input-wrapper .auth-input {
        font-size: 1.125rem;
    }
}

@media (max-width: 1199.98px) {
    .authentication-cover .authentication-image {
        inset-block-end: 9%;
    }

    [dir=rtl] .authentication-cover .authentication-image {
        inline-size: 65%;
    }
}

#twoStepsForm .fv-plugins-bootstrap5-row-invalid .form-control {
    border-color: #ff4d49;
}

.light-style .authentication-wrapper .authentication-bg {
    background-color: #fff;
}

.dark-style .authentication-wrapper .authentication-bg {
    background-color: #30334e;
}

.required:after {
    content: ' *';
    color: red;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.img-holder {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    text-align: center;
    z-index: 0;
    object-fit: cover;
    background: rgba(30, 34, 40, .5);
    height: 100%;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff8a;
    z-index: 9999;
}

#status {
    width: 40px;
    height: 40px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
}

.spinner {
    margin: 0 auto;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top: 5px solid #dee2e6;
    border-right: 5px solid #dee2e6;
    border-bottom: 5px solid #dee2e6;
    border-left: 5px solid var(--primary, #F59E0B);
    transform: translateZ(0);
    animation: SpinnerAnimation 1.1s infinite linear;
}

.spinner, .spinner:after {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

@keyframes SpinnerAnimation {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

.app-brand-link img {
    max-height: 100px;
    max-width: 260px;
}
