
:root {
    --background: #080d18;
    --sidebar: #0d1423;
    --panel: #111c2e;
    --border: #233149;
    --text: #e8eef8;
    --muted: #8795aa;
    --blue: #4389ff;
    --green: #27d69a;
    --red: #ff5268;
    --orange: #ffad42;
    --purple: #a78bfa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 250px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 55px;
}

.brand strong {
    color: var(--blue);
}

.brand-icon {
    color: var(--green);
    font-size: 32px;
}

.menu-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
    text-decoration: none;
    color: var(--muted);
    padding: 13px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #172a45;
    color: #ffffff;
}

.sidebar nav a.active {
    border-left: 3px solid var(--blue);
}

.sidebar-bottom {
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
    line-height: 2;
}

.sidebar-bottom p {
    color: #607087;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 7px;
    box-shadow: 0 0 9px rgba(39, 214, 154, 0.5);
}

/* Main layout */

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 38px 42px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.eyebrow {
    color: var(--blue);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 700;
}

h1 {
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.top-status {
    border: 1px solid var(--border);
    background: var(--panel);
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
}

/* Demo notice */

.notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(67, 137, 255, 0.08);
    border: 1px solid rgba(67, 137, 255, 0.3);
    border-radius: 9px;
    padding: 16px 20px;
    margin-bottom: 25px;
    font-size: 12px;
    color: #b8c8df;
}

.notice strong {
    color: var(--blue);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Metrics */

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

.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--blue);
}

.metric-card.critical::after {
    background: var(--red);
}

.metric-card.high::after {
    background: var(--orange);
}

.metric-card p {
    color: var(--muted);
    font-size: 12px;
}

.metric-card h2 {
    font-size: 32px;
    margin: 14px 0 8px;
}

.metric-card span {
    color: var(--muted);
    font-size: 11px;
}

/* Dashboard panels */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    margin-bottom: 25px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 23px;
    min-width: 0;
}

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

.panel-heading h3 {
    font-size: 15px;
    margin-bottom: 7px;
}

.panel-heading p {
    color: var(--muted);
    font-size: 11px;
}

.chart-container {
    height: 220px;
    position: relative;
    display: flex;
    justify-content: center;
}

.monitoring-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.monitoring-info div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.monitoring-info div:last-child {
    border-bottom: none;
}

.monitoring-info span {
    color: var(--muted);
}

.monitoring-info strong {
    color: var(--green);
    font-size: 11px;
    text-align: right;
}

/* Alert table */

.alerts-panel {
    margin-bottom: 25px;
}

.live-label {
    background: rgba(67, 137, 255, 0.12);
    color: var(--blue);
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
}

td {
    font-size: 12px;
    padding: 17px 12px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.severity {
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.critical-tag {
    color: var(--red);
    background: rgba(255, 82, 104, 0.12);
}

.high-tag {
    color: var(--orange);
    background: rgba(255, 173, 66, 0.12);
}

.medium-tag {
    color: #e8d05b;
    background: rgba(232, 208, 91, 0.12);
}

.low-tag {
    color: var(--green);
    background: rgba(39, 214, 154, 0.12);
}

/* Footer */

footer {
    text-align: center;
    color: #607087;
    font-size: 10px;
    padding: 20px 0;
    letter-spacing: 1px;
}

/* Responsive design */

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
    }

    .brand {
        margin-bottom: 15px;
    }

    .menu-label,
    .sidebar-bottom {
        display: none;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar nav a {
        padding: 8px;
        font-size: 11px;
    }

    body {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 22px 15px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: 23px;
    }

    .notice {
        align-items: flex-start;
        flex-direction: column;
    }

    .metrics {
        gap: 10px;
    }

    .metric-card {
        padding: 15px;
    }

    .metric-card h2 {
        font-size: 25px;
    }
}
