:root {
    --primary: #3EB489;
    --primary-dark: #2A8F6A;
    --primary-light: #B8EAD7;
    --secondary: #FAF9F6;
    --dark: #1a1a2e;
    --gray: #4a5568;
    --light-gray: #e2e8f0;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

/* Typography */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.875rem; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

p, li, td, th, span, label, a {
    font-size: 0.875rem;
}

small, .small {
    font-size: 0.8rem !important;
}

.lead {
    font-size: 0.975rem;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-size: 0.875rem;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-size: 0.875rem;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn {
    font-size: 0.875rem;
}

.btn-sm {
    font-size: 0.8rem;
}

.btn-lg {
    font-size: 0.975rem;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

.navbar-brand i {
    color: var(--primary);
    margin-right: 6px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray);
    transition: color 0.3s;
    margin: 0 0.4rem;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(154, 177, 122, 0.05) 0%, rgba(245, 245, 240, 0.1) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(154, 177, 122, 0.2);
}

.calculator-card {
    padding: 1.5rem;
    transition: transform 0.3s;
}

.calculator-card:hover {
    transform: translateY(-5px);
}

.result-box {
    background: var(--secondary);
    border-radius: 10px;
}

/* Stats Section */
.stats-section {
    background: var(--secondary);
}

.stat-card {
    padding: 1.25rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* How It Works Section */
.how-it-works-section {
    background: var(--white);
}

.step-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    height: 100%;
    border: 1px solid var(--light-gray);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(154, 177, 122, 0.1);
    border-color: var(--primary-light);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* Lenders Section */
.lenders-section {
    background: var(--secondary);
}

.lender-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 14px;
    transition: all 0.3s;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lender-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.lender-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.lender-badge i {
    color: var(--primary);
}

.rating {
    color: #fbbf24;
    font-size: 0.75rem;
}

.rate-chip {
    background: var(--secondary);
    padding: 0.6rem;
    border-radius: 8px;
}

/* Features Section */
.features-section {
    background: var(--white);
}

.feature-card {
    padding: 1.5rem;
    background: var(--white);
    border-radius: 14px;
    transition: all 0.3s;
    height: 100%;
    border: 1px solid var(--light-gray);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 30px rgba(154, 177, 122, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon i {
    font-size: 1.85rem;
    color: var(--primary);
}

/* Testimonials Section */
.testimonials-section {
    background: var(--secondary);
}

.testimonial-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 14px;
    height: 100%;
    transition: transform 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

/* FAQ Section */
.faq-section {
    background: var(--white);
}

.faq-item {
    background: var(--white);
    margin-bottom: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--secondary);
}

.faq-answer {
    padding: 1rem;
    background: var(--secondary);
    border-top: 1px solid var(--light-gray);
    line-height: 1.6;
    color: var(--gray);
    font-size: 0.8rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 2.5rem 0 1.25rem;
}

.footer h5 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer h6 {
    font-size: 0.85rem;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: var(--primary);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 8px;
    color: var(--white);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1050;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--light-gray);
}

.sidebar-header h4 {
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    padding: 0.3rem 1.25rem;
}

.sidebar-nav .nav-link {
    color: var(--gray);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-nav .nav-link i {
    width: 22px;
    margin-right: 8px;
    font-size: 1.2rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--secondary);
    min-height: 100vh;
    width: calc(100% - 260px);
    max-width: calc(100% - 260px);
}

.main-header {
    background: var(--white);
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-header h4 {
    font-size: 1rem;
}

.main-header .menu-toggle,
.main-header .dropdown {
    display: none !important;
}

.content-wrapper {
    padding: 1.25rem 1.5rem;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0.85rem !important;
        padding-bottom: 120px !important;
    }
    .dashboard-card {
        padding: 0.85rem !important;
        border-radius: 10px !important;
    }
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card-dashboard {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 14px;
    padding: 1.25rem;
}

/* Tables */
.table-custom {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    width: 100% !important;
    font-size: 0.875rem;
}

.table-custom thead {
    background: var(--secondary);
}

.table-custom th {
    border: none;
    padding: 0.75rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table-custom td {
    padding: 0.75rem 0.85rem;
    vertical-align: middle;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(154, 177, 122, 0.1);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Badges */
.badge-success {
    background: var(--success);
    color: white;
    font-size: 0.75rem;
}

.badge-warning {
    background: var(--warning);
    color: white;
    font-size: 0.75rem;
}

.badge-danger {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
}

.badge-info {
    background: var(--info);
    color: white;
    font-size: 0.75rem;
}

.badge {
    font-size: 0.75rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: none;
    justify-content: space-around;
    padding: 0.6rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.mobile-nav-item {
    text-align: center;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.72rem;
}

.mobile-nav-item i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 3px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .content-wrapper {
        padding-bottom: 70px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .main-header {
        padding: 0.75rem;
    }

    .content-wrapper {
        padding: 0.85rem;
        padding-bottom: 70px;
    }

    .step-card,
    .feature-card,
    .lender-card {
        margin-bottom: 0.85rem;
    }
    
    .dashboard-card {
        margin-bottom: 0.85rem;
        padding: 0.85rem;
    }

    .stat-card-dashboard {
        margin-bottom: 0.85rem;
    }
}

/* Ensure tables are scrollable on small screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 0.85rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 280px;
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.6rem;
    border-bottom: 1px solid var(--light-gray);
    transition: background 0.3s;
}

.notification-item:hover {
    background: var(--secondary);
}

.notification-item.unread {
    background: var(--primary-light);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--light-gray);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--secondary);
}

/* Display overrides for Bootstrap classes */
.display-3 {
    font-size: 2.5rem !important;
}
.display-4 {
    font-size: 2rem !important;
}
.display-5 {
    font-size: 1.75rem !important;
}
.display-6 {
    font-size: 1.4rem !important;
}

.fs-1 { font-size: 1.75rem !important; }
.fs-2 { font-size: 1.45rem !important; }
.fs-3 { font-size: 1.2rem !important; }
.fs-4 { font-size: 1.05rem !important; }
.fs-5 { font-size: 0.95rem !important; }
.fs-6 { font-size: 0.85rem !important; }

/* Dropdown menu items */
.dropdown-item {
    font-size: 0.875rem;
}

.dropdown-header {
    font-size: 0.85rem;
}

/* Alert */
.alert {
    font-size: 0.875rem;
}

/* Modal */
.modal-title {
    font-size: 1.05rem;
}

.modal-body {
    font-size: 0.875rem;
}

/* Card */
.card-title {
    font-size: 0.975rem;
}

.card-text {
    font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb-item {
    font-size: 0.85rem;
}

/* Pagination */
.page-link {
    font-size: 0.85rem;
}

/* Icon utilities */
.icon-sm i { font-size: 1rem; }
.icon-md i { font-size: 1.35rem; }
.icon-lg i { font-size: 1.75rem; }

/* Modal Stability */
.modal-backdrop {
    z-index: 1040 !important;
}
.modal {
    z-index: 1051 !important;
}
.modal-dialog {
    transition: transform 0.3s ease-out !important;
}
.modal.fade .modal-dialog {
    transform: scale(0.95) !important;
}
.modal.show .modal-dialog {
    transform: scale(1) !important;
}

