/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
    --ops-sidebar-bg:          #0f1117;
    --ops-sidebar-border:      #1e2330;
    --ops-sidebar-text:        #8b95a9;
    --ops-sidebar-text-active: #ffffff;
    --ops-sidebar-accent:      #4f6ef7;
    --ops-sidebar-hover:       #1a2035;
    --ops-sidebar-width:       240px;
    --ops-header-height:       60px;

    --ops-bg:                  #f4f5f7;
    --ops-card-bg:             #ffffff;
    --ops-card-border:         1px solid #e4e7ec;
    --ops-card-radius:         8px;
    --ops-card-shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);

    --ops-text-primary:        #111827;
    --ops-text-secondary:      #6b7280;
    --ops-text-muted:          #9ca3af;
    --ops-link:                #4f6ef7;

    --ops-font:                'Inter', system-ui, -apple-system, sans-serif;
    --ops-font-mono:           'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    /* Status colours */
    --ops-success-bg:          #d1fae5;
    --ops-success-text:        #065f46;
    --ops-success-border:      #a7f3d0;
    --ops-failed-bg:           #fee2e2;
    --ops-failed-text:         #991b1b;
    --ops-failed-border:       #fca5a5;
    --ops-unknown-bg:          #fef3c7;
    --ops-unknown-text:        #92400e;
    --ops-unknown-border:      #fcd34d;
    --ops-processing-bg:       #dbeafe;
    --ops-processing-text:     #1e40af;
    --ops-processing-border:   #93c5fd;
    --ops-reversed-bg:         #f3f4f6;
    --ops-reversed-text:       #374151;
    --ops-reversed-border:     #d1d5db;

    /* Form */
    --ops-input-border:        #d1d5db;
    --ops-input-focus:         #4f6ef7;
    --ops-input-radius:        6px;

    /* Danger zone */
    --ops-danger:              #dc2626;
    --ops-danger-hover:        #b91c1c;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--ops-font);
    font-size: 14px;
    color: var(--ops-text-primary);
    background: var(--ops-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ops-link);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.ops-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.ops-sidebar {
    width: var(--ops-sidebar-width);
    flex-shrink: 0;
    background: var(--ops-sidebar-bg);
    border-right: 1px solid var(--ops-sidebar-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ops-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ops-topbar {
    height: var(--ops-header-height);
    flex-shrink: 0;
    background: var(--ops-card-bg);
    border-bottom: var(--ops-card-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}

.ops-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.ops-sidebar-brand {
    padding: 20px 16px;
    border-bottom: 1px solid var(--ops-sidebar-border);
}

.ops-sidebar-brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: .01em;
}

.ops-sidebar-brand-sub {
    font-size: 11px;
    color: var(--ops-sidebar-text);
    margin-top: 2px;
}

.ops-sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    list-style: none;
    margin: 0;
}

.ops-sidebar-nav li { margin-bottom: 2px; }

.ops-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ops-sidebar-text);
    transition: background .15s, color .15s;
}
.ops-sidebar-nav a:hover {
    background: var(--ops-sidebar-hover);
    color: var(--ops-sidebar-text-active);
    text-decoration: none;
}
.ops-sidebar-nav a.active {
    background: var(--ops-sidebar-hover);
    color: var(--ops-sidebar-text-active);
}
.ops-sidebar-nav a .bi { font-size: 15px; flex-shrink: 0; }

.ops-sidebar-section {
    padding: 16px 20px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ops-sidebar-text);
    opacity: .6;
}

.ops-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--ops-sidebar-border);
    font-size: 12px;
    color: var(--ops-sidebar-text);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.ops-topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ops-text-primary);
    flex: 1;
}

.ops-topbar-user {
    font-size: 13px;
    color: var(--ops-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.ops-card {
    background: var(--ops-card-bg);
    border: var(--ops-card-border);
    border-radius: var(--ops-card-radius);
    box-shadow: var(--ops-card-shadow);
}

.ops-card-header {
    padding: 16px 20px;
    border-bottom: var(--ops-card-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ops-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ops-text-primary);
    margin: 0;
}

.ops-card-body {
    padding: 20px;
}

/* ── Stat cards (dashboard) ──────────────────────────────────────────────── */
.ops-stat {
    background: var(--ops-card-bg);
    border: var(--ops-card-border);
    border-radius: var(--ops-card-radius);
    box-shadow: var(--ops-card-shadow);
    padding: 20px;
}

.ops-stat-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ops-text-secondary);
    margin-bottom: 8px;
}

.ops-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ops-text-primary);
    font-variant-numeric: tabular-nums;
}

.ops-stat-value.danger { color: var(--ops-danger); }

/* ── Status badges ───────────────────────────────────────────────────────── */
.ops-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ops-badge-success {
    background: var(--ops-success-bg);
    color: var(--ops-success-text);
    border: 1px solid var(--ops-success-border);
}

.ops-badge-failed {
    background: var(--ops-failed-bg);
    color: var(--ops-failed-text);
    border: 1px solid var(--ops-failed-border);
}

/* UNKNOWN must never look like a failure (U2) */
.ops-badge-unknown {
    background: var(--ops-unknown-bg);
    color: var(--ops-unknown-text);
    border: 1px solid var(--ops-unknown-border);
}

.ops-badge-processing {
    background: var(--ops-processing-bg);
    color: var(--ops-processing-text);
    border: 1px solid var(--ops-processing-border);
}

.ops-badge-reversed {
    background: var(--ops-reversed-bg);
    color: var(--ops-reversed-text);
    border: 1px solid var(--ops-reversed-border);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.ops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ops-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: var(--ops-card-border);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ops-text-secondary);
    white-space: nowrap;
}

.ops-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--ops-text-primary);
    vertical-align: middle;
}

.ops-table tbody tr:hover td { background: #fafbfc; }
.ops-table tbody tr:last-child td { border-bottom: none; }

.ops-table td.mono {
    font-family: var(--ops-font-mono);
    font-size: 12px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ops-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    border: 1px solid transparent;
    text-decoration: none;
}

.ops-btn-primary {
    background: var(--ops-sidebar-accent);
    color: #ffffff;
    border-color: var(--ops-sidebar-accent);
}
.ops-btn-primary:hover {
    background: #3d5ce8;
    color: #ffffff;
    text-decoration: none;
}

.ops-btn-secondary {
    background: #ffffff;
    color: var(--ops-text-primary);
    border-color: var(--ops-input-border);
}
.ops-btn-secondary:hover {
    background: #f9fafb;
    color: var(--ops-text-primary);
    text-decoration: none;
}

.ops-btn-danger {
    background: var(--ops-danger);
    color: #ffffff;
    border-color: var(--ops-danger);
}
.ops-btn-danger:hover { background: var(--ops-danger-hover); color: #ffffff; text-decoration: none; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.ops-form-group { margin-bottom: 16px; }

.ops-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ops-text-primary);
    margin-bottom: 6px;
}

.ops-label-required::after { content: " *"; color: var(--ops-danger); }

.ops-input, .ops-select, .ops-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ops-input-border);
    border-radius: var(--ops-input-radius);
    font-size: 13px;
    font-family: var(--ops-font);
    color: var(--ops-text-primary);
    background: #ffffff;
    transition: border-color .15s, box-shadow .15s;
}

.ops-input:focus, .ops-select:focus, .ops-textarea:focus {
    outline: none;
    border-color: var(--ops-input-focus);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, .1);
}

.ops-textarea { resize: vertical; min-height: 80px; }

.ops-field-error {
    font-size: 12px;
    color: var(--ops-danger);
    margin-top: 4px;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.ops-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ops-alert-warning {
    background: var(--ops-unknown-bg);
    color: var(--ops-unknown-text);
    border: 1px solid var(--ops-unknown-border);
}

.ops-alert-danger {
    background: var(--ops-failed-bg);
    color: var(--ops-failed-text);
    border: 1px solid var(--ops-failed-border);
}

.ops-alert-success {
    background: var(--ops-success-bg);
    color: var(--ops-success-text);
    border: 1px solid var(--ops-success-border);
}

/* ── UNKNOWN detail panel ────────────────────────────────────────────────── */
/* U2: UNKNOWN must not look like a failure */
.ops-unknown-panel {
    background: var(--ops-unknown-bg);
    border: 1px solid var(--ops-unknown-border);
    border-radius: 8px;
    padding: 16px 20px;
}

.ops-unknown-panel-title {
    font-weight: 600;
    color: var(--ops-unknown-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Wizard steps ────────────────────────────────────────────────────────── */
.ops-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
}

.ops-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.ops-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid #d1d5db;
    color: var(--ops-text-muted);
    background: #ffffff;
    flex-shrink: 0;
}

.ops-step.active .ops-step-number {
    border-color: var(--ops-sidebar-accent);
    background: var(--ops-sidebar-accent);
    color: #ffffff;
}

.ops-step.done .ops-step-number {
    border-color: var(--ops-success-text);
    background: var(--ops-success-bg);
    color: var(--ops-success-text);
}

.ops-step-label { color: var(--ops-text-secondary); }
.ops-step.active .ops-step-label { color: var(--ops-text-primary); font-weight: 600; }

.ops-step-connector {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 12px;
}

/* ── Authentication page ─────────────────────────────────────────────────── */
.ops-auth-body {
    background: #0f1117;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ops-auth-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 48px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.ops-auth-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--ops-text-primary);
    margin-bottom: 8px;
}

.ops-auth-tagline {
    font-size: 13px;
    color: var(--ops-text-secondary);
    margin-bottom: 28px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.ops-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ops-text-muted);
}
.ops-empty .bi { font-size: 40px; display: block; margin-bottom: 12px; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.ops-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.ops-mono  { font-family: var(--ops-font-mono); font-size: 12px; }
.ops-muted { color: var(--ops-text-muted); }
.ops-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ops-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; font-size: 13px; }
.ops-dl dt { color: var(--ops-text-secondary); font-weight: 500; }
.ops-dl dd { margin: 0; color: var(--ops-text-primary); word-break: break-all; }

.ops-divider { border: none; border-top: var(--ops-card-border); margin: 20px 0; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.ops-stat-card {
    position: relative;
    background: var(--ops-card-bg);
    border: var(--ops-card-border);
    border-radius: var(--ops-card-radius);
    box-shadow: var(--ops-card-shadow);
    padding: 20px;
    overflow: hidden;
}
.ops-stat-card__value {
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ops-text-primary);
    line-height: 1;
    margin-bottom: 6px;
}
.ops-stat-card__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ops-text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ops-stat-card__icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    opacity: .08;
}
.ops-stat-card--success { border-left: 4px solid var(--ops-success-text); }
.ops-stat-card--failed  { border-left: 4px solid var(--ops-danger); }
.ops-stat-card--unknown { border-left: 4px solid var(--ops-unknown-text); }

/* ── Buttons (additional variants) ──────────────────────────────────────── */
.ops-btn-outline {
    background: transparent;
    color: var(--ops-text-primary);
    border: 1px solid var(--ops-input-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ops-btn-outline:hover {
    background: #f3f4f6;
    color: var(--ops-text-primary);
    text-decoration: none;
}
.ops-btn-danger-outline {
    background: transparent;
    color: var(--ops-danger);
    border: 1px solid #fca5a5;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s;
    display: inline-flex;
    align-items: center;
}
.ops-btn-danger-outline:hover { background: var(--ops-failed-bg); color: var(--ops-danger); text-decoration: none; }

/* ── Tables (additional helpers) ─────────────────────────────────────────── */
.ops-table-wrapper { overflow-x: auto; }
.ops-empty-row { text-align: center; padding: 32px 16px; color: var(--ops-text-muted); }
.ops-row-attention > td { background: #fffbeb !important; }
.ops-row-locked > td { opacity: .65; }
.ops-id-link { font-family: var(--ops-font-mono); font-size: 12px; color: var(--ops-link); }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.ops-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.ops-filter-select {
    width: auto;
    font-size: 13px;
    padding: 5px 10px;
}

/* ── Detail view ─────────────────────────────────────────────────────────── */
.ops-page-heading { font-size: 20px; font-weight: 700; color: var(--ops-text-primary); }
.ops-id-code {
    font-family: var(--ops-font-mono);
    font-size: 14px;
    font-weight: 400;
    color: var(--ops-text-secondary);
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}
.ops-detail-list { display: grid; gap: 0; }
.ops-detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.ops-detail-row:last-child { border-bottom: none; }
.ops-detail-row dt { color: var(--ops-text-secondary); font-weight: 500; }
.ops-detail-row dd { margin: 0; color: var(--ops-text-primary); word-break: break-word; }

/* ── Card variants ───────────────────────────────────────────────────────── */
.ops-card--narrow { max-width: 720px; }
.ops-card--attention { border: 1px solid var(--ops-unknown-border); }
.ops-card-header--attention {
    background: var(--ops-unknown-bg);
    color: var(--ops-unknown-text);
}
.ops-link-sm { font-size: 12px; color: var(--ops-link); }

/* ── Form helpers ────────────────────────────────────────────────────────── */
.ops-form-control:focus {
    outline: none;
    border-color: var(--ops-input-focus);
    box-shadow: 0 0 0 3px rgba(79,110,247,.1);
}
.ops-required { color: var(--ops-danger); }
/* A provider readOnly=1 field: shown, not editable. Value still submits via a paired hidden input. */
.ops-field-readonly {
    background: #f3f4f6;
    color: var(--ops-text-muted);
    cursor: default;
}
.ops-fieldset-legend {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ops-text-secondary);
    margin-bottom: 12px;
}

/* ── Wizard ──────────────────────────────────────────────────────────────── */
.ops-wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
}
.ops-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ops-text-muted);
    padding: 0 16px;
    position: relative;
}
.ops-wizard-step:first-child { padding-left: 0; }
.ops-wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: #e5e7eb;
}
.ops-wizard-step--active { color: var(--ops-text-primary); font-weight: 600; }
.ops-wizard-step--done   { color: var(--ops-success-text); }
.ops-wizard-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: #e5e7eb;
    color: var(--ops-text-secondary);
}
.ops-wizard-step--active .ops-wizard-step__num { background: var(--ops-sidebar-accent); color: #fff; }
.ops-wizard-step--done   .ops-wizard-step__num { background: var(--ops-success-bg); color: var(--ops-success-text); }

/* ── Service selection ───────────────────────────────────────────────────── */
.ops-service-radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--ops-input-border);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ops-service-radio-card:hover { border-color: var(--ops-sidebar-accent); background: #f8f9ff; }
.ops-service-radio-label { display: flex; flex-direction: column; gap: 2px; }
.ops-service-name  { font-size: 13px; font-weight: 500; color: var(--ops-text-primary); }
.ops-service-currency { font-size: 11px; font-family: var(--ops-font-mono); }

/* Same card used as a plain drill-down link (category/biller/service pickers) */
a.ops-service-radio-card { text-decoration: none; color: inherit; }
a.ops-service-radio-card:hover .ops-service-name { color: var(--ops-sidebar-accent); }

.ops-service-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef1fe;
    color: var(--ops-sidebar-accent);
    font-size: 15px;
    flex-shrink: 0;
}
a.ops-service-radio-card:hover .ops-service-card-icon { background: var(--ops-sidebar-accent); color: #fff; }

/* ── Quick search (payment wizard category/biller pickers, reusable elsewhere) ── */
.ops-quick-search { position: relative; flex: 1; }
.ops-quick-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ops-text-muted);
    font-size: 13px;
    pointer-events: none;
}
.ops-quick-search-input { padding-left: 34px !important; }
.ops-quick-search-bar { display: flex; align-items: center; gap: 12px; }
.ops-quick-search-count { font-size: 12px; color: var(--ops-text-muted); white-space: nowrap; }
.ops-quick-search-hidden { display: none !important; }

/* ── Confirm page ────────────────────────────────────────────────────────── */
.ops-confirm-idempotency-note {
    font-size: 12px;
    color: var(--ops-text-muted);
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 14px;
}
.ops-kv-tag {
    display: inline-block;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-family: var(--ops-font-mono);
    margin: 2px;
}

/* ── Result banner ───────────────────────────────────────────────────────── */
.ops-result-banner {
    padding: 28px 24px;
    border-bottom: var(--ops-card-border);
    text-align: center;
    border-radius: var(--ops-card-radius) var(--ops-card-radius) 0 0;
}
.ops-result-banner__sub { font-size: 13px; color: inherit; opacity: .8; }
.ops-result-banner--success { background: var(--ops-success-bg); color: var(--ops-success-text); }
.ops-result-banner--failed  { background: var(--ops-failed-bg);  color: var(--ops-failed-text);  }
/* U2: UNKNOWN banner is amber, not red */
.ops-result-banner--unknown { background: var(--ops-unknown-bg); color: var(--ops-unknown-text); }
.ops-result-banner--processing { background: var(--ops-processing-bg); color: var(--ops-processing-text); }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.ops-tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0;
}
.ops-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ops-text-secondary);
    border-radius: 6px 6px 0 0;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    transition: color .15s, background .15s;
}
.ops-tab:hover { color: var(--ops-text-primary); text-decoration: none; }
.ops-tab--active {
    color: var(--ops-sidebar-accent);
    background: var(--ops-card-bg);
    border-color: #e5e7eb;
    border-bottom-color: #fff;
}

/* ── Chips / tags ────────────────────────────────────────────────────────── */
.ops-chip {
    display: inline-block;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    margin: 1px;
}
.ops-code-block {
    font-family: var(--ops-font-mono);
    font-size: 12px;
    word-break: break-all;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: var(--ops-input-radius);
    padding: 8px 10px;
    margin-top: 4px;
}
/* ── Provider request trace (SYS_ADMIN only) ────────────────────────────── */
.ops-trace-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ops-text-muted);
    margin-bottom: 4px;
}
.ops-trace-pre {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 0;
}
/* Keeps the trace panel in view while the (often taller) form/result column
   next to it scrolls — the whole point of putting it beside the form instead
   of below it. max-height leaves room to scroll the panel's own long content
   independently, rather than pinning something taller than the viewport. */
.ops-trace-sticky {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.ops-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--ops-sidebar-accent);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ── Error pages ─────────────────────────────────────────────────────────── */
.ops-error-page { padding: 60px 24px; }
.ops-error-code {
    font-size: 96px;
    font-weight: 800;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 12px;
}
.ops-error-title { font-size: 24px; font-weight: 700; color: var(--ops-text-primary); margin-bottom: 8px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.ops-modal {
    border: var(--ops-card-border);
    border-radius: var(--ops-card-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.ops-modal .modal-header {
    border-bottom: var(--ops-card-border);
    background: #f9fafb;
    border-radius: var(--ops-card-radius) var(--ops-card-radius) 0 0;
}
.ops-modal .modal-footer { border-top: var(--ops-card-border); }

/* ops-confirm-modal is on .modal-content, a child of .modal-dialog — sizing
   the dialog itself has to be scoped from the outer #opsConfirmModal instead. */
#opsConfirmModal .modal-dialog { max-width: 460px; }
.ops-confirm-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}
.ops-confirm-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ops-unknown-bg);
    color: var(--ops-unknown-text);
    font-size: 15px;
    flex-shrink: 0;
}
.ops-confirm-modal-message {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ops-text-primary);
}
.ops-confirm-modal .modal-body { padding: 22px 24px; }
.ops-confirm-modal .modal-footer { padding: 14px 24px; }

/* ── Loading overlay (data-ops-loading, see ops.js) ─────────────────────── */
.ops-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
}
.ops-loading-overlay--visible {
    opacity: 1;
    visibility: visible;
}
.ops-loading-overlay-box {
    background: var(--ops-card-bg);
    border-radius: var(--ops-card-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    padding: 32px 36px;
    max-width: 380px;
    text-align: center;
}
.ops-loading-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px auto;
    border: 3px solid #e4e7ec;
    border-top-color: var(--ops-link);
    border-radius: 50%;
    animation: ops-spin .8s linear infinite;
}
@keyframes ops-spin {
    to { transform: rotate(360deg); }
}
.ops-loading-overlay-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ops-text-primary);
}

/* ── Auth logo ───────────────────────────────────────────────────────────── */
.ops-auth-logo { margin-bottom: 28px; }
.ops-auth-logo-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--ops-text-primary);
    letter-spacing: -.01em;
}
.ops-auth-logo-sub {
    font-size: 12px;
    color: var(--ops-text-muted);
    margin-top: 2px;
}

/* ── Alert unknown (dashboard banner) ───────────────────────────────────── */
.ops-alert-unknown {
    background: var(--ops-unknown-bg);
    color: var(--ops-unknown-text);
    border: 1px solid var(--ops-unknown-border);
    border-radius: 6px;
    padding: 12px 16px;
}
