:root {
    color-scheme: dark;
    --bg: #071014;
    --panel: #0c171d;
    --panel-2: #101f26;
    --line: #1f3740;
    --text: #e7f1f4;
    --muted: #89a3aa;
    --cyan: #38c7d5;
    --green: #34d399;
    --red: #fb7185;
    --amber: #fbbf24;
}

* {
    box-sizing: border-box;
}

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

button,
input,
a {
    font: inherit;
}

button,
a {
    border: 1px solid var(--line);
    background: #10242b;
    color: var(--text);
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
a:hover {
    border-color: var(--cyan);
}

input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #081318;
    color: var(--text);
    padding: 8px 10px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(420px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 28px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(56, 199, 213, 0.5);
    border-radius: 8px;
    color: var(--cyan);
    font-weight: 800;
    margin-bottom: 18px;
}

.login-panel h1,
.topbar h1,
.section-head h2 {
    margin: 0;
    letter-spacing: 0;
}

.login-panel p {
    margin: 8px 0 22px;
    color: var(--muted);
    line-height: 1.5;
}

.stack {
    display: grid;
    gap: 14px;
}

.app-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 22px;
}

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

.topbar nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--cyan);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 14px;
}

.alert.error {
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: var(--red);
    background: rgba(251, 113, 133, 0.08);
}

.alert.success {
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: var(--green);
    background: rgba(52, 211, 153, 0.08);
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.status-strip article,
.control-panel,
.feed-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.status-strip article {
    min-height: 86px;
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.status-strip span,
.info-list span {
    color: var(--muted);
    font-size: 12px;
}

.status-strip strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 20px;
}

.layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 14px;
}

.control-panel {
    padding: 16px;
    align-self: start;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.info-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.feed-panel {
    min-width: 0;
    overflow: hidden;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.table-wrap {
    overflow: auto;
    max-height: calc(100vh - 250px);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
}

th,
td {
    border-bottom: 1px solid rgba(31, 55, 64, 0.8);
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--panel-2);
    color: var(--muted);
    font-size: 12px;
}

tbody tr.signal-row {
    background: rgba(56, 199, 213, 0.06);
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--muted);
}

.long {
    color: var(--green);
}

.short {
    color: var(--red);
}

.wait {
    color: var(--amber);
}

.muted {
    color: var(--muted);
}

@media (max-width: 980px) {
    .topbar,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-strip,
    .layout {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        max-height: none;
    }
}

