:root {
    --primary: #4a6bff;
    --secondary: #f8f9fa;
    --accent: #00c853;
    --danger: #ff4444;
    --dark: #2c3e50;
    --light: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--secondary);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header Styles */
header {
    background-color: var(--light);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

/* Dropdown Menu (User Menu) */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 72px);
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    background-color: var(--light);
    border-right: 1px solid var(--light-gray);
    padding: 2rem 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background-color: var(--light-gray);
}

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

.sidebar-nav a svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    padding: 2rem;
}

.page-header,
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1,
.dashboard-header h1 {
    font-size: 1.8rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

.btn-danger {
    background-color: var(--danger);
    color: var(--light);
}

.btn-danger:hover {
    background-color: #e53935;
}

/* Responsive Media Queries */

/* Tablet and below */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .nav-links {
        gap: 1.5rem;
    }
    .user-menu,
    .auth-buttons {
        font-size: 0.95rem;
    }
}

/* Mobile layout */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        justify-content: center;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .user-menu,
    .auth-buttons {
        justify-content: center;
    }

    .user-dropdown {
        text-align: center;
    }

    /* Responsive Layouts */
    .invoice-grid,
    .filter-row,
    .form-row,
    .summary-cards,
    .stats-grid,
    .funding-grid,
    .confirmation-details,
    .payment-methods,
    .performance-metrics,
    .history-table,
    .schedule-table,
    .invoice-table {
        grid-template-columns: 1fr;
    }

    .invoice-actions,
    .confirmation-actions,
    .payment-actions,
    .default-actions {
        flex-direction: column;
    }

    .invoice-actions .btn,
    .confirmation-actions .btn,
    .payment-actions .btn,
    .default-actions .btn {
        width: 100%;
    }

    .amount-selector {
        flex-direction: column;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .tracker-steps,
    .countdown,
    .stepper,
    .lock-status {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .tracker-step,
    .countdown-item,
    .step,
    .lock-phase {
        flex: 1 0 100px;
    }

    .lock-phase:not(:last-child)::after {
        display: none;
    }

    .review-item {
        flex-direction: column;
    }

    .review-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}

/* Extra small devices (phones) */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .invoice-table,
    .history-table,
    .schedule-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .navbar {
        padding: 0.8rem;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 3rem 5%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--light);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-gray);
    font-size: 0.9rem;
}

/* === All Existing Component Styles Preserved Below === */

/* Verification Status Card */
.verification-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}
.verification-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.verification-icon.pending {
    color: #ffc107;
}
.verification-icon.verified {
    color: var(--accent);
}
.verification-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.verification-subtitle {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Fund Status Card */
.fund-status-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}
.fund-status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.fund-status-icon.locked {
    color: #ffc107;
}
.fund-status-icon.released {
    color: var(--accent);
}
.fund-status-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.fund-status-subtitle {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.countdown-item {
    text-align: center;
}
.countdown-value {
    display: inline-block;
    min-width: 50px;
    padding: 0.5rem;
    background-color: var(--primary);
    color: var(--light);
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    font-weight: 600;
}
.countdown-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Lock Status */
.lock-status {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}
.lock-phase {
    text-align: center;
    position: relative;
}
.lock-phase:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}
.lock-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
}
.lock-badge.completed {
    background-color: var(--accent);
    color: var(--light);
}
.lock-badge.current {
    background-color: var(--primary);
    color: var(--light);
}
.lock-badge.pending {
    background-color: var(--light-gray);
    color: var(--gray);
}
.lock-label {
    font-weight: 500;
}
.lock-date {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Progress Tracker */
.progress-tracker {
    margin-bottom: 2rem;
}
.tracker-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1rem;
}
.tracker-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--light-gray);
    z-index: 1;
}
.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}
.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.tracker-step.completed .step-number {
    background-color: var(--accent);
    color: var(--light);
}
.tracker-step.active .step-number {
    background-color: var(--primary);
    color: var(--light);
}
.step-label {
    font-size: 0.8rem;
    text-align: center;
    max-width: 100px;
}
.tracker-description {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Document Checklist */
.checklist-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.checklist-header h2 {
    font-size: 1.3rem;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
}
.checklist-item:last-child {
    border-bottom: none;
}
.checklist-status {
    margin-right: 1rem;
    font-size: 1.2rem;
}
.checklist-status.completed {
    color: var(--accent);
}
.checklist-status.pending {
    color: var(--gray);
}
.checklist-content {
    flex: 1;
}
.checklist-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.checklist-description {
    font-size: 0.9rem;
    color: var(--gray);
}
.checklist-date {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}
.checklist-action {
    margin-left: 1rem;
    color: var(--primary);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}
.checklist-action:hover {
    text-decoration: underline;
}

/* Funding Breakdown */
.funding-breakdown {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.funding-breakdown h2 {
    margin-bottom: 1.5rem;
}
.funding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.funding-card {
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}
.funding-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}
.funding-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.funding-item {
    margin-bottom: 0.75rem;
}
.funding-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}
.funding-value {
    font-weight: 500;
}

/* Release Conditions */
.conditions-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.conditions-card h2 {
    margin-bottom: 1.5rem;
}
.condition-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.condition-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}
.condition-icon.completed {
    color: var(--accent);
}
.condition-icon.pending {
    color: var(--gray);
}
.condition-content {
    flex: 1;
}
.condition-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.condition-description {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Disbursement Confirmation */
.confirmation-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.confirmation-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.confirmation-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--accent);
}
.confirmation-title {
    font-size: 1.3rem;
    font-weight: 600;
}
.confirmation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.confirmation-item {
    margin-bottom: 0.75rem;
}
.confirmation-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}
.confirmation-value {
    font-weight: 500;
}
.confirmation-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* Notifications */
.notifications-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.notification-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}
.notification-icon.info {
    color: var(--primary);
}
.notification-icon.success {
    color: var(--accent);
}
.notification-icon.warning {
    color: #ffc107;
}
.notification-content {
    flex: 1;
}
.notification-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.notification-message {
    font-size: 0.9rem;
    color: var(--gray);
}
.notification-time {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Invoice Overview */
.invoice-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.invoice-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}
.invoice-card h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}
.invoice-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.meta-item {
    margin-bottom: 0.75rem;
}
.meta-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}
.meta-value {
    font-weight: 500;
}
.invoice-amount {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1rem 0;
}
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}
.status-funded {
    background-color: #d1ecf1;
    color: #0c5460;
}
.status-pending {
    background-color: #fff3cd;
    color: #856404;
}
.status-approved {
    background-color: #d4edda;
    color: #155724;
}
.status-repaid {
    background-color: #d4edda;
    color: #155724;
}
.status-defaulted {
    background-color: #f8d7da;
    color: #721c24;
}
.status-upcoming {
    background-color: #fff3cd;
    color: #856404;
}
.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
}
.status-verified {
    background-color: #d4edda;
    color: #155724;
}

/* Workflow Tracker */
.workflow-tracker {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.workflow-tracker h2 {
    margin-bottom: 1.5rem;
}
.timeline {
    position: relative;
    padding-left: 50px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--light-gray);
}
.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-icon {
    position: absolute;
    left: -50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-weight: 600;
}
.timeline-icon.completed {
    background-color: var(--accent);
}
.timeline-icon.current {
    background-color: var(--primary);
}
.timeline-icon.pending {
    background-color: var(--light-gray);
    color: var(--gray);
}
.timeline-content {
    padding-left: 1rem;
}
.timeline-date {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}
.timeline-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.timeline-description {
    font-size: 0.9rem;
    color: var(--gray);
}
.timeline-actions {
    margin-top: 0.5rem;
}
.timeline-action {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 1rem;
}
.timeline-action:hover {
    text-decoration: underline;
}

/* Documents Section */
.documents-section {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.documents-section h2 {
    margin-bottom: 1.5rem;
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.document-card {
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
}
.document-card:hover {
    border-color: var(--primary);
}
.document-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.document-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.document-type {
    font-size: 0.8rem;
    color: var(--gray);
}
.document-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}
.document-action {
    color: var(--primary);
    font-size: 0.8rem;
    text-decoration: none;
}
.document-action:hover {
    text-decoration: underline;
}

/* Funding Progress */
.funding-section {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.funding-section h2 {
    margin-bottom: 1.5rem;
}
.progress-container {
    margin-bottom: 1.5rem;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.progress-bar {
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 75%;
}
.progress-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.progress-item {
    margin-bottom: 0.5rem;
}
.progress-label {
    font-size: 0.85rem;
    color: var(--gray);
}
.progress-value {
    font-weight: 500;
}

/* Charge Status */
.charge-status {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
}
.charge-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--accent);
}
.charge-text {
    flex: 1;
}
.charge-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.charge-link:hover {
    text-decoration: underline;
}

/* Form Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}
.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--light-gray);
    z-index: 1;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border: 3px solid var(--light);
}
.step.active .step-number {
    background-color: var(--primary);
    color: var(--light);
}
.step.completed .step-number {
    background-color: var(--accent);
    color: var(--light);
}
.step-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}
.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}
.step.completed .step-label {
    color: var(--dark);
}

/* Form Content */
.form-container {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.form-section {
    display: none;
}
.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-group .hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--light-gray);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.file-upload:hover {
    border-color: var(--primary);
}
.file-upload input {
    display: none;
}
.file-upload-icon {
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 1rem;
}
.file-upload-text {
    margin-bottom: 1rem;
}
.file-upload-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--light);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}
.uploaded-files {
    margin-top: 1.5rem;
}
.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}
.file-icon {
    margin-right: 0.75rem;
    color: var(--gray);
}
.file-name {
    flex: 1;
    font-size: 0.9rem;
}
.file-size {
    font-size: 0.8rem;
    color: var(--gray);
    margin-right: 1rem;
}
.file-remove {
    color: var(--danger);
    cursor: pointer;
}

/* Review Summary */
.review-summary {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.review-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.review-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.review-label {
    font-weight: 500;
    width: 200px;
}
.review-value {
    flex: 1;
}
.review-section {
    margin-bottom: 2rem;
}
.review-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.terms-checkbox input {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}
.terms-text {
    font-size: 0.9rem;
}
.terms-link {
    color: var(--primary);
    text-decoration: none;
}
.terms-link:hover {
    text-decoration: underline;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}
.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}
.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
}
.stat-card .value.accent {
    color: var(--accent);
}
.stat-card .value.danger {
    color: var(--danger);
}

/* Invoice Table */
.invoice-table {
    width: 100%;
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}
.table-header h2 {
    font-size: 1.3rem;
}
.table-actions {
    display: flex;
    gap: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem 1.5rem;
    text-align: left;
}
th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--dark);
}
tr:not(:last-child) {
    border-bottom: 1px solid var(--light-gray);
}
.action-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.action-link:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}
.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.summary-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}
.summary-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}
.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.summary-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Repayment Schedule */
.schedule-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.schedule-header h2 {
    font-size: 1.3rem;
}
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}
.schedule-table th {
    text-align: left;
    padding: 1rem;
    background-color: var(--light-gray);
    font-weight: 600;
}
.schedule-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}
.schedule-table tr:last-child td {
    border-bottom: none;
}
.schedule-action {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.schedule-action:hover {
    text-decoration: underline;
}

/* Payment Initiation */
.payment-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.payment-card h2 {
    margin-bottom: 1.5rem;
}
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.payment-method {
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
.payment-method:hover {
    border-color: var(--primary);
}
.payment-method.selected {
    border-color: var(--primary);
    background-color: rgba(74, 107, 255, 0.05);
}
.payment-method-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.payment-method-name {
    font-weight: 500;
}
.payment-form {
    margin-top: 1.5rem;
}
.payment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Transaction History */
.history-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.history-header h2 {
    font-size: 1.3rem;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table th {
    text-align: left;
    padding: 1rem;
    background-color: var(--light-gray);
    font-weight: 600;
}
.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}
.history-table tr:last-child td {
    border-bottom: none;
}
.amount-paid {
    color: var(--accent);
    font-weight: 500;
}
.amount-failed {
    color: var(--danger);
    font-weight: 500;
}

/* Late Payment Section */
.late-payment {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}
.late-payment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.late-payment-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #ffc107;
}
.late-payment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Portfolio Overview */
.portfolio-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.portfolio-header h2 {
    font-size: 1.3rem;
}
.portfolio-actions {
    display: flex;
    gap: 1rem;
}

/* Performance Chart */
.performance-chart {
    height: 300px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

/* Investment Table */
.investment-table {
    width: 100%;
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Marketplace CTA */
.marketplace-cta {
    background-color: var(--primary);
    color: var(--light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}
.marketplace-cta h2 {
    margin-bottom: 1rem;
}
.marketplace-cta p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Hero Section */
.hero {
    padding: 5rem 5%;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 2rem;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.hero-image {
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 5%;
    background-color: var(--light);
}
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.step-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}
.step-card:hover {
    transform: translateY(-5px);
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--light);
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 1rem;
}
.step-card h3 {
    margin-bottom: 1rem;
}
.step-card p {
    color: var(--gray);
}

/* Features Section */
.features {
    padding: 5rem 5%;
    background-color: var(--secondary);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}
.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.feature-card h3 {
    margin-bottom: 1rem;
}

/* CTA Section */
.cta {
    padding: 5rem 5%;
    background-color: var(--primary);
    color: var(--light);
    text-align: center;
}
.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}
.cta p {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 3rem 5%;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-links h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--light);
}
.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-gray);
    font-size: 0.9rem;
}

/* Invoice Marketplace Specific Styles */
.filters-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.filter-group {
    margin-bottom: 1rem;
}
.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.filter-control {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}
.filter-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}
.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}
.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}
.invoice-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}
.invoice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.invoice-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}
.invoice-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.invoice-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray);
}
.invoice-body {
    padding: 1.5rem;
}
.invoice-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.invoice-label {
    font-size: 0.9rem;
    color: var(--gray);
}
.invoice-value {
    font-weight: 500;
}
.invoice-value.accent {
    color: var(--accent);
}
.invoice-value.danger {
    color: var(--danger);
}
.progress-container {
    margin: 1.5rem 0;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.progress-bar {
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: var(--primary);
}
.progress-fill.verification {
    background-color: #17a2b8;
}
.progress-fill.funding {
    background-color: var(--accent);
}
.invoice-footer {
    padding: 1rem 1.5rem;
    background-color: var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.invoice-actions {
    display: flex;
    gap: 0.75rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}
.status-pending {
    background-color: #fff3cd;
    color: #856404;
}
.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Seller Rating */
.rating {
    display: flex;
    align-items: center;
}
.rating-stars {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Commit Funds Page Specific Styles */
.risk-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.risk-header h2 {
    font-size: 1.3rem;
}
.risk-meter {
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    margin: 1.5rem 0;
    overflow: hidden;
}
.risk-fill {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, var(--accent), #ffc107);
}
.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray);
}
.risk-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.risk-factor {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}
.risk-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}
.risk-icon.low {
    color: var(--accent);
}
.risk-icon.medium {
    color: #ffc107;
}
.risk-icon.high {
    color: var(--danger);
}
.commitment-form {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.commitment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.commitment-header h2 {
    font-size: 1.3rem;
}
.amount-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.amount-option {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}
.amount-option:hover {
    border-color: var(--primary);
}
.amount-option.selected {
    border-color: var(--primary);
    background-color: rgba(74, 107, 255, 0.05);
}
.amount-option .amount {
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.amount-option .description {
    font-size: 0.85rem;
    color: var(--gray);
}
.deposit-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.deposit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.deposit-header h2 {
    font-size: 1.3rem;
}
.balance-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
}
.balance-label {
    font-weight: 500;
}
.balance-amount {
    font-weight: 700;
}
.deposit-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.deposit-method {
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
.deposit-method:hover {
    border-color: var(--primary);
}
.deposit-method.selected {
    border-color: var(--primary);
    background-color: rgba(74, 107, 255, 0.05);
}
.deposit-method-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.deposit-method-name {
    font-weight: 500;
}

/* Repayment Tracking Specific Styles */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.summary-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}
.summary-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}
.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.summary-value.accent {
    color: var(--accent);
}
.summary-value.danger {
    color: var(--danger);
}
.summary-label {
    font-size: 0.9rem;
    color: var(--gray);
}
.performance-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.performance-header h2 {
    font-size: 1.3rem;
}
.performance-chart {
    height: 300px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    margin-bottom: 1.5rem;
}
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.metric-item {
    margin-bottom: 0.5rem;
}
.metric-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}
.metric-value {
    font-weight: 500;
}
.metric-value.accent {
    color: var(--accent);
}
.metric-value.danger {
    color: var(--danger);
}
.history-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.history-header h2 {
    font-size: 1.3rem;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table th {
    text-align: left;
    padding: 1rem;
    background-color: var(--light-gray);
    font-weight: 600;
}
.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}
.history-table tr:last-child td {
    border-bottom: none;
}
.amount-paid {
    color: var(--accent);
    font-weight: 500;
}
.amount-failed {
    color: var(--danger);
    font-weight: 500;
}
.status-on-time {
    background-color: #d4edda;
    color: #155724;
}
.status-late {
    background-color: #fff3cd;
    color: #856404;
}
.status-defaulted {
    background-color: #f8d7da;
    color: #721c24;
}
.default-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}
.default-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.default-header h2 {
    font-size: 1.3rem;
}
.default-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}
.default-item:last-child {
    border-bottom: none;
}
.default-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--danger);
}
.default-content {
    flex: 1;
}
.default-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.default-description {
    font-size: 0.9rem;
    color: var(--gray);
}
.default-actions {
    display: flex;
    gap: 0.75rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}
@media (max-width: 768px) {
    .invoice-grid {
        grid-template-columns: 1fr;
    }
    .filter-row {
        grid-template-columns: 1fr;
    }
    .invoice-actions {
        flex-direction: column;
        width: 100%;
    }
    .invoice-actions .btn {
        width: 100%;
    }
    .amount-selector {
        flex-direction: column;
    }
    .form-actions {
        flex-direction: column;
    }
    .summary-cards {
        grid-template-columns: 1fr 1fr;
    }
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    .history-table {
        display: block;
        overflow-x: auto;
    }
    .default-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .default-actions {
        margin-top: 1rem;
        width: 100%;
    }
    .default-actions .btn {
        width: 100%;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .tracker-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .tracker-step {
        flex: 1 0 100px;
    }
    .countdown {
        flex-wrap: wrap;
    }
    .countdown-item {
        flex: 1 0 50px;
    }
    .payment-methods {
        grid-template-columns: 1fr;
    }
    .payment-actions {
        flex-direction: column;
    }
    .schedule-table, .history-table {
        display: block;
        overflow-x: auto;
    }
    .lock-status {
        flex-direction: column;
        gap: 1.5rem;
    }
    .lock-phase:not(:last-child)::after {
        display: none;
    }
    .funding-grid {
        grid-template-columns: 1fr;
    }
    .confirmation-details {
        grid-template-columns: 1fr;
    }
    .confirmation-actions {
        flex-direction: column;
    }
    .stepper {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .step {
        flex: 1 0 100px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .review-item {
        flex-direction: column;
    }
    .review-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    th, td {
        padding: 0.75rem;
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .invoice-table {
        overflow-x: auto;
        display: block;
    }
}

/* Terms Section */
.terms-card {
    background-color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.terms-header {
    margin-bottom: 1.5rem;
}
.terms-header h2 {
    font-size: 1.3rem;
}
.terms-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}
.terms-content p {
    margin-bottom: 1rem;
}
.terms-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.terms-content li {
    margin-bottom: 0.5rem;
}

/* Scrollbar styling */
.terms-content::-webkit-scrollbar {
    width: 8px;
}
.terms-content::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}
.terms-content::-webkit-scrollbar-thumb {
    background-color: var(--gray);
    border-radius: 4px;
}

/* Auth Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}
.auth-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.auth-header p {
    color: var(--text-muted);
}
.auth-form {
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}
.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.role-switch {
    margin-top: 1.5rem;
}
.role-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.role-buttons .btn {
    flex: 1;
}
.small-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
}
.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: #f5f5f5;
}
.user-dropdown:hover .dropdown-content {
    display: block;
}

.disbursement-cta {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.disbursement-cta h2 {
    margin: 0 0 8px;
    color: #2e7d32;
    font-size: 1.2rem;
}

.disbursement-cta p {
    color: #555;
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.action-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
    align-items: center;
}

.action-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 10px 16px;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
}

/* Responsive: Stack on small screens */
@media (max-width: 600px) {
    .action-links {
        flex-direction: column;
    }

    .action-links .btn {
        width: 100%;
        justify-content: center;
    }
}