:root {
    --bg: #060b10;
    --panel: rgba(14, 22, 32, 0.92);
    --panel-2: rgba(21, 34, 48, 0.78);
    --text: #eef7ff;
    --muted: #9eb2c4;
    --line: rgba(155, 190, 220, 0.18);
    --accent: #45e3ff;
    --accent-2: #a8ff60;
    --warning: #ffcf5a;
    --danger: #ff6b6b;
    --shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(69, 227, 255, 0.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(168, 255, 96, 0.12), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    width: min(1500px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero-panel,
.panel,
.summary-card {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, var(--panel), rgba(9, 16, 24, 0.9));
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 30px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

h1, h2, p { margin-top: 0; }

h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 0.95;
}

h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.subtitle {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

button {
    border: 0;
    color: #00131a;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 900;
    cursor: pointer;
}

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

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.summary-card {
    padding: 18px;
}

.summary-card .label {
    color: var(--muted);
    display: block;
    margin-bottom: 10px;
}

.summary-card strong {
    font-size: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.panel {
    padding: 22px;
    min-width: 0;
}

.panel.wide {
    grid-column: 1 / -1;
}

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

.metric-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
}

.metric-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.metric-title {
    font-weight: 900;
}

.metric-subtitle {
    color: var(--muted);
    font-size: 0.86rem;
}

.status-pill {
    height: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 800;
}

.metric-number {
    font-size: 2.4rem;
    font-weight: 950;
    line-height: 1;
    margin-bottom: 8px;
}

.progress-track {
    overflow: hidden;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: inherit;
    transition: width 0.35s ease;
}

.metric-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9rem;
}

.raw-json {
    max-height: 390px;
    overflow: auto;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.24);
    color: #d9f9ff;
    font-size: 0.85rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.empty-state {
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 20px;
}

code {
    color: var(--accent-2);
}

@media (max-width: 900px) {
    .hero-panel,
    .hero-actions {
        align-items: stretch;
    }

    .hero-panel {
        flex-direction: column;
    }

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