/* ============================================
   Auth Pages — Shared styles for auth templates
   (login, forgot_password, partner_request/register)
   ============================================ */

/* ===== Shared Auth Page Background ===== */
.login-page,
.forgot-page,
.register-page {
    min-height: 100vh;
    background: #0A0A0F;
    position: relative;
    overflow: hidden;
    padding: 100px 0 60px;
}

/* Dot grid background */
.login-page::before,
.forgot-page::before,
.register-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(139,92,246,0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

/* Matrix rain (shared) */
.matrix-rain {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 85%, transparent 100%);
}
.matrix-rain .col {
    position: absolute;
    top: -100vh;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    color: #a78bfa;
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
    animation: matrixFall linear infinite;
    will-change: transform;
    text-shadow: 0 0 12px rgba(139,92,246,0.4), 0 0 4px rgba(139,92,246,0.2);
}
.matrix-rain .col-green {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgba(74,222,128,0.6), 0 0 24px rgba(74,222,128,0.2) !important;
}
@keyframes matrixFall {
    0%   { transform: translateY(-10vh); }
    100% { transform: translateY(calc(100vh + 100%)); }
}

/* Container z-index */
.login-page .container,
.forgot-page .container,
.register-page .container {
    position: relative;
    z-index: 2;
}

.login-page .container,
.forgot-page .container {
    display: flex;
    justify-content: center;
}

/* Hide orbs */
.register-orb { display: none; }

/* ===== Shared Form Card ===== */
.login-form-card,
.forgot-form-card,
.register-form-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 480px;
}

/* Shared form header */
.login-form-header,
.forgot-form-header,
.register-form-header {
    text-align: center;
    margin-bottom: 28px;
}

/* Shared form logo */
.login-form-logo,
.forgot-form-logo,
.register-form-logo {
    width: 52px; height: 52px;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.12);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: #8B5CF6;
}

.login-form-header h2,
.forgot-form-header h2,
.register-form-header h2 {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 6px;
}

.login-form-header p,
.forgot-form-header p,
.register-form-header p {
    color: #64748B;
    font-size: 0.9rem;
}

/* Shared form fields */
.login-form-card .form-label,
.forgot-form-card .form-label,
.register-form-card .form-label {
    color: #1A1A2E;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.login-form-card .input-group,
.forgot-form-card .input-group {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    background: #FAFAFA;
    transition: border-color 0.15s ease;
}

.login-form-card .input-group:focus-within,
.forgot-form-card .input-group:focus-within {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
    background: #FFFFFF;
}

.login-form-card .input-group-text,
.forgot-form-card .input-group-text {
    background: transparent;
    border: none;
    padding: 10px 14px;
}

.login-form-card .input-group-text i,
.forgot-form-card .input-group-text i {
    color: #8B5CF6;
    font-size: 1rem;
}

.login-form-card .form-control,
.forgot-form-card .form-control {
    border: none;
    padding: 10px 14px 10px 0;
    font-size: 0.9rem;
    background: transparent;
    color: #1A1A2E;
}

.login-form-card .form-control:focus,
.forgot-form-card .form-control:focus {
    box-shadow: none;
}

.login-form-card .form-control::placeholder,
.forgot-form-card .form-control::placeholder {
    color: #94A3B8;
}

/* Register form fields */
.register-form-card .form-control,
.register-form-card .form-select {
    background: #FAFAFA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #1A1A2E;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.15s ease;
}
.register-form-card .form-control:focus,
.register-form-card .form-select:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
    background: #FFFFFF;
}
.register-form-card .form-control::placeholder {
    color: #94A3B8;
}

/* ===== Shared Submit Buttons ===== */
.btn-login-new,
.btn-forgot-submit,
.btn-register-submit {
    width: 100%;
    padding: 12px;
    background: #8B5CF6;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login-new:hover,
.btn-forgot-submit:hover,
.btn-register-submit:hover {
    background: #7C3AED;
    color: #FFFFFF;
}

/* ===== Login-specific ===== */

/* Google button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #1A1A2E;
    font-weight: 500;
    font-size: 0.9rem;
    transition: border-color 0.15s ease;
    text-decoration: none;
}
.btn-google:hover {
    border-color: #D1D5DB;
    background: #FAFAFA;
    color: #1A1A2E;
}

/* Divider */
.login-divider,
.register-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.login-divider::before,
.login-divider::after,
.register-divider::before,
.register-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}
.login-divider span,
.register-divider span {
    color: #94A3B8;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bottom links */
.login-bottom-links,
.register-bottom-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.btn-partner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #8B5CF6;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}
.btn-partner-cta:hover {
    background: #7C3AED;
    color: #FFFFFF;
}

.login-security,
.register-security,
.forgot-security-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.78rem;
    color: #94A3B8;
    background: transparent;
}
.login-security i,
.register-security i,
.forgot-security-footer i { color: #8B5CF6; }

/* Remember / forgot */
.login-form-card .form-check-label {
    font-size: 0.85rem;
    color: #64748B;
}
.login-form-card .forgot-link {
    font-size: 0.85rem;
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.login-form-card .forgot-link:hover {
    color: #7C3AED;
    text-decoration: underline;
}

/* ===== Forgot Password specific ===== */
.forgot-back-link {
    font-size: 0.85rem;
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.forgot-back-link:hover {
    color: #7C3AED;
    text-decoration: underline;
}

/* Security info card */
.forgot-security-card {
    background: rgba(139,92,246,0.04);
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 16px;
    max-width: 480px;
    width: 100%;
}
.forgot-security-card h6 {
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.forgot-security-card h6 i {
    color: #8B5CF6;
}
.forgot-security-card ul {
    margin-bottom: 0;
    padding-left: 18px;
}
.forgot-security-card li {
    color: #94A3B8;
    font-size: 0.78rem;
    line-height: 1.6;
}

/* Forgot success alert */
.forgot-form-card .alert-success {
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    color: #22c55e;
    border-radius: 10px;
}
.forgot-form-card .alert-success strong {
    color: #16a34a;
}
.forgot-form-card .alert-success p {
    color: #64748B;
}
.forgot-form-card .alert {
    border-radius: 10px;
    font-size: 0.88rem;
}

/* Forgot bottom links */
.forgot-bottom-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

/* ===== Register specific ===== */
.register-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 600px;
}

/* Left: Brand Showcase */
.register-showcase {
    color: #EDEDEF;
    padding: 40px 0;
}
.register-showcase-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 100px;
    font-size: 0.82rem;
    color: #A0A0A8;
    margin-bottom: 24px;
}
.register-showcase h1 {
    font-family: 'Instrument Sans', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: #EDEDEF;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}
.register-showcase-desc {
    font-size: 1rem;
    color: #A0A0A8;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Feature steps */
.register-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}
.register-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    transition: border-color 0.15s ease;
}
.register-feature-item:hover {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    transform: none;
}
.register-feature-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.register-feature-icon.purple { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.register-feature-icon.green { background: rgba(16,185,129,0.12); color: #10b981; }
.register-feature-icon.orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.register-feature-icon.pink { background: rgba(236,72,153,0.12); color: #ec4899; }
.register-feature-text {
    color: #A0A0A8;
    font-size: 0.88rem;
    font-weight: 400;
}

/* Trust signals */
.register-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.register-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #5C5C66;
}
.register-trust-item i { color: #8B5CF6; font-size: 0.85rem; }

/* Password wrapper & toggle */
.register-form-card .password-wrapper {
    position: relative;
}
.register-form-card .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94A3B8;
    transition: color 0.15s ease;
    z-index: 2;
}
.register-form-card .password-toggle:hover {
    color: #8B5CF6;
}

/* Password strength meter */
.password-strength {
    margin-top: 8px;
}
.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #E5E7EB;
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.15s ease, background 0.15s ease;
}
.password-strength-fill[data-level="0"] { width: 0%; background: #E5E7EB; }
.password-strength-fill[data-level="1"] { width: 25%; background: #ef4444; }
.password-strength-fill[data-level="2"] { width: 50%; background: #f59e0b; }
.password-strength-fill[data-level="3"] { width: 75%; background: #3b82f6; }
.password-strength-fill[data-level="4"] { width: 100%; background: #10b981; }
.password-strength-text {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.password-strength-text[data-level="0"] { color: #94A3B8; }
.password-strength-text[data-level="1"] { color: #ef4444; }
.password-strength-text[data-level="2"] { color: #f59e0b; }
.password-strength-text[data-level="3"] { color: #3b82f6; }
.password-strength-text[data-level="4"] { color: #10b981; }

/* GDPR checkbox */
.register-form-card .form-check-label {
    color: #64748B;
    font-size: 0.82rem;
}
.register-form-card .form-check-label a {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 500;
}
.register-form-card .form-check-label a:hover {
    text-decoration: underline;
}

/* Google OAuth button */
.btn-google-register {
    width: 100%;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #1A1A2E;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color 0.15s ease;
    text-decoration: none;
}
.btn-google-register:hover {
    border-color: #D1D5DB;
    background: #FAFAFA;
    color: #1A1A2E;
}

.register-bottom-links a {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 600;
}
.register-bottom-links a:hover {
    text-decoration: underline;
}

/* Referral code link */
#referralToggle {
    color: #8B5CF6 !important;
}
.register-form-card .input-group-text {
    border: 1px solid #E5E7EB;
    border-right: none;
    border-radius: 10px 0 0 10px;
    background: #FAFAFA;
}

/* Register responsive */
@media (max-width: 991px) {
    .register-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .register-showcase {
        text-align: center;
        padding: 20px 0;
    }
    .register-showcase h1 {
        font-size: 2rem;
    }
    .register-features {
        max-width: 400px;
        margin: 0 auto 30px;
    }
    .register-trust {
        justify-content: center;
    }
    .register-page {
        padding: 80px 0 40px;
    }
}
@media (max-width: 576px) {
    .login-page,
    .forgot-page { padding: 80px 0 40px; }
    .login-form-card,
    .forgot-form-card,
    .register-form-card { padding: 28px 20px; }
    .register-showcase h1 {
        font-size: 1.6rem;
    }
}

/* ===== Dark Mode ===== */
body.dark-mode .register-form-card {
    background: #1A1A2E;
    border: 1px solid rgba(255,255,255,0.08);
}
body.dark-mode .register-form-header h2 {
    color: #EDEDEF;
}
body.dark-mode .register-form-header p {
    color: #A0A0B0;
}
body.dark-mode .register-form-card .form-label {
    color: #EDEDEF;
}
body.dark-mode .register-form-card .form-control,
body.dark-mode .register-form-card .form-select {
    background: #16161D;
    border: 1px solid rgba(255,255,255,0.1);
    color: #EDEDEF;
}
body.dark-mode .register-form-card .form-control::placeholder {
    color: #6B6B78;
}
body.dark-mode .register-form-card .input-group-text {
    background: #16161D;
    border: 1px solid rgba(255,255,255,0.1);
    color: #A0A0B0;
}
body.dark-mode .register-form-card .password-toggle {
    color: #A0A0B0;
}
body.dark-mode .password-strength-bar {
    background: rgba(255,255,255,0.08);
}
body.dark-mode .register-divider::before,
body.dark-mode .register-divider::after {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
}
body.dark-mode .register-divider span {
    color: #6B6B78;
}
body.dark-mode .btn-google-register {
    background: #16161D;
    border: 1px solid rgba(255,255,255,0.1);
    color: #EDEDEF;
}
body.dark-mode .register-bottom-links a {
    color: #8B5CF6;
}
body.dark-mode .register-security {
    color: #6B6B78;
}
body.dark-mode .register-form-card .form-check-label {
    color: #A0A0B0;
}
