/* =========================================================
   NOS Redirector — App Shell + UI System (authoritative)
   Loaded AFTER Tailwind so these rules win conflicts.
   ========================================================= */

:root {
  --ui-amber: #f59e0b;
  --ui-amber-600: #d97706;
  --ui-danger: #ef4444;
  --ui-success: #10b981;
  --ui-warning: #f59e0b;
  --ui-info: #3b82f6;
  --app-header-h: 5rem;
  --app-sidebar-w: 18rem;
  --app-pad-x: 2rem;
  --app-pad-y: 1.5rem;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
}

html.dark {
  --surface: #0f172a;
  --surface-2: #020617;
  --border: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
}

/* ---------- HARD VIEWPORT LOCK ---------- */
html.app-html,
html.app-html body {
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.app-html body {
  background: var(--surface-2);
  color: var(--text);
}

body.login-page {
  overflow: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
}

html:has(body.login-page) {
  overflow: auto !important;
  height: auto !important;
  max-height: none !important;
}

.app-shell {
  display: flex !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  position: relative;
}

.app-sidebar {
  width: var(--app-sidebar-w);
  flex: 0 0 auto;
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 30;
}

.app-sidebar.w-20 {
  width: 5rem;
  --app-sidebar-w: 5rem;
}

.app-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: var(--surface-2);
}

.app-topbar {
  height: var(--app-header-h) !important;
  min-height: var(--app-header-h) !important;
  max-height: var(--app-header-h) !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.app-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: var(--app-pad-y) var(--app-pad-x) !important;
  -webkit-overflow-scrolling: touch;
}

.page-frame {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100%;
}

/* Kill nested wrappers that previously caused height jumps */
.page-frame > .space-y-8,
.page-frame > .flex.flex-col.space-y-8 {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
}

.page-frame > .space-y-8 > :not([hidden]) ~ :not([hidden]),
.page-frame .space-y-8 > :not([hidden]) ~ :not([hidden]) {
  /* neutralize Tailwind space-y margin so gap controls spacing */
  margin-top: 0 !important;
}

.page-title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- CARDS / TABLES ---------- */
.ui-card,
.page-frame .bg-white.rounded-3xl,
.page-frame .dark\:bg-slate-900 {
  /* keep existing card look; ensure consistent radius */
}

.ui-table-wrap {
  overflow: auto !important;
  max-height: min(52vh, 560px) !important;
  -webkit-overflow-scrolling: touch;
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

/* ---------- EMPTY STATES ---------- */
.ui-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.ui-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: #f1f5f9;
  color: #64748b;
}

html.dark .ui-empty-icon {
  background: #1e293b;
  color: #94a3b8;
}

.ui-empty-icon svg { width: 1.75rem; height: 1.75rem; }
.ui-empty-title { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 0.35rem; }
.ui-empty-text { font-size: 0.75rem; color: var(--muted); max-width: 22rem; margin-bottom: 1.25rem; }

/* ---------- BUTTONS ---------- */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.ui-btn:disabled,
.ui-btn.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.ui-btn--primary {
  background: linear-gradient(to right, var(--ui-amber), var(--ui-amber-600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.18);
}

.ui-btn--ghost {
  background: #f1f5f9;
  color: #0f172a;
}

html.dark .ui-btn--ghost {
  background: #1e293b;
  color: #f1f5f9;
}

.ui-btn--danger {
  background: var(--ui-danger);
  color: #fff;
}

.ui-btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}

/* =========================================================
   PANEL MODALS (page forms) — do NOT use Tailwind hidden+flex
   ========================================================= */
.ui-modal {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 70 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  background: rgba(2, 6, 23, 0.82) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  opacity: 0;
  pointer-events: none;
}

.ui-modal.is-open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: ui-fade-in 0.18s ease;
}

.ui-modal-panel {
  width: 100% !important;
  max-width: 32rem !important;
  max-height: min(90vh, 900px) !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1.5rem !important;
  padding: 1.5rem !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(8px) scale(0.98);
  animation: ui-scale-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  outline: none;
  color: #0f172a !important;
}

html.dark .ui-modal-panel,
html.dark .ui-modal .ui-modal-panel {
  background: #475569 !important;
  border-color: #94a3b8 !important;
  color: #f8fafc !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.ui-modal.is-open .ui-modal-panel {
  transform: none;
}

/* Command palette alignment override */
#command-palette.ui-modal {
  align-items: flex-start;
  padding-top: 6rem;
}

#command-palette .ui-modal-panel {
  max-width: 42rem;
  padding: 0;
}

/* =========================================================
   SYSTEM DIALOGS (confirm/alert/prompt)
   ========================================================= */
.ui-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ui-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ui-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ui-dialog-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  color: #0f172a;
}

html.dark .ui-dialog-panel {
  background: #475569 !important;
  border-color: #94a3b8 !important;
  color: #f8fafc !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75) !important;
}

.ui-dialog.is-open .ui-dialog-panel {
  transform: translateY(0) scale(1);
}

.ui-dialog-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: #f1f5f9;
  color: #64748b;
}

.ui-dialog-icon .ui-icon { width: 1.4rem; height: 1.4rem; }
.ui-dialog-icon--danger,
.ui-dialog-icon--error { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.ui-dialog-icon--success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.ui-dialog-icon--warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.ui-dialog-icon--info,
.ui-dialog-icon--confirm,
.ui-dialog-icon--alert { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.ui-dialog-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: inherit;
  margin: 0 0 0.5rem;
}

.ui-dialog-message {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

html.dark .ui-dialog-message {
  color: #94a3b8;
}

.ui-dialog-details {
  margin: -0.5rem 0 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.ui-dialog-details pre {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: auto;
  max-height: 8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ui-dialog-field { margin-bottom: 1.25rem; }
.ui-dialog-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.ui-dialog-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

.ui-dialog-input:focus {
  border-color: var(--ui-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.ui-dialog-input.is-invalid { border-color: #ef4444; }

.ui-dialog-actions {
  display: flex;
  gap: 0.75rem;
}

.ui-dialog-actions .ui-btn { flex: 1; }

/* =========================================================
   TOASTS
   ========================================================= */
.ui-toast-root {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.ui-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem 1rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.ui-toast.is-visible { transform: translateX(0); opacity: 1; }
.ui-toast.is-leaving { transform: translateX(110%); opacity: 0; }

.ui-toast-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ui-toast-icon .ui-icon { width: 1.1rem; height: 1.1rem; }
.ui-toast--success .ui-toast-icon { background: rgba(16,185,129,.12); color: #10b981; }
.ui-toast--error .ui-toast-icon { background: rgba(239,68,68,.12); color: #ef4444; }
.ui-toast--warning .ui-toast-icon { background: rgba(245,158,11,.12); color: #f59e0b; }
.ui-toast--info .ui-toast-icon { background: rgba(59,130,246,.12); color: #3b82f6; }
.ui-toast--loading .ui-toast-icon { background: rgba(148,163,184,.15); color: #94a3b8; }

.ui-toast-body { flex: 1; min-width: 0; }
.ui-toast-title { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.ui-toast-msg { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.4; }

.ui-toast-actions { display: flex; gap: 0.5rem; margin-top: 0.55rem; }
.ui-toast-action {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ui-amber-600);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.ui-toast-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}

.ui-toast-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(148,163,184,0.2);
}

.ui-toast-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--ui-amber);
}

.ui-toast--error .ui-toast-progress-bar { background: #ef4444; }
.ui-toast--success .ui-toast-progress-bar { background: #10b981; }
.ui-toast--warning .ui-toast-progress-bar { background: #f59e0b; }

/* Busy overlay */
.ui-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
}

.ui-busy-overlay.hidden { display: none !important; }

.ui-busy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  width: min(20rem, calc(100vw - 2rem));
  text-align: center;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.ui-busy-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(245,158,11,0.2);
  border-top-color: var(--ui-amber);
  border-radius: 50%;
  margin: 0 auto 0.9rem;
  animation: ui-spin 0.75s linear infinite;
}

.ui-busy-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.ui-busy-progress {
  height: 0.35rem;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.ui-busy-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--ui-amber), var(--ui-amber-600));
  transition: width 0.25s ease;
}

/* Animations */
@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-scale-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ui-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-scale-up { animation: ui-scale-in 0.22s ease; }
.animate-fade-in { animation: ui-fade-in 0.25s ease; }
.ui-spin { animation: ui-spin 0.75s linear infinite; }

html.ui-modal-open,
html.ui-modal-open body {
  overflow: hidden !important;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

/* Mobile */
@media (max-width: 768px) {
  :root {
    --app-pad-x: 1rem;
    --app-pad-y: 1rem;
    --app-header-h: 4rem;
  }

  .app-sidebar {
    position: fixed !important;
    left: 0; top: 0; bottom: 0;
    z-index: 40;
    transition: transform 0.25s ease;
  }

  .app-sidebar.is-collapsed-mobile {
    transform: translateX(-100%);
  }

  .ui-toast-root {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .page-title { font-size: 1.35rem; }
  .ui-table-wrap { max-height: min(58vh, 480px) !important; }
}

@media (min-width: 769px) {
  .app-sidebar.is-collapsed-mobile { transform: none !important; }
  #sidebar-backdrop { display: none !important; }
}

/* =========================================================
   ACCESSIBILITY & CONTRAST LAYER (Light + Dark)
   ========================================================= */
.text-slate-350,.text-slate-450,.text-slate-505,.text-slate-550,.text-slate-650,.text-slate-705,.text-slate-850{color:var(--muted)!important}
.border-slate-850,.border-slate-205,.border-slate-250,.border-slate-805{border-color:var(--border)!important}

.app-content input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
.app-content select,.app-content textarea,
.ui-modal input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
.ui-modal select,.ui-modal textarea,
.ui-dialog input:not([type=checkbox]):not([type=radio]),
.ui-dialog select,.ui-dialog textarea{
  color:var(--text)!important;
  background-color:var(--surface-2)!important;
  border:1px solid var(--border)!important;
  caret-color:var(--text);
}
.app-content input::placeholder,.app-content textarea::placeholder,
.ui-modal input::placeholder,.ui-modal textarea::placeholder{
  color:var(--muted)!important;opacity:.85!important;
}
.app-content input:focus,.app-content select:focus,.app-content textarea:focus,
.ui-modal input:focus,.ui-modal select:focus,.ui-modal textarea:focus{
  outline:none!important;border-color:var(--ui-amber)!important;
  box-shadow:0 0 0 3px rgba(245,158,11,.2)!important;
}
.app-content input:disabled,.app-content select:disabled,.app-content textarea:disabled,
.ui-modal input:disabled,.ui-modal select:disabled,.ui-modal textarea:disabled{
  opacity:.55!important;cursor:not-allowed!important;color:var(--muted)!important;
}
.ui-table thead th{color:var(--muted)!important;background:var(--surface-2)!important}
.ui-table tbody td{color:var(--text)}
a:focus-visible,button:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--ui-amber)!important;outline-offset:2px!important;
}
.ui-label-row{display:flex;align-items:center;gap:.4rem;margin-bottom:.4rem}
.ui-label{display:block;font-size:.7rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0}
.ui-req{color:var(--ui-danger);font-weight:700;margin-left:.15rem}
.ui-opt{font-size:.65rem;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted);opacity:.8;margin-left:.35rem}
.ui-hint{display:block;margin-top:.35rem;font-size:.7rem;line-height:1.4;color:var(--muted)}
.ui-help{display:inline-flex;align-items:center;justify-content:center;width:1.05rem;height:1.05rem;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--muted);font-size:.65rem;font-weight:800;cursor:help;flex-shrink:0;line-height:1;padding:0}
.ui-help:hover,.ui-help:focus-visible{color:#fff;background:var(--ui-amber);border-color:var(--ui-amber)}
.ui-tip{position:absolute;z-index:90;max-width:16rem;padding:.65rem .75rem;border-radius:.75rem;background:#0f172a;color:#f8fafc;font-size:.72rem;line-height:1.45;box-shadow:0 12px 30px rgba(0,0,0,.28);pointer-events:none;animation:ui-fade-in .12s ease}
.ui-tip::after{content:'';position:absolute;left:.85rem;top:100%;border:6px solid transparent;border-top-color:#0f172a}
.ui-seg{display:flex;flex-wrap:wrap;gap:.35rem;padding:.25rem;background:var(--surface-2);border:1px solid var(--border);border-radius:.85rem}
.ui-seg label{flex:1 1 auto;min-width:5.5rem;text-align:center;cursor:pointer;margin:0!important;position:relative}
.ui-seg input{position:absolute;opacity:0;pointer-events:none}
.ui-seg span{display:block;padding:.45rem .6rem;border-radius:.65rem;font-size:.7rem;font-weight:700;color:var(--muted);transition:.15s ease}
.ui-seg input:checked+span{background:var(--ui-amber);color:#fff}
/* HTTP / HTTPS scheme toggle — visually separate buttons */
.ui-scheme-toggle{display:inline-flex;align-items:stretch;gap:.35rem;padding:.35rem;background:var(--surface-2);border:1px solid var(--border);border-radius:.85rem}
.ui-scheme-btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-width:5.5rem;padding:.55rem 1.1rem;border-radius:.65rem;font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;border:2px solid transparent;background:var(--surface);color:var(--muted);cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .1s ease;line-height:1}
.ui-scheme-btn:hover{color:var(--text);transform:translateY(-1px)}
.ui-scheme-btn:active{transform:translateY(0)}
.ui-scheme-btn[data-scheme="https"]:not(.is-active){color:#059669;border-color:rgba(5,150,105,.25)}
.ui-scheme-btn[data-scheme="http"]:not(.is-active){color:#d97706;border-color:rgba(217,119,6,.25)}
.ui-scheme-btn.is-active[data-scheme="https"]{background:#059669;border-color:#047857;color:#fff;box-shadow:0 4px 14px rgba(5,150,105,.35)}
.ui-scheme-btn.is-active[data-scheme="http"]{background:#d97706;border-color:#b45309;color:#fff;box-shadow:0 4px 14px rgba(217,119,6,.35)}
html.dark .ui-scheme-btn.is-active[data-scheme="https"]{background:#10b981;border-color:#34d399}
html.dark .ui-scheme-btn.is-active[data-scheme="http"]{background:#f59e0b;border-color:#fbbf24;color:#1e293b}
.ui-scheme-panel{display:flex;flex-wrap:wrap;align-items:center;gap:1rem;padding:1rem 1.15rem;border-radius:1rem;border:1px solid var(--border);background:var(--surface)}
.ui-scheme-panel__label{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:0}
.ui-scheme-divider{width:1px;align-self:stretch;background:var(--border);min-height:2.5rem}
.ui-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .55rem;border-radius:999px;font-size:.65rem;font-weight:800}
.ui-badge--ok{background:rgba(16,185,129,.12);color:#059669}
.ui-badge--warn{background:rgba(245,158,11,.14);color:#b45309}
.ui-badge--err{background:rgba(239,68,68,.12);color:#dc2626}
.ui-badge--info{background:rgba(59,130,246,.12);color:#2563eb}
.ui-badge--muted{background:rgba(100,116,139,.12);color:#475569}
html.dark .ui-badge--ok{color:#34d399}
html.dark .ui-badge--warn{color:#fbbf24}
html.dark .ui-badge--err{color:#f87171}
html.dark .ui-badge--info{color:#60a5fa}
html.dark .ui-badge--muted{color:#94a3b8}
.ui-empty-title{color:var(--text)!important}
.ui-empty-text{color:var(--muted)!important}
.ui-guide{border:1px solid var(--border);background:var(--surface);border-radius:1.25rem;padding:1rem 1.15rem}
.ui-guide h3{margin:0 0 .35rem;font-size:.85rem;font-weight:800;color:var(--text)}
.ui-guide p{margin:0;font-size:.78rem;color:var(--muted);line-height:1.45}
