/* ============================================================
   YourLoanWala - Main Stylesheet
   The Partners Grid Enterprises
   ============================================================ */

:root {
    --primary: #1a3a6e;       /* Deep Navy Blue */
    --secondary: #d4a017;     /* Gold */
    --accent: #0e76bc;        /* Sky Blue */
    --success: #28a745;
    --danger: #dc3545;
    --light-bg: #f4f7fb;
    --dark-text: #1a2340;
    --muted: #6c757d;
    --white: #ffffff;
    --card-shadow: 0 4px 20px rgba(26,58,110,0.10);
    --hero-gradient: linear-gradient(135deg, #0d1f4e 0%, #1a3a6e 40%, #0e76bc 100%);
}

/* ============================================================
   GLOBAL
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    color: var(--dark-text);
    background: var(--light-bg);
    margin: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary); }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: #0d2a55;
    border-color: #0d2a55;
}
.btn-gold {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white) !important;
    font-weight: 600;
}
.btn-gold:hover {
    background: #b8890e;
    border-color: #b8890e;
    color: var(--white);
}
.btn-outline-gold {
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-weight: 600;
    background: transparent;
}
.btn-outline-gold:hover {
    background: var(--secondary);
    color: var(--white);
}

.text-gold { color: var(--secondary) !important; }
.text-primary-dark { color: var(--primary) !important; }
.bg-primary-dark { background: var(--primary) !important; }
.bg-gold { background: var(--secondary) !important; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-main {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand img { height: 45px; }
.navbar-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.navbar-brand .brand-text span { color: var(--secondary); }
.navbar-brand .brand-sub {
    font-size: 0.68rem;
    color: var(--muted);
    display: block;
    line-height: 1;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: rgba(26,58,110,0.07);
}

.nav-partner-btn {
    background: var(--secondary);
    color: var(--white) !important;
    border-radius: 25px !important;
    padding: 8px 22px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s !important;
}
.nav-partner-btn:hover {
    background: #b8890e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,160,23,0.4);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: var(--hero-gradient);
    min-height: 88vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(212,160,23,0.08);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(14,118,188,0.15);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    background: rgba(212,160,23,0.2);
    border: 1px solid rgba(212,160,23,0.5);
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 16px;
    border-radius: 20px;
    display: inline-block;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-title .highlight { color: var(--secondary); }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.82);
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-cta-group { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-cta-primary {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 14px 34px;
    border-radius: 35px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}
.hero-cta-primary:hover {
    background: #b8890e;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212,160,23,0.4);
}

.hero-cta-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
    padding: 13px 30px;
    border-radius: 35px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}
.hero-cta-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
}

.hero-stats {
    display: flex;
    gap: 35px;
    margin-top: 45px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}
.hero-stat .label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Hero Card */
.hero-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 35px;
    color: var(--white);
}
.hero-card .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--secondary);
}

.partner-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.partner-benefit-item .icon {
    width: 36px;
    height: 36px;
    background: rgba(212,160,23,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--secondary);
    font-size: 1rem;
}
.partner-benefit-item .text h6 {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--white);
}
.partner-benefit-item .text p {
    font-size: 0.80rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.marquee-strip {
    background: var(--secondary);
    padding: 10px 0;
    overflow: hidden;
}
.marquee-content {
    display: flex;
    animation: marqueeScroll 35s linear infinite;
    white-space: nowrap;
}
.marquee-content span {
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0 30px;
    letter-spacing: 0.3px;
}
.marquee-content span::after {
    content: '◆';
    margin-left: 30px;
    opacity: 0.7;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-badge {
    background: rgba(26,58,110,0.08);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--muted);
    max-width: 600px;
}

/* ============================================================
   PRODUCT CARDS (Loans & Insurance)
   ============================================================ */
.product-section { padding: 80px 0; background: var(--white); }

.product-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(26,58,110,0.16);
    border-color: var(--secondary);
}
.product-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.product-card h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.product-card p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 14px;
    line-height: 1.6;
}
.product-commission {
    background: rgba(212,160,23,0.1);
    border: 1px solid rgba(212,160,23,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #a07010;
}

/* ============================================================
   WHY PARTNER SECTION
   ============================================================ */
.why-partner-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0d1f4e 0%, #1a3a6e 100%);
}

.why-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 28px;
    height: 100%;
    transition: all 0.3s;
}
.why-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-4px);
}
.why-card .icon {
    width: 56px;
    height: 56px;
    background: rgba(212,160,23,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 18px;
}
.why-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}
.why-card p {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.68);
    line-height: 1.65;
}

/* ============================================================
   EARNING CALCULATOR SECTION
   ============================================================ */
.calculator-section { padding: 80px 0; background: var(--light-bg); }

.calculator-box {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(26,58,110,0.10);
    overflow: hidden;
}
.calculator-header {
    background: var(--hero-gradient);
    padding: 28px 32px;
}
.calculator-body { padding: 32px; }

/* ============================================================
   JOIN SECTION
   ============================================================ */
.join-section {
    padding: 80px 0;
    background: var(--white);
}

.join-step {
    text-align: center;
    padding: 20px;
}
.join-step .step-num {
    width: 52px;
    height: 52px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.join-step h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}
.join-step p { font-size: 0.85rem; color: var(--muted); }

/* ============================================================
   BACKED BY SECTION
   ============================================================ */
.backed-section {
    padding: 55px 0;
    background: var(--light-bg);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.backed-logo {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s;
}
.backed-logo:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.backed-logo h5 { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin: 0 0 4px; }
.backed-logo p { font-size: 0.78rem; color: var(--muted); margin: 0; }
.backed-logo .badge-partner {
    background: rgba(26,58,110,0.08);
    color: var(--primary);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section { padding: 80px 0; background: var(--white); }

.testimonial-card {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 28px;
    height: 100%;
    position: relative;
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 18px;
    left: 24px;
    font-size: 4rem;
    color: var(--secondary);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}
.testimonial-card p { font-size: 0.9rem; color: #444; line-height: 1.7; margin-bottom: 16px; padding-top: 10px; }
.testimonial-author { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.testimonial-role { font-size: 0.78rem; color: var(--muted); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
    background: var(--hero-gradient);
    padding: 70px 0;
    text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-main {
    background: #0d1530;
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}
.footer-main h6 {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.footer-link { display: block; color: rgba(255,255,255,0.65); font-size: 0.87rem; padding: 3px 0; transition: color 0.2s; }
.footer-link:hover { color: var(--secondary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 45px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    text-align: center;
}

/* ============================================================
   MODAL (T&C and Agreement)
   ============================================================ */
.tnc-modal .modal-dialog { max-width: 700px; }
.tnc-modal .modal-header {
    background: var(--hero-gradient);
    color: var(--white);
}
.tnc-modal .modal-body { max-height: 55vh; overflow-y: auto; font-size: 0.9rem; line-height: 1.7; }
.tnc-modal .modal-body h4 { color: var(--primary); font-size: 1rem; margin-top: 18px; }
.tnc-accept-bar { background: #f8f9fa; padding: 16px 24px; border-top: 1px solid #dee2e6; }

/* ============================================================
   PARTNER FORMS
   ============================================================ */
.form-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(26,58,110,0.10);
    overflow: hidden;
}
.form-header {
    background: var(--hero-gradient);
    padding: 32px;
    color: var(--white);
}
.form-header h3 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.form-header p { opacity: 0.8; margin: 6px 0 0; font-size: 0.9rem; }
.form-body { padding: 35px; }

.form-label { font-weight: 600; font-size: 0.88rem; color: var(--dark-text); }
.form-control, .form-select {
    border: 1.5px solid #dde3ef;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,58,110,0.1);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--primary);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-logo {
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.sidebar-logo .brand { font-size: 1.25rem; font-weight: 800; color: var(--white); }
.sidebar-logo .brand span { color: var(--secondary); }
.sidebar-logo .sub { font-size: 0.7rem; color: rgba(255,255,255,0.55); }

/* Scrollable menu area */
.sidebar-menu {
    padding: 16px 0 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
/* Custom scrollbar for sidebar — visible on dark background */
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); border-radius: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background: var(--secondary); }
/* Firefox */
.sidebar-menu { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.35) transparent; }

/* Sticky logout footer */
.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
}
.sidebar-section {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.38);
    padding: 14px 22px 6px;
    font-weight: 600;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-link i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-left-color: var(--secondary);
}
.sidebar-link .badge { margin-left: auto; }

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--light-bg);
    transition: all 0.3s;
}

.topbar {
    background: var(--white);
    padding: 14px 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 105;  /* must be > sidebar (100) so dropdown appears on top */
}
/* Ensure Bootstrap dropdown menus always render above all page content */
.topbar .dropdown-menu {
    z-index: 1050;
}
.topbar .page-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.content-area { padding: 28px; }

/* Stats Cards */
.stat-card {
    background: var(--white);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
}
.stat-card .icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-card .value { font-size: 1.7rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* Data Tables */
.data-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.data-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.data-card-header h6 { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 0; }

.table th {
    background: var(--light-bg);
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 12px 16px;
    border: none;
}
.table td { padding: 13px 16px; font-size: 0.88rem; vertical-align: middle; }
.table tbody tr:hover { background: rgba(26,58,110,0.03); }

/* ============================================================
   COMMISSION SECTION
   ============================================================ */
.commission-table-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.commission-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 20px 24px;
    color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .hero-title { font-size: 2.2rem; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
@media (max-width: 767px) {
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 20px; }
    .hero-cta-group { flex-direction: column; }
    .section-title { font-size: 1.7rem; }
    .form-body { padding: 22px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
    animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212,160,23,0.5); }
    70% { box-shadow: 0 0 0 12px rgba(212,160,23,0); }
    100% { box-shadow: 0 0 0 0 rgba(212,160,23,0); }
}

/* ============================================================
   FLOATING WHATSAPP BUTTON
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #25D366;
    color: var(--white);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 18px rgba(37,211,102,0.4);
    z-index: 999;
    transition: all 0.3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: var(--white);
    box-shadow: 0 6px 25px rgba(37,211,102,0.5);
}

/* ============================================================
   AD BANNER CARDS
   ============================================================ */
.ad-banner-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
    cursor: pointer;
}
.ad-banner-card:hover { transform: scale(1.03); }

/* Upload area */
.upload-area {
    border: 2px dashed #dde3ef;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(26,58,110,0.03);
}
.upload-area i { font-size: 2.5rem; color: var(--muted); margin-bottom: 12px; }

/* Status colors */
.status-new { color: #0d6efd; }
.status-approved { color: #198754; }
.status-rejected { color: #dc3545; }
.status-pending { color: #fd7e14; }

/* Partner Card */
.partner-profile-card {
    background: var(--hero-gradient);
    border-radius: 16px;
    padding: 24px;
    color: var(--white);
}
.partner-avatar {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}
