/* Platform-admin uses a deliberately distinct visual identity from
   the tenant-themable customer/vet apps: a dark primary + amber
   accent, so operators have an unambiguous visual cue that they are
   in admin territory. Spec §17 isolates the admin app on a separate
   origin; the styling reinforces that. Everything structural (cards,
   forms, buttons, surface tokens) comes from crates/ui/style/web.css —
   only the palette override and admin-only components live here. */

:root {
    --primary:  #1f2937;
    --accent:   #f59e0b;
    --bg-soft:  #f3f4f6;
    --border:   #d1d5db;
    /* Focus ring follows the amber accent, not the dark primary. */
    --focus:    var(--accent);
}

.code-token { word-break: break-all; }

/* Standalone search box (not in a <form>) — mirrors the shared
   form-input look from web.css. */
.admin-search {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg);
    color: inherit;
    font: inherit;
    margin-bottom: 1rem;
    -webkit-appearance: none;
            appearance: none;
}
.admin-search:focus {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--focus);
}

.banner-admin {
    background: var(--accent);
    color: #1f2937;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* Horizontal-scroll wrapper so wide tables stay within their card on
   narrow viewports instead of overflowing the widget boundary. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll .job-table {
    min-width: 40rem;
}

/* ===== Jobs table ===== */
.job-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.job-table th,
.job-table td {
    text-align: left;
    padding: 0.4rem 0.5rem;
}
.job-table tbody tr {
    border-top: 1px solid var(--border);
}

.job-status {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.job-status-succeeded { background: #d1fae5; color: #065f46; }
.job-status-failed    { background: #fee2e2; color: #b91c1c; }
.job-status-running   { background: #dbeafe; color: #1e40af; }
.job-status-queued    { background: #f3f4f6; color: #6b7280; }

/* ===== Job-detail page ===== */
.job-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.kv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.kv-table th,
.kv-table td {
    padding: 0.3rem 0.5rem;
    text-align: left;
}
.kv-table th {
    width: 12rem;
    color: var(--muted);
    font-weight: 500;
}
.job-detail-payload {
    white-space: pre-wrap;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
    margin: 0;
}
