/* §178.22ay CT widget — React-integrated panel mode (replaces §178.22ax modal mode).
   Scoped to .orbio-ct-* prefix. Renders inline v widget content area, žiadny overlay/modal. */

/* §178.22ax legacy modal classes — ponechané pre prípadný fallback (nepoužívané v React mode) */
.orbio-ct-overlay { display: none; }
.orbio-ct-modal { display: contents; }

/* §178.22ay primary panel container — flex column, full height, scrolls naturally */
.orbio-ct-root {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
  padding: 12px 16px 16px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary, #e8f4f8);
  gap: 12px;
}

/* Tab bar (sticky top) — analogicky k .rtg-tabs pattern */
.orbio-ct-tabs {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,212,170,0.15);
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(15,31,58,0.95) 70%, rgba(15,31,58,0));
  backdrop-filter: blur(8px);
  z-index: 5;
}
.orbio-ct-tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(232,244,248,0.7);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.orbio-ct-tab:hover { background: rgba(0,212,170,0.08); color: #e8f4f8; }
.orbio-ct-tab.active {
  background: rgba(0,212,170,0.15);
  color: #00d4aa;
  border-color: rgba(0,212,170,0.4);
}

/* Light theme override (svetlo) */
html[data-theme="svetlo"] .orbio-ct-root { color: #1e293b; }
html[data-theme="svetlo"] .orbio-ct-tabs { background: linear-gradient(180deg, rgba(255,255,255,0.95) 70%, rgba(255,255,255,0)); border-bottom-color: rgba(14,116,144,0.2); }
html[data-theme="svetlo"] .orbio-ct-tab { background: rgba(0,40,80,0.04); color: #475569; border-color: rgba(0,40,80,0.08); }
html[data-theme="svetlo"] .orbio-ct-tab:hover { background: rgba(14,116,144,0.08); color: #0e7490; }
html[data-theme="svetlo"] .orbio-ct-tab.active { background: rgba(14,116,144,0.12); color: #0e7490; border-color: rgba(14,116,144,0.35); }

/* Header pre legacy/standalone (nepoužívaný v React mode) */
.orbio-ct-h { display: none; }
.orbio-ct-btn-icon {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(232,244,248,0.6);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  font-family: inherit;
}
.orbio-ct-btn-icon:hover { color: #00d4aa; border-color: rgba(0,212,170,0.4); }
html[data-theme="svetlo"] .orbio-ct-btn-icon { color: #475569; border-color: rgba(0,40,80,0.1); }
html[data-theme="svetlo"] .orbio-ct-btn-icon:hover { color: #0e7490; border-color: rgba(14,116,144,0.35); }

/* Table wrapper — scrollable, sticky thead */
.orbio-ct-table-wrap {
  overflow: auto;
  flex: 1; min-height: 0;
  border-radius: 8px;
}
.orbio-ct-loading, .orbio-ct-empty {
  padding: 50px 20px;
  text-align: center;
  color: rgba(232,244,248,0.5);
  font-style: italic;
}
.orbio-ct-loading { color: rgba(0,212,170,0.7); }

/* ─── Studies table ─── */
.orbio-ct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.orbio-ct-table thead th {
  text-align: left;
  padding: 9px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(232,244,248,0.5);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: rgba(15,31,58,0.95);
  backdrop-filter: blur(8px);
}
.orbio-ct-table tbody td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(232,244,248,0.85);
}
.orbio-ct-row { cursor: pointer; transition: background 0.12s; }
.orbio-ct-row:hover { background: rgba(0,212,170,0.05); }

.orbio-ct-time { font-size: 10px; color: rgba(0,212,170,0.55); margin-top: 2px; }
.orbio-ct-modality {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(0,212,170,0.12);
  color: #00d4aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.orbio-ct-ddx { max-width: 280px; color: rgba(232,244,248,0.8); font-size: 11px; line-height: 1.3; }

/* ─── Status badges ─── */
.orbio-ct-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.orbio-ct-st-idle { background: rgba(148,163,184,0.18); color: #94a3b8; }
.orbio-ct-st-queued { background: rgba(245,158,11,0.18); color: #fbbf24; animation: orbio-ct-pulse 1.6s ease-in-out infinite; }
.orbio-ct-st-running { background: rgba(59,130,246,0.18); color: #60a5fa; animation: orbio-ct-pulse 1.6s ease-in-out infinite; }
.orbio-ct-st-done { background: rgba(0,212,170,0.18); color: #00d4aa; }
.orbio-ct-st-failed { background: rgba(239,68,68,0.18); color: #fca5a5; }
@keyframes orbio-ct-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ─── Detail view ─── */
.orbio-ct-detail-header {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.orbio-ct-d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 18px;
}
.orbio-ct-d-grid > div { display: flex; flex-direction: column; gap: 3px; }
.orbio-ct-d-grid label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(232,244,248,0.45);
  text-transform: uppercase;
}
.orbio-ct-d-grid > div > div { font-size: 13px; color: #e8f4f8; }
.orbio-ct-mono { font-family: ui-monospace, monospace; font-size: 11px !important; color: rgba(232,244,248,0.65) !important; }
.orbio-ct-anamnesis {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: rgba(232,244,248,0.85);
  line-height: 1.5;
}
.orbio-ct-anamnesis label {
  font-size: 9px; letter-spacing: 0.6px; text-transform: uppercase;
  color: rgba(232,244,248,0.5); margin-right: 6px;
}
.orbio-ct-error {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  font-size: 12px;
}

.orbio-ct-section {
  margin-bottom: 22px;
}
.orbio-ct-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #00d4aa;
  letter-spacing: 0.3px;
}

.orbio-ct-scope-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0,212,170,0.15);
  color: #00d4aa;
  font-size: 10px;
  font-weight: 700;
}

/* ─── Slice grid ─── */
.orbio-ct-slice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.orbio-ct-slice {
  position: relative;
  aspect-ratio: 1;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
}
.orbio-ct-slice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orbio-ct-slice-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232,244,248,0.4);
  font-size: 10px;
}
.orbio-ct-slice-num {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 9px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.orbio-ct-slice-key {
  border-color: rgba(0,212,170,0.5);
  box-shadow: 0 0 0 1px rgba(0,212,170,0.3) inset;
}
.orbio-ct-slice-key .orbio-ct-slice-num { background: rgba(0,212,170,0.8); }

/* ─── Findings ─── */
.orbio-ct-findings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.orbio-ct-finding {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
}
.orbio-ct-finding-crop {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: 6px;
}
.orbio-ct-no-crop {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232,244,248,0.35);
  font-size: 10px;
  font-style: italic;
}
.orbio-ct-finding-meta { flex: 1; min-width: 0; }
.orbio-ct-finding-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.orbio-ct-finding-h strong { font-size: 13px; color: #e8f4f8; }
.orbio-ct-sev {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.orbio-ct-conf {
  font-size: 11px;
  color: rgba(232,244,248,0.55);
  font-weight: 500;
}
.orbio-ct-region {
  font-size: 11px;
  color: rgba(0,212,170,0.75);
  margin-bottom: 4px;
}
.orbio-ct-desc {
  font-size: 12px;
  color: rgba(232,244,248,0.78);
  line-height: 1.5;
}

/* ─── Report markdown ─── */
.orbio-ct-report-md {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(232,244,248,0.92);
}
.orbio-ct-report-md h2,
.orbio-ct-report-md h3,
.orbio-ct-report-md h4 {
  color: #00d4aa;
  margin: 1.2em 0 0.5em;
}
.orbio-ct-report-md h2 { font-size: 16px; }
.orbio-ct-report-md h3 { font-size: 14px; }
.orbio-ct-report-md h4 { font-size: 12px; letter-spacing: 0.3px; }
.orbio-ct-report-md ul { padding-left: 22px; }
.orbio-ct-report-md li { margin-bottom: 4px; }
.orbio-ct-report-md strong { color: #e8f4f8; }
.orbio-ct-report-md code {
  background: rgba(0,0,0,0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #fbbf24;
}
.orbio-ct-report-md p { margin: 0.6em 0; }

/* ─── Actions ─── */
.orbio-ct-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.orbio-ct-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  font-family: inherit;
}
.orbio-ct-btn:disabled { opacity: 0.5; cursor: wait; }
.orbio-ct-btn-primary {
  background: linear-gradient(135deg, rgba(0,212,170,0.85), rgba(0,170,140,0.85));
  color: #fff;
  border-color: rgba(0,212,170,0.6);
}
.orbio-ct-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #00d4aa, #00aa8c);
  box-shadow: 0 4px 12px rgba(0,212,170,0.3);
}
.orbio-ct-btn-secondary {
  background: rgba(255,255,255,0.05);
  color: rgba(232,244,248,0.85);
  border-color: rgba(255,255,255,0.1);
}
.orbio-ct-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.orbio-ct-btn-danger {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.3);
}
.orbio-ct-btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
}

/* ─── Trigger button (sidebar / header injection) ─── */
.orbio-ct-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,212,170,0.12);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}
.orbio-ct-trigger:hover {
  background: rgba(0,212,170,0.22);
  border-color: rgba(0,212,170,0.5);
}
.orbio-ct-trigger::before {
  content: "🩻";
  font-size: 14px;
}

/* ═══ §178.22az — Sync banner + DICOM Viewer ═══ */

.orbio-ct-sync-banner {
  padding: 8px 14px;
  background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: 8px;
  font-size: 12px;
  color: #00d4aa;
}
.orbio-ct-sync-banner strong { color: #fff; font-weight: 700; }
html[data-theme="svetlo"] .orbio-ct-sync-banner { background: rgba(14,116,144,0.06); color: #0e7490; border-color: rgba(14,116,144,0.25); }
html[data-theme="svetlo"] .orbio-ct-sync-banner strong { color: #0c4a6e; }

.orbio-ct-viewer {
  background: #000;
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.orbio-ct-viewer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(15,31,58,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  align-items: center;
}
.orbio-ct-viewer-control-group {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.orbio-ct-viewer-control-group > label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(232,244,248,0.55);
  text-transform: uppercase;
}
.orbio-ct-viewer-control-group select,
.orbio-ct-viewer-control-group input[type=number] {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8f4f8;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-family: inherit;
}
.orbio-ct-viewer-control-group select { max-width: 320px; }

.orbio-ct-wl-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.orbio-ct-wl-pill {
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(232,244,248,0.7);
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.orbio-ct-wl-pill:hover { background: rgba(0,212,170,0.1); color: #e8f4f8; }
.orbio-ct-wl-pill.active {
  background: rgba(0,212,170,0.22);
  color: #00d4aa;
  border-color: rgba(0,212,170,0.5);
}

.orbio-ct-viewer-stage {
  position: relative;
  flex: 1;
  min-height: 480px;
  max-height: 720px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  user-select: none;
}
.orbio-ct-viewer-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}
.orbio-ct-viewer-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.orbio-ct-viewer-info-tl, .orbio-ct-viewer-info-tr {
  position: absolute;
  padding: 6px 10px;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  border-radius: 6px;
  line-height: 1.45;
}
.orbio-ct-viewer-info-tl { top: 8px; left: 8px; }
.orbio-ct-viewer-info-tr { top: 8px; right: 8px; text-align: right; }
.orbio-ct-viewer-info-tl strong,
.orbio-ct-viewer-info-tr strong { color: #00d4aa; font-weight: 700; }

.orbio-ct-viewer-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  background: rgba(15,31,58,0.85);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.orbio-ct-viewer-nav input[type=range] {
  flex: 1;
  accent-color: #00d4aa;
}

/* Light theme overrides for viewer */
html[data-theme="svetlo"] .orbio-ct-viewer { border-color: rgba(14,116,144,0.25); }
html[data-theme="svetlo"] .orbio-ct-viewer-controls,
html[data-theme="svetlo"] .orbio-ct-viewer-nav {
  background: rgba(248,250,252,0.95);
  border-color: rgba(14,116,144,0.15);
}
html[data-theme="svetlo"] .orbio-ct-viewer-control-group > label { color: #475569; }
html[data-theme="svetlo"] .orbio-ct-viewer-control-group select,
html[data-theme="svetlo"] .orbio-ct-viewer-control-group input[type=number] {
  background: #fff;
  color: #1e293b;
  border-color: rgba(14,116,144,0.2);
}
html[data-theme="svetlo"] .orbio-ct-wl-pill {
  background: rgba(0,40,80,0.04);
  color: #475569;
  border-color: rgba(0,40,80,0.1);
}
html[data-theme="svetlo"] .orbio-ct-wl-pill.active {
  background: rgba(14,116,144,0.15);
  color: #0e7490;
  border-color: rgba(14,116,144,0.4);
}

/* ═══ §178.22bc — Empty state CTA (Synchronizovať z Cloud) ═══ */
.orbio-ct-empty-cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,212,170,0.04) 0%, transparent 100%);
  border: 1px dashed rgba(0,212,170,0.18);
  border-radius: 12px;
  margin: 20px 0;
}
html[data-theme="svetlo"] .orbio-ct-empty-cta {
  background: linear-gradient(180deg, rgba(14,116,144,0.04) 0%, transparent 100%);
  border-color: rgba(14,116,144,0.2);
}

/* ═══ §178.22bd — Binary state colors (modrá ok / červená down) pre 3-pill compact strip ═══ */
.orbio-conn-bin-ok { color: rgba(96,165,250,0.95); }
.orbio-conn-bin-ok .orbio-conn-dot { background: #3b82f6; box-shadow: 0 0 4px rgba(59,130,246,0.6); }
.orbio-conn-bin-down { color: rgba(252,165,165,0.95); }
.orbio-conn-bin-down .orbio-conn-dot { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.55); }
.orbio-conn-bin-loading { color: rgba(148,163,184,0.7); }
.orbio-conn-bin-loading .orbio-conn-dot { background: #94a3b8; animation: orbio-conn-pulse 1.4s ease-in-out infinite; }
html[data-theme="svetlo"] .orbio-conn-bin-ok { color: #2563eb; }
html[data-theme="svetlo"] .orbio-conn-bin-ok .orbio-conn-dot { background: #2563eb; }
html[data-theme="svetlo"] .orbio-conn-bin-down { color: #dc2626; }
html[data-theme="svetlo"] .orbio-conn-bin-down .orbio-conn-dot { background: #dc2626; }

/* ═══ §178.22bg — Widget header connectivity wrap (toolbar-style, integrované do widget chrome) ═══ */
.widget-header-conn-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: 16px;
  flex: 0 0 auto;     /* žiadny stretch — nech ikony vpravo majú miesto */
}
.widget-header-conn-wrap .orbio-conn-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;            /* rozostup medzi GW · PACS · DATA */
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(0,212,170,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 10px;
  user-select: none;
}
.widget-header-conn-wrap .orbio-conn-strip:hover {
  background: rgba(0,212,170,0.10);
  border-color: rgba(0,212,170,0.25);
}
html[data-theme="svetlo"] .widget-header-conn-wrap .orbio-conn-strip {
  background: rgba(14,116,144,0.05);
  border-color: rgba(14,116,144,0.12);
}
html[data-theme="svetlo"] .widget-header-conn-wrap .orbio-conn-strip:hover {
  background: rgba(14,116,144,0.10);
  border-color: rgba(14,116,144,0.3);
}
.widget-header-conn-wrap .orbio-conn-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: transparent !important;
  border: none !important;
}
.widget-header-conn-wrap .orbio-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.widget-header-conn-wrap .orbio-conn-mini-lbl {
  line-height: 1;
  opacity: 0.95;
}
/* Override binary state colors v header context — väčšia farba + glow pre dot */
.widget-header-conn-wrap .orbio-conn-bin-ok .orbio-conn-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.25), 0 0 6px rgba(59,130,246,0.55);
}
.widget-header-conn-wrap .orbio-conn-bin-ok .orbio-conn-mini-lbl { color: #60a5fa; }
.widget-header-conn-wrap .orbio-conn-bin-down .orbio-conn-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.22), 0 0 5px rgba(239,68,68,0.5);
}
.widget-header-conn-wrap .orbio-conn-bin-down .orbio-conn-mini-lbl { color: #fca5a5; }
.widget-header-conn-wrap .orbio-conn-bin-loading .orbio-conn-dot {
  background: #94a3b8;
  animation: orbio-conn-pulse 1.4s ease-in-out infinite;
}
.widget-header-conn-wrap .orbio-conn-bin-loading .orbio-conn-mini-lbl { color: rgba(232,244,248,0.5); }
html[data-theme="svetlo"] .widget-header-conn-wrap .orbio-conn-bin-ok .orbio-conn-mini-lbl { color: #2563eb; }
html[data-theme="svetlo"] .widget-header-conn-wrap .orbio-conn-bin-down .orbio-conn-mini-lbl { color: #dc2626; }
html[data-theme="svetlo"] .widget-header-conn-wrap .orbio-conn-bin-loading .orbio-conn-mini-lbl { color: #94a3b8; }

/* ═══ §178.22be — Location pills v records list (PACS / DATA / oboje) ═══ */
.orbio-loc-row {
  display: inline-flex;
  gap: 3px;
  flex-wrap: wrap;
}
.orbio-loc-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: help;
}
.orbio-loc-pacs {
  background: rgba(168,85,247,0.14);
  color: #c084fc;
  border-color: rgba(168,85,247,0.3);
}
.orbio-loc-data {
  background: rgba(0,212,170,0.14);
  color: #00d4aa;
  border-color: rgba(0,212,170,0.3);
}
html[data-theme="svetlo"] .orbio-loc-pacs { background: rgba(126,34,206,0.1); color: #7e22ce; border-color: rgba(126,34,206,0.3); }
html[data-theme="svetlo"] .orbio-loc-data { background: rgba(14,116,144,0.1); color: #0e7490; border-color: rgba(14,116,144,0.3); }

/* ═══ §178.22bb — Compact connectivity strip (preferred — používa sa v header tabbar) ═══ */
.orbio-conn-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 9px;
  user-select: none;
}
.orbio-conn-strip:hover { background: rgba(255,255,255,0.04); }
html[data-theme="svetlo"] .orbio-conn-strip:hover { background: rgba(0,40,80,0.04); }

.orbio-conn-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(232,244,248,0.5);
  transition: color 0.12s;
}
.orbio-conn-mini-lbl { line-height: 1; opacity: 0.85; }
.orbio-conn-mini.orbio-conn-st-ok { color: rgba(74,222,128,0.85); }
.orbio-conn-mini.orbio-conn-st-down { color: rgba(252,165,165,0.9); }
.orbio-conn-mini.orbio-conn-st-unconfigured { color: rgba(252,211,77,0.85); }
.orbio-conn-mini.orbio-conn-st-checking,
.orbio-conn-mini.orbio-conn-st-loading { color: rgba(147,197,253,0.85); }
.orbio-conn-mini.orbio-conn-st-unknown { color: rgba(232,244,248,0.35); }
.orbio-conn-mini .orbio-conn-dot {
  width: 6px; height: 6px;
}
.orbio-conn-spin {
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.6;
}
html[data-theme="svetlo"] .orbio-conn-mini { color: #94a3b8; }
html[data-theme="svetlo"] .orbio-conn-mini.orbio-conn-st-ok { color: #16a34a; }
html[data-theme="svetlo"] .orbio-conn-mini.orbio-conn-st-down { color: #dc2626; }
html[data-theme="svetlo"] .orbio-conn-mini.orbio-conn-st-unconfigured { color: #d97706; }
html[data-theme="svetlo"] .orbio-conn-mini.orbio-conn-st-checking,
html[data-theme="svetlo"] .orbio-conn-mini.orbio-conn-st-loading { color: #2563eb; }

/* ═══ §178.22ba — Connectivity bar (zdieľaný pre CT + RTG widget) ═══ */
.orbio-conn-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 6px;
}
.orbio-conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(232,244,248,0.75);
  cursor: help;
  transition: all 0.15s;
}
.orbio-conn-pill:hover { background: rgba(255,255,255,0.07); }
.orbio-conn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(148,163,184,0.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.orbio-conn-lbl { font-size: 10px; line-height: 1; }

/* State variants */
.orbio-conn-st-ok .orbio-conn-dot { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.55); }
.orbio-conn-st-ok { color: #4ade80; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
.orbio-conn-st-down .orbio-conn-dot { background: #ef4444; box-shadow: 0 0 5px rgba(239,68,68,0.55); }
.orbio-conn-st-down { color: #fca5a5; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.orbio-conn-st-checking .orbio-conn-dot,
.orbio-conn-st-loading .orbio-conn-dot {
  background: #60a5fa;
  animation: orbio-conn-pulse 1.4s ease-in-out infinite;
}
.orbio-conn-st-checking, .orbio-conn-st-loading { color: #93c5fd; border-color: rgba(96,165,250,0.3); }
.orbio-conn-st-unconfigured .orbio-conn-dot { background: #fbbf24; }
.orbio-conn-st-unconfigured { color: #fcd34d; border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }
.orbio-conn-st-unknown .orbio-conn-dot { background: rgba(148,163,184,0.55); }
.orbio-conn-st-unknown { color: rgba(232,244,248,0.5); border-color: rgba(255,255,255,0.05); }

@keyframes orbio-conn-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.orbio-conn-refresh {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(232,244,248,0.55);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.15s;
}
.orbio-conn-refresh:hover:not(:disabled) {
  color: #00d4aa;
  border-color: rgba(0,212,170,0.4);
}
.orbio-conn-refresh:disabled { opacity: 0.5; cursor: wait; }

/* Light theme overrides */
html[data-theme="svetlo"] .orbio-conn-bar {
  background: rgba(248,250,252,0.6);
  border-color: rgba(14,116,144,0.12);
}
html[data-theme="svetlo"] .orbio-conn-pill {
  background: rgba(0,40,80,0.04);
  color: #475569;
  border-color: rgba(0,40,80,0.08);
}
html[data-theme="svetlo"] .orbio-conn-pill:hover { background: rgba(0,40,80,0.08); }
html[data-theme="svetlo"] .orbio-conn-st-ok { background: rgba(22,163,74,0.07); color: #16a34a; border-color: rgba(22,163,74,0.3); }
html[data-theme="svetlo"] .orbio-conn-st-down { background: rgba(220,38,38,0.07); color: #dc2626; border-color: rgba(220,38,38,0.3); }
html[data-theme="svetlo"] .orbio-conn-st-unconfigured { color: #d97706; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.06); }
html[data-theme="svetlo"] .orbio-conn-st-checking, html[data-theme="svetlo"] .orbio-conn-st-loading { color: #2563eb; border-color: rgba(37,99,235,0.3); }
html[data-theme="svetlo"] .orbio-conn-refresh {
  border-color: rgba(0,40,80,0.12);
  color: #475569;
}
html[data-theme="svetlo"] .orbio-conn-refresh:hover:not(:disabled) {
  color: #0e7490;
  border-color: rgba(14,116,144,0.4);
}
