:root {
    --primary: #2563eb;
    --sidebar: #14243d;
    --sidebar-hover: #243c5e;
    --background: #f4f6fa;
    --white: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --sidebar-width: 260px;
}

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

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 14px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 24px;
    border-bottom: 1px solid #ffffff15;
}

.brand>i {
    font-size: 32px;
    color: #60a5fa;
}

.brand h2 {
    font-size: 25px;
    letter-spacing: 1px;
}

.brand small {
    color: #94a9c5;
    font-size: 12px;
}

.navigation {
    flex: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #94a9c5;
    padding: 25px 24px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    width: calc(100% - 24px);
    margin: 4px 12px;
    padding: 13px 15px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #cbd5e1;
    text-align: left;
    transition: .2s;
}

.nav-item i {
    font-size: 18px;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

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

.sidebar-footer {
    padding: 22px;
    color: #cbd5e1;
    border-top: 1px solid #ffffff15;
    font-size: 12px;
}

.sidebar-footer small {
    display: block;
    margin-top: 5px;
    color: #94a9c5;
}

.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 28px;
    gap: 15px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

#pageTitle {
    font-size: 17px;
    font-weight: 600;
}

.icon-button {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 25px;
}

#menuToggle {
    display: none;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 20px;
}

.demo-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 11px;
}

.content {
    flex: 1;
    padding: 30px;
}

.page-heading {
    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: 27px;
    margin-bottom: 7px;
}

.page-heading p {
    color: var(--muted);
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 3px 10px #00000004;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 22px;
    margin-bottom: 15px;
}

.blue {
    color: #2563eb;
    background: #dbeafe;
}

.red {
    color: #dc2626;
    background: #fee2e2;
}

.orange {
    color: #d97706;
    background: #fef3c7;
}

.green {
    color: #059669;
    background: #d1fae5;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 18px;
}

.panel p {
    color: var(--muted);
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 7px;
    padding: 11px 17px;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

.btn:disabled {
    opacity: .6;
    cursor: wait;
}

.search-input {
    width: 100%;
    max-width: 350px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 11px 14px;
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
}

th,
td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: #f8fafc;
}

.status {
    display: inline-block;
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 12px;
}

.status-success {
    color: #047857;
    background: #d1fae5;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
}

.progress {
    height: 9px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width .3s;
}

.progress-text {
    margin-top: 10px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 45px 15px;
    color: var(--muted);
}

.empty-state i {
    font-size: 40px;
    color: #94a3b8;
    display: block;
    margin-bottom: 15px;
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 20px;
    font-size: 11px;
}

.overlay {
    display: none;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    #menuToggle {
        display: block;
    }
    .overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: #00000066;
        z-index: 90;
    }
    .topbar {
        padding: 12px 16px;
    }
    .content {
        padding: 18px;
    }
    .stats-grid {
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 27px;
    }
    .panel {
        padding: 17px;
    }
    .user-name {
        display: none;
    }
    .page-heading h1 {
        font-size: 23px;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}