/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0b0d10;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 100, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 100, 0.05) 0%, transparent 60%);
    display: flex;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
    color: #eef2f6;
}

.dashboard {
    max-width: 1440px;
    width: 100%;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    flex: 0 0 240px;
    background: rgba(18, 22, 28, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 255, 100, 0.18);
    border-radius: 28px;
    padding: 28px 20px;
    position: sticky;
    top: 24px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0, 255, 100, 0.3); border-radius: 10px; }

.sidebar-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #d0e0ec;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 100, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title .version {
    font-size: 11px;
    font-weight: 400;
    color: #00ff88;
    border: 1px solid rgba(0, 255, 100, 0.25);
    padding: 0 12px;
    border-radius: 40px;
}

.client-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 16px;
}

.client-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    color: #b8c8d8;
    gap: 12px;
    letter-spacing: 0.2px;
}

.client-item:hover {
    background: rgba(0, 255, 100, 0.06);
    color: #ffffff;
}

.client-item.active {
    background: rgba(0, 255, 100, 0.08);
    color: #00ff88;
    border-left: 2px solid #00ff88;
    border-radius: 12px 0 0 12px;
    box-shadow: inset 0 0 24px rgba(0, 255, 100, 0.04);
}

.client-rank {
    font-size: 11px;
    font-weight: 300;
    color: #6a7a8a;
    min-width: 20px;
    text-align: right;
}

.client-item.active .client-rank {
    color: #00ff88;
}

.client-name {
    flex: 1;
    font-weight: 500;
}

.client-orders {
    font-size: 12px;
    font-weight: 400;
    color: #6a7a8a;
    background: rgba(255,255,255,0.05);
    padding: 0 12px;
    border-radius: 40px;
}

.client-item.active .client-orders {
    color: #00ff88;
    background: rgba(0, 255, 100, 0.10);
}

.sidebar-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 100, 0.08);
    font-size: 12px;
    font-weight: 300;
    color: #6a7a8a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer .dot {
    color: #00ff88;
    font-size: 8px;
}

/* ---------- MAIN CONTENT ---------- */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: rgba(18, 22, 28, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 255, 100, 0.10);
    border-radius: 28px;
    padding: 28px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header-card {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-card h1 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: lowercase;
    color: #ffffff;
}

.header-card .meta {
    font-size: 12px;
    font-weight: 300;
    color: #8a9aaa;
    letter-spacing: 0.5px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header .label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a9aaa;
}

/* ---------- KPI GRID ---------- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.metric-item {
    background: rgba(255,255,255,0.03);
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 100, 0.06);
    transition: border-color 0.2s;
}

.metric-item:hover {
    border-color: rgba(0, 255, 100, 0.20);
}

.metric-item .metric-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9aabba;
    margin-bottom: 4px;
}

.metric-item .metric-value {
    font-size: 28px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* ---------- CHARTS ---------- */
.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-box {
    padding: 20px 24px 16px;
}

.chart-box h4 {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aabba;
    margin-bottom: 12px;
}

.chart-container {
    height: 160px;
    position: relative;
}

.full-width {
    grid-column: 1 / -1;
}

/* ---------- TABLE ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-weight: 400;
    color: #dce4ec;
}

table thead tr {
    border-bottom: 1px solid rgba(0, 255, 100, 0.08);
}

table th {
    text-align: left;
    padding: 10px 8px 10px 0;
    font-weight: 500;
    color: #9aabba;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

table td {
    padding: 10px 8px 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #d0dce8;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background: rgba(0, 255, 100, 0.03);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .sidebar {
        flex: 1 1 100%;
        position: relative;
        top: 0;
        max-height: 320px;
        overflow-y: auto;
    }
    .chart-row {
        grid-template-columns: 1fr;
    }
    .dashboard {
        gap: 18px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }
    .card {
        padding: 18px 16px;
    }
    .header-card {
        padding: 16px;
    }
    .header-card h1 {
        font-size: 20px;
    }
    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }
    .metric-item .metric-value {
        font-size: 22px;
    }
}

/* scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 100, 0.2);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 100, 0.35);
}