* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

:root {
    --bg: #f5f5f5;
    --section-bg: #ffffff;
    --text: #333333;
    --th-text: #ffffff;
    --muted: #555555;
    --primary: #667eea;
    --secondary: #764ba2;
    --border: rgba(0, 0, 0, 0.08);
    --card: #ffffff;
    --shadow: rgba(0,0,0,0.12);
}

body.dark-theme {
    --bg: #121826;
    --section-bg: #1d2438;
    --text: #e5e9f0;
    --muted: #a8b3cf;
    --primary: #5fcde4;
    --secondary: #9187ff;
    --border: rgba(255, 255, 255, 0.12);
    --card: #1b253c;
    --shadow: rgba(0,0,0,0.35);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a, a:visited {
    color: #fff;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

body.dark-theme .navbar {
    background: rgba(30, 34, 50, 0.85);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

body.dark-theme .navbar.scrolled {
    background: rgba(22, 28, 44, 0.9);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand i {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #243757 0%, #1a2c4e 100%);
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="50" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 20px;
}

.floating-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.floating-card p {
    opacity: 0.8;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Common Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--section-bg);
    color: var(--text);
}

body.dark-theme .about {
    background: #182038;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #555;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 1rem;
}

.feature-list i {
    color: #2ecc71;
    margin-right: 15px;
    margin-top: 2px;
    font-size: 1.1rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    color: white;
    width: 100%;
    max-width: 400px;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.image-placeholder p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--section-bg);
    color: var(--text);
}

body.dark-theme .features {
    background: #182038;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--card);
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

body.dark-theme .feature-card {
    border-color: rgba(255, 255, 255, 0.08);
}


.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Install Page */
.install-page {
    min-height: 100vh;
    padding: 140px 0 80px;
    background: var(--bg);
}

.install-box {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 12px 30px var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}


.install-box h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text);
}

.install-subtitle {
    margin-bottom: 30px;
    color: var(--muted);
}

.install-details {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 20px 25px;
    margin: 24px 0;
    text-align: left;
}

.install-details h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.install-details ul {
    text-align: left;
    list-style: none;
    padding: 0;
}

.install-details li {
    margin-bottom: 8px;
    color: #334155;
}

.install-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert-success {
    background: #e6f9f0;
    border: 1px solid #2ecc71;
    color: #205334;
}

.alert-info {
    background: #eaf2ff;
    border: 1px solid #3498db;
    color: #1f466e;
}

.warning {
    color: #b34747;
    background: #fff1f0;
    font-weight: 600;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
}

/* Footer */
.footer {
    background: var(--section-bg);
    color: var(--text);
    padding: 60px 0 20px;
}

body.dark-theme .footer {
    background: #151f33;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.footer-brand i {
    color: #3498db;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #bdc3c7;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 10px;
    text-align: center;
    color: #95a5a6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-theme .btn-primary {
    box-shadow: 0 4px 15px rgba(95, 205, 228, 0.35);
}

body.dark-theme .btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}


.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #2c3e50;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }

    .nav-brand {
        font-size: 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 30px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .about-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 16px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .floating-card {
        padding: 30px;
    }
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(102, 126, 234, .9) 0%, rgba(118, 75, 162, .9) 100%);
    padding: 20px;
}

body.dark-theme .login-container {
    background: linear-gradient(135deg, rgba(20, 28, 60, 0.9) 0%, rgba(34, 42, 76, 0.95) 100%);
}

.login-box {
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 12px 30px var(--shadow);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 430px;
    position: relative;
}

.login-box h2 {
    margin-bottom: 10px;
    text-align: center;
    color: var(--text);
}

.login-box h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--muted);
}

.login-box .text-muted {
    color: var(--muted);
    margin-bottom: 15px;
    text-align: center;
}

.login-box .form-group label {
    color: var(--text);
}

.login-box .form-group input {
    background: var(--section-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.login-box .form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
}

.theme-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    padding: 10px 14px;
    text-decoration: none;
}

.theme-toggle-item:hover {
    background: rgba(52, 152, 219, 0.07);
    color: var(--text);
}

/* Navigation */
.admin-nav, .borrower-nav {
    position: sticky;
    top: 0;
    z-index: 2000;    
    color: var(--text);
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: right;
    align-items: center;    
}

.logo {
    flex: 0 0 auto;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

body.dark-theme .admin-nav,
body.dark-theme .borrower-nav {
    background: var(--section-bg);
    border-bottom-color: var(--border);
}

.admin-nav a, .borrower-nav a {
    color: var(--text);
    text-decoration: none;    
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover, .borrower-nav a:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
}

.admin-nav .nav-links,
.borrower-nav .nav-links {    
    align-items: center;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-menu-btn:hover {
    background: rgba(102, 126, 234, 0.25);
    color: var(--primary);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.24);
    border-radius: 14px;
    min-width: 240px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 3000;
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform-origin: top right;
    opacity: 0;
}

.user-dropdown.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown .user-info {
    padding: 12px 14px;
    background: var(--section-bg);
    border-bottom: 1px solid var(--border);
}

.user-dropdown .user-info strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 3px;
}

.user-dropdown .user-info span {
    font-size: 12px;
    color: var(--muted);
}

.user-dropdown a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #0c1f3e;
}

body.dark-theme .user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f6ff;
}

body.dark-theme .user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .user-dropdown {
    background: #1b273b;
    border-color: rgba(255,255,255,0.08);
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px 8px 0 0;
}

.dropdown-user-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dropdown-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-user-avatar i {
    font-size: 28px;
    color: white;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.dropdown-user-id {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.dropdown-status {
    padding: 12px 16px;
    background: var(--section-bg);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

.status-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.status-info i {
    color: var(--primary);
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.status-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.status-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 4px;        
    text-transform: uppercase;
}

.member-since {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

body.dark-theme .dropdown-user-header {
    background: linear-gradient(135deg, #5fcde4, #9187ff);
}

.nav-links {
    display: flex;
    gap: 20px;
}


/* Dashboard */
.admin-container,
.borrower-container {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
}

body.dark-theme .admin-container,
body.dark-theme .borrower-container {
    background: var(--bg);
}

.admin-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: #1f2b44;
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    z-index: 1200;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.admin-nav.closed {
    transform: translateX(-100%);
}

.admin-nav .nav-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.admin-nav a {
    color: #c7d1eb;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    display: block;
    font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.admin-nav .sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


.user-dropdown {
    display: none;
    position: absolute;
    top: 64px;
    right: 16px;
    width: 220px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1350;
    flex-direction: column;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown a,
.user-dropdown button {
    text-decoration: none;
    color: var(--text);
    padding: 10px 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(0,0,0,0.05);
}

.theme-toggle-item {
    display: block;
    width: 100%;
    margin-top: 5px;
}

.sidebar-toggle-btn {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 1300;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--card);
    color: var(--text);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1100;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-toggle-btn:hover {
    transform: rotate(90deg);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    min-height: 100vh;
    padding: 28px;
}

.dashboard {
    padding: 0;
    max-width: none;
    margin: 0;
    min-height: auto;
    background: transparent;
}

body.dark-theme .dashboard {
    background: transparent;
}

@media (max-width: 992px) {
    .admin-nav {
        transform: translateX(-100%);
        width: 240px;
    }

    .admin-nav.open {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: flex;
        left: 16px;
    }

    .main-content, .content, .dashboard {
        margin-left: 0;
        padding-top: 70px;
    }
}

.content,
.main-content {
    padding: 84px 28px 28px;
}

body.dark-theme .dashboard {
    background: #181f33;
}
.dashboard h1 {
    font-size: 2.1rem;
    margin-bottom: 20px;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0 35px;
}

.stat-card {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid var(--border);
}

body.dark-theme .stat-card {
    border-color: rgba(255,255,255,0.1);
}

.stat-card h3 {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--text);
}

.stat-card.warning .stat-number {
    color: #f39c12;
}

.stat-card.danger .stat-number {
    color: #e74c3c;
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.data-table th {
    background: var(--primary);
    color: var(--th-text);
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
}

.data-table td,
.borrower-container,
.content,
.page-header,
.stats-grid .stat-card,
.chart-section,
.recent-section,
.activity-section,
.profile-section,
.form-card,
.info-grid {
    background: var(--card);
    color: var(--text);
}

.page-header h1, .page-header h2, .page-header h3 {
    color: var(--text);
}

.filter-tabs .tab {
    background: var(--section-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.filter-tabs .tab.active {
    background: var(--primary);
    color: white;
}

body.dark-theme .filter-tabs .tab {
    background: #2a364f;
    color: #d4def4;
    border-color: rgba(255,255,255,0.12);
}

body.dark-theme .filter-tabs .tab.active {
    background: var(--primary);
    color: #fff;
}

body.dark-theme .page-header {
    color: var(--text);
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:hover {
    background: rgba(52, 152, 219, 0.08);
}

body.dark-theme .data-table tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .data-table th {
    background: #3f5e8d;
}

body.dark-theme .data-table {
    border-color: rgba(255,255,255,0.08);
}

body.dark-theme .data-table td {
    border-color: rgba(255,255,255,0.08);
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending { background: #f39c12; color: white; }
.status-approved { background: #3498db; color: white; }
.status-disbursed { background: #2ecc71; color: white; }
.status-repaid { background: #27ae60; color: white; }
.status-defaulted { background: #e74c3c; color: white; }
.status-active { background: #2ecc71; color: white; }
.status-suspended { background: #f39c12; color: white; }
.status-blacklisted { background: #e74c3c; color: white; }

/* Forms */
.form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #3498db;
}

.btn-success {
    background: #2ecc71;
}

.btn-danger {
    background: #e74c3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-error {
    background: #fdecea;
    color: #842029;
    border-color: #f5c2c7;
}

body.dark-theme .alert-error {
    background: rgba(255, 111, 128, 0.15);
    color: #ffb4c1;
    border-color: rgba(255, 87, 105, 0.25);
}

.alert-success {
    background: #e6f4ea;
    color: #0f5132;
    border-color: #badbcc;
}

body.dark-theme .alert-success {
    background: rgba(46, 204, 113, 0.15);
    color: #d6f5e1;
    border-color: rgba(46, 204, 113, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 16px;
    background: #ecf0f1;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
}

.tab.active {
    background: #3498db;
    color: white;
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
    margin-bottom: 20px;
    display: inline-block;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--section-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--card);
    border-color: var(--primary);
}

.filter-btn i:last-child {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 200px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100;
}

.filter-menu.active {
    display: flex;
}

.filter-item {
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.filter-item:last-child {
    border-bottom: none;
}

.filter-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.filter-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.filter-item i {
    width: 18px;
    text-align: center;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

body.dark-theme .info-grid {
    background: #1b273b;
}
/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
        overflow-x: auto;
        display: block;
    }
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox input {
    width: auto;
}

/* Collateral Inputs */
.collateral-input {
    margin-bottom: 10px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-4 {
    margin-top: 20px;
}

.text-danger {
    color: #e74c3c;
    font-weight: bold;
}

/* Additional styles for new features */

/* Form Cards */
.form-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.form-card h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.chart-section, .recent-section, .activity-section {
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

body.dark-theme .chart-section,
body.dark-theme .recent-section,
body.dark-theme .activity-section {
    background: #1b273b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.chart-section {
    grid-column: span 2;
}

.activity-section {
    grid-column: span 2;
}

/* Activity Log */
.activity-log {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.activity-item strong {
    display: block;
    font-size: 12px;
    color: #666;
}

.activity-item span {
    display: block;
    font-size: 14px;
    margin: 5px 0;
}

.activity-item small {
    color: #999;
    font-size: 11px;
}

/* Collateral Rows */
.collateral-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.collateral-input {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.collateral-desc-input {
    flex: 3;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.quick-collateral {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    background: #ecf0f1;
    color: #333;
    margin: 2px;
}

.btn-xs:hover {
    background: #bdc3c7;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-inline {
    display: inline-block;
    margin-left: 10px;
}

/* Report Filters */
.report-filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Borrower Portal Header & Footer */
.borrower-header {
    background: var(--section-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    font-size: 14px;
}

.borrower-nav {
    display: flex;    
    align-items: center;
    flex: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(102, 126, 234, 0.08);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.user-menu {
    position: relative;
    flex-shrink: 0;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-btn i:last-child {
    font-size: 12px;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 220px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 2000;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown a,
.user-dropdown button {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(102, 126, 234, 0.1);
}

.user-dropdown a i,
.user-dropdown button i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

.theme-toggle-btn {
    width: 100%;
    font-weight: 500;
}

.theme-toggle-btn span {
    margin-left: 2px;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.borrower-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: var(--bg);
}



.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.borrower-footer,
.admin-footer {
    background: var(--section-bg);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    flex-shrink: 0;
}


/* Mobile Navigation */
@media (max-width: 992px) {
    .hamburger-menu {
        display: flex;
        order: 1;
    }

    .header-logo {
        order: 2;
        flex: 1;
    }

    .borrower-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 70px;
        width: 240px;
        height: calc(100vh - 70px);
        background: var(--section-bg);
        border-right: 1px solid var(--border);
        padding: 1rem 0;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1499;
    }

    .borrower-nav.open {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 1.5rem;
        border-bottom: none;
        border-left: 3px solid transparent;
        border-radius: 0;
        margin: 0;
    }

    .nav-link.active {
        border-left-color: var(--primary);
        border-bottom: none;
    }

    .user-menu {
        order: 3;
    }

    .header-container {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.75rem;
    }

    .header-logo {
        gap: 8px;
    }

    .logo-text {
        font-size: 12px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .user-menu-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .user-menu-btn span {
        display: none;
    }

    .user-dropdown {
        min-width: 200px;
        right: -50%;
        transform: translateX(50%);
    }

    .content {
        padding: 1rem;
    }

    .borrower-footer {
        padding: 1.5rem 1rem;
        font-size: 13px;
    }
}


    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-inline label {
    font-size: 12px;
    margin-bottom: 3px;
}

.report-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.summary-stats {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* Status Badge Updates */
.status-defaulted {
    background: #e74c3c;
    color: white;
}

.status-blacklisted {
    background: #c0392b;
    color: white;
}

.stat-card.danger .stat-number {
    color: #e74c3c;
}

/* Text Utilities */
.text-muted {
    color: #6c757d;
    font-size: 13px;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .collateral-row {
        flex-direction: column;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .admin-nav, .btn, .action-buttons, .report-filters, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        margin: 0;
        padding: 20px;
    }
    
    .data-table {
        page-break-inside: avoid;
    }
    
    .stat-card {
        break-inside: avoid;
    }
}