:root {
    color-scheme: dark;
    --bg: #05060a;
    --panel: #111323;
    --panel-alt: #1a1d34;
    --accent: #ff9f1c;
    --accent-soft: #f7b267;
    --muted: #8f96b2;
    --text: #f5f6ff;
    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

@font-face {
    font-family: "Space Grotesk";
    src: local("Space Grotesk"), local("SpaceGrotesk-Bold");
    font-weight: 600;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background: radial-gradient(circle at top, #151936, #06070d);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    padding: 2rem clamp(1.5rem, 5vw, 4rem);
}

.site-header {
    padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header h1 {
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

.site-header nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.site-header nav a,
.site-header nav button {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.site-header nav .ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stats-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(140deg, rgba(255, 159, 28, 0.18), rgba(93, 253, 203, 0.08));
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 35px rgba(5, 6, 10, 0.25);
}

.stat-card .label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.35rem;
}

.stat-card .value {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin: 0;
}

.stat-card .detail {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

article,
section > .card,
.card {
    background: var(--panel);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(5, 6, 10, 0.35);
}

.stat-block .number {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-family: var(--font-display);
    margin: 0;
}

.pill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pill-list li {
    display: flex;
    justify-content: space-between;
    margin-block: 0.35rem;
    background: var(--panel-alt);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.95rem;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meta-list li {
    margin-bottom: 0.35rem;
}

.health-list,
.net-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.health-list li,
.net-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-alt);
    border-radius: 0.8rem;
    padding: 0.6rem 0.9rem;
}

.status.healthy {
    color: #5dfdcb;
}

.status.degraded {
    color: #f5cd79;
}

.status.down {
    color: #ff6b6b;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border-radius: 1rem;
    overflow: hidden;
}

table th,
table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 159, 28, 0.2);
    color: var(--accent);
    font-size: 0.85rem;
}

.chip.alt {
    background: rgba(93, 253, 203, 0.15);
    color: #5dfdcb;
}

.chip.warning {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.profile-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-grid article pre {
    max-height: 220px;
    overflow: auto;
    background: var(--panel-alt);
    padding: 0.75rem;
    border-radius: 0.75rem;
}

.net-control-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.net-control-form input,
.net-control-form textarea,
.net-control-form button {
    border-radius: 0.6rem;
    border: none;
    padding: 0.65rem 0.9rem;
}

.net-control-form input,
.net-control-form textarea {
    background: var(--panel-alt);
    color: var(--text);
}

.net-control-form button {
    background: linear-gradient(120deg, var(--accent), var(--accent-soft));
    color: #1b1c1f;
    font-weight: 700;
    cursor: pointer;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field span {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-field small {
    max-width: 720px;
}

.form-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.form-card form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field small {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.75rem;
    color: var(--muted);
}

.form-card input,
.form-card button {
    padding: 0.65rem 0.9rem;
    border-radius: 0.6rem;
    border: none;
}

.form-card input {
    background: var(--panel-alt);
    color: var(--text);
}

.form-card button {
    background: linear-gradient(120deg, var(--accent), var(--accent-soft));
    color: #1b1c1f;
    font-weight: 700;
    cursor: pointer;
}

.form-hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.3rem 0 0.8rem;
}

.error {
    color: #ff6b6b;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.tagline {
    margin-top: 0.25rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .site-header nav {
        width: 100%;
    }
}
