/* Agents page — tabbed list, status badges, data table. Uses the shared design tokens (auth.css). */

.tabs {
    display: flex;
    gap: 2px;
    padding: 0 16px;
    border-bottom: 1px solid var(--surface-3);
}

.tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 12px 14px;
    font: inherit;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab:hover { color: var(--text); }

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-3);
    border-radius: 0;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

.tab.active .tab-count {
    color: #fff;
    background: var(--accent);
}

/* Status badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid var(--surface-3);
    color: var(--text-2);
}

.badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-2);
}

.badge.on { color: #1a7f4b; border-color: #b7e0c6; background: #eefaf2; }
.badge.on .dot { background: #1f9d57; }

.badge.off { color: #8a8a8a; }
.badge.off .dot { background: #c0c0c0; }

/* Data table */
.kr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.kr-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-2);
    padding: 8px 12px;
    border-bottom: 1px solid var(--surface-3);
}

.kr-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--surface-2);
    vertical-align: middle;
}

.kr-table tbody tr:last-child td { border-bottom: none; }
.kr-table tbody tr:hover { background: var(--surface-2); }

.kr-strong { font-weight: 600; color: var(--text); }
.kr-muted { color: var(--text-2); }
.kr-row-actions { text-align: right; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.kr-row-actions .btn-sm { margin-left: 6px; }

/* ── Add connection (dynamic form) ────────────────────────────────── */

.section-title { font-weight: 600; color: var(--text); margin: 18px 0 8px; }
.req { color: var(--accent); margin-left: 2px; }

/* .check (the bordered, accent-on-tick row used here and in the add-connection dialog) lives in ui.css. */

.banner.success {
    border: 1px solid #b7e0c6;
    background: #eefaf2;
    color: #1a7f4b;
    padding: 10px 12px;
    margin-bottom: 14px;
}

/* Clickable agent rows */
.kr-table tbody tr.row-link { cursor: pointer; }
.kr-table tbody tr.row-link td.kr-row-actions { font-size: 18px; color: var(--text-2); }

/* Agent detail — status definition list */
.detail-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    margin: 0;
}

.detail-list dt {
    padding: 12px 16px 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    border-bottom: 1px solid var(--surface-2);
}

.detail-list dd {
    margin: 0;
    padding: 12px 0;
    color: var(--text);
    border-bottom: 1px solid var(--surface-2);
    display: flex;
    align-items: center;
}

.detail-list dt:last-of-type,
.detail-list dd:last-of-type { border-bottom: none; }

/* Toolbar above a tab's content (label + action) */
.tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

/* Dynamic DBMS connection form — spacing comes from the shared .dbms-form rule (--field-gap) in auth.css */
.dbms-form { margin-top: 16px; }

/* Wider, scrollable modal for the add-connection form */
.modal.modal-lg { width: 560px; max-width: calc(100vw - 32px); }
.modal.modal-lg .modal-body { max-height: 65vh; overflow-y: auto; }

/* Danger button (delete) */
.btn-danger {
    background: #fff;
    border: 1px solid #e6b4ad;
    color: #b3392b;
}
.btn-danger:hover:not(:disabled) { background: #fbeae7; border-color: #d99287; }

/* Link-style button (e.g. the database count toggle) */
.linklike {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.linklike.danger { color: var(--danger, #c0392b); }

/* Inline row actions (Edit / Delete) */
.kr-actions { display: inline-flex; gap: 14px; white-space: nowrap; }
.kr-row-actions { text-align: right; white-space: nowrap; }

/* Backup-job tiers (full / differential / PITR / encryption) and the per-tier database picker */
.job-tier { border: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; gap: var(--field-gap); }
.job-tier.disabled { opacity: 0.6; }
.db-pick { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); padding: 10px; }
.check.disabled { opacity: 0.5; cursor: default; }

/* ── Backup-job wizard (ported from the Keeprift design) ──────────────────── */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--text-2); cursor: pointer; }
.crumb a:hover { color: var(--text); }
.crumb-sep { color: var(--muted-2); }

.wizard-shell { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.wizard-steps { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.wizard-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); text-align: left; background: none; border: none; cursor: pointer; }
.wizard-step:disabled { cursor: default; }
.wizard-step.active { color: var(--text); background: var(--surface-2); font-weight: 500; }
.wizard-step.done { color: var(--text-2); }
.wizard-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wizard-step.active .wizard-step-num { background: var(--text); color: var(--bg); border-color: var(--text); }
.wizard-step.done .wizard-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.wizard-step-label { display: flex; flex-direction: column; line-height: 1.25; }
.wizard-step-sub { font-size: 11.5px; font-weight: 400; color: var(--muted); }

.wizard-content { background: var(--surface); border: 1px solid var(--border); min-height: 500px; display: flex; flex-direction: column; }
.wizard-content-head { padding: 24px 32px 16px; border-bottom: 1px solid var(--border); }
.wizard-eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wizard-content-title { font-size: 18px; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; }
.wizard-content-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.wizard-content-body { padding: 32px; flex: 1; display: flex; flex-direction: column; gap: 24px; }
.wizard-content-foot { padding: 16px 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface-2); }

.option-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); cursor: pointer; background: var(--surface); text-align: left; width: 100%; font: inherit; color: var(--text); }
.option-card:hover { border-color: var(--border-strong); }
.option-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.option-card-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex-shrink: 0; }
.option-card.selected .option-card-radio { border-color: var(--accent); border-width: 5px; }
.option-card-body { flex: 1; min-width: 0; }
.option-card-title { font-size: 13.5px; font-weight: 500; }
.option-card-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

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

.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); }
.checkbox:hover { background: var(--surface-2); }
.checkbox.checked { border-color: var(--accent); background: var(--accent-soft); }
.checkbox.disabled { opacity: 0.5; cursor: default; }
.checkbox.disabled:hover { background: var(--surface); }
.checkbox-box { width: 16px; height: 16px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; font-size: 11px; color: transparent; line-height: 1; }
.checkbox.checked .checkbox-box { border-color: var(--accent); background: var(--accent); color: #fff; }

.cron-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Cron builder */
.cron-builder { display: flex; flex-direction: column; gap: var(--field-gap); border: 1px solid var(--border); padding: 16px; background: var(--surface); }
.cron-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cron-num { max-width: 80px; }
.cron-time { max-width: 140px; }
.cron-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cron-chips-dom { max-width: 360px; }
.cron-chip { min-width: 40px; padding: 6px 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-family: inherit; cursor: pointer; text-align: center; }
.cron-chip:hover { border-color: var(--border-strong); }
.cron-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.cron-output { border: 1px solid var(--border); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.cron-output-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.cron-output-code { font-size: 14px; color: var(--text); }
.cron-output-code.invalid { color: var(--danger); }

/* Schedule creator (cron builder + UTC clock, banner, next-run preview) */
.schedule-creator { display: flex; flex-direction: column; gap: var(--field-gap); }
.schedule-clock { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); background: var(--surface-2); }
.schedule-clock-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: schedule-pulse 2s ease-in-out infinite; }
.schedule-clock-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.schedule-clock-time { margin-left: auto; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes schedule-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.schedule-nextrun { border: 1px solid var(--border); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.schedule-nextrun-row { display: flex; align-items: baseline; gap: 10px; }
.schedule-nextrun-row-muted { opacity: 0.75; }
.schedule-nextrun-zone { min-width: 64px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.schedule-nextrun-time { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.schedule-nextrun-rel { font-size: 12px; margin-top: 2px; }

.info-row { display: grid; grid-template-columns: 140px 1fr; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; align-items: center; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); font-weight: 500; }
.info-value { color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

@media (max-width: 880px) {
    .wizard-shell { grid-template-columns: 1fr; gap: 16px; }
    .wizard-steps { position: static; flex-direction: row; overflow-x: auto; }
    .wizard-content-body { padding: 18px; gap: 18px; }
    .wizard-content-head { padding: 18px 18px 12px; }
    .wizard-content-foot { padding: 14px 18px; }
    .option-grid { grid-template-columns: 1fr; }
}

/* Generated-key row (encryption keys) */
.enc-key-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.enc-key-msg { font-size: 13px; }
.enc-key-msg.ok { color: #2e7d32; }
.enc-key-msg.fail { color: var(--danger, #c0392b); }

/* Destination connection-test results */
.test-results { margin-top: 18px; }
.test-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.test-item {
    display: grid;
    grid-template-columns: 18px minmax(120px, max-content) 1fr;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--surface-3);
    background: var(--surface-2);
}
.test-item .test-icon { font-weight: 700; }
.test-item .test-agent { font-weight: 600; }
.test-item .test-detail { color: var(--text-2); word-break: break-word; }
.test-item.ok .test-icon { color: #2e7d32; }
.test-item.fail { border-color: color-mix(in srgb, var(--danger, #c0392b) 40%, var(--surface-3)); }
.test-item.fail .test-icon { color: var(--danger, #c0392b); }

/* Expanded databases sub-row */
.kr-table tr.subrow td { background: var(--surface-2); padding: 12px 16px; }
.kr-table.inner { margin: 0; }
.kr-table.inner thead th { border-bottom: 1px solid var(--surface-3); }
.kr-table.inner tbody td { border-bottom: 1px solid var(--surface-2); }
.kr-table.inner tbody tr:last-child td { border-bottom: none; }

/* ── Agent onboarding ─────────────────────────────────────────────── */

.onboard-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 8px;
}

/* Two columns: the install guide + a sticky credentials/info rail. Collapses on narrow viewports. */
.onboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 24px;
    align-items: start;
}

.onboard-aside {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 980px) {
    /* Stack to one column and float the credentials rail above the guide — the token/API URL are needed while
       following the steps, so they shouldn't sit below all of them on a phone. */
    .onboard-grid { grid-template-columns: 1fr; }
    .onboard-aside { position: static; order: -1; }
}

/* OS segmented control — full-bleed across the top of the guide card. Auto-flow so it fits however many OSes there are. */
.os-seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    border-bottom: 1px solid var(--border-strong);
}

.os-seg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface-2);
    border: 0;
    border-right: 1px solid var(--border-strong);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.os-seg-btn:last-child { border-right: 0; }
.os-seg-btn:hover { color: var(--text); background: var(--surface-3); }

.os-seg-btn.active {
    background: var(--surface);
    color: var(--accent-text);
    font-weight: 600;
    box-shadow: inset 0 2px 0 var(--accent);
}

.os-seg-ico { font-size: 18px; line-height: 0; }

.onboard-guide {
    padding: 24px;
    animation: onb-fade 0.28s ease;
}

/* Download hero — the primary call to action for the selected OS. */
.dl-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 24px;
    flex-wrap: wrap;
    padding: 18px 20px;
    margin-bottom: 26px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.dl-hero-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 6px;
}

.dl-hero-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.dl-hero-note { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.dl-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-lg iconify-icon { font-size: 18px; line-height: 0; }

/* Numbered stepper. Starts at 2 — the download hero above it is step 1. */
.steps {
    list-style: none;
    counter-reset: step 1;
    margin: 0;
    padding: 0;
}

.step {
    counter-increment: step;
    position: relative;
    padding: 0 0 26px 42px;
    animation: onb-rise 0.4s ease both;
}

.step:nth-child(1) { animation-delay: 0.04s; }
.step:nth-child(2) { animation-delay: 0.10s; }
.step:nth-child(3) { animation-delay: 0.16s; }
.step:nth-child(4) { animation-delay: 0.22s; }
.step:last-child { padding-bottom: 0; }

.step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
}

/* Connecting line down the left rail, centred under the number squares. */
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 31px;
    bottom: 4px;
    width: 1px;
    background: var(--border-strong);
}

.step-title { font-weight: 600; color: var(--text); margin: 4px 0 9px; letter-spacing: -0.005em; }
.step-body { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.step-body .kr-muted { font-size: 13px; margin-top: 6px; }

/* Credentials rail — surfaces both things the agent needs (API URL + token). */
.cred-card { padding: 0; }

.cred-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.cred-head iconify-icon { font-size: 17px; line-height: 0; color: var(--accent); }

.cred { padding: 15px 16px; border-bottom: 1px solid var(--border); }
.cred:last-child { border-bottom: 0; }

.cred-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.cred-val {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
}

.cred-val code {
    flex: 1;
    min-width: 0;
    padding: 9px 11px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    overflow-x: auto;
    white-space: nowrap;
}

.cred-copy {
    flex-shrink: 0;
    border: 0;
    border-left: 1px solid var(--border-strong);
    background: var(--surface-3);
    color: var(--text-2);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 13px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.cred-copy:hover { background: var(--accent-soft); color: var(--accent-text); }
.cred-copy:disabled { opacity: 0.5; cursor: default; }

.cred-rotate {
    margin-top: 10px;
    width: 100%;
    appearance: none;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    padding: 8px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cred-rotate:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.cred-rotate:disabled { opacity: 0.5; cursor: default; }

.cred-hint { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* "How it works" info panel. */
.onboard-how {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.how-title { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 11px; }

.how-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.45;
}

.how-list li { position: relative; padding-left: 16px; }
.how-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; background: var(--accent); }
.how-list b { color: var(--text); font-weight: 600; }

@keyframes onb-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes onb-rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .onboard-guide, .step { animation: none !important; }
}

/* Phones: tighten the guide, stack the download hero, and make the CTA a full-width tap target. */
@media (max-width: 560px) {
    .onboard-guide { padding: 18px 14px; }

    .dl-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .dl-hero-actions { width: 100%; }
    .dl-hero-actions .btn { flex: 1; justify-content: center; }

    .os-seg-btn { padding: 12px 6px; font-size: 13.5px; gap: 7px; }
    .os-seg-ico { font-size: 17px; }

    .step { padding-left: 38px; }
    .cred-head, .cred { padding-left: 14px; padding-right: 14px; }
}

.code-block {
    position: relative;
    margin: 8px 0;
    background: #1d1b19;
    border: 1px solid var(--surface-3);
}

.code-block pre {
    margin: 0;
    padding: 12px 14px;
    padding-right: 58px; /* keep short commands clear of the floating copy button */
    overflow-x: auto;
    color: #e9e4dd;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
}

/* Floats top-right over the code. Subtle by default so it doesn't add visual weight; firms up on hover. */
.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    cursor: pointer;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.copy-btn:hover { background: #2a2723; border-color: #3a3631; color: #fff; }

/* Backup-job operation status */
.op-status { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.op-status-text { font-weight: 600; font-size: 15px; }
.op-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
/* Inline variant for status dots sat next to text in table cells (no flex parent to size them). */
.op-dot.inline { display: inline-block; margin-right: 6px; vertical-align: middle; }
.op-dot.running { background: var(--accent); animation: op-pulse 1.2s ease-in-out infinite; }
.op-dot.ok { background: var(--success); }
.op-dot.fail { background: var(--danger); }
@keyframes op-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.op-dot.queued { background: var(--warning); }
.op-dot.warn { background: var(--warning); }
.op-elapsed { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); margin: 4px 0 0; }
.op-elapsed-sub { font-size: 12.5px; margin-bottom: 8px; }

/* Operation log viewer */
.log-list { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; max-height: 420px; overflow-y: auto; border: 1px solid var(--border); background: var(--surface-2); padding: 10px 12px; }
.log-line { padding: 1px 0; white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.log-line .log-ts { color: var(--text-3, var(--text-2)); opacity: 0.65; margin-right: 10px; font-variant-numeric: tabular-nums; }
.log-line.warn .log-msg { color: var(--warning); }
.log-line.err .log-msg { color: var(--danger); }
.log-line.dim .log-msg { opacity: 0.65; }

/* Operations filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.filter-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }

/* Operation artifacts panel */
.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.artifact { border: 1px solid var(--border); background: var(--surface-2); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.artifact-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.artifact-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); border: 1px solid var(--accent); padding: 1px 6px; flex: none; }
.artifact-meta { font-size: 12px; color: var(--text-2); }
.artifact-size { font-family: var(--font-mono); font-size: 12.5px; }
.payload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 8px; }
.payload { border: 1px solid var(--border); background: var(--surface); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.payload-name { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payload-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); }
.payload-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.payload-key { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payload-empty { font-size: 12px; color: var(--text-2); margin-top: 8px; font-style: italic; }

/* ── Backup-job wizard: large "paper" select panels + numbered sections ───────── */
.wizard-section { display: flex; flex-direction: column; gap: 12px; animation: paperRise 0.25s ease both; }
.wizard-section + .wizard-section { padding-top: 22px; border-top: 1px dashed var(--border); }
.section-step-title { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 9px; letter-spacing: -0.005em; }
.section-step-title .n { width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.section-step-title.muted .n { background: var(--surface-3); color: var(--muted); }

.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.paper-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer;
  text-align: left; font: inherit; color: var(--text); min-height: 104px;
  box-shadow: 0 1px 2px rgba(26, 24, 20, 0.04);
  transition: border-color 0.12s, box-shadow 0.14s, transform 0.12s, background 0.12s;
}
.paper-card:hover { border-color: var(--accent); box-shadow: 0 5px 16px rgba(26, 24, 20, 0.10); transform: translateY(-2px); }
.paper-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent), 0 5px 16px rgba(212, 104, 58, 0.14); }
.paper-card.disabled { opacity: 0.5; cursor: not-allowed; }
.paper-card.disabled:hover { border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(26, 24, 20, 0.04); transform: none; }
.paper-icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; }
.paper-card.selected .paper-icon { background: #fff; border-color: var(--accent); color: var(--accent-text); }
.paper-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.paper-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.paper-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; line-height: 1; opacity: 0; transform: scale(0.6); transition: opacity 0.12s, transform 0.12s; }
.paper-card.selected .paper-check { opacity: 1; transform: scale(1); }

@keyframes paperRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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