:root {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Layout ─────────────────────────────── */

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

.header h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header h1 span { color: var(--accent); }

.header .status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
}

.header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

/* ── Cards ──────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.card h2 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.card.full { grid-column: 1 / -1; }

/* ── Stats ──────────────────────────────── */

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child { border-bottom: none; }

.stat-label { color: var(--text-dim); font-size: 14px; }

.stat-value { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

.bar-bg {
    width: 120px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-left: 12px;
}

.bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.5s ease;
}

.bar-fill.warn { background: var(--yellow); }
.bar-fill.crit { background: var(--red); }

.stat-right {
    display: flex;
    align-items: center;
}

/* ── Lists ──────────────────────────────── */

.list-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.list-item:last-child { border-bottom: none; }

.list-item .title { font-size: 14px; }
.list-item .meta { font-size: 12px; color: var(--text-dim); }

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge.pending { background: #30363d; color: var(--text-dim); }
.badge.active { background: #0d419d; color: var(--accent); }
.badge.completed { background: #0f5323; color: var(--green); }
.badge.info { background: #0d419d; color: var(--accent); }
.badge.warn { background: #4b2900; color: var(--yellow); }
.badge.error { background: #5c1a1a; color: var(--red); }

.empty {
    color: var(--text-dim);
    font-size: 14px;
    font-style: italic;
    padding: 8px 0;
}

/* ── Forms ──────────────────────────────── */

.inline-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.inline-form input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.inline-form input:focus { border-color: var(--accent); }

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover { opacity: 0.9; }

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-sm:hover { border-color: var(--red); color: var(--red); }
