:root {
    --bg: #ebebeb;
    --panel: #f8f8f8;
    --panel-alt: #ffffff;
    --border: #c7c7c7;
    --text: #242424;
    --muted: #626262;
    --accent: #2f6f96;
    --alert: #c62020;
    --header-dark: #242424;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f0f0f0 0%, #e5e5e5 100%);
    color: var(--text);
    font-family: Verdana, Tahoma, sans-serif;
    font-size: 13px;
}

.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid #989898;
    background: linear-gradient(180deg, #2a2a2a 0%, #1d1d1d 100%);
    color: #ebebeb;
}

.brand {
    padding: 20px;
    font-size: 28px;
    letter-spacing: 1px;
    font-weight: 700;
    border-bottom: 1px solid #3d3d3d;
}

.nav-section {
    padding: 10px 0;
}

.nav-title {
    color: #9a9a9a;
    font-size: 11px;
    padding: 0 14px 8px;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    color: #e4e4e4;
    text-decoration: none;
    border-top: 1px solid #2f2f2f;
    border-bottom: 1px solid #171717;
}

.nav-link:hover,
.nav-link.active {
    background: #3a3a3a;
}

.badge-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 2px;
    color: #fff;
    background: var(--alert);
    font-weight: 700;
}

.main {
    padding: 18px;
}

.topbar {
    background: var(--header-dark);
    color: #f5f5f5;
    border: 1px solid #111;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.panel {
    background: var(--panel-alt);
    border: 1px solid var(--border);
}

.panel h2 {
    margin: 0;
    font-size: 13px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #3b3b3b 0%, #2e2e2e 100%);
    color: #fff;
}

.panel-content {
    padding: 12px;
}

.stat-list {
    width: 100%;
    border-collapse: collapse;
}

.stat-list td {
    padding: 6px 4px;
    border-bottom: 1px solid #ececec;
}

.stat-list tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) td {
    background: #ebebeb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 7px 8px;
    border-bottom: 2px solid #ddd;
    text-align: left;
    font-size: 12px;
    color: #555;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #ececec;
    font-size: 13px;
}

.stat-list td:last-child {
    text-align: right;
    font-weight: 700;
}

.report-item {
    border: 1px solid #dfdfdf;
    background: var(--panel);
    margin-bottom: 8px;
    padding: 8px;
}

.report-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.report-meta {
    color: var(--muted);
    font-size: 11px;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
}

.trend-indicator::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.trend-up {
    color: #1e7a34;
}

.trend-up::before {
    border-bottom: 7px solid #1e7a34;
}

.trend-down {
    color: #b51f1f;
}

.trend-down::before {
    border-top: 7px solid #b51f1f;
}

.trend-steady {
    color: #5a5a5a;
}

.trend-steady::before {
    border-top: 5px solid #5a5a5a;
    border-bottom: 5px solid #5a5a5a;
    border-left: 7px solid #5a5a5a;
    border-right: 0;
}

.status-label {
    font-weight: 700;
    padding: 1px 5px;
    border: 1px solid currentColor;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-good    { color: #1e7a34; }
.status-ok      { color: #3a6e1c; }
.status-warn    { color: #8a6200; }
.status-danger  { color: #b51f1f; }
.status-critical { color: #7a0000; background: #ffeaea; }

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid #989898;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
