anyllm_proxy 0.9.5

HTTP proxy translating Anthropic Messages API to OpenAI Chat Completions
Documentation
@import url('https://fonts.bunny.net/css?family=dm-sans:wght@400;500;600&family=dm-mono:wght@400;500&display=swap');

:root {
  --bg-base: #131516;
  --bg-raised: #1a1d1f;
  --bg-sunken: #0e1011;
  --bg-hover: #22272a;
  --border: #2a2f33;
  --border-sub: #1f2428;
  --text-1: #e8e3d9;
  --text-2: #7a8088;
  --text-3: #4e545b;
  --accent: #e8a030;
  --accent-dim: rgba(232, 160, 48, 0.12);
  --accent-bdr: rgba(232, 160, 48, 0.35);
  --ok: #4caf6e;
  --ok-dim: rgba(76, 175, 110, 0.12);
  --warn: #d4922b;
  --warn-dim: rgba(212, 146, 43, 0.12);
  --err: #e05252;
  --err-dim: rgba(224, 82, 82, 0.12);
  --font-ui: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --r: 2px;
  --rm: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg-base); color: var(--text-1); font-family: var(--font-ui); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }

/* App layout */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 220px; min-width: 220px; background: var(--bg-raised); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: 14px 16px; font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent); border-bottom: 1px solid var(--border); letter-spacing: 0.02em; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 10px 0; }
.sidebar-group { padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border-sub); }
.sidebar-group:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-group-label { padding: 8px 16px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; }
.sidebar-item { display: block; padding: 8px 16px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; user-select: none; border-left: 2px solid transparent; text-decoration: none; }
.sidebar-item.active { color: var(--text-1); background: var(--bg-hover); border-left-color: var(--accent); font-weight: 600; }
.sidebar-item:hover { color: var(--text-1); background: var(--bg-hover); }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }

/* WS status dot */
.ws-status::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.connected { color: var(--ok); }
.connected::before { background: var(--ok); animation: pulse 2s ease-in-out infinite; }
.disconnected { color: var(--err); }
.disconnected::before { background: var(--err); }
@keyframes pulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.4; } }

/* Layout */
.tab-content { flex: 1; min-width: 0; padding: 14px 20px; max-width: 1400px; margin: 0 auto; overflow-x: auto; }

/* Stats */
.stats-row { display: flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; background: var(--bg-raised); }
.stat { flex: 1; padding: 12px 14px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-label { color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-value { font-family: var(--font-mono); font-size: 22px; margin-top: 3px; font-weight: 500; }

/* Backend cards */
.backend-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.card { padding: 12px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--rm); }
.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-name { color: var(--accent); font-weight: 600; font-family: var(--font-mono); font-size: 13px; }
.card-body { margin-top: 8px; color: var(--text-2); font-size: 12px; }

/* Section */
.section-label { color: var(--text-2); font-size: 10px; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.07em; font-weight: 500; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* Feed */
.feed { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; max-height: 400px; overflow-y: auto; }
.feed-header, .feed-row { display: grid; grid-template-columns: 140px 50px 80px 1fr 65px 55px 55px; padding: 6px 12px; font-size: 12px; }
.feed-header { background: var(--bg-hover); color: var(--text-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.feed-row { border-bottom: 1px solid var(--border-sub); cursor: pointer; }
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--bg-hover); }
.feed-detail { padding: 12px 16px; background: var(--bg-sunken); border-bottom: 1px solid var(--border-sub); border-left: 2px solid var(--accent); font-size: 12px; display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; }
.feed-detail .label { color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.feed-detail .val { color: var(--text-1); font-family: var(--font-mono); word-break: break-all; }
.feed-detail .error-msg { color: var(--err); grid-column: 1 / -1; margin-top: 4px; padding: 6px; background: var(--err-dim); border-left: 2px solid var(--err); border-radius: var(--r); }
.streaming-badge { font-size: 9px; padding: 1px 5px; border-radius: 1px; background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-bdr); margin-left: 4px; }
.status-2xx { color: var(--ok); }
.status-4xx { color: var(--warn); }
.status-5xx { color: var(--err); }

/* Forms */
.form-group { margin-bottom: 14px; padding: 12px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--rm); }
.form-label { font-weight: 600; margin-bottom: 4px; }
.form-hint { color: var(--text-2); font-size: 11px; margin-bottom: 8px; }
.form-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
input, select { background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-1); padding: 6px 10px; border-radius: var(--r); font-size: 13px; font-family: var(--font-ui); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Buttons */
.btn { padding: 7px 14px; border-radius: var(--r); cursor: pointer; font-size: 13px; border: 1px solid; font-weight: 500; font-family: var(--font-ui); transition: none; }
.btn-primary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-primary:hover { background: var(--accent-dim); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-secondary:hover { border-color: var(--text-2); color: var(--text-1); }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err-dim); }
.btn-sm { padding: 3px 7px; font-size: 11px; }

/* Badges */
.badge { font-size: 10px; padding: 2px 5px; border-radius: 1px; font-family: var(--font-mono); }
.badge-override { background: var(--warn-dim); color: var(--warn); }
.badge-active { background: var(--ok-dim); color: var(--ok); }
.badge-revoked { background: var(--err-dim); color: var(--err); }
.badge-expired { background: var(--warn-dim); color: var(--warn); }

/* Misc */
.readonly-section { opacity: 0.75; padding: 12px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--rm); }
.model-grid { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.model-grid .label { color: var(--text-2); }
.warn { color: var(--warn); }
.error { color: var(--err); }
.empty { text-align: center; padding: 40px; color: var(--text-2); }
.pagination { display: flex; gap: 8px; margin-top: 12px; align-items: center; font-size: 13px; color: var(--text-2); }

/* Operator / Charts */
.operator-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.operator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; margin-bottom: 14px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.chart-card { padding: 12px; background: var(--bg-raised); min-height: 210px; }
.chart-card.wide { grid-column: 1 / -1; border-top: 1px solid var(--border); }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.chart-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); font-weight: 500; }
.chart-value { font-size: 20px; font-weight: 500; color: var(--text-1); font-family: var(--font-mono); }
.chart-subtitle { font-size: 11px; color: var(--text-2); }
.chart-svg { width: 100%; height: 130px; display: block; }
.chart-grid-line { stroke: var(--border-sub); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.secondary { stroke-width: 1.5; opacity: 0.8; }
.chart-area { fill-opacity: 0.08; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--text-3); font-family: var(--font-mono); }

/* Failure table */
.failure-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.failure-table th, .failure-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border-sub); vertical-align: top; }
.failure-table th { color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.failure-summary { max-width: 340px; color: var(--text-1); }

/* Timeline */
.timeline-list { display: flex; flex-direction: column; gap: 8px; }
.timeline-item { padding: 10px; border: 1px solid var(--border-sub); border-radius: var(--r); background: var(--bg-sunken); }
.timeline-item:hover { border-color: var(--border); }
.timeline-meta { display: grid; grid-template-columns: 90px 52px 88px 1fr 70px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 8px; }
.timeline-track { height: 6px; border-radius: 0; background: var(--border); overflow: hidden; }
.timeline-bar { height: 100%; min-width: 4px; border-radius: 0; }
.timeline-caption { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--text-2); }

/* Utility */
.mono { font-family: var(--font-mono); }
.dim { color: var(--text-2); }
.accent { color: var(--accent); }
.ok { color: var(--ok); }

/* Login */
.login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-base); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.login-card { background: var(--bg-raised); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--rm); padding: 32px; width: 320px; }
.login-title { font-family: var(--font-mono); font-size: 15px; font-weight: 500; margin-bottom: 24px; color: var(--text-1); }
.login-title .prompt { color: var(--accent); }
.login-card input[type="password"] { width: 100%; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-1); border-radius: var(--r); }
.login-card input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.login-card .btn { width: 100%; padding: 10px; font-size: 14px; }
.login-error { color: var(--err); font-size: 12px; margin-top: 8px; min-height: 16px; }

/* Keys tab */
.keys-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.keys-grid th, .keys-grid td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-sub); }
.keys-grid th { background: var(--bg-hover); color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; position: sticky; top: 0; }
.keys-grid tr:hover td { background: var(--bg-hover); }

/* Budget bar */
.budget-bar { height: 4px; border-radius: 0; background: var(--border); margin-top: 4px; overflow: hidden; min-width: 60px; }
.budget-bar-fill { height: 100%; background: var(--ok); transition: width 0.3s; }
.budget-bar-fill.warn { background: var(--warn); }
.budget-bar-fill.danger { background: var(--err); }

/* Tag chips */
.tag-input-area { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r); min-height: 34px; align-items: center; cursor: text; }
.tag-input-area:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--r); font-size: 11px; color: var(--text-1); }
.chip-remove { cursor: pointer; color: var(--text-3); font-size: 13px; line-height: 1; }
.chip-remove:hover { color: var(--err); }
.tag-input-bare { background: none; border: none; outline: none; color: var(--text-1); font-size: 13px; min-width: 80px; padding: 2px 4px; flex: 1; font-family: var(--font-ui); }

/* Key result */
.key-result { background: var(--bg-sunken); border: 1px solid var(--border); border-left: 3px solid var(--ok); border-radius: var(--r); padding: 12px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.key-result-label { color: var(--ok); font-size: 11px; margin-bottom: 4px; font-weight: 600; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--bg-raised); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--rm); padding: 20px; width: 460px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal-title { font-weight: 600; font-size: 15px; margin-bottom: 16px; color: var(--text-1); }

/* Traffic tab */
.route-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.route-table th, .route-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border-sub); }
.route-table th { background: var(--bg-hover); color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; position: sticky; top: 0; }
.route-table tr:hover td { background: var(--bg-hover); }
.route-table td.mono { font-family: var(--font-mono); }

/* Uptime tab */
.uptime-proxy { padding: 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--rm); margin-bottom: 16px; }
.uptime-proxy-stats { display: flex; gap: 24px; margin-bottom: 10px; font-size: 13px; }
.uptime-pct { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--ok); }
.history-bar { display: flex; gap: 2px; margin-top: 8px; height: 16px; }
.history-day { flex: 1; border-radius: 1px; min-width: 4px; }
.history-day.up { background: var(--ok); }
.history-day.down { background: var(--err); }
.history-day.degraded { background: var(--warn); }
.history-day.no-data { background: var(--border); }
.backend-health-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.backend-health-table th, .backend-health-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-sub); }
.backend-health-table th { background: var(--bg-hover); color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }

/* Route scope selector */
.route-scope-list { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; border: 1px solid var(--border-sub); border-radius: var(--r); padding: 8px; background: var(--bg-sunken); }
.route-scope-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 2px 0; }
.route-scope-item:hover { color: var(--accent); }
.hint { color: var(--text-3); font-size: 11px; font-weight: 400; }

/* Button disabled state (shared across all variants) */
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn:disabled:hover { background: transparent; color: inherit; border-color: inherit; }

/* Modal */
.modal-backdrop-v2 { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: 100; overflow-y: auto; }
.modal-v2 { background: var(--bg-raised); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--rm); width: 100%; max-height: calc(100vh - 16vh); display: flex; flex-direction: column; outline: none; }
.modal-sm { max-width: 380px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 780px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-sub); }
.modal-header .modal-title { font-weight: 600; font-size: 14px; color: var(--text-1); margin: 0; }
.modal-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; font-family: var(--font-ui); }
.modal-close:hover { color: var(--text-1); }
.modal-close:disabled { cursor: not-allowed; opacity: 0.4; }
.modal-body { padding: 16px; overflow-y: auto; font-size: 13px; color: var(--text-1); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-sub); background: var(--bg-sunken); }

/* Confirm dialog specifics */
.confirm-message { line-height: 1.5; color: var(--text-1); }
.confirm-error { margin-top: 12px; padding: 8px 10px; background: var(--err-dim); border: 1px solid var(--err-bdr); color: var(--err); font-size: 12px; border-radius: var(--r); }

/* Toast */
.toast-stack { position: fixed; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 200; max-width: 360px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; background: var(--bg-raised); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r); font-size: 12px; color: var(--text-1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--err); }
.toast-warn { border-left-color: var(--warn); }
.toast-info { border-left-color: var(--accent); }
.toast-message { flex: 1; line-height: 1.4; word-break: break-word; }
.toast-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; font-family: var(--font-ui); }
.toast-close:hover { color: var(--text-1); }

/* Async boundary error */
.async-error { padding: 20px; text-align: center; background: var(--bg-raised); border: 1px solid var(--err-bdr); border-left: 3px solid var(--err); border-radius: var(--rm); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.async-error-title { font-weight: 600; color: var(--err); font-size: 13px; }
.async-error-message { color: var(--text-2); font-size: 12px; max-width: 480px; word-break: break-word; }

/* Skeleton loader */
.skeleton-stack { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.skeleton { background: var(--bg-hover); border-radius: var(--r); position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent); animation: skeleton-shimmer 1.4s linear infinite; }
.skeleton-row { height: 28px; }
@keyframes skeleton-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ── Per-tab polish ──────────────────────────────────────────────────────── */

/* Toolbar above tables */
.toolbar { display: flex; gap: 10px; align-items: center; margin: 10px 0 8px; }
.toolbar-search { flex: 1; max-width: 340px; }
.toolbar-count { font-size: 11px; white-space: nowrap; }

/* Empty-state CTA card */
.empty-cta { padding: 28px 20px; background: var(--bg-raised); border: 1px dashed var(--border); border-radius: var(--rm); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0; }
.empty-cta-title { font-weight: 600; color: var(--text-1); font-size: 14px; }
.empty-cta-body { color: var(--text-2); font-size: 12px; max-width: 520px; line-height: 1.5; }
.empty-cta .btn { margin-top: 6px; }

/* Inline error (non-modal) */
.inline-error { margin-top: 8px; padding: 6px 10px; background: var(--err-dim); border-left: 3px solid var(--err); border-radius: var(--r); font-size: 12px; }

/* Route detail (extracted from inline styles) */
.route-detail { padding: 12px 16px; background: var(--bg-sunken); border-top: 1px solid var(--border); }
.route-detail-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.route-detail-title { font-weight: 600; }
.route-detail-desc { margin-left: 8px; }
.route-detail-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.route-detail-subhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.route-detail-subhead-label { margin-bottom: 0; }
.route-detail-add { display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r); }
.route-detail-add-select { flex: 1; }
.route-detail-add-models { width: 160px; }
.route-detail-empty { padding: 8px 0; font-size: 13px; }
.route-provider-row { display: grid; grid-template-columns: 24px 1fr auto auto auto auto; gap: 0 8px; align-items: center; padding: 6px 8px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 4px; font-size: 13px; }
.route-provider-name { font-weight: 500; }
.route-provider-id { margin-left: 6px; font-size: 11px; }
.route-provider-models { font-size: 11px; }
.route-provider-reorder { display: flex; gap: 2px; }
.route-provider-toggle { font-size: 10px; }
.route-provider-remove { font-size: 10px; }
.btn-icon { padding: 1px 4px; font-size: 10px; }

/* Route row */
.route-row { cursor: pointer; }
.route-row-name { font-weight: 500; }
.route-row-desc { margin-left: 6px; font-size: 11px; }
.route-row-actions { text-align: right; }
.route-row-detail-cell { padding: 0; }

/* Audit detail cell clipping */
.audit-detail { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Provider pick grid (inside AddProviderModal) */
.provider-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 400px; overflow-y: auto; }
.provider-pick-card { padding: 10px 12px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--rm); cursor: pointer; font-size: 13px; font-weight: 500; text-align: left; color: var(--text-1); font-family: inherit; }
.provider-pick-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.provider-pick-name { display: block; }
.provider-pick-proto { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; text-transform: uppercase; }

/* Provider group */
.provider-group { margin-bottom: 20px; }
.provider-group-label { margin-bottom: 8px; }
.provider-card-meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; font-size: 12px; }
.provider-card-actions { display: flex; gap: 6px; margin-top: 10px; }

/* Provider catalog (redesigned tab) */
.provider-catalog { display: flex; flex-direction: column; gap: 18px; }
.provider-tier-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); font-weight: 600; margin-bottom: 2px; }
.provider-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.provider-tile-grid.tier-top { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.provider-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--rm); cursor: pointer; text-align: center; position: relative; }
.provider-tile:hover { border-color: var(--accent); background: var(--bg-hover); }
.provider-tile.has-backends { border-left: 2px solid var(--accent); }
.provider-tile-name { font-size: 12px; font-weight: 500; color: var(--text-1); line-height: 1.3; }
.provider-tile-count { font-size: 10px; color: var(--text-3); font-family: var(--font-mono); }

/* Provider detail panel (lightbox overlay) */
.provider-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); z-index: 50; }
.provider-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(640px, 90vw); max-height: 80vh; overflow-y: auto; z-index: 51; background: var(--bg-raised); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--rm); }
.provider-panel-header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-sub); }
.provider-panel-header h3 { flex: 1; font-size: 16px; font-weight: 600; margin: 0; }
.provider-panel-close { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; font-family: var(--font-ui); }
.provider-panel-close:hover { color: var(--text-1); }
.provider-panel-caps { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 16px; border-bottom: 1px solid var(--border-sub); align-items: center; }
.badge-cap { font-size: 10px; padding: 2px 6px; border-radius: 1px; background: var(--bg-hover); color: var(--text-2); border: 1px solid var(--border); font-family: var(--font-mono); }
.badge-cap.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-bdr); }
.provider-panel-meta { display: flex; gap: 16px; padding: 8px 16px; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border-sub); flex-wrap: wrap; }
.provider-panel-meta .mono { font-family: var(--font-mono); }

/* Backend rows within panel */
.provider-panel-section { padding: 12px 16px; }
.provider-panel-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); font-weight: 500; margin-bottom: 8px; }
.provider-backend-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-sunken); border: 1px solid var(--border-sub); border-radius: var(--r); margin-bottom: 4px; font-size: 13px; }
.provider-backend-row .backend-name { font-family: var(--font-mono); font-weight: 500; flex: 1; }
.provider-backend-row .backend-status { font-size: 11px; color: var(--text-2); }

/* Add backend form within panel */
.provider-add-toggle { margin-top: 8px; }
.provider-add-form { margin-top: 8px; padding: 12px; background: var(--bg-sunken); border: 1px solid var(--border-sub); border-radius: var(--r); }
.provider-add-form .form-group { margin-bottom: 10px; padding: 8px 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r); }
.provider-add-form .form-label { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.provider-add-form .form-hint { font-size: 10px; }
.provider-add-form input { font-size: 12px; padding: 5px 8px; }
.provider-add-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.provider-empty-hint { color: var(--text-3); font-size: 12px; padding: 8px 0; }

/* Models: discover section */
.models-discover { margin-bottom: 20px; }
.models-discover-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.models-discover-hint { font-size: 12px; }
.models-discover-count { margin-top: 8px; font-size: 12px; }
.models-discover-results { margin-top: 8px; }
.models-discover-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); font-size: 12px; }
.models-discover-item { padding: 4px 8px; cursor: pointer; border-bottom: 1px solid var(--border); }
.models-discover-item:hover { background: var(--bg-hover); }
.models-discover-item.is-selected { background: var(--accent-dim); }
.models-discover-item-name { margin-left: 8px; }

/* Misc */
.key-icon-inline { vertical-align: -1px; margin-right: 3px; }