:root {
    --primary: #0d6efd;
    --primary-dark: #084298;
    --sidebar: #101828;
    --sidebar-light: #1d2939;
    --body-bg: #f4f7fb;
    --text: #344054;
    --muted: #667085;
    --white: #ffffff;
    --border: #e4e7ec;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--body-bg);
    color: var(--text);
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(13, 110, 253, 0.85), rgba(16, 24, 40, 0.95)),
        url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 18px;
}

.login-logo {
    width: 75px;
    height: 75px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
}

/* ADMIN LAYOUT */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 275px;
    background: var(--sidebar);
    color: white;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand small {
    display: block;
    color: #98a2b3;
    font-size: 12px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.sidebar-menu {
    padding: 15px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 14px;
    color: #d0d5dd;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--sidebar-light);
    color: white;
}

.sidebar-menu .logout-link {
    background: rgba(220, 53, 69, 0.15);
    color: #ffb4bd;
    margin-top: 10px;
}

.menu-label {
    color: #98a2b3;
    font-size: 11px;
    text-transform: uppercase;
    margin: 18px 10px 8px;
    letter-spacing: 0.8px;
}

.main-content {
    margin-left: 275px;
    width: calc(100% - 275px);
    min-height: 100vh;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-user {
    text-align: right;
}

.topbar-user span {
    display: block;
    font-weight: 600;
}

.topbar-user small {
    color: var(--muted);
}

.content-area {
    padding: 24px;
}

/* CARDS */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
    min-height: 135px;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.stat-card h3 {
    margin: 10px 0 5px;
    color: var(--primary);
    font-weight: 700;
}

.stat-card small {
    color: var(--muted);
}

.stat-card.green h3 {
    color: #198754;
}

.stat-card.orange h3 {
    color: #fd7e14;
}

.stat-card.purple h3 {
    color: #6f42c1;
}

.stat-card.dark h3 {
    color: #212529;
}

.stat-card.red h3 {
    color: #dc3545;
}

.stat-card.sacco h3 {
    color: #0f766e;
}

.stat-card.loan h3 {
    color: #b45309;
}

.panel-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h6 {
    margin: 0;
    font-weight: 700;
}

/* ROADMAP */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.roadmap-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #f9fafb;
}

.roadmap-item strong {
    display: block;
    margin-bottom: 6px;
}

.roadmap-item span {
    font-size: 13px;
    color: var(--muted);
}

.roadmap-item.done {
    background: #ecfdf3;
    border-color: #abefc6;
}

.roadmap-item.active {
    background: #eff8ff;
    border-color: #84caff;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-wrapper {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        align-items: flex-start;
        gap: 10px;
    }

    .roadmap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 15px;
    }

    .topbar {
        flex-direction: column;
    }

    .topbar-user {
        text-align: left;
    }

    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 22px;
    }
}