/* ==========================================================================
   Marmot Modern Split-Screen Authentication Design System
   Matches institutional dark fintech UI (Tradesea alignment)
   ========================================================================== */

:root {
    --auth-bg-page: #030308;
    --auth-bg-card: rgba(10, 20, 36, 0.65);
    --auth-bg-card-solid: #0A1424;
    --auth-card-border: rgba(0, 242, 254, 0.14);
    --auth-card-border-hover: rgba(0, 242, 254, 0.40);
    --auth-card-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 242, 254, 0.08), 0 0 32px rgba(0, 242, 254, 0.08);
    --auth-card-shadow-hover: 0 20px 56px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 242, 254, 0.22), 0 0 44px rgba(0, 242, 254, 0.16);
    --auth-bg-input: rgba(6, 12, 22, 0.75);
    --auth-bg-input-focus: rgba(10, 18, 32, 0.95);
    --auth-border-subtle: rgba(0, 242, 254, 0.10);
    --auth-border-input: rgba(0, 242, 254, 0.16);
    --auth-border-focus: #00F2FE;
    --auth-focus-ring: rgba(0, 242, 254, 0.25);
    --auth-primary: #00F2FE;
    --auth-primary-hover: #38BDF8;
    --auth-primary-text: #040810;
    --auth-text-main: #F8FAFC;
    --auth-text-muted: #94A3B8;
    --auth-text-subtle: #64748B;
    --auth-accent-cyan: #00F2FE;
    --auth-accent-blue: #38BDF8;
}

body.auth-page {
    background-color: #030308 !important;
    background-image:
        linear-gradient(rgba(0, 242, 254, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 254, 0.032) 1px, transparent 1px) !important;
    background-size: 55px 55px, 55px 55px !important;
    background-attachment: fixed !important;
    color: var(--auth-text-main) !important;
    font-family: 'Google Sans Flex', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Outer Fullscreen Split Layout */
.auth-split-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: transparent !important;
    position: relative;
    overflow-x: hidden;
    z-index: 2;
}

/* Background Particle Canvas */
.auth-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   Left Hero Pane (Showcase & Security Branding)
   ========================================================================== */
.auth-hero-pane {
    flex: 1 1 50%;
    max-width: 50%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 4rem;
    position: relative;
    overflow: hidden;
    background: transparent !important;
    border-right: none !important;
    z-index: 2;
}

/* Ambient Volumetric Beam from Top-Left */
.auth-hero-beam {
    display: none !important;
}

.auth-hero-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--auth-text-main);
    transition: opacity 0.2s ease;
}

.auth-hero-brand:hover {
    opacity: 0.9;
}

.auth-hero-brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.auth-hero-brand-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-hero-brand-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Padlock & Biometric Center Hero */
.auth-hero-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto 0;
    width: 100%;
}

.auth-padlock-container {
    position: relative;
    width: 480px;
    height: 480px;
    max-width: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-padlock-3d-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 55%, transparent 72%);
    mask-image: radial-gradient(ellipse at 50% 50%, black 55%, transparent 72%);
    filter: drop-shadow(0 0 55px rgba(0, 242, 254, 0.28));
    animation: authFloat 7s ease-in-out infinite alternate;
}

.auth-padlock-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 45px rgba(0, 242, 254, 0.15));
    animation: authFloat 6s ease-in-out infinite alternate;
}

@keyframes authFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(0.5deg); }
}

.auth-fingerprint-glow {
    animation: authPulse 3s ease-in-out infinite alternate;
}

@keyframes authPulse {
    0% { opacity: 0.7; filter: drop-shadow(0 0 6px #00F2FE); }
    100% { opacity: 1; filter: drop-shadow(0 0 16px #00F2FE); }
}

.auth-hero-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8125rem;
    color: var(--auth-text-subtle);
}

.auth-hero-footer i {
    color: #38BDF8;
}

/* ==========================================================================
   Right Form Pane (Clean Form Alignment)
   ========================================================================== */
.auth-form-pane {
    flex: 1 1 50%;
    max-width: 50%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    background: transparent;
    position: relative;
    z-index: 2;
}

.auth-form-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    background: rgba(10, 20, 36, 0.65) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(0, 242, 254, 0.14) !important;
    border-radius: 20px !important;
    padding: 2.25rem 2.25rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.auth-form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.07) 0%, transparent 55%);
    border-radius: inherit;
    pointer-events: none;
    opacity: 1;
    z-index: 0;
}

.auth-form-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 254, 0.32) !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 242, 254, 0.10) !important;
    background: rgba(10, 20, 36, 0.78) !important;
}

.auth-form-card > * {
    position: relative;
    z-index: 1;
}

/* Mobile Brand Header (Visible only on < lg) */
.auth-mobile-header {
    display: none;
    width: 100%;
    max-width: 420px;
    margin-bottom: 2rem;
    text-align: left;
}

/* Headings */
.auth-title {
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.925rem;
    font-weight: 400;
    color: var(--auth-text-muted);
    margin-bottom: 1.75rem;
}

/* Social Buttons */
.auth-social-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

.btn-auth-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: rgba(10, 20, 36, 0.70);
    border: 1px solid var(--auth-border-input);
    border-radius: 10px;
    color: #F8FAFC;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-auth-social:hover {
    background: rgba(14, 28, 50, 0.90);
    border-color: rgba(0, 242, 254, 0.35);
    color: #00F2FE;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 242, 254, 0.08);
}

.btn-auth-social svg,
.btn-auth-social i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.35rem 0;
    color: var(--auth-text-subtle);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    padding: 0 0.85rem;
    text-transform: lowercase;
}

/* Form Groups & Inputs */
.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    margin-bottom: 0.4rem;
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input {
    width: 100%;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border-input);
    border-radius: 10px;
    color: #F8FAFC;
    font-size: 0.9rem;
    padding: 0.72rem 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    background: var(--auth-bg-input-focus);
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
    outline: none;
    color: #FFFFFF;
}

.auth-input::placeholder {
    color: #475569;
}

.auth-input-password {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-subtle);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.auth-password-toggle:hover {
    color: var(--auth-text-muted);
}

/* Checkbox & Options */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    user-select: none;
    font-size: 0.8125rem;
    margin: 0;
}

.auth-terms-label {
    display: inline;
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
    margin: 0;
    cursor: pointer;
}

.auth-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--auth-bg-input);
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-link {
    color: #38BDF8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: #60A5FA;
    text-decoration: underline;
}

.auth-terms-note {
    font-size: 0.8rem;
    color: var(--auth-text-subtle);
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.auth-terms-note a {
    color: #38BDF8;
    text-decoration: none;
}

.auth-terms-note a:hover {
    text-decoration: underline;
}

/* Primary Action Button */
.btn-auth-primary {
    width: 100%;
    background: #00F2FE !important;
    color: #040810 !important;
    -webkit-text-fill-color: #040810 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.82rem 1.5rem !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

.btn-auth-primary:hover {
    background: #38BDF8 !important;
    color: #040810 !important;
    -webkit-text-fill-color: #040810 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 26px rgba(0, 242, 254, 0.55) !important;
}

.btn-auth-primary:active {
    transform: translateY(0) !important;
}

/* Footer Link */
.auth-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.auth-footer-text a {
    color: #38BDF8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-footer-text a:hover {
    color: #60A5FA;
    text-decoration: underline;
}

/* Alert / Error Box */
.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #F87171;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.825rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ADE80;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.825rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* OTP Specific Styling */
.auth-otp-grid {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.25rem 0 1.5rem 0;
}

.auth-otp-box {
    width: 50px;
    height: 54px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(6, 12, 22, 0.85) !important;
    border: 1px solid rgba(0, 242, 254, 0.18) !important;
    border-radius: 12px !important;
    color: #00F2FE !important;
    outline: none;
    transition: all 0.2s ease;
}

.auth-otp-box:focus {
    background: rgba(10, 20, 36, 0.95) !important;
    border-color: #00F2FE !important;
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.25) !important;
}

.auth-timer-pill,
.auth-badge-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 4px 14px !important;
    background: rgba(0, 242, 254, 0.08) !important;
    color: #00F2FE !important;
    border: 1px solid rgba(0, 242, 254, 0.22) !important;
    border-radius: 50px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.10) !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991.98px) {
    .auth-hero-pane {
        display: none !important;
    }

    .auth-form-pane {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        padding: 2.5rem 1.25rem !important;
        justify-content: flex-start !important;
    }

    .auth-form-card {
        padding: 1.75rem 1.25rem !important;
        border-radius: 16px !important;
        max-width: 100% !important;
    }

    .auth-mobile-header {
        display: block !important;
    }
}

/* Compatibility & Bridge for Legacy Auth Partials */
.auth-form-card .login-form-group {
    margin-bottom: 1.15rem;
}

.auth-form-card .login-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    margin-bottom: 0.4rem;
}

.auth-form-card .login-input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.auth-form-card .login-input-group .input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--auth-text-subtle);
    font-size: 1.05rem;
    pointer-events: none;
    z-index: 2;
}

.auth-form-card .login-input-group .login-input {
    width: 100%;
    background: var(--auth-bg-input) !important;
    border: 1px solid var(--auth-border-input) !important;
    border-radius: 10px !important;
    color: #F8FAFC !important;
    font-size: 0.9rem !important;
    padding: 0.72rem 0.95rem 0.72rem 2.45rem !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.auth-form-card .login-input-group .login-input:focus {
    background: var(--auth-bg-input-focus) !important;
    border-color: var(--auth-border-focus) !important;
    box-shadow: 0 0 0 3px var(--auth-focus-ring) !important;
    outline: none !important;
    color: #FFFFFF !important;
}

.auth-form-card .login-input-group .password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--auth-text-subtle);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.auth-form-card .login-input-group .password-toggle-btn:hover {
    color: var(--auth-text-muted);
}

.auth-form-card .btn-login {
    width: 100% !important;
    background: #00F2FE !important;
    color: #040810 !important;
    -webkit-text-fill-color: #040810 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.82rem 1.5rem !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35) !important;
    transition: all 0.2s ease !important;
}

.auth-form-card .btn-login:hover {
    background: #38BDF8 !important;
    color: #040810 !important;
    -webkit-text-fill-color: #040810 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 26px rgba(0, 242, 254, 0.55) !important;
}

.auth-form-card .form-control {
    width: 100% !important;
    background: var(--auth-bg-input) !important;
    border: 1px solid var(--auth-border-input) !important;
    border-radius: 10px !important;
    color: #F8FAFC !important;
    font-size: 0.9rem !important;
    padding: 0.72rem 0.95rem !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.auth-form-card .form-control:focus {
    background: var(--auth-bg-input-focus) !important;
    border-color: var(--auth-border-focus) !important;
    box-shadow: 0 0 0 3px var(--auth-focus-ring) !important;
    outline: none !important;
    color: #FFFFFF !important;
}
