/* ============================================================
   BusinessLine — Modern SaaS Authentication Design System 2026
   Vibrant Aurora Mesh, Elevated Cards, Segmented Pill Controls,
   3D Illustrations & Multi-Role Support (Admin / Vendor / Affiliate)
   ============================================================ */

:root {
    --mp-primary: #4f46e5;
    --mp-primary-rgb: 79, 70, 229;
    --mp-primary-dark: #3730a3;
    --mp-primary-light: #818cf8;
    --mp-secondary: #7c3aed;
    --mp-accent: #2563eb;
    --mp-gradient-btn: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    --mp-gradient-btn-hover: linear-gradient(135deg, #1d4ed8 0%, #4338ca 50%, #6d28d9 100%);
    
    --mp-text-main: #0f172a;
    --mp-text-muted: #64748b;
    --mp-text-light: #94a3b8;
    
    --mp-card-bg: #ffffff;
    --mp-card-border: rgba(226, 232, 240, 0.85);
    --mp-card-radius: 24px;
    --mp-card-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.12), 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    
    --mp-input-radius: 12px;
    --mp-input-border: #e2e8f0;
    --mp-input-focus: #4f46e5;
    --mp-input-ring: rgba(79, 70, 229, 0.14);
}

/* Base Auth Canvas with Ambient Aurora Glows */
body {
    background-color: #f8fafc;
    color: var(--mp-text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.mp-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 2.5rem 1rem;
    background-color: #f8fafc;
}

/* Ambient Aurora Mesh Background Blobs */
.mp-auth-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 8% 12%, rgba(192, 132, 252, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 45% 70%, rgba(56, 189, 248, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 92% 15%, rgba(251, 113, 133, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 85% 85%, rgba(129, 140, 248, 0.20) 0%, transparent 48%),
        radial-gradient(circle at 25% 45%, rgba(254, 240, 138, 0.14) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

/* Grid & Centered Layout */
.mp-auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mp-auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

/* Trust Pill Badge */
.mp-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 1.15rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 50rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #059669;
}
[data-bs-theme="dark"] .mp-trust-pill {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* ============================================================
   LEFT COLUMN: Hero Branding & 3D Visual Experience
   ============================================================ */
.mp-auth-hero {
    flex: 1 1 50%;
    max-width: 540px;
    padding: 1rem;
}

/* Brand Logo */
.mp-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
}
.mp-hero-brand img {
    max-height: 56px;
    max-width: 240px;
    width: auto;
    object-fit: contain;
}

/* Headline & Tagline */
.mp-hero-title {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}
.mp-hero-subtitle {
    font-size: 1.05rem;
    color: var(--mp-text-muted);
    line-height: 1.6;
    margin-bottom: 2.25rem;
    max-width: 460px;
}

/* Feature Bullets with Vibrant Rounded Icon Badges */
.mp-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.mp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    transition: transform 0.25s ease;
}
.mp-feature-item:hover {
    transform: translateX(4px);
}

.mp-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.mp-feature-item:hover .mp-feature-icon {
    transform: scale(1.06);
}

/* Icon Gradient Variants */
.mp-feature-icon--blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}
.mp-feature-icon--pink {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
    box-shadow: 0 8px 18px rgba(244, 63, 94, 0.35);
}
.mp-feature-icon--green {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.35);
}
.mp-feature-icon--gold {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}
.mp-feature-icon--purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 8px 18px rgba(139, 92, 246, 0.35);
}
.mp-feature-icon--cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0369a1 100%);
    box-shadow: 0 8px 18px rgba(6, 182, 212, 0.35);
}

.mp-feature-text h6 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.2rem;
}
.mp-feature-text p {
    font-size: 0.88rem;
    color: var(--mp-text-muted);
    line-height: 1.45;
    margin-bottom: 0;
}

/* 3D Illustration Container with Gentle Float */
.mp-hero-illustration {
    position: relative;
    max-width: 480px;
    animation: mpHeroFloat 8s ease-in-out infinite;
}
.mp-hero-illustration img,
.mp-hero-illustration svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(79, 70, 229, 0.16));
}

@keyframes mpHeroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================================
   RIGHT COLUMN: Elevated White SaaS Card
   ============================================================ */
.mp-auth-card-panel {
    flex: 1 1 50%;
    max-width: 520px;
}

.mp-auth-card {
    background: var(--mp-card-bg);
    border-radius: var(--mp-card-radius);
    padding: 2.75rem 2.5rem;
    box-shadow: var(--mp-card-shadow);
    border: 1px solid var(--mp-card-border);
    position: relative;
    transition: all 0.3s ease;
}

/* Card Header */
.mp-card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.mp-card-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.mp-card-subtitle {
    font-size: 0.92rem;
    color: var(--mp-text-muted);
    margin-bottom: 0;
}

/* Portal Badge (Optional Accent) */
.partner-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 1rem;
    border-radius: 50rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(79, 70, 229, 0.08);
    color: var(--mp-primary);
    border: 1px solid rgba(79, 70, 229, 0.18);
    margin: 0 auto 0.85rem auto;
}

/* Segmented Role Switcher Tabs (Signature Pill Toggle) */
.mp-role-tabs {
    background: #f1f5f9;
    padding: 5px;
    border-radius: 50rem;
    display: flex;
    gap: 4px;
    margin-bottom: 1.75rem;
    border: 1px solid #e2e8f0;
}

.mp-role-tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: 50rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mp-text-muted);
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.mp-role-tab:hover {
    color: #0f172a;
}
.mp-role-tab.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Input Group Styles */
.mp-input-group {
    border-radius: var(--mp-input-radius);
    border: 1.5px solid var(--mp-input-border);
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mp-input-group:focus-within {
    border-color: var(--mp-input-focus) !important;
    box-shadow: 0 0 0 4px var(--mp-input-ring) !important;
}

.mp-input-group .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0 0.85rem 0 1.15rem;
    color: var(--mp-text-light);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}
.mp-input-group:focus-within .input-group-text {
    color: var(--mp-primary);
}

.mp-input-group .form-control {
    border: none !important;
    height: 48px !important;
    padding: 0.75rem 1rem 0.75rem 0.25rem !important;
    font-size: 0.95rem !important;
    color: #0f172a !important;
    box-shadow: none !important;
    background: transparent !important;
}
.mp-input-group .form-control::placeholder {
    color: #94a3b8;
    font-size: 0.92rem;
}

.mp-toggle-pwd {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.15rem;
    padding: 0 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}
.mp-toggle-pwd:hover {
    color: var(--mp-primary) !important;
}

/* Checkbox & Forgot Password Row */
.mp-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.mp-form-options .form-check-label {
    font-size: 0.88rem;
    color: var(--mp-text-muted);
    cursor: pointer;
    user-select: none;
}
.mp-form-options .form-check-input {
    cursor: pointer;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 4px;
    border-color: #cbd5e1;
}
.mp-form-options .form-check-input:checked {
    background-color: var(--mp-primary);
    border-color: var(--mp-primary);
}
.mp-form-options a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mp-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.mp-form-options a:hover {
    color: var(--mp-primary-dark);
    text-decoration: underline;
}

/* Primary Submit Button */
.mp-btn-submit,
.mp-auth-page .reg_form .aff-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 50px;
    border: none !important;
    border-radius: var(--mp-input-radius) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: var(--mp-gradient-btn) !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35) !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    margin-top: 1.5rem;
}
.mp-btn-submit:hover:not(:disabled),
.mp-auth-page .reg_form .aff-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45) !important;
    background: var(--mp-gradient-btn-hover) !important;
    color: #ffffff !important;
}
.mp-btn-submit:active:not(:disabled),
.mp-auth-page .reg_form .aff-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}
.mp-btn-submit:disabled,
.mp-auth-page .reg_form .aff-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Divider "OR CONTINUE WITH" */
.mp-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 1.75rem 0 1.25rem 0;
}
.mp-auth-divider::before,
.mp-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}
.mp-auth-divider span {
    padding: 0 1rem;
}

/* Social Buttons Grid */
.mp-social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.mp-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.mp-social-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Switch Links ("Don't have an account? Register Now") */
.mp-switch-link {
    text-align: center;
    font-size: 0.92rem;
    color: var(--mp-text-muted);
    margin-top: 1.5rem;
}
.mp-switch-link a {
    color: var(--mp-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}
.mp-switch-link a:hover {
    color: var(--mp-primary-dark);
    text-decoration: underline;
}

/* Bottom Back to Homepage Link */
.mp-back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mp-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.4rem 1rem;
    border-radius: 50rem;
}
.mp-back-home-link:hover {
    color: var(--mp-primary);
    background: rgba(79, 70, 229, 0.08);
    text-decoration: none;
}
[data-bs-theme="dark"] .mp-back-home-link:hover {
    color: #818cf8;
    background: rgba(129, 140, 248, 0.12);
}

/* Notification Box in Reset / Info */
.mp-info-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1e40af;
    font-size: 0.88rem;
    margin-top: 1.5rem;
}
.mp-info-alert i {
    font-size: 1.25rem;
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: -1px;
}
.mp-info-alert strong {
    display: block;
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.mp-info-alert p {
    margin-bottom: 0;
    color: #1e3a8a;
    line-height: 1.45;
}

/* --- Registration Dynamic Form Tweaks --- */
.mp-auth-page .reg_form {
    padding: 0 !important;
}
.mp-auth-page .reg_form .form-group {
    margin-bottom: 1.25rem;
}
.mp-auth-page .reg_form .form-control.custom_input,
.mp-auth-page .reg_form .form-select.custom_input {
    border-radius: var(--mp-input-radius) !important;
    border: 1.5px solid var(--mp-input-border) !important;
    height: 48px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    background: #ffffff !important;
    color: #0f172a !important;
}
.mp-auth-page .reg_form .form-control.custom_input:focus,
.mp-auth-page .reg_form .form-select.custom_input:focus {
    border-color: var(--mp-input-focus) !important;
    box-shadow: 0 0 0 4px var(--mp-input-ring) !important;
}
.mp-auth-page .reg_form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mp-text-muted);
    margin-bottom: 0.35rem;
}

/* Affiliate / Vendor segmented switch pills in registration */
.mp-auth-page .aff-reg-tabs-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
}
.mp-auth-page .aff-reg-tabs {
    background: #f1f5f9;
    padding: 5px;
    border-radius: 50rem;
    display: flex;
    gap: 4px;
    border: 1px solid #e2e8f0;
}
.mp-auth-page .aff-reg-tabs .list-group-item {
    flex: 1;
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: 50rem !important;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mp-text-muted) !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.25s ease;
    text-decoration: none;
}
.mp-auth-page .aff-reg-tabs .list-group-item.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* ============================================================
   DARK MODE ADAPTATION
   ============================================================ */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .mp-auth-page {
    background-color: #0b1120;
    color: #f8fafc;
}

[data-bs-theme="dark"] .mp-auth-page::before {
    background:
        radial-gradient(circle at 10% 15%, rgba(139, 92, 246, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 45% 70%, rgba(14, 165, 233, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 90% 15%, rgba(244, 63, 94, 0.10) 0%, transparent 42%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.14) 0%, transparent 48%);
}

[data-bs-theme="dark"] .mp-auth-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .mp-hero-title,
[data-bs-theme="dark"] .mp-card-title,
[data-bs-theme="dark"] .mp-hero-brand-name,
[data-bs-theme="dark"] .mp-feature-text h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] .mp-hero-subtitle,
[data-bs-theme="dark"] .mp-card-subtitle,
[data-bs-theme="dark"] .mp-feature-text p,
[data-bs-theme="dark"] .mp-switch-link {
    color: #94a3b8;
}

[data-bs-theme="dark"] .mp-back-home,
[data-bs-theme="dark"] .mp-back-link {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .mp-back-home:hover,
[data-bs-theme="dark"] .mp-back-link:hover {
    background: #1e293b;
    color: #818cf8 !important;
}

[data-bs-theme="dark"] .mp-trust-pill {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

[data-bs-theme="dark"] .mp-role-tabs,
[data-bs-theme="dark"] .mp-auth-page .aff-reg-tabs {
    background: #1e293b;
    border-color: #334155;
}
[data-bs-theme="dark"] .mp-role-tab,
[data-bs-theme="dark"] .mp-auth-page .aff-reg-tabs .list-group-item {
    color: #94a3b8;
}

[data-bs-theme="dark"] .mp-input-group,
[data-bs-theme="dark"] .mp-auth-page .reg_form .form-control.custom_input,
[data-bs-theme="dark"] .mp-auth-page .reg_form .form-select.custom_input {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .mp-input-group .form-control {
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .mp-input-group .form-control::placeholder {
    color: #64748b;
}

[data-bs-theme="dark"] .mp-social-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .mp-social-btn:hover {
    background: #273549;
    border-color: #475569;
    color: #ffffff;
}

[data-bs-theme="dark"] .mp-auth-divider::before,
[data-bs-theme="dark"] .mp-auth-divider::after {
    border-color: #334155;
}

[data-bs-theme="dark"] .mp-info-alert {
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}
[data-bs-theme="dark"] .mp-info-alert p {
    color: #93c5fd;
}

/* ============================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ============================================================ */
@media (max-width: 991px) {
    .mp-top-nav {
        position: static;
        margin-bottom: 1.5rem;
        pointer-events: auto;
    }
    .mp-auth-wrapper {
        flex-direction: column;
        gap: 2rem;
    }
    .mp-auth-hero {
        max-width: 100%;
        text-align: center;
        padding: 0;
    }
    .mp-hero-brand {
        justify-content: center;
    }
    .mp-hero-subtitle {
        margin: 0 auto 2rem auto;
    }
    .mp-feature-list {
        max-width: 440px;
        margin: 0 auto 2rem auto;
        text-align: left;
    }
    .mp-hero-illustration {
        display: none;
    }
    .mp-auth-card-panel {
        max-width: 100%;
        width: 100%;
    }
    .mp-auth-card {
        padding: 2.25rem 1.75rem;
    }
}

@media (max-width: 575px) {
    .mp-hero-title {
        font-size: 2.15rem;
    }
    .mp-auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: 18px;
    }
    .mp-social-grid {
        grid-template-columns: 1fr;
    }
}
