:root {
    --primary: #ff5a1f;
    --primary-dark: #d9430c;
    --secondary: #0f172a;
    --accent: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --light-bg: #f4f7fb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--light-bg);
    color: var(--text-main);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #111827 55%, #1f2937 100%);
    color: #ffffff;
    padding: 22px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #f97316);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 12px 24px rgba(255,90,31,0.35);
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .2px;
}

.sidebar-brand small {
    color: #cbd5e1;
}

.sidebar-menu {
    margin-top: 28px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #d1d5db;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    transition: all .2s ease;
    font-weight: 600;
}

    .sidebar-link i {
        font-size: 18px;
    }

    .sidebar-link:hover {
        color: #ffffff;
        background: rgba(255,255,255,0.1);
        transform: translateX(4px);
    }

    .sidebar-link.active,
    .sidebar-link:focus {
        color: #ffffff;
        background: linear-gradient(135deg, var(--primary), #f97316);
    }

.sidebar-footer {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    background: rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 14px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .user-mini strong {
        display: block;
        font-size: 14px;
    }

    .user-mini small {
        color: #cbd5e1;
    }

.user-avatar {
    width: 42px;
    height: 42px;
    background: #ffffff;
    color: var(--primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
}

/* Main */
.main-area {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}

.topbar {
    height: 82px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

    .topbar h5 {
        font-weight: 800;
    }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-box {
    height: 42px;
    min-width: 280px;
    background: #f3f4f6;
    border-radius: 999px;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
}

    .search-box input {
        border: 0;
        outline: 0;
        background: transparent;
        width: 100%;
        font-size: 14px;
    }

.notification-icon {
    width: 42px;
    height: 42px;
    background: #fff7ed;
    color: var(--primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.content-area {
    padding: 28px;
}

/* Cards */
.stat-card {
    border: 0;
    border-radius: 22px;
    color: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 34px rgba(15,23,42,0.10);
}

    .stat-card::after {
        content: "";
        position: absolute;
        right: -35px;
        top: -35px;
        width: 115px;
        height: 115px;
        border-radius: 50%;
        background: rgba(255,255,255,0.17);
    }

    .stat-card .card-body {
        position: relative;
        z-index: 1;
        padding: 24px;
    }

.stat-label {
    font-size: 14px;
    opacity: .9;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    margin-top: 10px;
}

.stat-small {
    font-size: 13px;
    opacity: .9;
}

.bg-orange {
    background: linear-gradient(135deg, #ff5a1f, #f97316);
}

.bg-blue {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.bg-green {
    background: linear-gradient(135deg, #059669, #10b981);
}

.bg-purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.modern-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(15,23,42,0.08);
    background: #ffffff;
}

    .modern-card .card-header {
        background: transparent;
        border-bottom: 1px solid var(--border-soft);
        padding: 18px 22px;
        font-weight: 800;
    }

    .modern-card .card-body {
        padding: 22px;
    }

/* Tables */
.table-modern {
    border-collapse: separate;
    border-spacing: 0 10px;
}

    .table-modern thead th {
        border: 0;
        color: var(--text-muted);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: .4px;
    }

    .table-modern tbody tr {
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15,23,42,0.05);
    }

    .table-modern tbody td {
        border: 0;
        vertical-align: middle;
        padding: 14px;
    }

        .table-modern tbody td:first-child {
            border-radius: 14px 0 0 14px;
        }

        .table-modern tbody td:last-child {
            border-radius: 0 14px 14px 0;
        }

.badge-soft {
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 700;
    font-size: 12px;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-review {
    background: #dbeafe;
    color: #1e40af;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-suspended {
    background: #e5e7eb;
    color: #374151;
}

/* Login */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #ff5a1f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .login-page .card {
        border-radius: 24px;
    }

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 86px;
        padding: 18px 12px;
    }

    .brand-title,
    .sidebar-brand small,
    .sidebar-link span,
    .sidebar-footer .user-mini div,
    .sidebar-footer .btn {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
    }

    .sidebar-link {
        justify-content: center;
    }

    .sidebar-footer {
        left: 12px;
        right: 12px;
    }

    .main-area {
        margin-left: 86px;
        width: calc(100% - 86px);
    }
}

@media (max-width: 576px) {
    .topbar {
        padding: 0 16px;
    }

    .content-area {
        padding: 18px;
    }

    .stat-number {
        font-size: 26px;
    }
}
.vehicle-thumb {
    width: 78px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.empty-icon {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    background: #fff7ed;
    color: #ff5a1f;
    display: grid;
    place-items: center;
    margin: 0 auto;
    font-size: 38px;
}

.mini-summary-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 14px 32px rgba(15,23,42,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 5px solid #ff5a1f;
}

    .mini-summary-card small {
        color: #6b7280;
        font-weight: 600;
    }

    .mini-summary-card h4 {
        margin: 4px 0 0;
        font-weight: 800;
    }

    .mini-summary-card i {
        font-size: 28px;
        color: #ff5a1f;
    }

    .mini-summary-card.green {
        border-left-color: #10b981;
    }

        .mini-summary-card.green i {
            color: #10b981;
        }

    .mini-summary-card.blue {
        border-left-color: #3b82f6;
    }

        .mini-summary-card.blue i {
            color: #3b82f6;
        }

    .mini-summary-card.purple {
        border-left-color: #a855f7;
    }

        .mini-summary-card.purple i {
            color: #a855f7;
        }

.btn-group form .btn {
    border-radius: 0;
}

.btn-group form:first-child .btn {
    border-top-left-radius: .375rem;
    border-bottom-left-radius: .375rem;
}

.btn-group form:last-child .btn {
    border-top-right-radius: .375rem;
    border-bottom-right-radius: .375rem;
}
.wallet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3px;
}

.wallet-mpesa {
    background: #fee2e2;
    color: #991b1b;
}

.wallet-emola {
    background: #dcfce7;
    color: #166534;
}

.wallet-mkesh {
    background: #dbeafe;
    color: #1e40af;
}

.wallet-default {
    background: #e5e7eb;
    color: #374151;
}
.table-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff5a1f, #f97316);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 10px 22px rgba(255,90,31,0.22);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.role-admin {
    background: #ede9fe;
    color: #5b21b6;
}

.role-seller {
    background: #dbeafe;
    color: #1e40af;
}

.role-dealer {
    background: #dcfce7;
    color: #166534;
}

.role-buyer {
    background: #fef3c7;
    color: #92400e;
}

.role-default {
    background: #e5e7eb;
    color: #374151;
}
