:root {
    --status-pending: #6c757d;
    --status-in-progress: #fd7e14;
    --status-done: #198754;
    --status-not-found: #adb5bd;
    --status-error: #dc3545;
    --status-blocked: #6610f2;
    --status-queued: #0d6efd;
    --status-running: #fd7e14;
    --status-succeeded: #198754;
    --status-failed: #dc3545;
    --status-killed: #6c757d;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    background: #6c757d;
    white-space: nowrap;
}

.badge-pending     { background: var(--status-pending); }
.badge-in_progress { background: var(--status-in-progress); }
.badge-done        { background: var(--status-done); }
.badge-not_found   { background: var(--status-not-found); color: #000; }
.badge-error       { background: var(--status-error); }
.badge-blocked     { background: var(--status-blocked); }
.badge-queued      { background: var(--status-queued); }
.badge-running     { background: var(--status-running); }
.badge-succeeded   { background: var(--status-succeeded); }
.badge-failed      { background: var(--status-failed); }
.badge-killed      { background: var(--status-killed); color: #000; }

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

.stat-card {
    padding: 1rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 0.5rem;
    background: var(--pico-card-background-color);
}

.stat-card h3 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.1;
}

.stat-card small {
    color: var(--pico-muted-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.72rem;
}

.log-tail {
    background: #0f1420;
    color: #d7e3ff;
    font-family: "Menlo", "Consolas", monospace;
    font-size: 0.8rem;
    padding: 1rem;
    border-radius: 0.5rem;
    max-height: 60vh;
    overflow: auto;
    white-space: pre;
}

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

.kv-table td:first-child {
    width: 28%;
    color: var(--pico-muted-color);
    font-weight: 500;
}

.categories-row .chip {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: var(--pico-muted-background-color, #eef);
    border-radius: 0.75rem;
    margin-right: 0.3rem;
    font-size: 0.85rem;
}

table.tight td, table.tight th {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: end;
    margin-bottom: 1rem;
}

.filter-bar label { display: block; font-size: 0.75rem; color: var(--pico-muted-color); }
.filter-bar select, .filter-bar input { min-width: 8rem; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.ic-cell { font-family: "Menlo", "Consolas", monospace; }

details.diff > summary { cursor: pointer; }
