:root {
    --bg: #07111f;
    --panel: rgba(15, 23, 42, 0.9);
    --panel-soft: rgba(15, 23, 42, 0.65);
    --line: rgba(148, 163, 184, 0.2);
    --text: #e5eefb;
    --muted: #9fb0ca;
    --accent: #5eead4;
    --accent-strong: #14b8a6;
    --danger: #fb7185;
    --warning: #fbbf24;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 24%),
        linear-gradient(180deg, #020617 0%, #07111f 45%, #0b1526 100%);
    color: var(--text);
    min-height: 100vh;
}

code {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.shell {
    width: min(1400px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 4.6rem);
    line-height: 0.94;
    margin: 0 0 1rem;
    max-width: 9ch;
}

.lede {
    margin: 0;
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-card,
.toolbar,
.status-banner,
.feed-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    border-radius: 28px;
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.hero-stat {
    padding: 1rem;
    border-radius: 20px;
    background: var(--panel-soft);
    border: 1px solid rgba(94, 234, 212, 0.12);
}

.hero-stat span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.hero-stat label {
    color: var(--muted);
    font-size: 0.95rem;
}

.toolbar {
    border-radius: 24px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbar h2,
.toolbar p {
    margin: 0;
}

.toolbar p {
    color: var(--muted);
    margin-top: 0.35rem;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

input,
button {
    font: inherit;
}

input {
    min-width: min(320px, 60vw);
    padding: 0.85rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.6);
    color: var(--text);
    outline: none;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
    color: #03131d;
    font-weight: 700;
    cursor: pointer;
}

.status-banner {
    border-radius: 18px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

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

.feed-card {
    border-radius: 26px;
    overflow: hidden;
}

.feed-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.feed-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pill {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #021414;
    background: var(--accent);
}

.pill.offline {
    background: var(--danger);
    color: white;
}

.feed-body {
    padding: 1rem 1rem 1.1rem;
}

.feed-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.feed-heading h3 {
    margin: 0;
    font-size: 1.15rem;
}

.meta {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.unit-id {
    white-space: nowrap;
}

.feed-footer {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.empty-state {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.45);
}

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

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

    .toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    input {
        min-width: 0;
        width: 100%;
    }
}
