:root {
    --bg: #0b0f14;
    --panel: #111821;
    --panel2: #151e29;
    --border: #263241;
    --text: #e7edf5;
    --muted: #8b98a8;
    --accent: #35d0ba;
    --blue: #4da3ff;
    --danger: #ff5c6c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: #0d131b;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
}

.subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
}

.status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--muted);
}

.dot.ok {
    background: var(--accent);
}

.dot.error {
    background: var(--danger);
}

.container {
    width: min(1500px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 50px;
}

.hero {
    margin-bottom: 28px;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.card,
.panel {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 8px;
}

.card {
    padding: 22px;
}

.card-label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1.5px;
}

.card-value {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 700;
}

.panel {
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    min-height: 64px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    margin: 0;
    font-size: 17px;
}

.panel-header span {
    color: var(--muted);
    font-size: 12px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    padding: 13px 16px;
    color: var(--muted);
    background: var(--panel2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 13px 16px;
    border-bottom: 1px solid #1d2733;
    white-space: nowrap;
}

tbody tr:hover {
    background: #17212c;
}

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

.state-established {
    color: var(--accent);
    font-weight: 700;
}

.state-active,
.state-idle {
    color: #ffb454;
    font-weight: 700;
}

.route-controls {
    display: flex;
    gap: 8px;
}

input {
    width: 220px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #0b1118;
    color: var(--text);
    outline: none;
}

input:focus {
    border-color: var(--blue);
}

button {
    padding: 9px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #18222d;
    color: var(--text);
    cursor: pointer;
}

button:hover {
    background: #202d3b;
}

footer {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        width: calc(100% - 28px);
    }

    .topbar {
        padding: 0 16px;
    }
}

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

    .hero h1 {
        font-size: 24px;
    }

    .route-controls {
        flex-direction: column;
    }

    input {
        width: 100%;
    }
}
