:root {
    --background: #0b0e12;
    --sidebar: #0f1318;
    --surface: #12171d;
    --surface-soft: #161c23;
    --border: rgba(255, 255, 255, 0.08);

    --text: #f4f6f8;
    --text-soft: #9aa4ae;
    --text-muted: #68727d;

    --accent: #d6ff48;
    --accent-soft: rgba(214, 255, 72, 0.08);

    --danger: #ff6b6b;
    --warning: #ffbf69;
    --success: #79e2a0;

    --radius-large: 20px;
    --radius-medium: 14px;
    --radius-small: 10px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(
            circle at 75% -10%,
            rgba(214, 255, 72, 0.05),
            transparent 35%
        ),
        var(--background);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        245px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;

    height: 100vh;

    padding: 28px 20px;

    background:
        rgba(15, 19, 24, 0.92);

    border-right:
        1px solid var(--border);

    display: flex;
    flex-direction: column;

    backdrop-filter: blur(20px);
}

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 44px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: grid;
    place-items: center;

    background: var(--accent);
    color: #10130d;

    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand strong {
    display: block;

    font-size: 15px;
    letter-spacing: -0.02em;
}

.brand span {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);
    font-size: 11px;

    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.navigation {
    display: grid;

    gap: 5px;
}

.nav-item {
    padding: 12px 14px;

    border-radius: var(--radius-small);

    color: var(--text-soft);

    text-decoration: none;

    transition:
        background 160ms ease,
        color 160ms ease;
}

.nav-item:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.nav-item--active {
    background: var(--accent-soft);
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;

    padding-top: 24px;

    border-top:
        1px solid var(--border);

    display: grid;

    gap: 4px;

    color: var(--text-soft);
}

.sidebar-footer small {
    color: var(--text-muted);
}

.content {
    min-width: 0;

    padding: 40px;

    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 24px;

    margin-bottom: 34px;
}

.eyebrow {
    color: var(--accent);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.18em;
}

.topbar h1 {
    margin:
        8px 0 6px;

    font-size:
        clamp(30px, 4vw, 46px);

    line-height: 1;

    letter-spacing: -0.05em;
}

.topbar p {
    margin: 0;

    color: var(--text-soft);
}

.topbar-actions {
    display: flex;
    align-items: center;

    gap: 12px;
}

.status {
    padding: 8px 12px;

    border:
        1px solid var(--border);

    border-radius: 999px;

    color: var(--text-muted);

    font-size: 12px;
}

.status--online {
    color: var(--success);
}

.status--offline {
    color: var(--danger);
}

#refreshButton {
    padding: 10px 15px;

    border: 0;

    border-radius: 999px;

    background: var(--accent);
    color: #10130d;

    font-weight: 700;
}

.metrics {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 18px;
}

.metric-card {
    min-height: 142px;

    padding: 20px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-large);

    background:
        rgba(18, 23, 29, 0.78);

    display: flex;
    flex-direction: column;
}

.metric-card--highlight {
    background:
        linear-gradient(
            145deg,
            rgba(214, 255, 72, 0.12),
            rgba(18, 23, 29, 0.8)
        );

    border-color:
        rgba(214, 255, 72, 0.20);
}

.metric-card span {
    color: var(--text-soft);

    font-size: 13px;
}

.metric-card strong {
    margin-top: auto;

    font-size: 36px;
    line-height: 1;

    letter-spacing: -0.05em;
}

.metric-card small {
    margin-top: 8px;

    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 320px;

    gap: 18px;
}

.panel {
    border:
        1px solid var(--border);

    border-radius:
        var(--radius-large);

    background:
        rgba(18, 23, 29, 0.78);

    overflow: hidden;
}

.panel-header {
    padding: 22px 22px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    border-bottom:
        1px solid var(--border);
}

.panel-header h2 {
    margin: 6px 0 0;

    font-size: 18px;

    letter-spacing: -0.025em;
}

.panel-counter {
    min-width: 36px;
    height: 36px;

    padding: 0 10px;

    border-radius: 999px;

    display: grid;
    place-items: center;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 12px;
}

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

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 16px 20px;

    text-align: left;

    border-bottom:
        1px solid var(--border);

    white-space: nowrap;
}

th {
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.1em;
}

td {
    color: var(--text-soft);

    font-size: 13px;
}

td:first-child {
    color: var(--text);
    font-weight: 600;
}

.score {
    color: var(--accent);

    font-weight: 800;
}

.priority {
    display: inline-flex;

    padding: 6px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
}

.priority--alta {
    color: var(--danger);

    background:
        rgba(255, 107, 107, 0.10);
}

.priority--media {
    color: var(--warning);

    background:
        rgba(255, 191, 105, 0.10);
}

.priority--baixa {
    color: var(--text-soft);

    background: var(--surface-soft);
}

.loading,
.empty {
    height: 120px;

    text-align: center;

    color: var(--text-muted);
}

.summary-list {
    padding: 8px 22px;
}

.summary-row {
    min-height: 58px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    border-bottom:
        1px solid var(--border);
}

.summary-row span {
    color: var(--text-soft);

    font-size: 13px;
}

.summary-row strong {
    font-size: 16px;
}

.information-box {
    margin: 20px;

    padding: 18px;

    border-radius:
        var(--radius-medium);

    background: var(--accent-soft);

    border:
        1px solid
        rgba(214, 255, 72, 0.12);
}

.information-box strong {
    color: var(--accent);
}

.information-box p {
    margin: 8px 0 0;

    color: var(--text-soft);

    font-size: 12px;
    line-height: 1.6;
}

.footer {
    padding: 24px 0 4px;

    color: var(--text-muted);

    font-size: 12px;
}

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

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

@media (
    max-width: 820px
) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;

        width: 100%;
        height: auto;

        padding: 18px;

        border-right: 0;

        border-bottom:
            1px solid var(--border);
    }

    .brand {
        margin-bottom: 18px;
    }

    .navigation {
        display: flex;

        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
    }

    .sidebar-footer {
        display: none;
    }

    .content {
        padding: 24px 18px;
    }

    .topbar {
        display: grid;
    }

    .topbar-actions {
        justify-content: space-between;
    }
}

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

    .metric-card {
        min-height: 120px;

        padding: 16px;
    }

    .metric-card strong {
        font-size: 30px;
    }

    th,
    td {
        padding:
            14px 16px;
    }
}
