/* ==========================================================================
   Aff Wing - Modern Split Screen Auth (Login & Register)
   Pixel-perfect match to Edgeway Partners design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.aff-auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0F172A;
    background: #F8FAFC;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   LEFT HERO PANEL (Purple Gradient)
   -------------------------------------------------------------------------- */
.aff-auth-hero {
    flex: 1 1 50%;
    width: 50%;
    min-height: 100vh;
    background: radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
                linear-gradient(150deg, #5345eb 0%, #6366f1 30%, #753be6 65%, #6d28d9 100%);
    padding: 60px 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.aff-auth-hero-logo {
    display: inline-block;
    z-index: 2;
}

.aff-auth-hero-logo img {
    height: 38px;
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

.aff-auth-hero-main {
    margin: 40px 0;
    max-width: 520px;
    z-index: 2;
}

.aff-auth-hero-heading {
    font-size: 40px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.18;
    letter-spacing: -0.6px;
    margin: 0 0 18px 0;
}

.aff-auth-hero-sub {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 32px 0;
    font-weight: 400;
}

/* Feature Checkmarks List */
.aff-auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.aff-auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.aff-auth-feature-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #FFFFFF;
}

.aff-auth-feature-icon svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* Statistics Counters (Register Page) */
.aff-auth-stats {
    display: flex;
    align-items: flex-start;
    gap: 36px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 10px;
}

.aff-auth-stat-col {
    display: flex;
    flex-direction: column;
}

.aff-auth-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.aff-auth-stat-label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 4px;
    font-weight: 400;
}

/* Bottom Testimonial Card */
.aff-auth-testimonial {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 22px 26px;
    max-width: 520px;
    z-index: 2;
    box-sizing: border-box;
}

.aff-auth-stars {
    color: #f59e0b;
    font-size: 15px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.aff-auth-quote {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 16px 0;
}

.aff-auth-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aff-auth-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aff-auth-author-info {
    display: flex;
    flex-direction: column;
}

.aff-auth-author-name {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.aff-auth-author-role {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.2;
    margin: 3px 0 0 0;
}

/* --------------------------------------------------------------------------
   RIGHT AUTH FORM PANEL (Clean White)
   -------------------------------------------------------------------------- */
.aff-auth-form-panel {
    flex: 1 1 50%;
    width: 50%;
    min-height: 100vh;
    background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
                #F8FAFC;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow-y: auto;
}

.aff-auth-container-inner {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
}

.aff-auth-container-inner.register-mode {
    max-width: 480px;
}

/* Top Pill Badge */
.aff-auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    background: #EEF2FF;
    border: 1px solid #E0E7FF;
    border-radius: 9999px;
    color: #4f46e5;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
    align-self: flex-start;
}

.aff-auth-pill svg {
    width: 14px;
    height: 14px;
}

.aff-auth-title {
    font-size: 32px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 8px 0;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.aff-auth-subtitle {
    font-size: 15px;
    color: #64748B;
    margin: 0 0 24px 0;
    line-height: 1.45;
}

/* The White Floating Card */
.aff-auth-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05),
                0 20px 35px -10px rgba(99, 102, 241, 0.03);
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
}

/* Account Type Box (Register page) */
.aff-account-type-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    margin-bottom: 22px;
}

.aff-account-type-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #6366f1;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.aff-account-type-text {
    display: flex;
    flex-direction: column;
}

.aff-account-type-name {
    font-weight: 700;
    font-size: 13.5px;
    color: #0F172A;
    margin: 0;
    line-height: 1.2;
}

.aff-account-type-sub {
    font-size: 11.5px;
    color: #64748B;
    margin: 2px 0 0 0;
    line-height: 1.2;
}

/* Form Groups & Inputs */
.aff-form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.aff-form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 7px;
    display: block;
}

.aff-form-label .req {
    color: #ef4444;
    margin-left: 2px;
}

.aff-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.aff-input-icon-left {
    position: absolute;
    left: 14px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 14px;
}

.aff-input-icon-left svg {
    width: 16px;
    height: 16px;
}

.aff-input-icon-right {
    position: absolute;
    right: 14px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.15s;
}

.aff-input-icon-right:hover {
    color: #475569;
}

.aff-input-icon-right svg {
    width: 16px;
    height: 16px;
}

.aff-field-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    font-size: 14.5px !important;
    color: #0F172A !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.aff-field-input.has-right-icon {
    padding-right: 42px !important;
}

.aff-field-input::placeholder {
    color: #94A3B8 !important;
    font-size: 14px !important;
}

.aff-field-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* Custom Select */
.aff-field-select {
    width: 100%;
    padding: 11px 36px 11px 40px;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: #0F172A !important;
    font-family: inherit !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.aff-field-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.aff-field-select option {
    background: #FFFFFF;
    color: #0F172A;
    padding: 8px;
}

.aff-select-caret {
    position: absolute;
    right: 14px;
    color: #94A3B8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.aff-select-caret svg {
    width: 14px;
    height: 14px;
}

/* Two Column Grid */
.aff-form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.aff-form-col {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
}

/* Checkbox & Links */
.aff-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 24px 0;
    font-size: 14px;
}

.aff-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
}

.aff-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    cursor: pointer;
    margin: 0;
}

.aff-forgot-link {
    color: #4f46e5;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.aff-forgot-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Submit Button */
.aff-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 13px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.aff-submit-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.38);
    transform: translateY(-1px);
}

.aff-submit-btn:active {
    transform: translateY(0);
}

.aff-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.aff-submit-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.aff-submit-btn:hover svg {
    transform: translateX(3px);
}

/* Card Bottom Links */
.aff-card-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #64748B;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aff-card-footer a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.aff-card-footer a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Bottom Security & Copyright */
.aff-auth-footer-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    font-size: 13px;
    color: #64748B;
}

.aff-auth-footer-trust svg {
    width: 15px;
    height: 15px;
    color: #10b981;
}

.aff-auth-footer-copy {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #94A3B8;
}

/* Alerts */
.aff-auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aff-auth-alert.danger {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #B91C1C;
}

.aff-auth-alert.success {
    background: #ECFDF5;
    border: 1px solid #D1FAE5;
    color: #047857;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .aff-auth-hero {
        padding: 40px 36px;
    }
    .aff-auth-hero-heading {
        font-size: 32px;
    }
    .aff-auth-form-panel {
        padding: 40px 24px;
    }
}

@media (max-width: 991px) {
    .aff-auth-page {
        flex-direction: column;
    }
    .aff-auth-hero {
        width: 100%;
        min-height: auto;
        padding: 40px 24px;
    }
    .aff-auth-form-panel {
        width: 100%;
        min-height: auto;
        padding: 40px 20px;
    }
    .aff-auth-hero-main {
        margin: 24px 0;
    }
    .aff-auth-testimonial {
        display: none;
    }
}

@media (max-width: 576px) {
    .aff-auth-hero-heading {
        font-size: 26px;
    }
    .aff-auth-title {
        font-size: 26px;
    }
    .aff-auth-card {
        padding: 24px 18px;
        border-radius: 16px;
    }
    .aff-form-row {
        flex-direction: column;
        gap: 18px;
    }
}

/* --------------------------------------------------------------------------
   SPECIFICITY ENFORCEMENT (Guards against body.portal-body global dark overrides)
   -------------------------------------------------------------------------- */
body.portal-body .aff-auth-page {
    color: #0F172A !important;
    background: #F8FAFC !important;
}

body.portal-body .aff-auth-hero h1,
body.portal-body .aff-auth-hero-heading {
    color: #FFFFFF !important;
}

body.portal-body .aff-auth-hero-sub {
    color: rgba(255, 255, 255, 0.88) !important;
}

body.portal-body .aff-auth-feature-item {
    color: #FFFFFF !important;
}

body.portal-body .aff-auth-stat-num {
    color: #FFFFFF !important;
}

body.portal-body .aff-auth-stat-label {
    color: rgba(255, 255, 255, 0.72) !important;
}

body.portal-body .aff-auth-quote {
    color: #FFFFFF !important;
}

body.portal-body .aff-auth-author-name {
    color: #FFFFFF !important;
}

body.portal-body .aff-auth-author-role {
    color: rgba(255, 255, 255, 0.72) !important;
}

body.portal-body .aff-auth-title,
body.portal-body .aff-auth-form-panel h2 {
    color: #0F172A !important;
}

body.portal-body .aff-auth-subtitle {
    color: #64748B !important;
}

body.portal-body .aff-form-label {
    color: #1E293B !important;
}

body.portal-body .aff-account-type-name {
    color: #0F172A !important;
}

body.portal-body .aff-account-type-sub {
    color: #64748B !important;
}

body.portal-body .aff-card-footer,
body.portal-body .aff-auth-footer-trust {
    color: #64748B !important;
}

body.portal-body .aff-checkbox-label {
    color: #475569 !important;
}

body.portal-body .aff-auth-footer-copy {
    color: #94A3B8 !important;
}

body.portal-body .aff-auth-card {
    background: #FFFFFF !important;
}

