:root {
  color-scheme: dark;
  --bg: #050508;
  --panel: rgba(16, 16, 24, 0.86);
  --panel-strong: rgba(25, 25, 36, 0.94);
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(189, 98, 255, 0.38);
  --text: #f8f4ff;
  --muted: #b6afbd;
  --dim: #716a78;
  --accent: #8e35ff;
  --accent-2: #c688ff;
  --accent-3: #f3f0ff;
  --good: #58e19a;
  --warn: #ffc65c;
  --bad: #ff5c7a;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(142, 53, 255, 0.28), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(198, 136, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(77, 36, 140, 0.18), transparent 38%),
    linear-gradient(145deg, #020204, #101018 48%, #050508);
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; }
button { user-select: none; }

.app-shell { width: min(1660px, calc(100vw - 40px)); margin: 0 auto; padding: 24px 0 48px; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(8, 8, 13, 0.78);
  backdrop-filter: blur(22px);
  border-radius: 30px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 20;
}
.brand-lockup { display: flex; align-items: center; gap: 18px; min-width: 340px; }
.brand-logo {
  object-fit: contain;

  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(142, 53, 255, .12), rgba(0,0,0,.2));
  box-shadow: 0 0 32px rgba(142, 53, 255, .18);
}
.eyebrow { color: var(--accent-2); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; font-weight: 900; }
h1 { margin: 4px 0 4px; font-size: clamp(24px, 3.4vw, 48px); letter-spacing: .055em; line-height: 0.98; }
h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: .02em; }
p { margin: 0; color: var(--muted); }
.subtitle { color: #ddd1ec; }
.topbar-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; justify-content: flex-end; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.field.compact { min-width: 98px; }
.token-field { min-width: min(320px, 100%); }
.token-input, input, textarea, .select-input, select {
  color: var(--text);
  background: rgba(0,0,0,.32);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}
textarea { resize: vertical; min-height: 86px; }
.token-input:focus, input:focus, textarea:focus, select:focus {
  border-color: rgba(198, 136, 255, .78);
  box-shadow: 0 0 0 3px rgba(142, 53, 255, .16);
}
.button {
  border: 1px solid rgba(255, 255, 255, .13);
  color: #fff;
  background: linear-gradient(135deg, #5a35b8, #2a2145);
  padding: 12px 15px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.26); }
.button:active { transform: translateY(0); }
.button.danger { background: linear-gradient(135deg, #8e35ff, #421071); }
.button.secondary { background: rgba(255,255,255,.07); }
.button.ghost { background: rgba(255,255,255,.035); color: var(--muted); }
.button.tiny { padding: 6px 9px; border-radius: 10px; font-size: 12px; }
.button-group { display: flex; gap: 8px; flex-wrap: wrap; }
main { display: grid; gap: 18px; margin-top: 20px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .metric-card, .worker-card, .job-card, .toolbar-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.panel { padding: 20px; overflow: hidden; }
.hero-panel { min-height: 440px; }
.panel-title-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.status-pill { border: 1px solid var(--line); border-radius: 18px; padding: 14px 15px; background: rgba(255,255,255,.045); min-width: 0; }
.status-pill strong { display: block; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill span { color: var(--muted); font-size: 13px; }
.toolbar-panel { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px; position: sticky; top: 160px; z-index: 10; }
.tabbar { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); border-radius: 999px; padding: 10px 13px; cursor: pointer; font-weight: 900; }
.tab-button.active { color: var(--text); border-color: var(--line-strong); background: rgba(142, 53, 255, .18); }
.toolbar-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.search-input { min-width: min(360px, 100%); }
.view-section { display: none; }
.view-section.active { display: grid; gap: 18px; }
.metric-card { padding: 18px; }
.metric-card .value { font-size: 34px; font-weight: 950; margin-top: 8px; }
.metric-card .label { color: var(--muted); }
.cards-list { display: grid; gap: 12px; }
.cards-list.compact { max-height: 560px; overflow: auto; padding-right: 4px; }
.worker-card { padding: 16px; display: grid; gap: 12px; background: var(--panel-strong); }
.worker-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.worker-name { font-weight: 950; font-size: 18px; }
.worker-meta, .muted { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; background: rgba(255,255,255,.055); color: var(--muted); white-space: nowrap; }
.badge.online, .badge.available, .badge.ready, .badge.ok, .badge.done, .badge.finished { color: var(--good); border-color: rgba(88,225,154,.34); }
.badge.busy, .badge.running, .badge.dispatched, .badge.leased { color: var(--warn); border-color: rgba(255,198,92,.34); }
.badge.offline, .badge.failed, .badge.bad, .badge.down, .badge.cancelled { color: var(--bad); border-color: rgba(255,92,122,.34); }
.badge.queued, .badge.open, .badge.unchecked { color: var(--accent-2); border-color: rgba(198,136,255,.34); }
.worker-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; color: #efe8ff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: rgba(0,0,0,.22); }
.stacked-form { display: grid; gap: 12px; }
.stacked-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 900; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input { flex: 1; min-width: 0; }
.form-hint { color: var(--dim); font-size: 12px; min-height: 16px; }
.form-hint.ok { color: var(--good); }
.form-hint.bad { color: var(--bad); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 740px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
th { color: var(--accent-2); background: rgba(0,0,0,.28); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.action-result, .console-output { margin-top: 12px; }
.action-result pre { white-space: pre-wrap; overflow: auto; max-height: 280px; }
.console-output { min-height: 180px; max-height: 480px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: rgba(0,0,0,.3); color: #f2eaff; }
.log-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; padding-right: 4px; }
.log-line { border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.2); padding: 10px 12px; }
.log-line .type { font-weight: 950; color: var(--accent-2); }
.log-line .msg { color: var(--muted); margin-top: 4px; font-size: 13px; }
.empty { color: var(--dim); border: 1px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; }
.split-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 10px; font-size: 13px; color: var(--muted); }
.kv strong { color: var(--text); font-weight: 850; overflow: hidden; text-overflow: ellipsis; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent-3); background: rgba(0,0,0,.24); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) {
  .topbar { display: grid; }
  .topbar-actions { justify-content: stretch; }
  .grid.two { grid-template-columns: 1fr; }
  .toolbar-panel { top: 184px; display: grid; }
  .status-strip, .grid.three { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .app-shell { width: min(100vw - 20px, 1660px); padding-top: 10px; }
  .brand-lockup { min-width: 0; align-items: flex-start; }
  .brand-logo { width: 76px; height: 76px; border-radius: 18px; }
  .status-strip, .grid.three { grid-template-columns: 1fr; }
  .topbar-actions, .inline-form, .toolbar-tools { display: grid; width: 100%; }
  .toolbar-panel { position: static; }
}


/* UI configuration pass -------------------------------------------------- */
:root[data-accent="ember"] {
  --accent: #ff4e35;
  --accent-2: #ff9b6e;
  --line-strong: rgba(255, 78, 53, 0.42);
}

:root[data-accent="steel"] {
  --accent: #4c9dff;
  --accent-2: #9dccff;
  --line-strong: rgba(76, 157, 255, 0.42);
}

:root[data-density="compact"] {
  --radius: 16px;
}

:root[data-density="compact"] .app-shell { padding-top: 14px; }
:root[data-density="compact"] .panel,
:root[data-density="compact"] .metric-card,
:root[data-density="compact"] .worker-card { padding: 14px; }
:root[data-density="compact"] .topbar { padding: 14px 16px; }
:root[data-density="compact"] .brand-logo { width: 82px; height: 82px; }
:root[data-density="compact"] h1 { font-size: clamp(23px, 3.2vw, 38px); }
:root[data-density="compact"] .cards-list { gap: 9px; }
:root[data-density="compact"] .kv { gap: 5px 10px; }
:root[data-card-style="dense"] .chips { display: none; }
:root[data-card-style="dense"] .worker-card { gap: 8px; }

:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

.settings-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
    rgba(10, 10, 15, .74);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.settings-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.ui-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}

.ui-switch-field {
  min-height: 58px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(198,136,255,.10), transparent 36%),
    rgba(0,0,0,.22);
  transition: border-color .18s var(--kh-ease-premium), background .18s var(--kh-ease-premium), transform .18s var(--kh-ease-premium);
}

.ui-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ui-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -10px 20px rgba(0,0,0,.22);
  transition: border-color .22s var(--kh-ease-premium), background .22s var(--kh-ease-premium), box-shadow .22s var(--kh-ease-premium);
}

.ui-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #aeb8c7;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(211,218,232,.86));
  box-shadow: 0 10px 22px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.62);
  transition: transform .24s var(--kh-ease-premium), color .2s var(--kh-ease-premium), background .2s var(--kh-ease-premium);
}

.ui-switch-symbol {
  grid-area: 1 / 1;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  transform: scale(.72) rotate(-12deg);
  opacity: 0;
  transition: opacity .16s var(--kh-ease-premium), transform .2s var(--kh-ease-premium);
}

.ui-switch-symbol.off {
  opacity: 1;
  transform: scale(.9) rotate(0deg);
}

.ui-switch-input:checked + .ui-switch-track {
  border-color: rgba(198,136,255,.48);
  background:
    radial-gradient(circle at 75% 50%, rgba(255,255,255,.26), transparent 24%),
    linear-gradient(135deg, rgba(157,78,221,.92), rgba(236,72,153,.58));
  box-shadow: 0 0 0 3px rgba(157,78,221,.12), inset 0 1px 0 rgba(255,255,255,.18);
}

.ui-switch-input:checked + .ui-switch-track .ui-switch-thumb {
  transform: translateX(22px);
  color: #7c2bd3;
  background: linear-gradient(180deg, #ffffff, #f0e7ff);
}

.ui-switch-input:checked + .ui-switch-track .ui-switch-symbol.on {
  opacity: 1;
  transform: scale(.92) rotate(0deg);
}

.ui-switch-input:checked + .ui-switch-track .ui-switch-symbol.off {
  opacity: 0;
  transform: scale(.7) rotate(12deg);
}

.ui-switch-input:focus-visible + .ui-switch-track {
  outline: 2px solid rgba(198,136,255,.60);
  outline-offset: 3px;
}

.ui-switch:hover .ui-switch-track {
  border-color: rgba(198,136,255,.34);
}

.ui-switch-field:hover {
  transform: translateY(-1px);
  border-color: rgba(198,136,255,.28);
  background:
    radial-gradient(circle at 100% 0, rgba(198,136,255,.16), transparent 38%),
    rgba(255,255,255,.055);
}

.ui-switch-label {
  min-width: 0;
  color: inherit;
}

.swipe-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  touch-action: pan-y;
}

.swipe-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.018)),
    var(--panel-strong);
  transition: transform .18s ease;
  will-change: transform;
}

.swipe-dragging .swipe-content {
  transition: none;
}

.swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 132px;
  background:
    linear-gradient(135deg, rgba(142,53,255,.25), rgba(0,0,0,.12));
}

.swipe-action {
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  min-width: 64px;
  font-weight: 900;
  background: rgba(255,255,255,.08);
}

.swipe-action.danger {
  background: linear-gradient(135deg, var(--accent), rgba(85, 22, 120, .85));
}

:root[data-swipe-actions="false"] .swipe-actions {
  display: none;
}

:root[data-swipe-actions="false"] .swipe-content {
  transform: none !important;
}

.dense-card .swipe-content {
  gap: 8px;
}

.meta-note {
  color: var(--dim);
  font-size: 12px;
}

.tabbar {
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  white-space: nowrap;
}

.table-wrap {
  scrollbar-width: thin;
}

@media (max-width: 1220px) {
  .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .settings-head { display: grid; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-panel { padding: 12px; }
  .swipe-content { padding: 14px; }
  .worker-actions .button.secondary {
    display: none;
  }
}

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


/* Toast + non-blocking adaptive header pass ------------------------------ */
.topbar {
  position: relative;
  top: auto;
  z-index: 1;
  align-items: stretch;
}

.toolbar-panel {
  position: static;
  top: auto;
  z-index: 1;
}

.brand-lockup {
  min-width: min(520px, 100%);
}

.topbar-actions {
  max-width: min(860px, 100%);
}

main {
  isolation: isolate;
}

.toast-viewport {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    rgba(13, 13, 20, .94);
  box-shadow: 0 18px 58px rgba(0,0,0,.42);
  backdrop-filter: blur(20px);
  touch-action: pan-y;
  animation: toast-in .18s ease-out;
}

.toast-dragging {
  transition: none !important;
}

.toast-exit-left {
  transform: translateX(-120%) !important;
  opacity: 0 !important;
  transition: transform .12s ease-in, opacity .12s ease-in;
}

.toast-exit-right {
  transform: translateX(120%) !important;
  opacity: 0 !important;
  transition: transform .12s ease-in, opacity .12s ease-in;
}

.toast-rail {
  background: var(--accent);
}

.toast-success .toast-rail { background: var(--good); }
.toast-warning .toast-rail { background: var(--warn); }
.toast-error .toast-rail { background: var(--bad); }
.toast-info .toast-rail { background: var(--accent-2); }

.toast-body {
  padding: 12px 13px;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.toast-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.toast-title-row strong {
  font-size: 14px;
  letter-spacing: .01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-body p {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.toast-close {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  flex: 0 0 auto;
}

.toast-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

@keyframes toast-in {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

  .topbar-actions {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100vw - 18px, 1660px);
  }

  .topbar {
    padding: 14px;
    border-radius: 22px;
  }

  .brand-lockup {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .12em;
  }

  h1 {
    font-size: clamp(21px, 7vw, 34px);
    word-break: break-word;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .token-field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .topbar-actions .button {
    width: 100%;
  }

  .toolbar-panel {
    padding: 10px;
    gap: 10px;
  }

  .tabbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tab-button {
    flex: 0 0 auto;
  }
}

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

  .brand-lockup {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .subtitle {
    display: none;
  }

  .toast-viewport {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
  }

  .toast-body {
    padding: 11px 12px;
  }
}


/* Usefulness UI pass: drawer, grouped actions, live overview -------------- */
.burger-button {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,.055);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.burger-button span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.burger-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.live-overview {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(170px, .75fr));
  gap: 12px;
}

.live-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.022)),
    rgba(9, 9, 14, .72);
  border-radius: 20px;
  padding: 13px 14px;
  min-width: 0;
  box-shadow: 0 18px 54px rgba(0,0,0,.24);
}

.live-card.primary {
  border-color: var(--line-strong);
}

.live-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.live-card strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card p {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-state {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-state strong {
  margin: 0;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(255,198,92,.12);
}

.live-dot.on {
  background: var(--good);
  box-shadow: 0 0 0 6px rgba(88,225,154,.12), 0 0 20px rgba(88,225,154,.34);
  animation: live-pulse 1.6s ease-in-out infinite;
}

.live-dot.poll {
  background: var(--warn);
}

@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.72); opacity: .72; }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(3px);
}

.action-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(520px, calc(100vw - 18px));
  display: grid;
  align-content: start;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) 16px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 0% 0%, rgba(142,53,255,.22), transparent 34%),
    linear-gradient(145deg, rgba(14,14,22,.98), rgba(4,4,8,.98));
  border-left: 1px solid var(--line-strong);
  box-shadow: -32px 0 92px rgba(0,0,0,.56);
  transform: translateX(105%);
  transition: transform .22s ease;
}

.action-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 15px;
  background: rgba(255,255,255,.045);
}

.drawer-head h2 {
  margin: 4px 0;
}

.drawer-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,.04);
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent-2);
}

.drawer-section-note {
  font-size: 12px;
  margin-bottom: 10px;
}

.drawer-action-grid,
.drawer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.drawer-action-grid .button,
.drawer-nav-button {
  width: 100%;
}

.drawer-nav-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.drawer-nav-button.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(142,53,255,.2);
}

.drawer-live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.drawer-live-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 11px;
  background: rgba(255,255,255,.04);
  min-width: 0;
}

.drawer-live-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-live-card p {
  font-size: 12px;
}

.visual-settings-section .settings-panel {
  box-shadow: none;
  padding: 0;
  background: transparent;
  border: 0;
}

.visual-settings-section .settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.drawer-open {
  overflow: hidden;
}

@media (max-width: 1060px) {
  .live-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: start;
  }

  .burger-button {
    position: absolute;
    right: 14px;
    top: 14px;
  }

  .brand-lockup {
    padding-right: 56px;
  }

  .live-overview {
    grid-template-columns: 1fr;
  }

  .drawer-live-summary,
  .drawer-action-grid,
  .drawer-nav,
  .visual-settings-section .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .action-drawer {
    width: 100vw;
    border-left: 0;
  }
}


/* Clarity pass: auto-onboarding and reduced duplicated actions ----------- */
.onboarding-panel {
  display: grid;
  align-content: start;
}

.onboarding-guide {
  display: grid;
  gap: 13px;
}

.onboarding-status {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255,255,255,.04);
}

.onboarding-status.ready {
  border-color: rgba(88, 225, 154, .32);
}

.onboarding-status.blocked {
  border-color: rgba(255, 198, 92, .32);
}

.onboarding-status strong {
  display: block;
  margin-bottom: 3px;
}

.onboarding-steps {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.onboarding-steps li {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0,0,0,.18);
}

.onboarding-steps strong {
  display: block;
  margin-bottom: 4px;
}

.onboarding-steps p,
.onboarding-status p {
  font-size: 13px;
  line-height: 1.38;
}

.onboarding-code {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(0,0,0,.28);
}

.onboarding-code div {
  min-width: 0;
}

.onboarding-code span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.onboarding-code code {
  display: block;
  color: var(--accent-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-result:empty {
  display: none;
}

.command-layout {
  align-items: start;
}

@media (max-width: 720px) {
  .onboarding-code {
    align-items: stretch;
    display: grid;
  }
}


/* v0.4.3 fixed sidebar admin layout + modal system ----------------------- */
body {
  background: #eef0f5;
  color: var(--text);
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background: #eef0f5;
}

.left-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 12px;
  background:
    radial-gradient(circle at 52% 6%, rgba(142,53,255,.24), transparent 28%),
    linear-gradient(180deg, #090d13, #030508 78%);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 26px 0 70px rgba(0,0,0,.2);
}

.sidebar-top {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.sidebar-burger {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  color: #cfd4df;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 4px;
}

.sidebar-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.sidebar-logo {
  object-fit: contain;

  width: 168px;
  height: 168px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(142,53,255,.34));
}

.sidebar-brand {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: -18px;
  color: #f3efff;
  letter-spacing: .16em;
}

.sidebar-brand strong {
  font-size: 15px;
}

.sidebar-brand span {
  color: var(--accent-2);
  font-size: 10px;
}

.side-nav {
  overflow-y: auto;
  padding: 6px 0;
}

.side-nav-group {
  display: grid;
  gap: 5px;
  margin: 18px 0;
}

.side-nav-heading {
  padding: 0 12px 6px;
  color: #8b93a0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.side-nav-item {
  min-height: 38px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 6px;
  margin: 0 0;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d7dce7;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.side-nav-item span {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  color: #d7c7ff;
}

.side-nav-item.active,
.side-nav-item:hover {
  color: #fff;
  background: rgba(142,53,255,.24);
  border-color: rgba(198,136,255,.18);
}

.sidebar-user-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 50px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}

.sidebar-user-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 999px;
  background: rgba(142,53,255,.12);
}

.sidebar-user-card strong {
  display: block;
  color: #fff;
}

.sidebar-user-card span:not(.live-dot) {
  color: #9ca4af;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: #202534;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
  background:
    radial-gradient(circle at 0 0, rgba(135, 88, 255, .12), transparent 26%),
    linear-gradient(180deg, rgba(13, 18, 25, .96), rgba(9, 13, 19, .92));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 34px rgba(2, 6, 14, .18);
  backdrop-filter: blur(10px);
  color: #f4f6fb;
}

.page-title h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.1;
}

.page-title p {
  color: #8f98a8;
  margin-top: 4px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.search-shell {
  width: min(280px, 30vw);
  min-height: 38px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #9ca4af;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
}

.search-shell input {
  min-width: 0;
  color: #f4f6fb;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-shell kbd {
  color: #8993a2;
  font-size: 11px;
}

.system-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-left: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12);
  white-space: nowrap;
}

.compact-select {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  color: #9ca4af;
  font-size: 12px;
}

.icon-top-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #f4f6fb;
  background: rgba(255,255,255,.05);
  cursor: pointer;
}

.notification-dot {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.workspace-main {
  min-width: 0;
  padding: 24px 24px 18px;
  display: grid;
  gap: 16px;
}

.app-shell,
.topbar {
  all: unset;
}

.mobile-tabbar-panel {
  display: none;
}

.compact-status {
  display: none;
}

.live-overview {
  display: none;
}

.grid.six {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, .98fr);
  gap: 16px;
}

.dashboard-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .95fr);
  gap: 16px;
}

.panel,
.metric-card,
.worker-card {
  border: 1px solid rgba(13, 18, 25, .08);
  background: linear-gradient(145deg, #111923, #0d141d);
  color: #f4f6fb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(11, 16, 24, .18);
}

.panel {
  padding: 16px;
}

.panel p,
.worker-meta,
.muted {
  color: #9ba6b4;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-weight: 900;
  cursor: pointer;
}

.modern-metric {
  min-height: 148px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 6px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(142,53,255,.18);
  color: #d9b7ff;
  font-size: 23px;
  font-weight: 900;
}

.modern-metric .value {
  font-size: 28px;
  line-height: 1;
}

.sparkline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 34px;
  opacity: .78;
}

.sparkline svg {
  width: 100%;
  height: 100%;
}

.sparkline polyline {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-table th {
  color: #9ba6b4;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-name-cell {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-areas: "dot name" "dot id";
  align-items: center;
  gap: 2px 8px;
}

.worker-name-cell .row-dot {
  grid-area: dot;
}

.worker-name-cell strong {
  grid-area: name;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-name-cell small {
  grid-area: id;
  color: #8f98a8;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-summary-cell {
  display: grid;
  gap: 8px;
  min-width: 240px;
}

.worker-summary-line,
.worker-card-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.worker-summary-line span,
.worker-card-summary-line span {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.worker-summary-line strong,
.worker-card-summary-line strong {
  color: #f5f0ff;
  font-size: 12px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-summary-pill-row,
.worker-card-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.worker-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  color: #dbe3ef;
  font-size: 11px;
  font-weight: 800;
}

.worker-card-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.row-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(142,53,255,.5);
}

.row-dot.off {
  background: var(--bad);
}

.heartbeat-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.mini-chip-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #cfd6df;
  font-size: 11px;
  font-weight: 850;
}

.kebab-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: #bac4d0;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #f4f6fb;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  text-align: left;
}

.quick-action-card span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(142,53,255,.22);
  color: var(--accent-2);
  font-size: 21px;
  font-weight: 900;
}

.quick-action-card em {
  color: #aab2bf;
  font-style: normal;
  font-size: 24px;
}

.progress-line {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  margin: 8px 0;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.app-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100;
  width: min(720px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #f4f6fb;
  background:
    radial-gradient(circle at 0 0, rgba(142,53,255,.22), transparent 38%),
    linear-gradient(145deg, #111923, #090e15);
  border: 1px solid rgba(198,136,255,.28);
  border-radius: 18px;
  box-shadow: 0 32px 120px rgba(0,0,0,.54);
  transform: translate(-50%, -48%);
}

.app-modal.open {
  display: grid;
}

.modal-head,
.modal-footer {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.release-list,
.modal-steps,
.modal-action-stack {
  display: grid;
  gap: 10px;
}

.release-item,
.modal-steps > div,
.worker-modal-grid > div,
.modal-code-row {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 12px;
}

.modal-code-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.modal-code-row span,
.worker-modal-grid span {
  color: #9ba6b4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-code-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-2);
}

.modal-action-stack {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.worker-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.modal-open {
  overflow: hidden;
}

body.sidebar-collapsed .admin-layout {
  grid-template-columns: 82px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar-logo {
  width: 52px;
  height: 52px;
  margin-top: 34px;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .side-nav-heading,
body.sidebar-collapsed .side-nav-item strong,
body.sidebar-collapsed .sidebar-user-card div {
  display: none;
}

body.sidebar-collapsed .side-nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.sidebar-collapsed .sidebar-user-card {
  grid-template-columns: 1fr;
  justify-items: center;
}

@media (max-width: 1320px) {
  .grid.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .left-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto;
  }
  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .side-nav-group {
    margin: 6px 0;
  }
  .workspace-topbar {
    position: static;
    display: grid;
  }
  .topbar-tools {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .search-shell {
    width: 100%;
  }
  .mobile-tabbar-panel {
    display: grid;
    gap: 10px;
  }
  .grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.sidebar-collapsed .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace-main {
    padding: 12px;
  }
  .grid.six,
  .quick-action-grid,
  .worker-modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-code-row {
    grid-template-columns: 1fr;
  }
}


/* v0.4.4 hotfix: boot-safe nav + tighter admin workspace ---------------- */
.workers-panel {
  min-height: 420px;
}

.grid.six:empty {
  display: none;
}

.workspace-main {
  align-content: start;
}

.sidebar-logo {
  background: transparent;
}

.sidebar-top {
  overflow: hidden;
}

/* v0.4.6 single-left-burger + automatic UI sync cleanup ----------------- */
.live-dot.error {
  background: var(--bad);
  box-shadow: 0 0 0 6px rgba(255, 91, 109, .12), 0 0 20px rgba(255, 91, 109, .24);
}

#autoSyncPill strong {
  min-width: 132px;
}

.mobile-tabbar-panel .button.secondary {
  display: none;
}

/* Manual refresh controls were removed: SSE is primary, polling is fallback. */


.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 16px;
}

.chart-panel {
  min-width: 0;
}

.chart-panel-wide {
  overflow: hidden;
}

.chart-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 123, 255, .22);
  background: rgba(184, 123, 255, .08);
  color: #f4f6fb;
  font-size: 12px;
  font-weight: 900;
}

.metric-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.08);
  color: #d5dcec;
  background: rgba(255,255,255,.04);
}

.metric-trend.up {
  color: #8df5bf;
  border-color: rgba(88,225,154,.25);
  background: rgba(88,225,154,.08);
}

.metric-trend.down {
  color: #ff9aae;
  border-color: rgba(255,92,122,.22);
  background: rgba(255,92,122,.08);
}

.metric-trend.flat {
  color: #bca8df;
}

.modern-metric {
  min-height: 176px;
  border-color: rgba(255,255,255,.05);
  background:
    radial-gradient(circle at top right, rgba(142,53,255,.18), transparent 32%),
    linear-gradient(145deg, #0f1825, #0b121b);
}

.modern-metric .label {
  font-size: 13px;
  color: #b8c0d0;
}

.modern-metric p {
  max-width: calc(100% - 8px);
  padding-bottom: 42px;
}

.modern-metric .value {
  letter-spacing: -0.03em;
}

.sparkline {
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 44px;
}

.sparkline .sparkline-area {
  opacity: .9;
}

.sparkline polyline {
  stroke: #ba8eff;
  stroke-width: 2.75;
}

.chart-shell-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.chart-shell-stat {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.chart-shell-stat strong {
  font-size: 20px;
  line-height: 1;
}

.chart-shell-stat span {
  font-size: 12px;
  color: #9ba6b4;
}

.rt-chart {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  padding: 10px 12px 12px;
}

.rt-chart svg {
  display: block;
  width: 100%;
  height: 240px;
}

.chart-grid line {
  stroke: rgba(255,255,255,.08);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.violet { stroke: #c084fc; }
.chart-line.blue { stroke: #67b7ff; }
.chart-line.pink { stroke: #fb86cf; }
.chart-line.green { stroke: #70f0b0; }

.chart-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #97a3b7;
}

.chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ccd4e2;
  font-size: 12px;
  font-weight: 700;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.violet { background: #c084fc; }
.legend-dot.blue { background: #67b7ff; }
.legend-dot.pink { background: #fb86cf; }
.legend-dot.green { background: #70f0b0; }

.breakdown-grid {
  display: grid;
  gap: 12px;
}

.breakdown-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 12px;
}

.breakdown-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.breakdown-card p {
  margin: 0;
  font-size: 12px;
  color: #9ba6b4;
}

.gauge-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}

.gauge-svg {
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
}

.gauge-bg,
.gauge-value {
  fill: none;
  stroke-width: 8;
}

.gauge-bg {
  stroke: rgba(255,255,255,.08);
}

.gauge-value {
  stroke-linecap: round;
}

.gauge-svg.violet .gauge-value { stroke: #c084fc; }
.gauge-svg.blue .gauge-value { stroke: #67b7ff; }
.gauge-svg.pink .gauge-value { stroke: #fb86cf; }
.gauge-svg.green .gauge-value { stroke: #70f0b0; }

.gauge-value-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.gauge-value-text strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.gauge-value-text span {
  display: block;
  font-size: 11px;
  color: #9ba6b4;
}

@media (max-width: 1280px) {
  .grid.six {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .chart-shell-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .chart-shell-head {
    grid-template-columns: 1fr;
  }

  .breakdown-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}


/* v0.5.0 design-system pass: semantic surfaces, declarative UI rhythm ----- */
:root {
  --kh-bg-page: #eef0f5;
  --kh-shell: #0a0f16;
  --kh-shell-2: #101823;
  --kh-surface: #101923;
  --kh-surface-2: #121d29;
  --kh-surface-3: #192332;
  --kh-border: rgba(255, 255, 255, .075);
  --kh-border-strong: rgba(198, 136, 255, .28);
  --kh-text: #f5f7ff;
  --kh-text-soft: #c6cedd;
  --kh-text-muted: #98a3b5;
  --kh-purple: #9d4edd;
  --kh-purple-2: #c084fc;
  --kh-blue: #67b7ff;
  --kh-pink: #fb86cf;
  --kh-green: #70f0b0;
  --kh-radius-sm: 10px;
  --kh-radius-md: 14px;
  --kh-radius-lg: 18px;
  --kh-card-shadow: 0 18px 46px rgba(10, 14, 22, .20);
  --kh-glow-purple: 0 0 28px rgba(157, 78, 221, .26);
}

.workspace-main {
  background:
    radial-gradient(circle at 80% 0%, rgba(157, 78, 221, .08), transparent 28%),
    linear-gradient(180deg, #eef0f5, #e7eaf1 100%);
}

.panel,
.metric-card,
.worker-card,
.quick-action-card,
.breakdown-card,
.chart-shell-stat,
.rt-chart {
  border-color: var(--kh-border);
}

.panel,
.metric-card,
.worker-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(157, 78, 221, .10), transparent 34%),
    linear-gradient(145deg, var(--kh-surface), #0b121b);
  box-shadow: var(--kh-card-shadow);
}

.panel-title-row h2,
.page-title h1 {
  letter-spacing: -.025em;
}

.panel-title-row p,
.page-title p {
  color: var(--kh-text-muted);
}

.side-nav-item,
.quick-action-card,
.button,
.icon-top-button,
.kebab-button {
  transition:
    transform .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    box-shadow .16s ease;
}

.side-nav-item:hover,
.quick-action-card:hover,
.button:hover,
.icon-top-button:hover,
.kebab-button:hover {
  transform: translateY(-1px);
}

.metric-card.modern-metric {
  border-radius: var(--kh-radius-lg);
  background:
    radial-gradient(circle at 18% 0%, rgba(192, 132, 252, .17), transparent 30%),
    linear-gradient(145deg, #111b27, #09111a);
}

.metric-card.modern-metric::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,132,252,.42), transparent);
  pointer-events: none;
}

.metric-icon {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), var(--kh-glow-purple);
}

.metric-icon.queue { background: rgba(103, 183, 255, .15); color: var(--kh-blue); }
.metric-icon.bolt { background: rgba(251, 134, 207, .14); color: var(--kh-pink); }
.metric-icon.shield { background: rgba(112, 240, 176, .13); color: var(--kh-green); }

.admin-table {
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-radius-md);
  overflow: hidden;
}

.admin-table tr:hover td {
  background: rgba(255,255,255,.026);
}

.mini-chip {
  border: 1px solid rgba(255,255,255,.055);
  background: rgba(255,255,255,.07);
}

.chart-panel {
  background:
    radial-gradient(circle at 0 0, rgba(103, 183, 255, .07), transparent 28%),
    linear-gradient(145deg, #111a25, #0a1119);
}

.rt-chart,
.chart-shell-stat,
.breakdown-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
}

.chart-line {
  filter: drop-shadow(0 0 6px rgba(192,132,252,.24));
}

.gauge-value {
  filter: drop-shadow(0 0 6px rgba(192,132,252,.34));
}

.quick-action-card {
  border-radius: var(--kh-radius-md);
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
}

.quick-action-card:hover {
  border-color: var(--kh-border-strong);
  box-shadow: var(--kh-glow-purple);
}

.modal-body,
.action-drawer {
  scrollbar-width: thin;
  scrollbar-color: rgba(192,132,252,.55) transparent;
}

.modal-body::-webkit-scrollbar,
.action-drawer::-webkit-scrollbar {
  width: 9px;
}

.modal-body::-webkit-scrollbar-thumb,
.action-drawer::-webkit-scrollbar-thumb {
  background: rgba(192,132,252,.45);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

html[data-density="compact"] .panel {
  padding: 13px;
}

html[data-card-style="dense"] .modern-metric {
  min-height: 144px;
}

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  transition-duration: .001ms !important;
  animation-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}


/* v0.5.1 auth gate: token request is outside the work surface ------------ */
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  color: var(--kh-text, #f5f7ff);
  background:
    radial-gradient(circle at 20% 10%, rgba(157, 78, 221, .28), transparent 28%),
    radial-gradient(circle at 78% 74%, rgba(103, 183, 255, .10), transparent 30%),
    linear-gradient(145deg, #020205, #0a0f16 52%, #05050a);
}

.auth-gate[hidden] {
  display: none;
}

.auth-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(28px);
  opacity: .28;
  pointer-events: none;
}

.auth-orb-a {
  left: -110px;
  top: -90px;
  background: radial-gradient(circle, rgba(157,78,221,.88), transparent 68%);
}

.auth-orb-b {
  right: -130px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(192,132,252,.62), transparent 68%);
}

.auth-card {
  width: min(560px, 100%);
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  border: 1px solid rgba(198, 136, 255, .28);
  border-radius: 28px;
  padding: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(157,78,221,.22), transparent 34%),
    linear-gradient(145deg, rgba(18, 27, 39, .96), rgba(5, 8, 13, .98));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.auth-brand img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(157,78,221,.38));
}

.auth-brand h1 {
  margin: 4px 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: .95;
  letter-spacing: -.045em;
}

.auth-brand p {
  margin: 0;
  color: var(--kh-text-muted, #98a3b5);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-token-field {
  display: grid;
  gap: 8px;
}

.auth-token-field > span,
.auth-footer label span {
  color: var(--kh-text-soft, #c6cedd);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.auth-token-input {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255,255,255,.045);
}

.auth-token-input:focus-within {
  border-color: rgba(198,136,255,.55);
  box-shadow: 0 0 0 4px rgba(157,78,221,.16);
}

.auth-token-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0 10px;
  font-size: 16px;
}

.auth-token-input button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--kh-text, #f5f7ff);
  background: rgba(255,255,255,.06);
  cursor: pointer;
  font-weight: 900;
}

.auth-submit {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(198,136,255,.42);
  border-radius: 18px;
  padding: 0 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(157,78,221,.95), rgba(103, 58, 183, .78));
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(157,78,221,.22);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 58px rgba(157,78,221,.30);
}

.auth-error {
  border: 1px solid rgba(255,92,122,.32);
  border-radius: 16px;
  padding: 12px 14px;
  color: #ffd7df;
  background: rgba(255,92,122,.10);
  font-size: 13px;
  line-height: 1.35;
}

.auth-error[hidden] {
  display: none;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.075);
  padding-top: 16px;
}

.auth-footer label {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px;
}

.auth-footer p {
  margin: 0;
  color: var(--kh-text-muted, #98a3b5);
  font-size: 12px;
  text-align: right;
}

.sidebar-logout-button {
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #f5f7ff;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.sidebar-logout-button:hover {
  border-color: rgba(198,136,255,.38);
  background: rgba(157,78,221,.18);
}

body.auth-required .toast-viewport {
  z-index: 120;
}

@media (max-width: 620px) {
  .auth-card {
    padding: 20px;
  }

  .auth-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .auth-brand img {
    width: 112px;
    height: 112px;
  }

  .auth-footer {
    display: grid;
    justify-items: stretch;
  }

  .auth-footer p {
    text-align: left;
  }
}


/* v0.5.2 dashboard summary + copy blocks pass --------------------------- */
.copy-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(198, 136, 255, .24);
  border-radius: 12px;
  padding: 0 12px;
  background: linear-gradient(135deg, rgba(157, 78, 221, .18), rgba(255,255,255,.04));
  color: #f5f7ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(10, 14, 22, .18);
}

.copy-chip:hover {
  border-color: rgba(198, 136, 255, .42);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(157, 78, 221, .18);
}

.copy-chip.copied {
  border-color: rgba(112, 240, 176, .34);
  background: linear-gradient(135deg, rgba(112, 240, 176, .14), rgba(255,255,255,.04));
}

.copy-chip svg {
  width: 15px;
  height: 15px;
  opacity: .92;
}

.copy-info-grid {
  display: grid;
  gap: 12px;
}

.copy-info-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(157,78,221,.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.copy-info-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.copy-info-label {
  display: block;
  margin-bottom: 4px;
  color: #dce4f2;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.copy-info-card p {
  margin: 0;
  color: var(--kh-text-muted, #98a3b5);
  font-size: 12px;
  line-height: 1.45;
}

.copy-value-shell {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(5, 9, 14, .42);
}

.copy-value-shell code {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #f3f6ff;
  font-size: 13px;
  line-height: 1.45;
}

.breakdown-grid {
  display: grid;
  gap: 12px;
}

.breakdown-card {
  position: relative;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.04), transparent 32%),
    linear-gradient(145deg, rgba(11, 19, 29, .96), rgba(9, 15, 24, .98));
  box-shadow: 0 16px 34px rgba(3, 8, 14, .22), inset 0 1px 0 rgba(255,255,255,.025);
}

.breakdown-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.02), transparent 38%);
}

.breakdown-card.violet { box-shadow: 0 16px 34px rgba(3, 8, 14, .22), inset 0 1px 0 rgba(255,255,255,.025), 0 0 0 1px rgba(192,132,252,.04); }
.breakdown-card.blue { box-shadow: 0 16px 34px rgba(3, 8, 14, .22), inset 0 1px 0 rgba(255,255,255,.025), 0 0 0 1px rgba(103,183,255,.04); }
.breakdown-card.pink { box-shadow: 0 16px 34px rgba(3, 8, 14, .22), inset 0 1px 0 rgba(255,255,255,.025), 0 0 0 1px rgba(251,134,207,.04); }
.breakdown-card.green { box-shadow: 0 16px 34px rgba(3, 8, 14, .22), inset 0 1px 0 rgba(255,255,255,.025), 0 0 0 1px rgba(112,240,176,.04); }

.breakdown-main {
  display: grid;
  gap: 10px;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.breakdown-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.breakdown-card p {
  margin: 0;
  color: #9fb0c3;
  font-size: 12px;
  line-height: 1.45;
}

.breakdown-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 950;
  color: #edf2fb;
}

.breakdown-card.tone-good .breakdown-pill {
  color: #9bf6c7;
  border-color: rgba(112, 240, 176, .28);
  background: rgba(112, 240, 176, .10);
}

.breakdown-card.tone-mid .breakdown-pill {
  color: #f7dafd;
  border-color: rgba(198, 136, 255, .26);
  background: rgba(198, 136, 255, .11);
}

.breakdown-card.tone-low .breakdown-pill {
  color: #ffd9d9;
  border-color: rgba(255, 92, 122, .20);
  background: rgba(255, 92, 122, .09);
}

.breakdown-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.breakdown-meta > div {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 10px 11px;
  background: rgba(255,255,255,.03);
}

.breakdown-meta span {
  display: block;
  margin-bottom: 4px;
  color: #92a4b8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.breakdown-meta strong {
  display: block;
  color: #f6f8fc;
  font-size: 16px;
  line-height: 1;
}

.gauge-wrap {
  position: relative;
  width: 96px;
  min-width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.05), rgba(255,255,255,.01));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.gauge-svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}

.gauge-orbit,
.gauge-bg,
.gauge-value {
  fill: none;
}

.gauge-orbit {
  stroke: rgba(255,255,255,.03);
  stroke-width: 3;
}

.gauge-bg,
.gauge-value {
  stroke-width: 8;
}

.gauge-bg {
  stroke: rgba(255,255,255,.09);
}

.gauge-value {
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.08));
}

.gauge-svg.violet .gauge-value { stroke: #c084fc; }
.gauge-svg.blue .gauge-value { stroke: #67b7ff; }
.gauge-svg.pink .gauge-value { stroke: #fb86cf; }
.gauge-svg.green .gauge-value { stroke: #70f0b0; }

.gauge-value-text {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.gauge-value-text strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.04em;
}

.gauge-value-text span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: #b0bed0;
}

.gauge-footnote {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 44px;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(6, 10, 16, .74);
  color: #90a1b5;
  font-size: 10px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .copy-info-head {
    display: grid;
  }

  .breakdown-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .breakdown-head {
    display: grid;
    justify-items: center;
  }

  .breakdown-meta {
    grid-template-columns: 1fr;
  }
}

/* v0.5.3 premium UI + release notes + unified icon system ---------------- */
:root {
  --kh-font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kh-letter-tight: -.035em;
  --kh-ease-premium: cubic-bezier(.2,.8,.2,1);
  --kh-ring-violet: rgba(192,132,252,.42);
  --kh-card-premium:
    radial-gradient(circle at 16% 0%, rgba(192, 132, 252, .16), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(103, 183, 255, .06), transparent 30%),
    linear-gradient(145deg, rgba(17, 27, 39, .98), rgba(8, 14, 22, .98));
}

.ui-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.ui-icon.is-color-icon {
  background: var(--icon-url) center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
}

.nav-icon,
.metric-icon,
.quick-action-card > span,
.release-item-icon,
.release-hero-icon {
  display: inline-grid;
  place-items: center;
}

.nav-icon .ui-icon,
.quick-action-card .ui-icon,
.metric-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.workspace-topbar,
.left-sidebar,
.panel,
.metric-card,
worker-card,
.quick-action-card,
.app-modal,
.auth-card {
  font-family: var(--kh-font-display);
}

.page-title h1,
.panel-title-row h2,
.auth-brand h1 {
  letter-spacing: var(--kh-letter-tight);
  font-weight: 950;
}

.page-title p,
.panel-title-row p,
.metric-card p,
.breakdown-card p,
.quick-action-card strong {
  text-wrap: pretty;
}

.panel,
.metric-card,
.worker-card,
.quick-action-card,
.breakdown-card,
.chart-shell-stat,
.rt-chart,
.copy-info-card,
.status-pill,
.live-card,
.auth-card {
  transform: translateZ(0);
  transition:
    transform .18s var(--kh-ease-premium),
    border-color .18s var(--kh-ease-premium),
    box-shadow .18s var(--kh-ease-premium),
    background .18s var(--kh-ease-premium),
    opacity .18s var(--kh-ease-premium);
}

.panel:hover,
.metric-card:hover,
.breakdown-card:hover,
.copy-info-card:hover,
.quick-action-card:hover,
.live-card:hover {
  border-color: rgba(198,136,255,.26);
  box-shadow:
    0 22px 58px rgba(4, 8, 14, .30),
    0 0 0 1px rgba(198,136,255,.045),
    0 0 34px rgba(157,78,221,.13);
}

.metric-card:hover,
.breakdown-card:hover,
.quick-action-card:hover,
.copy-info-card:hover {
  transform: translateY(-2px);
}

.metric-card.modern-metric,
.panel.chart-panel,
.breakdown-card,
.copy-info-card,
.quick-action-card,
.worker-card {
  background: var(--kh-card-premium);
}

.side-nav-item {
  position: relative;
  overflow: hidden;
}

.side-nav-item::before {
  content: '';
  position: absolute;
  inset: 6px auto 6px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background .18s var(--kh-ease-premium), box-shadow .18s var(--kh-ease-premium);
}

.side-nav-item.active::before {
  background: var(--kh-purple-2, #c084fc);
  box-shadow: 0 0 18px rgba(192,132,252,.52);
}

.side-nav-item.active,
.side-nav-item:hover {
  background:
    radial-gradient(circle at 0 50%, rgba(192,132,252,.22), transparent 34%),
    rgba(255,255,255,.055);
}

.quick-action-card {
  position: relative;
  overflow: hidden;
}

.quick-action-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.07), transparent 42%);
  transition: opacity .18s var(--kh-ease-premium);
}

.quick-action-card:hover::after {
  opacity: 1;
}

.quick-action-card > span {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 0 24px rgba(157,78,221,.18);
}

.admin-table tr {
  transition: background .16s var(--kh-ease-premium), transform .16s var(--kh-ease-premium);
}

.admin-table tbody tr:hover td {
  background: rgba(198,136,255,.045);
}

.button,
.copy-chip,
.icon-top-button,
.sidebar-logout-button,
.kebab-button,
.link-button {
  transition:
    transform .16s var(--kh-ease-premium),
    box-shadow .16s var(--kh-ease-premium),
    border-color .16s var(--kh-ease-premium),
    background .16s var(--kh-ease-premium),
    color .16s var(--kh-ease-premium);
}

.button:hover,
.copy-chip:hover,
.icon-top-button:hover,
.sidebar-logout-button:hover,
.kebab-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.button:active,
.copy-chip:active,
.icon-top-button:active,
.sidebar-logout-button:active,
.kebab-button:active,
.quick-action-card:active,
.side-nav-item:active {
  transform: translateY(0) scale(.99);
}

.release-hero {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(198,136,255,.24);
  border-radius: 20px;
  padding: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(192,132,252,.22), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}

.release-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #f4eaff;
  background: linear-gradient(135deg, rgba(157,78,221,.55), rgba(103,58,183,.22));
  box-shadow: 0 0 34px rgba(157,78,221,.24);
}

.release-hero-icon .ui-icon {
  width: 27px;
  height: 27px;
}

.release-hero strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.release-hero p {
  margin: 0;
  color: #aab5c7;
  line-height: 1.45;
}

.premium-release-list {
  display: grid;
  gap: 12px;
}

.premium-release-item {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 13px;
  align-items: start;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(157,78,221,.10), transparent 32%),
    rgba(255,255,255,.035);
}

.release-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #d8bbff;
  background: rgba(157,78,221,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.release-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 5px;
}

.release-item-head strong {
  font-size: 15px;
}

.release-item-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(198,136,255,.22);
  color: #e7d4ff;
  background: rgba(198,136,255,.09);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.premium-release-item p {
  margin: 0;
  color: #9faabc;
  line-height: 1.45;
}

.release-copy-row {
  display: grid;
}

@media (max-width: 1320px) {
  .workspace-main {
    padding: 18px;
  }

  .grid.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid,
  .dashboard-bottom-grid,
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .left-sidebar {
    position: relative;
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .sidebar-logo {
    width: 96px;
    height: 96px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .side-nav-group {
    margin: 8px 0;
  }

  .side-nav-item {
    min-height: 44px;
  }

  .workspace-topbar {
    padding: 12px 14px;
  }

  .topbar-tools {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .search-shell {
    width: 100%;
  }

  .system-pill,
  .compact-select,
  .icon-top-button {
    justify-self: stretch;
  }

  .system-pill {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .workspace-main {
    padding: 12px;
    gap: 12px;
  }

  .grid.six,
  .chart-shell-head,
  .quick-action-grid,
  .breakdown-meta {
    grid-template-columns: 1fr;
  }

  .panel,
  .metric-card,
  .worker-card,
  .breakdown-card,
  .copy-info-card {
    border-radius: 16px;
  }

  .metric-card.modern-metric {
    min-height: 154px;
  }

  .rt-chart svg {
    height: 180px;
  }

  .release-hero,
  .premium-release-item {
    grid-template-columns: 1fr;
  }

  .release-item-head {
    display: grid;
  }

  .auth-card {
    border-radius: 22px;
  }
}


/* v0.5.3 interaction hotfix: real sidebar/release controls + header version */
.admin-layout {
  transition: grid-template-columns .24s var(--kh-ease-premium);
}

.left-sidebar,
.sidebar-logo,
.sidebar-brand,
.side-nav-heading,
.side-nav-item,
.side-nav-item strong,
.sidebar-user-card,
.sidebar-user-card div,
.workspace-main {
  transition:
    width .24s var(--kh-ease-premium),
    padding .24s var(--kh-ease-premium),
    margin .24s var(--kh-ease-premium),
    opacity .18s var(--kh-ease-premium),
    transform .18s var(--kh-ease-premium),
    grid-template-columns .24s var(--kh-ease-premium);
}

.sidebar-burger {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
  transition:
    background .18s var(--kh-ease-premium),
    border-color .18s var(--kh-ease-premium),
    transform .18s var(--kh-ease-premium),
    box-shadow .18s var(--kh-ease-premium);
}

.sidebar-burger:hover {
  border-color: rgba(198,136,255,.34);
  background: rgba(198,136,255,.12);
  box-shadow: 0 10px 28px rgba(0,0,0,.22), 0 0 24px rgba(157,78,221,.14);
  transform: translateY(-1px);
}

.sidebar-burger span {
  transition:
    transform .22s var(--kh-ease-premium),
    opacity .16s var(--kh-ease-premium),
    background .16s var(--kh-ease-premium);
}

.sidebar-burger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.sidebar-burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(.4);
}

.sidebar-burger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.page-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.panel-version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(198,136,255,.32);
  border-radius: 999px;
  color: #eadcff;
  background:
    radial-gradient(circle at 0 0, rgba(198,136,255,.22), transparent 70%),
    rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 0 22px rgba(157,78,221,.12);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  white-space: nowrap;
}

.icon-top-button {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.icon-top-button .ui-icon {
  width: 19px;
  height: 19px;
}

body.sidebar-collapsed .left-sidebar {
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-top {
  gap: 10px;
}

body.sidebar-collapsed .sidebar-burger {
  left: 24px;
}

body.sidebar-collapsed .side-nav-group {
  display: grid;
  justify-items: center;
}

body.sidebar-collapsed .side-nav-item {
  min-height: 46px;
  padding-inline: 0;
  width: 48px;
}

body.sidebar-collapsed .sidebar-user-card {
  padding: 8px;
}

body.sidebar-collapsed .sidebar-logout-button {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
  font-size: 0;
}

body.sidebar-collapsed .sidebar-logout-button::before {
  content: "⎋";
  font-size: 15px;
}

@media (max-width: 920px) {
  body.sidebar-collapsed .left-sidebar {
    display: none;
  }
}

/* v0.5.3 modal readability polish: clipped scroll body + solid footer/header */
.app-modal {
  height: min(82vh, 760px);
  min-height: min(520px, calc(100dvh - 28px));
  animation: kh-modal-in .22s var(--kh-ease-premium);
}

.modal-backdrop:not([hidden]) {
  animation: kh-backdrop-in .18s ease-out;
}

.modal-head,
.modal-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  backdrop-filter: blur(18px);
}

.modal-head {
  background:
    radial-gradient(circle at 0 0, rgba(198,136,255,.13), transparent 42%),
    linear-gradient(180deg, rgba(18, 25, 39, .98), rgba(13, 19, 29, .94));
}

.modal-footer {
  min-height: 80px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(12, 18, 27, .94), rgba(7, 12, 20, .99));
  box-shadow: 0 -18px 42px rgba(0,0,0,.34);
}

.modal-body {
  min-height: 0;
  padding: 18px 20px 24px 18px;
  overscroll-behavior: contain;
  scroll-padding: 18px 96px;
}

.release-copy-row {
  padding-bottom: 2px;
}

@keyframes kh-modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -48%) scale(1);
  }
}

@keyframes kh-backdrop-in {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

@media (max-width: 700px) {
  .app-modal {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
    border-radius: 18px;
  }

  .modal-head,
  .modal-body,
  .modal-footer {
    padding-inline: 12px;
  }

  .modal-footer {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .modal-footer .button {
    width: 100%;
  }

  .premium-release-item {
    gap: 10px;
  }
}

/* v0.5.4 portable initial setup ----------------------------------------- */
body.setup-required {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 0%, rgba(142, 53, 255, .24), transparent 42%),
    radial-gradient(circle at 10% 100%, rgba(255, 77, 128, .12), transparent 34%),
    #05070d;
}

.initial-setup-form {
  display: grid;
  gap: 14px;
}

.initial-setup-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(198,136,255,.25);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(142,53,255,.22), transparent 42%),
    rgba(255,255,255,.045);
}

.initial-setup-hero strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.initial-setup-hero code {
  display: inline-flex;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(0,0,0,.22);
}

.initial-setup-grid {
  display: grid;
  gap: 12px;
}

.initial-setup-field {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
}

.initial-setup-field.required {
  border-color: rgba(198,136,255,.28);
}

.initial-setup-field > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.initial-setup-field em {
  padding: 3px 8px;
  border: 1px solid rgba(198,136,255,.24);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.initial-setup-field p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.initial-setup-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.initial-setup-input-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(2, 4, 10, .72);
  outline: 0;
}

.initial-setup-input-row input:focus {
  border-color: rgba(198,136,255,.55);
  box-shadow: 0 0 0 4px rgba(142,53,255,.16);
}

.initial-setup-error {
  padding: 12px 14px;
  border: 1px solid rgba(255, 108, 108, .34);
  border-radius: 16px;
  color: #ffd6d6;
  background: rgba(255, 72, 72, .12);
  font-weight: 800;
}

@media (max-width: 700px) {
  .initial-setup-hero,
  .initial-setup-input-row {
    grid-template-columns: 1fr;
  }

  .initial-setup-input-row .button {
    width: 100%;
  }
}

/* v0.5.6 config inspector */
.config-layout {
  display: grid;
  gap: 18px;
}

.config-overview-panel,
.config-groups-panel,
.config-raw-panel {
  overflow: hidden;
}

.config-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.config-summary-card,
.config-source-card,
.config-health-item,
.config-group-card,
.config-field-row {
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
}

.config-summary-card {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 16px;
  border-radius: 20px;
}

.config-summary-card span,
.config-source-card span,
.config-field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.config-summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.config-health-list,
.config-source-list,
.config-groups-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.config-health-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
}

.config-health-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.config-health-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.config-health-item.critical {
  border-color: rgba(255, 91, 91, .42);
  background: linear-gradient(135deg, rgba(255, 74, 74, .15), rgba(255,255,255,.025));
}

.config-health-item.warning {
  border-color: rgba(255, 196, 87, .38);
  background: linear-gradient(135deg, rgba(255, 196, 87, .13), rgba(255,255,255,.025));
}

.config-health-item.info,
.config-health-item.ok {
  border-color: rgba(198,136,255,.25);
}

.config-source-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
}

.config-source-card.primary {
  border-color: rgba(198,136,255,.28);
  background:
    radial-gradient(circle at 0 0, rgba(142,53,255,.18), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.024));
}

.config-source-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.config-source-card em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 800;
}

.config-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-env-key-row,
.config-group-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-env-key-row .mini-chip.active {
  border-color: rgba(198,136,255,.38);
  color: var(--accent-2);
}

.config-groups-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.config-group-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border-radius: 22px;
}

.config-group-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.config-group-card h3 {
  margin: 0 0 6px;
}

.config-group-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.config-group-stats span {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(0,0,0,.16);
  color: var(--muted);
  font-size: 12px;
}

.config-group-stats strong {
  color: var(--text);
}

.config-field-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.config-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 240px);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
}

.config-field-row.from-env {
  border-color: rgba(112, 225, 177, .24);
}

.config-field-row.secret code {
  color: var(--accent-2);
}

.config-field-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-field-row code {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.config-raw-output {
  max-height: 560px;
  overflow: auto;
  margin-top: 12px;
}

.error-empty {
  border-color: rgba(255, 91, 91, .34);
  color: #ffd4d4;
}

@media (max-width: 1100px) {
  .config-summary-grid,
  .config-groups-grid,
  .config-source-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .config-summary-grid,
  .config-groups-grid,
  .config-source-grid,
  .config-field-row {
    grid-template-columns: 1fr;
  }

  .config-field-row code {
    text-align: left;
  }
}

/* v0.5.8 UI precision + editable config inspector ----------------------- */
.sidebar-user-card {
  grid-template-columns: 50px minmax(0, 1fr) auto;
  overflow: hidden;
}

.sidebar-user-card > div {
  min-width: 0;
}

.sidebar-user-card strong,
.sidebar-user-card span:not(.live-dot) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout-button {
  min-width: 66px;
  padding: 0 12px;
  white-space: nowrap;
}

.config-editor-status {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(198,136,255,.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(142,53,255,.12), rgba(255,255,255,.025));
  color: var(--muted);
  font-weight: 800;
}

.config-editor-status.error {
  border-color: rgba(255, 91, 91, .34);
  background: linear-gradient(135deg, rgba(255, 74, 74, .13), rgba(255,255,255,.025));
  color: #ffd4d4;
}

.config-field-row.editable {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 280px);
}

.config-field-row.dirty {
  border-color: rgba(198,136,255,.44);
  background:
    radial-gradient(circle at 100% 0, rgba(198,136,255,.14), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}

.config-editor-input,
.config-switch {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: var(--text);
  background: rgba(0,0,0,.18);
  font: 800 12px/1.2 var(--font, Inter, system-ui, sans-serif);
}

.config-editor-input {
  padding: 0 10px;
  outline: none;
}

.config-editor-input:focus {
  border-color: rgba(198,136,255,.55);
  box-shadow: 0 0 0 3px rgba(142,53,255,.16);
}

.config-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  cursor: pointer;
}

.config-switch input {
  accent-color: #9d4edd;
}

.config-switch.ui-switch {
  justify-content: space-between;
  padding: 5px 9px;
  overflow: hidden;
}

.config-switch .ui-switch-track {
  width: 46px;
  height: 26px;
}

.config-switch .ui-switch-thumb {
  width: 18px;
  height: 18px;
}

.config-switch .ui-switch-input:checked + .ui-switch-track .ui-switch-thumb {
  transform: translateX(20px);
}

.config-switch .ui-switch-label {
  color: #f7f1ff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 1280px) {
  .sidebar-user-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .sidebar-user-card .sidebar-logout-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .config-field-row.editable {
    grid-template-columns: 1fr;
  }
}

/* v0.6.0 worker realtime table + notification badge ---------------------- */
.notification-dot[hidden] {
  display: none !important;
}

.notification-dot {
  padding: 0 5px;
  line-height: 18px;
  box-shadow: 0 0 0 2px rgba(8, 10, 16, .96), 0 0 24px rgba(157, 78, 221, .42);
}

.live-dot.error {
  background: var(--bad);
  box-shadow: 0 0 0 6px rgba(255, 92, 122, .12), 0 0 20px rgba(255, 92, 122, .30);
}

.workers-table-wrap {
  overflow: auto;
}

.worker-realtime-table {
  min-width: 1180px;
}

.worker-realtime-table th[data-column="name"],
.worker-realtime-table td[data-column="name"] { width: 220px; }
.worker-realtime-table th[data-column="status"],
.worker-realtime-table td[data-column="status"] { width: 112px; }
.worker-realtime-table th[data-column="heartbeat"],
.worker-realtime-table td[data-column="heartbeat"] { width: 160px; }
.worker-realtime-table th[data-column="uptime"],
.worker-realtime-table td[data-column="uptime"] { width: 168px; }
.worker-realtime-table th[data-column="capabilities"],
.worker-realtime-table td[data-column="capabilities"] { width: 220px; }
.worker-realtime-table th[data-column="actions"],
.worker-realtime-table td[data-column="actions"] { width: 230px; }

.heartbeat-cell.detailed,
.worker-uptime-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.heartbeat-cell.detailed > div,
.worker-uptime-cell {
  display: grid;
  gap: 2px;
}

.heartbeat-cell.detailed strong,
.worker-uptime-cell strong {
  font-size: 12px;
  color: #eef2f8;
  white-space: nowrap;
}

.heartbeat-cell.detailed small,
.worker-uptime-cell small {
  color: #8f98a8;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.capability-cell > strong {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #f7f0ff;
  background: rgba(157, 78, 221, .20);
  border: 1px solid rgba(198, 136, 255, .24);
}

.capability-cell > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.muted-chip {
  color: #aeb6c4;
  background: rgba(255,255,255,.045);
}

.worker-realtime-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 6px;
}

.worker-rt-chip {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
}

.worker-rt-chip strong {
  color: #f5f0ff;
  font-size: 13px;
}

.worker-rt-chip em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-rt-chip.bad strong,
.worker-detail-stat.bad strong {
  color: var(--bad);
}

.worker-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.worker-table-action {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.08);
  color: #dbe3ef;
  background: rgba(255,255,255,.055);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s var(--kh-ease-premium), border-color .16s var(--kh-ease-premium), background .16s var(--kh-ease-premium);
}

.worker-table-action.primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(157,78,221,.42), rgba(192,132,252,.22));
  border-color: rgba(198,136,255,.32);
}

.worker-table-action:hover {
  transform: translateY(-1px);
  border-color: rgba(198,136,255,.36);
  background: rgba(157,78,221,.16);
}

.worker-detail-layout {
  display: grid;
  gap: 16px;
}

.worker-detail-section {
  display: grid;
  gap: 10px;
}

.worker-detail-section h3 {
  margin: 0;
  color: #f5f0ff;
  font-size: 14px;
  letter-spacing: -.01em;
}

.worker-detail-kv-grid,
.worker-detail-stat-grid,
.worker-hardware-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.worker-detail-kv,
.worker-detail-stat,
.worker-hardware-list {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}

.worker-detail-kv {
  padding: 12px 14px;
  min-width: 0;
}

.worker-detail-kv-label,
.worker-detail-stat span,
.worker-hardware-list header {
  display: block;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.worker-detail-kv-value {
  display: block;
  margin-top: 7px;
  color: #f7f1ff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.worker-detail-stat {
  padding: 11px 12px;
}

.worker-detail-stat strong {
  display: block;
  margin-top: 4px;
  color: #f7f1ff;
  font-size: 22px;
}

.worker-hardware-lists {
  display: grid;
  gap: 10px;
}

.worker-hardware-list {
  overflow: hidden;
}

.worker-hardware-list header {
  padding: 11px 13px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.worker-hardware-list > div {
  display: grid;
  gap: 0;
}

.worker-hardware-entry {
  padding: 11px 13px;
  color: #dbe3ef;
  font-size: 13px;
  line-height: 1.45;
  border-top: 1px solid rgba(255,255,255,.05);
}

.worker-hardware-entry:first-child {
  border-top: 0;
}

.worker-capability-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.worker-capability-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
}

.worker-capability-item code {
  color: var(--accent-2);
  overflow-wrap: anywhere;
}

.worker-capability-item p {
  font-size: 12px;
  color: #aab3c1;
}

.worker-detail-disclosure {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  overflow: hidden;
}

.worker-detail-disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: #f5f0ff;
  font-size: 13px;
  font-weight: 800;
}

.worker-detail-disclosure summary::-webkit-details-marker {
  display: none;
}

.worker-detail-disclosure[open] summary {
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.worker-detail-disclosure .worker-detail-json {
  border: 0;
  border-radius: 0;
  max-height: 200px;
}

.worker-detail-json {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.28);
  color: #dbe3ef;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 760px) {
  .worker-realtime-table {
    min-width: 1040px;
  }

  .worker-detail-kv-grid,
  .worker-detail-stat-grid,
  .worker-hardware-grid {
    grid-template-columns: 1fr;
  }

  .worker-row-actions {
    min-width: 200px;
  }
}

/* v0.6.5 premium authorization screen ----------------------------------- */
body.auth-required {
  overflow: hidden;
  background: #05030a;
}

.auth-gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 44px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7f3ff;
  background:
    linear-gradient(180deg, rgba(3, 3, 10, .08), rgba(3, 3, 10, .54)),
    radial-gradient(circle at 50% 16%, rgba(150, 75, 255, .18), transparent 30%),
    url('/assets/auth-background.png') center / cover no-repeat,
    #05030a;
}

.auth-gate::before,
.auth-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.auth-gate::before {
  background:
    radial-gradient(circle at 50% 2%, rgba(214, 167, 255, .20), transparent 18%),
    radial-gradient(circle at 16% 76%, rgba(157, 78, 221, .20), transparent 24%),
    radial-gradient(circle at 84% 76%, rgba(157, 78, 221, .20), transparent 24%);
  mix-blend-mode: screen;
}

.auth-gate::after {
  background:
    linear-gradient(90deg, rgba(0,0,0,.58), transparent 20%, transparent 80%, rgba(0,0,0,.58)),
    radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(0,0,0,.44) 100%);
}

.auth-gate[hidden] { display: none; }
.auth-orb { display: none; }

.auth-card {
  width: min(850px, calc(100vw - 28px));
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(207, 149, 255, .46);
  border-radius: clamp(28px, 3vw, 38px);
  background:
    radial-gradient(circle at 50% 0%, rgba(207,149,255,.20), transparent 24%),
    radial-gradient(circle at 0% 0%, rgba(157,78,221,.16), transparent 26%),
    linear-gradient(145deg, rgba(21, 18, 37, .82), rgba(4, 5, 12, .94) 58%, rgba(7, 6, 16, .88));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 0 56px rgba(157, 78, 221, .22),
    0 42px 130px rgba(0, 0, 0, .66);
  backdrop-filter: blur(22px) saturate(1.28);
  -webkit-backdrop-filter: blur(22px) saturate(1.28);
}

.auth-card::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: -2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(232, 198, 255, .95), rgba(147, 61, 255, .75), transparent);
  filter: blur(.2px);
  box-shadow: 0 0 34px rgba(198, 136, 255, .85);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(157,78,221,.055));
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: clamp(144px, 18vw, 205px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 42px);
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.auth-brand-logo,
.auth-brand img {
  width: clamp(132px, 17vw, 190px);
  height: clamp(132px, 17vw, 190px);
  object-fit: contain;
  justify-self: center;
  filter:
    drop-shadow(0 0 20px rgba(157,78,221,.34))
    drop-shadow(0 0 54px rgba(157,78,221,.28));
}

.auth-brand-copy { min-width: 0; }

.auth-brand .eyebrow {
  color: #d58dff;
  font-size: clamp(12px, 1.35vw, 16px);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 1000;
  text-shadow: 0 0 18px rgba(213,141,255,.46);
}

.auth-brand h1 {
  margin: 8px 0 12px;
  color: #fff;
  font-size: clamp(44px, 7vw, 76px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(255,255,255,.12), 0 18px 58px rgba(0,0,0,.52);
}

.auth-brand p {
  max-width: 520px;
  color: rgba(234, 226, 244, .78);
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.42;
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.auth-token-field { display: contents; }

.auth-field-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f1e8ff;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.auth-label-icon,
.auth-input-icon,
.auth-row-icon,
.auth-footer-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #c46cff;
}

.auth-label-icon .ui-icon,
.auth-input-icon .ui-icon,
.auth-row-icon .ui-icon,
.auth-footer-icon .ui-icon,
.auth-token-toggle .ui-icon {
  width: 22px;
  height: 22px;
}

.auth-label-icon {
  width: 26px;
  height: 26px;
}

.auth-token-input {
  min-height: 78px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(198,136,255,.58);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.050), rgba(255,255,255,.018)),
    rgba(7, 8, 18, .68);
  box-shadow:
    0 0 0 1px rgba(117,55,179,.10) inset,
    0 18px 44px rgba(0,0,0,.24);
  transition:
    border-color .18s var(--kh-ease-premium),
    box-shadow .18s var(--kh-ease-premium),
    background .18s var(--kh-ease-premium);
}

.auth-token-input:focus-within {
  border-color: rgba(223,181,255,.90);
  box-shadow:
    0 0 0 4px rgba(157,78,221,.18),
    0 0 34px rgba(157,78,221,.24),
    0 18px 44px rgba(0,0,0,.24);
}

.auth-input-icon,
.auth-row-icon,
.auth-footer-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(198,136,255,.18);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0, rgba(198,136,255,.20), transparent 52%),
    rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.auth-token-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -.03em;
}

.auth-token-input input::placeholder { color: rgba(222, 212, 233, .48); }

.auth-token-toggle {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  color: #f7efff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.030)),
    rgba(15, 14, 27, .86);
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition:
    transform .18s var(--kh-ease-premium),
    border-color .18s var(--kh-ease-premium),
    background .18s var(--kh-ease-premium),
    box-shadow .18s var(--kh-ease-premium);
}

.auth-token-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(198,136,255,.50);
  background: rgba(157,78,221,.14);
  box-shadow: 0 18px 42px rgba(0,0,0,.32), 0 0 22px rgba(157,78,221,.16);
}

.auth-remember-row {
  min-height: 84px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 6px 8px 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
}

.auth-remember-copy {
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.auth-remember-copy strong {
  color: #fff;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.1;
  font-weight: 1000;
}

.auth-remember-copy span {
  color: rgba(226, 218, 238, .70);
  font-size: clamp(13px, 1.2vw, 16px);
}

.auth-switch {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.auth-switch .ui-switch-track {
  width: 74px;
  height: 42px;
  border-color: rgba(198,136,255,.36);
  background: linear-gradient(180deg, rgba(255,255,255,.080), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 34px rgba(0,0,0,.26);
}

.auth-switch .ui-switch-thumb {
  width: 32px;
  height: 32px;
  top: 4px;
  left: 4px;
}

.auth-switch .ui-switch-input:checked + .ui-switch-track {
  border-color: rgba(232,198,255,.58);
  background:
    radial-gradient(circle at 80% 50%, rgba(255,255,255,.26), transparent 22%),
    linear-gradient(135deg, rgba(194,83,255,.98), rgba(126,43,221,.86));
  box-shadow:
    0 0 0 4px rgba(157,78,221,.14),
    0 0 30px rgba(157,78,221,.42),
    inset 0 1px 0 rgba(255,255,255,.20);
}

.auth-switch .ui-switch-input:checked + .ui-switch-track .ui-switch-thumb {
  transform: translateX(32px);
}

.auth-submit {
  min-height: 86px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 0;
  padding: 0 28px;
  border: 1px solid rgba(232,198,255,.52);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 16% 0, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, rgba(179,75,255,.98), rgba(94,20,154,.92));
  cursor: pointer;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 1000;
  letter-spacing: -.02em;
  text-align: left;
  box-shadow:
    0 24px 60px rgba(157,78,221,.30),
    0 0 34px rgba(157,78,221,.32),
    inset 0 1px 0 rgba(255,255,255,.22);
  transition:
    transform .18s var(--kh-ease-premium),
    border-color .18s var(--kh-ease-premium),
    box-shadow .18s var(--kh-ease-premium),
    filter .18s var(--kh-ease-premium);
}

.auth-submit:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.72);
  filter: saturate(1.08) brightness(1.04);
  box-shadow:
    0 32px 74px rgba(157,78,221,.38),
    0 0 50px rgba(198,136,255,.42),
    inset 0 1px 0 rgba(255,255,255,.28);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.26), transparent 42%),
    rgba(255,255,255,.12);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  font-size: 42px;
  line-height: 1;
}

.auth-submit strong {
  font-size: 32px;
  font-weight: 500;
}

.auth-error {
  border: 1px solid rgba(255,92,122,.40);
  border-radius: 18px;
  padding: 12px 14px;
  color: #ffdce4;
  background: linear-gradient(135deg, rgba(255,92,122,.14), rgba(255,92,122,.055));
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
}

.auth-error[hidden] { display: none; }

.auth-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  align-items: center;
  gap: 26px;
  padding-top: 4px;
  border-top: 0;
}

.auth-locale-field {
  display: grid;
  grid-template-columns: 46px auto minmax(180px, 250px);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.auth-locale-field > span:not(.auth-footer-icon) {
  color: #f2ebff;
  font-size: 15px;
  font-weight: 950;
  text-transform: none;
  letter-spacing: 0;
}

.auth-locale-field select,
.auth-footer .select-input {
  width: 100%;
  min-height: 54px;
  padding: 0 42px 0 18px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.028)),
    rgba(7,8,18,.76);
  font-weight: 850;
  appearance: auto;
}

.auth-security-hint {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: rgba(226,218,238,.72);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

@media (max-width: 900px) {
  .auth-card {
    width: min(680px, calc(100vw - 24px));
    max-height: calc(100svh - 24px);
    overflow: auto;
  }

  .auth-brand {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
  }

  .auth-brand-logo,
  .auth-brand img {
    width: 132px;
    height: 132px;
  }

  .auth-brand h1 { font-size: clamp(36px, 8vw, 58px); }

  .auth-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .auth-gate {
    align-items: start;
    padding: 12px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 24px;
  }

  .auth-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding-bottom: 18px;
  }

  .auth-brand-logo,
  .auth-brand img {
    width: 118px;
    height: 118px;
  }

  .auth-token-input {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 70px;
  }

  .auth-token-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .auth-remember-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  .auth-switch {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .auth-submit {
    min-height: 72px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding: 0 16px;
    font-size: 18px;
  }

  .auth-submit-icon {
    width: 44px;
    height: 44px;
  }

  .auth-locale-field { grid-template-columns: 46px 1fr; }
  .auth-locale-field select { grid-column: 1 / -1; }
  .auth-security-hint { font-size: 13px; }
}

/* v0.6.6 Command Deck: capability-aware command builder ------------------ */
.command-layout-v066 {
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.command-builder-panel,
.command-output-panel {
  overflow: visible;
}

.command-deck-title-row {
  align-items: start;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin: -4px -4px 16px;
  padding: 4px 4px 16px;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(189, 124, 255, .45);
  border-radius: 999px;
  color: var(--accent-3);
  background: rgba(125, 67, 216, .14);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  padding: 7px 10px;
  white-space: nowrap;
}

.command-builder-form {
  display: grid;
  gap: 16px;
}

.command-target-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
  gap: 12px;
  align-items: stretch;
}

.command-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.command-field > span,
.command-section-head .eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.command-field input,
.command-field textarea,
.command-field select,
.command-json-preview textarea {
  width: 100%;
}

.command-text-field input {
  min-height: 54px;
  border: 1px solid rgba(189, 124, 255, .30);
  border-radius: 18px;
  background: rgba(4, 8, 14, .72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 18px 60px rgba(0,0,0,.16);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 0 16px;
  outline: none;
}

.command-text-field input:focus {
  border-color: rgba(196, 123, 255, .74);
  box-shadow: 0 0 0 4px rgba(162, 89, 255, .16), inset 0 0 0 1px rgba(255,255,255,.05);
}

.command-worker-card,
.selected-capability-card,
.command-preset-hint,
.command-json-preview {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(157, 87, 255, .18), transparent 36%),
    rgba(8, 13, 22, .70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.command-worker-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  min-height: 92px;
}

.command-worker-card span,
.command-worker-card div {
  color: var(--muted);
  font-size: 12px;
}

.command-worker-card strong {
  color: var(--text);
  font-size: 15px;
}

.command-worker-card code {
  color: var(--accent-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-capability-shell {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 23, 35, .72), rgba(8, 12, 20, .62));
  padding: 14px;
}

.command-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-section-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.command-section-head strong {
  color: var(--text);
  font-size: 22px;
}

.selected-capability-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.selected-capability-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-capability-card code {
  color: var(--accent-3);
  font-size: 12px;
}

.selected-capability-card p {
  color: var(--muted);
  margin: 0;
}

.selected-capability-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.command-preset-shell {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.command-preset-hint {
  align-content: center;
  color: var(--muted);
  display: grid;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
}

.command-json-preview {
  color: var(--muted);
  padding: 0;
  overflow: hidden;
}

.command-json-preview summary {
  cursor: pointer;
  font-weight: 900;
  padding: 12px 14px;
}

.command-json-preview textarea {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  background: rgba(0,0,0,.26);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 12px 14px;
  resize: vertical;
}

.command-submit-button {
  min-height: 56px;
  justify-content: center;
  gap: 12px;
}

.command-submit-button .button-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  font-size: 26px;
  line-height: 1;
}

.command-output-list {
  display: grid;
  gap: 12px;
}

.command-output-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: rgba(8, 13, 22, .72);
  overflow: hidden;
  overflow-anchor: none;
}

.command-output-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.command-output-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.command-output-title strong,
.command-output-meta code,
.command-output-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-output-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}

.command-output-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.command-output-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.command-output-body details {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  overflow: hidden;
}

.command-output-body summary {
  cursor: pointer;
  font-weight: 900;
  padding: 10px 12px;
}

.command-output-body pre {
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1120px) {
  .command-layout-v066,
  .command-target-grid,
  .command-preset-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {

  .command-output-card header,
  .command-output-kv,
  .selected-capability-card > div:first-child {
    align-items: stretch;
    flex-direction: column;
  }
}

/* v0.6.7.2 Command Deck: tabbed capability browser + editable presets -- */
.command-capability-shell-v0672 {
  gap: 14px;
}

.command-section-head-stacked {
  align-items: flex-start;
}

.command-capability-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, .34fr);
  gap: 10px;
  align-items: end;
}

.command-capability-search input,
.command-preset-editor input {
  min-height: 44px;
  border: 1px solid rgba(189, 124, 255, .24);
  border-radius: 15px;
  background: rgba(4, 8, 14, .62);
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.command-capability-search input:focus,
.command-preset-editor input:focus {
  border-color: rgba(196, 123, 255, .72);
  box-shadow: 0 0 0 4px rgba(162, 89, 255, .14);
  background: rgba(7, 12, 20, .84);
}

.command-capability-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 1px solid rgba(189, 124, 255, .18);
  padding-top: 2px;
}

.command-capability-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-bottom-color: rgba(189, 124, 255, .18);
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  color: var(--muted);
  padding: 0 14px;
  margin-bottom: -1px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.command-capability-tab span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.command-capability-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.command-capability-tab:hover,
.command-capability-tab.active {
  border-color: rgba(189, 124, 255, .56);
  color: var(--text);
}

.command-capability-tab:hover {
  background: linear-gradient(180deg, rgba(126, 67, 216, .18), rgba(126, 67, 216, .08));
  box-shadow: 0 10px 24px rgba(88, 36, 163, .14);
}

.command-capability-tab.active {
  background: linear-gradient(180deg, rgba(145, 80, 244, .26), rgba(112, 56, 193, .14));
  border-bottom-color: rgba(9, 15, 24, .96);
  box-shadow: 0 16px 34px rgba(88, 36, 163, .20);
}

.command-capability-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(9, 15, 24, .98);
}

.command-capability-tab.active strong {
  background: linear-gradient(180deg, rgba(174, 104, 255, .34), rgba(120, 64, 212, .24));
}

.command-capability-tab-icon {
  width: 14px;
  height: 14px;
}

.command-capability-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 12px;
  align-items: start;
  padding-top: 8px;
}

.command-capability-list-panel,
.command-capability-inspector {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.command-capability-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.command-capability-list-shell {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.command-capability-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.command-capability-row:hover,
.command-capability-row.active {
  border-color: rgba(189, 124, 255, .56);
  background: linear-gradient(180deg, rgba(124, 69, 221, .18), rgba(124, 69, 221, .09));
  box-shadow: 0 18px 36px rgba(88, 36, 163, .16);
  transform: translateY(-1px);
}

.command-capability-icon,
.command-capability-select-indicator {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.command-capability-icon {
  background: radial-gradient(circle at 30% 20%, rgba(189,124,255,.28), rgba(111,64,195,.10));
  color: var(--accent-3);
}

.command-capability-select-indicator {
  width: 28px;
  height: 28px;
  align-self: center;
  color: rgba(221, 198, 255, .82);
  background: rgba(255,255,255,.04);
}

.command-capability-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.command-capability-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.command-capability-main strong {
  font-size: 14px;
}

.command-capability-main code {
  color: var(--accent-3);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-capability-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.command-capability-type-label {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  padding: 4px 8px;
}

.command-capability-tags,
.selected-capability-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.command-capability-badge,
.command-capability-pill,
.selected-capability-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(189, 124, 255, .35);
  border-radius: 999px;
  color: var(--accent-3);
  background: rgba(125, 67, 216, .10);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.command-capability-pill.muted {
  border-color: rgba(255,255,255,.12);
  color: var(--muted);
  background: rgba(255,255,255,.03);
}

.selected-capability-card-v0672 {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 14px;
}

.selected-capability-card-v0672 header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.selected-capability-card-v0672 header > div {
  display: grid;
  gap: 4px;
}

.selected-capability-card-v0672 code {
  color: var(--accent-3);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.selected-capability-card-v0672 p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.selected-capability-args-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.selected-capability-args-grid section {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  padding: 12px;
}

.selected-capability-args-grid h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.selected-capability-args-grid ul,
.selected-capability-args-grid p {
  margin: 0;
  padding-left: 16px;
  color: var(--text);
  font-size: 13px;
}

.selected-capability-args-grid p {
  padding-left: 0;
  color: var(--muted);
}

.command-preset-shell-v0672 {
  grid-template-columns: minmax(0, .68fr) minmax(220px, .8fr);
}

.command-preset-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(189, 124, 255, .18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(189, 124, 255, .13), transparent 34%),
    rgba(6, 10, 18, .58);
  padding: 13px;
}

.command-preset-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .34fr);
  gap: 10px;
}

.command-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-preset-actions .button {
  min-height: 40px;
  padding-inline: 12px;
}

.command-preset-actions .button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 980px) {
  .command-capability-browser,
  .command-preset-shell-v0672 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .command-capability-toolbar,
  .command-preset-editor-grid {
    grid-template-columns: 1fr;
  }

  .command-capability-row,
  .selected-capability-card-v0672 header,
  .selected-capability-args-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .command-capability-row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-capability-select-indicator {
    display: none;
  }
}

/* v0.6.7.7 Command panel: stable capability DOM + structured copyable output -- */
.command-output-disclosure-stack {
  gap: 12px;
}

.command-output-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.command-output-field-grid-meta {
  grid-template-columns: minmax(180px, .8fr) minmax(180px, .8fr) minmax(220px, 1.4fr);
}

.command-output-field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  cursor: copy;
  outline: none;
  padding: 10px 12px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
  user-select: text;
}

.command-output-field:hover,
.command-output-field:focus-visible {
  border-color: rgba(189, 124, 255, .45);
  background: rgba(189, 124, 255, .08);
  box-shadow: 0 0 0 3px rgba(189, 124, 255, .09);
}

.command-output-field.copied {
  border-color: rgba(72, 222, 128, .6);
  background: rgba(72, 222, 128, .09);
}

.command-output-field.copied::after {
  content: attr(title);
  position: absolute;
  right: 10px;
  top: 8px;
  border: 1px solid rgba(72, 222, 128, .35);
  border-radius: 999px;
  background: rgba(7, 16, 12, .92);
  color: #86efac;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 3px 7px;
  text-transform: uppercase;
}

.command-output-field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.command-output-field code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-output-field.mono code,
.command-output-field.mono pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.command-output-field.compact {
  min-height: 74px;
}

.command-output-field.multiline {
  padding: 0;
  overflow: hidden;
}

.command-output-field.multiline .command-output-field-label {
  padding: 10px 12px 0;
}

.command-output-field.multiline em {
  top: 10px;
}

.command-output-field pre {
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 2px 0 0;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
}

.command-output-field.tone-danger pre {
  color: #fecaca;
}

.command-output-field em {
  position: absolute;
  right: 10px;
  top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  opacity: .68;
  text-transform: uppercase;
}

.command-output-disclosure-stack details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-output-disclosure-stack details > summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.command-output-empty {
  border-radius: 14px;
  margin: 10px;
}

@media (max-width: 760px) {
  .command-output-field-grid,
  .command-output-field-grid-meta {
    grid-template-columns: 1fr;
  }

  .command-output-disclosure-stack details > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* v0.6.7.8 Command output encoding + reliable clipboard fallback ---------- */
.copy-chip.copy-failed,
.button.copy-failed,
.command-output-field.copy-failed {
  border-color: rgba(248, 113, 113, .6) !important;
  background: rgba(248, 113, 113, .09) !important;
}

.command-output-field.copy-failed::after {
  content: attr(data-copy-failed-label);
  position: absolute;
  right: 10px;
  top: 8px;
  border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 999px;
  background: rgba(18, 8, 10, .92);
  color: #fecaca;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 3px 7px;
  text-transform: uppercase;
}

/* v0.6.7.8 Command panel: dynamic argument builder ---------------------- */
.command-args-shell {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(189, 124, 255, .14), transparent 34%),
    linear-gradient(180deg, rgba(17, 23, 35, .68), rgba(8, 12, 20, .60));
  padding: 15px;
}

.command-args-head {
  align-items: flex-start;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 12px;
}

.command-args-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .42fr);
  gap: 12px;
  align-items: start;
}

.command-arg-field:first-child {
  grid-column: 1 / -1;
}

.command-arg-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.command-arg-label em {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 4px 8px;
  text-transform: uppercase;
}

.command-arg-required .command-arg-label em {
  border-color: rgba(189, 124, 255, .42);
  background: rgba(125, 67, 216, .12);
  color: var(--accent-3);
}

.command-arg-field input,
.command-arg-field textarea {
  min-height: 50px;
  border: 1px solid rgba(189, 124, 255, .24);
  border-radius: 17px;
  background: rgba(4, 8, 14, .66);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.command-arg-field textarea {
  min-height: 86px;
  padding-block: 13px;
  resize: vertical;
}

.command-arg-field input:focus,
.command-arg-field textarea:focus {
  border-color: rgba(196, 123, 255, .74);
  background: rgba(7, 12, 20, .84);
  box-shadow: 0 0 0 4px rgba(162, 89, 255, .14), inset 0 0 0 1px rgba(255,255,255,.05);
}

.command-arg-field small,
.command-args-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.command-arg-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid rgba(189, 124, 255, .24);
  border-radius: 17px;
  background: rgba(4, 8, 14, .66);
  color: var(--text);
  padding: 0 14px;
}

.command-arg-checkbox input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent-2);
}

.command-args-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
  padding: 14px;
}

@media (max-width: 760px) {
  .command-args-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.6.7.8.1 Command panel polish: spacing, boundaries, disclosure chevrons */
.command-builder-form,
.command-args-shell,
.command-output-card,
.command-output-body,
.command-output-body details,
.command-output-field-grid,
.command-output-field-grid-meta,
.command-output-field,
.command-json-preview,
.command-json-preview textarea {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.command-builder-form {
  gap: 18px;
}

.command-preset-shell,
.command-args-shell,
.command-json-preview,
.command-output-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.16);
}

.command-args-shell {
  gap: 16px;
  padding: 16px;
}

.command-args-head {
  padding-bottom: 14px;
}

.command-args-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.command-arg-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.command-arg-label {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.command-arg-label em {
  flex: 0 0 auto;
}

.command-arg-field input,
.command-arg-field textarea,
.command-arg-checkbox,
.command-json-preview textarea,
.command-output-field pre,
.command-output-field code {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.command-arg-field small {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.command-json-preview {
  margin-top: 2px;
}

.command-json-preview summary,
.command-output-disclosure-stack details > summary,
.worker-detail-disclosure summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  list-style: none;
  padding-left: 16px;
}

.command-json-preview summary::-webkit-details-marker,
.command-output-disclosure-stack details > summary::-webkit-details-marker,
.worker-detail-disclosure summary::-webkit-details-marker {
  display: none;
}

.command-json-preview summary::before,
.command-output-disclosure-stack details > summary::before,
.worker-detail-disclosure summary::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: .82;
  transform: rotate(-45deg);
  transition: transform .18s ease, opacity .18s ease;
}

.command-json-preview[open] summary::before,
.command-output-disclosure-stack details[open] > summary::before,
.worker-detail-disclosure[open] summary::before {
  transform: rotate(45deg) translateY(-1px);
}

.command-output-disclosure-stack details > summary {
  padding-right: 14px;
}

.command-output-disclosure-stack details > summary > span {
  min-width: 0;
  margin-right: auto;
}

.command-output-disclosure-stack details > summary small {
  min-width: 0;
  text-align: right;
}

.command-output-card header {
  align-items: stretch;
  gap: 14px;
  padding: 16px;
}

.command-output-card header > div {
  min-width: 0;
  flex: 1 1 auto;
}

.command-output-card header > .button {
  flex: 0 0 auto;
  align-self: flex-start;
}

.command-output-body {
  gap: 12px;
  padding: 16px;
}

.command-output-field-grid {
  gap: 12px;
}

.command-output-field-grid-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.command-output-field {
  overflow: hidden;
}

.command-output-field code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.command-output-field.multiline {
  min-width: 0;
}

.command-output-field pre {
  overflow-wrap: anywhere;
}

.command-output-field em {
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .command-output-field-grid-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .command-output-card header {
    flex-direction: column;
  }

  .command-output-card header > .button {
    width: 100%;
    justify-content: center;
  }

  .command-output-field-grid-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .command-json-preview summary,
  .command-output-disclosure-stack details > summary,
  .worker-detail-disclosure summary {
    align-items: flex-start;
  }

  .command-output-disclosure-stack details > summary small {
    text-align: left;
  }
}


/* v0.6.7.8.2 Command deck premium disclosure system --------------------- */
:root {
  --command-disclosure-radius: 18px;
  --command-disclosure-border: rgba(189, 124, 255, .18);
  --command-disclosure-border-hover: rgba(203, 145, 255, .38);
  --command-disclosure-bg: linear-gradient(180deg, rgba(19, 25, 38, .82), rgba(8, 12, 20, .72));
  --command-disclosure-bg-open: linear-gradient(180deg, rgba(25, 31, 48, .92), rgba(9, 13, 22, .82));
  --command-disclosure-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 38px rgba(0,0,0,.20);
  --command-disclosure-shadow-open: inset 0 1px 0 rgba(255,255,255,.075), 0 18px 48px rgba(0,0,0,.24), 0 0 0 1px rgba(189,124,255,.06);
}

.command-json-preview,
.command-output-disclosure-stack details,
.worker-detail-disclosure {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--command-disclosure-border);
  border-radius: var(--command-disclosure-radius);
  background: var(--command-disclosure-bg);
  box-shadow: var(--command-disclosure-shadow);
  overflow: hidden;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.command-json-preview:hover,
.command-output-disclosure-stack details:hover,
.worker-detail-disclosure:hover,
.command-json-preview:focus-within,
.command-output-disclosure-stack details:focus-within,
.worker-detail-disclosure:focus-within {
  border-color: var(--command-disclosure-border-hover);
  box-shadow: var(--command-disclosure-shadow-open);
}

.command-json-preview[open],
.command-output-disclosure-stack details[open],
.worker-detail-disclosure[open] {
  background: var(--command-disclosure-bg-open);
  border-color: rgba(203, 145, 255, .34);
  box-shadow: var(--command-disclosure-shadow-open);
}

.command-json-preview::after,
.command-output-disclosure-stack details::after,
.worker-detail-disclosure::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(214, 164, 255, .65), rgba(125, 67, 216, .20), rgba(214, 164, 255, .04));
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.command-json-preview[open]::after,
.command-output-disclosure-stack details[open]::after,
.worker-detail-disclosure[open]::after {
  opacity: 1;
}

.command-json-preview summary,
.command-output-disclosure-stack details > summary,
.worker-detail-disclosure summary {
  min-height: 46px;
  padding: 11px 14px 11px 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.014));
  color: rgba(245, 240, 255, .96);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .015em;
  line-height: 1.25;
  text-transform: none;
  transition: background .18s ease, color .18s ease;
}

.command-json-preview summary:hover,
.command-output-disclosure-stack details > summary:hover,
.worker-detail-disclosure summary:hover {
  background: linear-gradient(180deg, rgba(189, 124, 255, .105), rgba(255,255,255,.022));
  color: var(--text);
}

.command-json-preview[open] summary,
.command-output-disclosure-stack details[open] > summary,
.worker-detail-disclosure[open] summary {
  border-bottom: 1px solid rgba(255,255,255,.075);
}

.command-json-preview summary::before,
.command-output-disclosure-stack details > summary::before,
.worker-detail-disclosure summary::before {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(203, 145, 255, .28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    rgba(125, 67, 216, .11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 1;
  transform: none;
}

.command-json-preview summary::after,
.command-output-disclosure-stack details > summary::after,
.worker-detail-disclosure summary::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(245, 240, 255, .84);
  border-bottom: 2px solid rgba(245, 240, 255, .84);
  transform: translate(-50%, -58%) rotate(-45deg);
  transition: transform .18s ease, border-color .18s ease;
}

.command-json-preview[open] summary::before,
.command-output-disclosure-stack details[open] > summary::before,
.worker-detail-disclosure[open] summary::before {
  border-color: rgba(203, 145, 255, .48);
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.16), transparent 42%),
    rgba(125, 67, 216, .20);
}

.command-json-preview[open] summary::after,
.command-output-disclosure-stack details[open] > summary::after,
.worker-detail-disclosure[open] summary::after {
  border-color: var(--accent-3);
  transform: translate(-50%, -68%) rotate(45deg);
}

.command-output-disclosure-stack details > summary > span,
.command-json-preview summary,
.worker-detail-disclosure summary {
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-output-disclosure-stack details > summary small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: rgba(213, 204, 228, .76);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1;
  padding: 0 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.command-output-card {
  border-color: rgba(189, 124, 255, .16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(189,124,255,.105), transparent 30%),
    linear-gradient(180deg, rgba(15, 21, 34, .86), rgba(7, 11, 18, .80));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 16px 44px rgba(0,0,0,.20);
}

.command-output-card header {
  padding: 13px 14px;
  border-bottom-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}

.command-output-title {
  gap: 9px;
}

.command-output-title strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.01em;
}

.command-output-meta {
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.25;
}

.command-output-meta code,
.command-output-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(255,255,255,.026);
  color: rgba(213, 204, 228, .76);
  padding: 0 8px;
}

.command-output-card header > .button {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 12px;
}

.command-output-body {
  gap: 10px;
  padding: 12px;
}

.command-output-field-grid,
.command-output-field-grid-meta {
  gap: 9px;
}

.command-output-field {
  gap: 5px;
  border-color: rgba(255,255,255,.075);
  border-radius: 16px;
  background: rgba(255,255,255,.028);
  padding: 9px 10px;
}

.command-output-field:hover,
.command-output-field:focus-visible {
  border-color: rgba(203, 145, 255, .42);
  background: rgba(189, 124, 255, .065);
  box-shadow: 0 0 0 3px rgba(189, 124, 255, .075);
  transform: translateY(-1px);
}

.command-output-field-label {
  color: rgba(213, 204, 228, .72);
  font-size: 10px;
  letter-spacing: .075em;
}

.command-output-field code {
  color: rgba(246, 242, 255, .96);
  font-size: 12px;
  line-height: 1.35;
}

.command-output-field.compact {
  min-height: 62px;
}

.command-output-field.multiline .command-output-field-label {
  padding: 9px 10px 0;
}

.command-output-field pre {
  max-height: 300px;
  padding: 10px;
  color: rgba(246, 242, 255, .94);
  font-size: 12px;
  line-height: 1.48;
}

.command-output-field em {
  right: 9px;
  top: 8px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(255,255,255,.026);
  font-size: 9px;
  letter-spacing: .045em;
  padding: 2px 6px;
}

.command-output-field.multiline em {
  top: 8px;
}

.command-json-preview textarea {
  min-height: 132px;
  border-top-color: rgba(255,255,255,.075);
  background: rgba(4, 8, 14, .56);
  color: rgba(246, 242, 255, .94);
  font-size: 12px;
  line-height: 1.48;
  padding: 11px 13px;
}

.worker-detail-disclosure .worker-detail-json {
  border-top: 1px solid rgba(255,255,255,.075);
  background: rgba(4, 8, 14, .50);
  font-size: 12px;
  line-height: 1.48;
  padding: 11px 13px;
}

@media (max-width: 760px) {
  .command-json-preview summary,
  .command-output-disclosure-stack details > summary,
  .worker-detail-disclosure summary {
    gap: 9px;
    padding-right: 12px;
  }

  .command-output-disclosure-stack details > summary small {
    white-space: normal;
  }

  .command-output-card header,
  .command-output-body {
    padding: 12px;
  }
}


.command-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(189, 124, 255, .24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.01)),
    rgba(4, 8, 14, .76);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 14px 40px rgba(0,0,0,.16);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
  overflow: hidden;
}

.command-control:hover {
  border-color: rgba(196, 123, 255, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    rgba(6, 10, 18, .82);
}

.command-control:focus-within {
  border-color: rgba(196, 123, 255, .78);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(7, 12, 20, .90);
  box-shadow:
    0 0 0 4px rgba(162, 89, 255, .14),
    0 18px 52px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.command-control.is-readonly {
  border-color: rgba(255,255,255,.11);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012)),
    rgba(8, 12, 19, .70);
}

.command-control.is-disabled {
  opacity: .72;
}

.command-control > .command-control-element {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 0 16px;
}

.command-control > textarea.command-control-element {
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
}

.command-control > .command-control-element::placeholder {
  color: rgba(199, 188, 214, .54);
}

.command-control-select:not(.ui-select-root)::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(243, 240, 255, .72);
  border-bottom: 2px solid rgba(243, 240, 255, .72);
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
  opacity: .82;
}

.command-control-select > select.command-control-element {
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.command-control-number {
  padding-right: 46px;
}

.command-control-number > input.command-control-element {
  appearance: textfield;
  -moz-appearance: textfield;
  padding-right: 8px;
}

.command-control-number > input.command-control-element::-webkit-outer-spin-button,
.command-control-number > input.command-control-element::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.command-control-stepper {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  width: 32px;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.command-control-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)),
    rgba(16, 18, 30, .92);
  color: rgba(243, 240, 255, .84);
  padding: 0;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.command-control-step:hover {
  border-color: rgba(196, 123, 255, .44);
  background:
    linear-gradient(180deg, rgba(196,123,255,.14), rgba(255,255,255,.02)),
    rgba(25, 18, 44, .96);
  color: var(--accent-3);
}

.command-control-step:active {
  transform: scale(.97);
}

.command-control-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(162, 89, 255, .22);
}

.command-control-step-icon {
  width: 12px;
  height: 12px;
}

.command-control-step-icon-up {
  transform: rotate(-90deg);
}

.command-control-step-icon-down {
  transform: rotate(90deg);
}

.command-field .command-control,
.command-json-preview .command-control {
  max-width: 100%;
}

.command-arg-field input,
.command-arg-field textarea {
  min-height: unset;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.command-arg-field input:focus,
.command-arg-field textarea:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.command-capability-search .command-control-element[type='search']::-webkit-search-decoration,
.command-capability-search .command-control-element[type='search']::-webkit-search-cancel-button,
.command-capability-search .command-control-element[type='search']::-webkit-search-results-button,
.command-capability-search .command-control-element[type='search']::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

@media (max-width: 900px) {
  .command-control {
    min-height: 52px;
  }

  .command-control > .command-control-element {
    font-size: 14px;
  }
}

/* v0.6.7.10 Preset command origin: unified command-based preset cards */
.command-preset-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
  align-items: stretch;
}

.command-preset-hint,
.command-preset-base-card {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(157, 87, 255, .15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(8, 13, 22, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 42px rgba(0,0,0,.14);
}

.command-preset-hint {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
}

.command-preset-hint strong,
.preset-base-head strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-preset-hint p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.preset-hint-icon,
.preset-base-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(198, 136, 255, .22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 35% 20%, rgba(198,136,255,.24), transparent 46%),
    rgba(255,255,255,.045);
  color: var(--accent-2);
  flex: 0 0 auto;
}

.preset-hint-icon .ui-icon,
.preset-base-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.command-preset-base-card {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.preset-base-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.preset-base-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1.2;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.preset-base-status {
  justify-self: end;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .06em;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.preset-base-status.is-available {
  border-color: rgba(88,225,154,.26);
  background: rgba(88,225,154,.08);
  color: var(--good);
}

.preset-base-status.is-missing {
  border-color: rgba(255,198,92,.30);
  background: rgba(255,198,92,.08);
  color: var(--warn);
}

.preset-base-status.is-auto {
  border-color: rgba(198,136,255,.26);
  background: rgba(198,136,255,.08);
  color: var(--accent-2);
}

.preset-base-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.preset-base-meta span {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.preset-base-meta code {
  color: var(--accent-3);
  font: 850 11px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .command-preset-context-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .preset-base-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .preset-base-status {
    grid-column: 2;
    justify-self: start;
  }
}

/* v0.6.7.10.1 — themed preset picker replaces native white dropdown */
.command-preset-field {
  position: relative;
  isolation: isolate;
  z-index: 60;
}

.command-preset-field > [data-i18n="command_deck.preset"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.command-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.command-preset-picker {
  position: relative;
  z-index: 40;
  min-width: 0;
  overflow: visible;
}

.command-preset-picker-button {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(189, 124, 255, .30);
  border-radius: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .20), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(5, 10, 20, .88);
  box-shadow:
    0 18px 54px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 0 0 1px rgba(255,255,255,.018);
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.command-preset-picker-button:hover {
  border-color: rgba(198, 136, 255, .52);
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .26), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.02)),
    rgba(7, 13, 25, .94);
}

.command-preset-picker-button:focus-visible,
.command-preset-picker.is-open .command-preset-picker-button {
  outline: none;
  border-color: rgba(212, 144, 255, .82);
  box-shadow:
    0 0 0 4px rgba(162, 89, 255, .16),
    0 22px 70px rgba(0,0,0,.36),
    0 0 34px rgba(162, 89, 255, .12),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.command-preset-picker-icon,
.command-preset-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 13px;
  color: #e9ddff;
  background:
    radial-gradient(circle at 35% 20%, rgba(198, 136, 255, .32), transparent 48%),
    linear-gradient(135deg, rgba(105, 72, 185, .62), rgba(35, 42, 75, .84));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 24px rgba(0,0,0,.22);
}

.command-preset-picker-copy,
.command-preset-option-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.command-preset-picker-copy strong,
.command-preset-option-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-preset-picker-copy small,
.command-preset-option-copy small {
  overflow: hidden;
  color: rgba(226, 218, 238, .72);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-preset-option-copy small {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ui-select-chevron {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: rgba(243, 240, 255, .78);
  background: rgba(255,255,255,.045);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.ui-select-chevron::before {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.command-preset-picker.is-open .ui-select-chevron {
  color: #fff;
  background: rgba(162, 89, 255, .18);
  transform: rotate(180deg);
}

.command-preset-picker-menu {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 9999;
  display: grid;
  gap: 8px;
  width: min(720px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  min-width: 320px;
  max-height: min(440px, calc(100vh - 40px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid rgba(189, 124, 255, .46);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(94, 159, 255, .08), transparent 30%),
    linear-gradient(180deg, rgba(11, 16, 31, .985), rgba(5, 9, 18, .99));
  box-shadow:
    0 26px 72px rgba(0,0,0,.54),
    0 0 0 1px rgba(255,255,255,.03) inset,
    0 0 28px rgba(162, 89, 255, .12);
  backdrop-filter: blur(20px);
}

.command-preset-picker-menu[hidden] {
  display: none;
}

.command-preset-picker-menu::-webkit-scrollbar {
  width: 10px;
}

.command-preset-picker-menu::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}

.command-preset-picker-menu::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 10, 20, .94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(198,136,255,.95), rgba(112,81,255,.82));
}

.command-preset-picker-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.command-preset-picker-option:hover,
.command-preset-picker-option:focus-visible {
  outline: none;
  border-color: rgba(189, 124, 255, .26);
  background:
    linear-gradient(90deg, rgba(121, 89, 255, .16), rgba(60, 120, 255, .06)),
    rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.command-preset-picker-option.is-selected {
  border-color: rgba(198, 136, 255, .36);
  background:
    linear-gradient(90deg, rgba(121, 89, 255, .32), rgba(49, 95, 210, .18)),
    rgba(17, 20, 49, .78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 28px rgba(0,0,0,.18);
}

.command-preset-picker-option.is-selected .command-preset-option-icon {
  color: #fff;
  border-color: rgba(198, 136, 255, .28);
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,.20), transparent 44%),
    linear-gradient(135deg, rgba(121, 89, 255, .94), rgba(54, 80, 180, .84));
}

.command-preset-option-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.command-preset-option-meta em,
.command-preset-option-meta b,
.command-preset-option-meta code {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(238, 231, 250, .78);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  max-width: 170px;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-preset-option-meta code {
  color: rgba(215, 201, 238, .76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.command-preset-option-meta b {
  color: #f3f0ff;
}

.command-preset-context-grid {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  .command-preset-picker-menu {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: min(420px, calc(100vh - 24px));
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .command-preset-picker-button {
    grid-template-columns: 36px minmax(0, 1fr) 26px;
    min-height: 66px;
    padding: 10px 12px;
  }

  .command-preset-picker-icon,
  .command-preset-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .command-preset-picker-menu {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    min-width: 0;
    max-height: min(380px, calc(100vh - 16px));
    padding: 8px;
    gap: 6px;
    border-radius: 16px;
  }

  .command-preset-picker-copy small,
  .command-preset-option-copy small {
    white-space: normal;
  }
}


.worker-update-rollout-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(170, 126, 255, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(189, 83, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(11, 14, 24, 0.88), rgba(17, 14, 30, 0.92));
  box-shadow: 0 18px 45px rgba(7, 4, 18, 0.28);
}

.worker-update-copy {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.worker-update-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.3fr);
  gap: 12px;
  align-items: end;
}

.worker-update-file-field input[type="file"] {
  width: 100%;
  color: var(--text);
  border: 1px dashed rgba(185, 145, 255, 0.3);
  border-radius: 16px;
  padding: 10px;
  background: rgba(5, 7, 14, 0.45);
}

.worker-update-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  user-select: none;
}

.worker-update-form .button {
  min-height: 46px;
}

@media (max-width: 820px) {
  .worker-update-form {
    grid-template-columns: 1fr;
  }
}

/* v0.6.7.13 Unified UI component registry -------------------------------- */
.ui-control {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ui-control > .ui-control-element,
.ui-control > .command-control-element {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ui-control-select {
  position: relative;
}

.ui-control-select > select.ui-control-element {
  cursor: pointer;
}

.ui-componentized-switch {
  margin: 0;
}

.ui-componentized-switch.worker-update-toggle,
.worker-update-toggle.ui-switch {
  justify-content: space-between;
  min-height: 54px;
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.014)),
    rgba(5, 10, 20, .72);
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 12px 34px rgba(0,0,0,.14);
}

.ui-componentized-switch.worker-update-toggle .ui-switch-track,
.worker-update-toggle.ui-switch .ui-switch-track {
  order: 2;
  flex: 0 0 auto;
}

.ui-switch[data-ui-component="switch"] {
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ui-switch[data-ui-component="switch"]:hover {
  border-color: rgba(198, 136, 255, .36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 16px 42px rgba(0,0,0,.18);
}

.config-field-row .ui-control {
  width: min(100%, 420px);
  justify-self: end;
}

.config-field-row .config-editor-input {
  min-width: 0;
}

.initial-setup-input-row .ui-control {
  flex: 1 1 auto;
}

.auth-token-input .ui-control {
  flex: 1 1 auto;
}

.auth-locale-field .ui-control,
.settings-grid .ui-control,
.command-field .ui-control,
.field.compact .ui-control {
  width: 100%;
}

.field.compact > .ui-control,
.command-field > .ui-control {
  margin-top: 0;
}

.select-input.ui-control-element,
.config-editor-input.ui-control-element {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

@media (max-width: 780px) {
  .config-field-row .ui-control {
    width: 100%;
    justify-self: stretch;
  }
}


/* v0.6.7.14 Registry-backed selects + file dropzone --------------------- */
.ui-native-select,
.ui-native-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.ui-select-root {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.ui-select-picker {
  position: relative;
  z-index: 42;
  width: 100%;
  min-width: 0;
}

.ui-select-button {
  width: 100%;
  min-height: 54px;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  padding: 9px 12px;
}

.ui-select-icon {
  border-radius: 13px;
}

.ui-select-icon .ui-icon {
  transform: none;
  opacity: .86;
}

.ui-select-copy strong,
.ui-select-option-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-copy small,
.ui-select-option-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-menu {
  position: fixed;
  z-index: 10020;
  display: grid;
  gap: 7px;
  min-width: 280px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid rgba(189, 124, 255, .46);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(94, 159, 255, .08), transparent 30%),
    linear-gradient(180deg, rgba(11, 16, 31, .985), rgba(5, 9, 18, .99));
  box-shadow:
    0 26px 72px rgba(0,0,0,.54),
    0 0 0 1px rgba(255,255,255,.03) inset,
    0 0 28px rgba(162, 89, 255, .12);
  backdrop-filter: blur(20px);
}

.ui-select-option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ui-select-option:hover,
.ui-select-option:focus-visible {
  border-color: rgba(189, 124, 255, .36);
  background: rgba(160, 100, 255, .10);
  outline: none;
}

.ui-select-option.is-selected {
  border-color: rgba(189, 124, 255, .54);
  background:
    linear-gradient(90deg, rgba(105, 76, 255, .30), rgba(61, 88, 176, .18)),
    rgba(13, 18, 40, .92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 0 24px rgba(162, 89, 255, .10);
}

.ui-select-option:disabled {
  opacity: .50;
  cursor: not-allowed;
}

.ui-select-option-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.ui-select-option-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.ui-select-option:not(.is-selected) .ui-select-option-icon .ui-icon:not(.is-color-icon) {
  transform: none;
  opacity: .66;
}

.ui-select-option-icon .ui-icon.is-color-icon,
.ui-select-icon .ui-icon.is-color-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.22));
}

.ui-select-empty {
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.ui-file-root {
  display: block;
  width: 100%;
  min-width: 0;
}

.ui-file-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  width: 100%;
  min-width: 0;
  border: 1px dashed rgba(189, 124, 255, .34);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .16), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.014)),
    rgba(4, 8, 18, .78);
  color: var(--text);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 36px rgba(0,0,0,.18);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ui-file-dropzone::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(189, 124, 255, .72), transparent);
  opacity: 0;
  transform: translateX(-36%);
}

.ui-file-dropzone:hover,
.ui-file-dropzone:focus-visible,
.ui-file-dropzone.is-drag-over {
  border-color: rgba(198, 136, 255, .70);
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .22), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.060), rgba(255,255,255,.018)),
    rgba(7, 12, 24, .88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 48px rgba(0,0,0,.24), 0 0 34px rgba(162, 89, 255, .10);
  outline: none;
}

.ui-file-dropzone.is-uploading::after {
  opacity: 1;
  animation: ui-file-upload-scan 1.15s ease-in-out infinite;
}

.ui-file-dropzone.is-done {
  border-color: rgba(62, 222, 144, .45);
}

.ui-file-dropzone.is-failed {
  border-color: rgba(255, 94, 128, .52);
}

.ui-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(189, 124, 255, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(162,89,255,.32), rgba(94,159,255,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px rgba(0,0,0,.20);
}

.ui-file-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.ui-file-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ui-file-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-file-copy small {
  min-width: 0;
  overflow: hidden;
  color: rgba(226, 218, 238, .70);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-file-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: rgba(235, 229, 247, .78);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}

@keyframes ui-file-upload-scan {
  0% { transform: translateX(-65%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(65%); }
}

.worker-update-file-field input[type="file"] {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 680px) {
  .ui-file-dropzone {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .ui-file-status {
    grid-column: 2;
    justify-self: start;
  }
}


/* v0.6.7.15 Registry-only component hardening */
select[data-ui-native-select],
select.ui-native-select,
input[type="file"].ui-native-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
}

.ui-control-input,
.command-control-input,
.ui-control-search,
.ui-control-url,
.ui-control-password,
.ui-control-number,
.command-control-number,
.ui-control-textarea,
.command-control-textarea {
  contain: layout style;
}

.ui-select-root,
.ui-file-root,
.ui-switch,
.ui-control {
  --ui-component-focus: rgba(162, 89, 255, .18);
  --ui-component-border: rgba(189, 124, 255, .26);
  --ui-component-border-hover: rgba(196, 123, 255, .42);
}

.ui-select-root[data-ui-component="select"] { display: block; }
.ui-select-picker.command-preset-picker,
.ui-select-menu.command-preset-picker-menu { isolation: isolate; }
.ui-file-root[data-ui-component="file"] { display: block; min-width: 0; }


/* v0.6.7.16 Worker personal page */
.workers-table tbody tr[data-worker-row] {
  cursor: pointer;
}

.workers-table tbody tr[data-worker-row]:hover {
  background: rgba(162, 89, 255, .065);
}

.worker-row-actions-clean {
  justify-content: flex-end;
}

.worker-detail-page-host {
  display: grid;
  gap: 18px;
}

.worker-page-shell {
  display: grid;
  gap: 18px;
}

.worker-page-hero,
.worker-page-info-card,
.worker-page-console-panel,
.worker-page-capability-panel,
.worker-page-hardware-panel,
.worker-page-empty {
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .14), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    rgba(7, 10, 18, .82);
  box-shadow: 0 22px 64px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
}

.worker-page-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.worker-page-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.worker-page-identity h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.worker-page-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid rgba(189,124,255,.28);
  background: rgba(162,89,255,.12);
  color: var(--accent-3);
  flex: 0 0 auto;
}

.worker-page-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.worker-page-meta,
.worker-page-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.worker-page-meta code,
.worker-page-status span {
  color: rgba(226, 218, 238, .72);
  font-size: 12px;
  font-weight: 720;
}

.worker-page-grid {
  display: grid;
  gap: 16px;
}

.worker-page-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.worker-page-main-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: start;
}

.worker-page-info-card {
  padding: 16px;
}

.worker-page-info-card h3,
.worker-page-console-panel h3,
.worker-page-capability-panel h3,
.worker-page-hardware-panel h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.worker-page-console-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.worker-page-console-list .command-output-card {
  border-radius: 20px;
}

.worker-page-capability-runner {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 14px;
  align-items: start;
}

.worker-page-capability-list {
  display: grid;
  gap: 8px;
  max-height: 650px;
  overflow: auto;
  padding-right: 4px;
}

.worker-page-capability-button {
  width: 100%;
}

.worker-page-command-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.worker-page-selected-capability {
  margin: 0;
}

.worker-page-arg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.worker-page-arg-field {
  min-width: 0;
}

.worker-page-command-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.worker-page-command-result:empty {
  display: none;
}

.worker-page-hardware-panel,
.worker-page-console-panel,
.worker-page-capability-panel,
.worker-page-empty {
  padding: 18px;
}

.worker-page-empty {
  display: grid;
  gap: 14px;
}

@media (max-width: 1220px) {
  .worker-page-overview-grid,
  .worker-page-main-grid,
  .worker-page-capability-runner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .worker-page-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .worker-page-status {
    justify-content: flex-start;
  }

  .worker-page-arg-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.6.7.17 worker page hardware polish + stable non-destructive refresh */
.worker-page-refresh,
.worker-page-profile-refresh {
  justify-self: start;
}

.worker-hardware-summary-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.worker-hardware-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.worker-hardware-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(189, 124, 255, .20);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.016)),
    rgba(5, 9, 17, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 38px rgba(0,0,0,.16);
}

.worker-hardware-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid rgba(189, 124, 255, .26);
  color: var(--accent-3);
  background: rgba(162, 89, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.worker-hardware-card-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.worker-hardware-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.worker-hardware-card-copy small {
  color: rgba(183, 190, 205, .78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.worker-hardware-card-copy strong {
  color: #f7f1ff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.worker-hardware-card-copy em {
  color: rgba(226, 218, 238, .70);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.worker-hardware-lists {
  gap: 14px;
}

.worker-hardware-list {
  border-color: rgba(189, 124, 255, .18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.014)),
    rgba(6, 10, 18, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.worker-hardware-list header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(189, 124, 255, .14);
  color: #f5f0ff;
}

.worker-hardware-list header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--accent-3);
  background: rgba(162, 89, 255, .12);
}

.worker-hardware-list header .ui-icon {
  width: 15px;
  height: 15px;
}

.worker-hardware-list header strong {
  margin-right: auto;
  color: #f5f0ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.01em;
  text-transform: none;
}

.worker-hardware-list header em {
  color: rgba(226, 218, 238, .68);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.worker-hardware-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
}

.worker-hardware-entry > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 9px;
  color: rgba(213, 182, 255, .92);
  background: rgba(255,255,255,.045);
}

.worker-hardware-entry .ui-icon {
  width: 13px;
  height: 13px;
}

.worker-hardware-entry p {
  margin: 0;
  color: #dbe3ef;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .worker-hardware-summary-strip,
  .worker-hardware-grid {
    grid-template-columns: 1fr;
  }
}

/* Worker profile/avatar pass -------------------------------------------------- */
.worker-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(198, 136, 255, .34);
  border-radius: 999px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(198, 136, 255, .32), transparent 36%),
    linear-gradient(135deg, rgba(142, 53, 255, .32), rgba(0, 0, 0, .36));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28), inset 0 0 22px rgba(255, 255, 255, .045);
  color: var(--accent-3);
  font-weight: 950;
  letter-spacing: .04em;
}
.worker-avatar-xs { width: 28px; height: 28px; font-size: 10px; }
.worker-avatar-sm { width: 38px; height: 38px; font-size: 12px; }
.worker-avatar-md { width: 48px; height: 48px; font-size: 14px; }
.worker-avatar-lg { width: 78px; height: 78px; font-size: 20px; border-radius: 24px; }
.worker-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.worker-avatar.has-image span { opacity: 0; }
.worker-name-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.worker-name-cell > div { display: grid; gap: 2px; min-width: 0; }
.worker-name-cell strong, .worker-name-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-card-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.worker-card-identity > div { min-width: 0; }
.worker-page-identity { align-items: center; }
.command-worker-card-with-avatar { display: flex; align-items: center; gap: 12px; }
.command-worker-card-with-avatar > div { display: grid; gap: 3px; min-width: 0; }


/* v0.6.7.20 worker personal page management + status spinners */
.worker-page-hero-managed {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.worker-page-hero-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 0;
}

.worker-page-hero-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.worker-page-tab-shell {
  display: grid;
  gap: 16px;
}

.worker-page-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.worker-page-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 14px;
}

.worker-page-tab-button span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.worker-page-tab-button strong {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #f4efff;
  font-size: 11px;
}

.worker-page-tab-button.active strong {
  background: rgba(162, 89, 255, .28);
}

.worker-page-tab-icon {
  width: 14px;
  height: 14px;
}

.worker-page-tab-panel {
  min-width: 0;
}

.worker-page-overview-tab {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.worker-page-overview-summary-card,
.worker-page-management-panel,
.worker-page-update-panel {
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    rgba(7, 10, 18, .82);
  box-shadow: 0 22px 64px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
}

.worker-page-overview-summary-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.worker-page-overview-summary-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.worker-page-overview-summary-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.worker-page-overview-summary-card p {
  margin: 4px 0 0;
  color: rgba(183, 190, 205, .78);
  font-size: 12px;
  line-height: 1.45;
}

.worker-page-overview-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.worker-page-management-mini-grid,
.worker-page-management-grid {
  display: grid;
  gap: 12px;
}

.worker-page-management-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.worker-page-management-mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.worker-management-action {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(189, 124, 255, .20);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    rgba(5, 9, 17, .72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .16s var(--kh-ease-premium), border-color .16s var(--kh-ease-premium), background .16s var(--kh-ease-premium);
}

.worker-management-action.compact {
  min-height: 72px;
}

.worker-management-action:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(196, 123, 255, .42);
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .18), transparent 42%),
    rgba(9, 14, 25, .82);
}

.worker-management-action:disabled {
  opacity: .70;
  cursor: progress;
}

.worker-management-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid rgba(189, 124, 255, .26);
  color: var(--accent-3);
  background: rgba(162, 89, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.worker-management-action-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.worker-management-action strong,
.worker-management-action small {
  display: block;
  min-width: 0;
}

.worker-management-action strong {
  color: #f7f1ff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.worker-management-action small {
  margin-top: 4px;
  color: rgba(226, 218, 238, .70);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.worker-page-update-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.worker-page-update-file-field {
  min-width: 0;
}

.worker-page-update-switch {
  display: block;
  width: max-content;
  max-width: 100%;
}

.worker-page-operation-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(189, 124, 255, .22);
  background: rgba(255,255,255,.055);
  color: #f4efff;
  font-size: 12px;
  font-weight: 900;
}

.worker-page-operation-pill.is-pending {
  border-color: rgba(255, 204, 102, .28);
  color: #ffd680;
}

.worker-page-operation-pill.is-uploading {
  border-color: rgba(57, 217, 138, .30);
  color: #77f3b6;
}

.ui-wait-spinner {
  --spinner-color: var(--accent-3);
  --spinner-track: rgba(255,255,255,.16);
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--spinner-color);
  border-right-color: color-mix(in srgb, var(--spinner-color) 70%, transparent);
  animation: workerUiSpinner 0.72s linear infinite;
  vertical-align: -2px;
}

.button .ui-wait-spinner,
.worker-page-operation-pill .ui-wait-spinner {
  margin-right: 2px;
}

.ui-wait-spinner-accent { --spinner-color: var(--accent-3); }
.ui-wait-spinner-info { --spinner-color: #75b9ff; }
.ui-wait-spinner-success { --spinner-color: #39d98a; }
.ui-wait-spinner-warning { --spinner-color: #ffd166; }
.ui-wait-spinner-danger { --spinner-color: #ff6b8a; }

@keyframes workerUiSpinner {
  to { transform: rotate(360deg); }
}

.worker-page-result-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(189, 124, 255, .18);
  background: rgba(255,255,255,.035);
}

.worker-page-result-block.is-ok {
  border-color: rgba(57, 217, 138, .20);
}

.worker-page-result-block.is-failed {
  border-color: rgba(255, 107, 138, .25);
}

.worker-page-result-block header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worker-page-result-block strong {
  color: #f7f1ff;
  font-size: 13px;
  font-weight: 900;
}

.worker-page-result-block pre {
  max-height: 320px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #dbe3ef;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1220px) {
  .worker-page-overview-tab {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .worker-page-hero-managed {
    grid-template-columns: 1fr;
  }

  .worker-page-hero-actions {
    justify-items: start;
  }

  .worker-page-tab-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .worker-page-tab-button {
    width: 100%;
  }

  .worker-page-management-grid,
  .worker-page-management-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.6.7.21 registry-backed tabs + dark workspace background */
body:not(.auth-required) {
  background:
    linear-gradient(180deg, rgba(3, 3, 10, .10), rgba(3, 3, 10, .58)),
    radial-gradient(circle at 50% 14%, rgba(150, 75, 255, .18), transparent 31%),
    radial-gradient(circle at 10% 6%, rgba(94, 159, 255, .10), transparent 26%),
    url('/assets/auth-background.png') center / cover fixed no-repeat,
    #05030a;
}

body:not(.auth-required) .workspace-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 3, 10, .18), rgba(3, 3, 10, .66)),
    radial-gradient(circle at 50% 0%, rgba(150, 75, 255, .16), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(94, 159, 255, .10), transparent 28%),
    url('/assets/auth-background.png') center / cover fixed no-repeat,
    #05030a !important;
  box-shadow:
    inset 1px 0 0 rgba(255,255,255,.035),
    inset 0 1px 0 rgba(255,255,255,.03);
}

body:not(.auth-required) .workspace-main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 8, 16, .68), rgba(9, 8, 22, .56)),
    radial-gradient(circle at 15% 0%, rgba(162, 89, 255, .10), transparent 30%);
  pointer-events: none;
}

.ui-tabs.ui-tabs-strip {
  display: flex;
  align-items: flex-end;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 10px;
  border-bottom: 1px solid rgba(189, 124, 255, .26);
  scrollbar-width: thin;
  scrollbar-color: rgba(189, 124, 255, .55) rgba(255,255,255,.035);
}

.ui-tabs.ui-tabs-strip::-webkit-scrollbar { height: 8px; }
.ui-tabs.ui-tabs-strip::-webkit-scrollbar-track { background: rgba(255,255,255,.035); border-radius: 999px; }
.ui-tabs.ui-tabs-strip::-webkit-scrollbar-thumb { background: rgba(189, 124, 255, .55); border-radius: 999px; }

.ui-tabs .ui-tab-button,
.ui-tabs .tab-button.ui-tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin: 0 2px -1px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(7, 10, 18, .56);
  color: rgba(214, 220, 233, .72);
  box-shadow: none;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition:
    color .16s var(--kh-ease-premium, ease),
    border-color .16s var(--kh-ease-premium, ease),
    background .16s var(--kh-ease-premium, ease),
    transform .16s var(--kh-ease-premium, ease),
    box-shadow .16s var(--kh-ease-premium, ease);
}

.ui-tabs .ui-tab-button:hover {
  transform: translateY(-1px);
  color: rgba(245, 240, 255, .92);
  border-color: rgba(189, 124, 255, .28);
  background:
    linear-gradient(180deg, rgba(162, 89, 255, .10), rgba(255,255,255,.014)),
    rgba(12, 13, 28, .72);
}

.ui-tabs .ui-tab-button.active,
.ui-tabs .ui-tab-button[aria-selected='true'] {
  color: #f8f4ff;
  border-color: rgba(189, 124, 255, .40);
  background:
    radial-gradient(circle at 50% 0%, rgba(189, 124, 255, .22), transparent 62%),
    linear-gradient(180deg, rgba(31, 23, 54, .96), rgba(10, 12, 24, .94));
  box-shadow:
    0 -1px 0 rgba(255,255,255,.045) inset,
    0 -14px 42px rgba(162, 89, 255, .10),
    0 0 0 1px rgba(255,255,255,.02) inset;
}

.ui-tabs .ui-tab-button.active::after,
.ui-tabs .ui-tab-button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -1px;
  height: 2px;
  background: rgba(10, 12, 24, .98);
}

.ui-tabs .ui-tab-button span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ui-tab-icon,
.worker-page-tab-icon,
.command-capability-tab-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.ui-tab-badge,
.ui-tabs .ui-tab-button strong {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #f4efff;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.ui-tabs .ui-tab-button.active .ui-tab-badge,
.ui-tabs .ui-tab-button.active strong {
  background: rgba(162, 89, 255, .30);
  color: #fff;
}

.worker-page-tab-shell {
  gap: 0;
}

.worker-page-tab-bar.ui-tabs {
  padding-left: 14px;
  padding-right: 14px;
}

.worker-page-tab-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(189, 124, 255, .24);
  border-top: 0;
  border-radius: 0 24px 24px 24px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.012)),
    rgba(5, 8, 16, .70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 16px 48px rgba(0,0,0,.16);
}

.command-capability-tabs.ui-tabs {
  padding-left: 8px;
  padding-right: 8px;
  gap: 0;
}

.command-capability-tabs.ui-tabs .command-capability-tab {
  border-radius: 14px 14px 0 0;
  margin-bottom: -1px;
}

@media (max-width: 760px) {
  .worker-page-tab-bar.ui-tabs {
    display: flex;
    flex-wrap: nowrap;
    padding-inline: 8px;
  }

  .worker-page-tab-button.ui-tab-button {
    width: auto;
    flex: 0 0 auto;
  }

  .worker-page-tab-panel {
    padding: 12px;
    border-radius: 0 18px 18px 18px;
  }
}

/* v0.6.7.23 dashboard system console */
.system-console-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(189, 124, 255, .24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.016)),
    rgba(7, 11, 19, .88);
  box-shadow: 0 22px 64px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.05);
}

.system-console-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(162,89,255,.72), rgba(100,181,246,.50), rgba(57,217,138,.48));
  opacity: .88;
  pointer-events: none;
}

.system-console-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.system-console-view {
  display: grid;
  gap: 9px;
  max-height: 360px;
  overflow: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 147, 255, .50) rgba(255,255,255,.04);
}

.system-console-view::-webkit-scrollbar { width: 8px; }
.system-console-view::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
.system-console-view::-webkit-scrollbar-thumb { background: rgba(200, 147, 255, .46); border-radius: 999px; }

.system-console-line {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-left-width: 3px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(11, 16, 27, .82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 8px 24px rgba(0,0,0,.12);
}

.system-console-line-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.system-console-line-head strong {
  color: #f6f3ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .025em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-console-line-head time {
  color: rgba(190, 199, 214, .72);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.system-console-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(243, 245, 251, .92);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.system-console-line p {
  margin: 0;
  color: rgba(224, 231, 244, .86);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.42;
}

.system-console-line details {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 6px;
}

.system-console-line summary {
  width: max-content;
  color: rgba(200, 147, 255, .92);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.system-console-line pre {
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(0,0,0,.24);
  color: rgba(235, 239, 248, .90);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-console-info { border-left-color: #75b9ff; }
.system-console-debug { border-left-color: rgba(200, 147, 255, .70); }
.system-console-success { border-left-color: #39d98a; }
.system-console-warning { border-left-color: #ffd166; }
.system-console-error { border-left-color: #ff6b8a; }

.system-console-success .system-console-level { color: #9ff8c7; border-color: rgba(57,217,138,.28); background: rgba(57,217,138,.10); }
.system-console-warning .system-console-level { color: #ffe29a; border-color: rgba(255,209,102,.28); background: rgba(255,209,102,.10); }
.system-console-error .system-console-level { color: #ffb3c2; border-color: rgba(255,107,138,.28); background: rgba(255,107,138,.10); }
.system-console-debug .system-console-level { color: #d9b8ff; border-color: rgba(200,147,255,.28); background: rgba(162,89,255,.10); }
.system-console-info .system-console-level { color: #b8dcff; border-color: rgba(117,185,255,.28); background: rgba(117,185,255,.10); }

@media (max-width: 760px) {
  .system-console-line-head {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .system-console-actions {
    justify-content: flex-start;
  }
}


/* v0.6.7.24 fullscreen raw console + cleaner dashboard + canvas charts */
.dashboard-home {
  display: grid;
  gap: 18px;
}

.dashboard-command-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(211, 176, 255, .18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .18), transparent 34%),
    linear-gradient(135deg, rgba(20, 28, 42, .96), rgba(10, 14, 24, .98));
  box-shadow:
    0 18px 54px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.dashboard-command-center h2 {
  margin: 5px 0 4px;
  color: #f7f4ff;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.dashboard-command-center p {
  max-width: 760px;
  margin: 0;
  color: rgba(217, 224, 238, .78);
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-command-center .eyebrow {
  color: #c893ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
}

.dashboard-command-center-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-metric-grid {
  gap: 14px;
}

.dashboard-home .modern-metric {
  min-height: 174px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(18, 26, 40, .94), rgba(10, 15, 25, .98));
  border-color: rgba(211, 176, 255, .16);
  box-shadow:
    0 14px 42px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.dashboard-home .dashboard-charts {
  align-items: stretch;
}

.dashboard-home .chart-panel,
.dashboard-home .workers-panel,
.dashboard-home .quick-actions-panel,
.dashboard-home .onboarding-panel,
.dashboard-home .dashboard-bottom-grid > .panel {
  border-radius: 26px;
  border-color: rgba(211, 176, 255, .15);
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(16, 23, 36, .94), rgba(9, 14, 24, .98));
  box-shadow:
    0 16px 48px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.dashboard-home .dashboard-bottom-grid {
  opacity: .94;
}

.dashboard-home .dashboard-aside {
  display: grid;
  gap: 16px;
}

.dashboard-home .quick-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-home .quick-action-card {
  min-height: 72px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012)),
    rgba(12, 18, 30, .92);
}

.dashboard-canvas-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.dashboard-canvas-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(5, 10, 18, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.dashboard-canvas-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-canvas-card strong {
  color: #f6f3ff;
  font-size: 13px;
  font-weight: 950;
}

.dashboard-canvas-card span {
  color: #c893ff;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-canvas-card canvas {
  display: block;
  width: 100%;
  height: 140px;
}

.system-console-panel {
  isolation: isolate;
}

.system-console-panel .panel-title-row {
  align-items: center;
}

.system-console-actions .button {
  min-height: 38px;
}

.system-console-actions::before {
  content: 'RAW JSONL';
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(117, 185, 255, .20);
  border-radius: 999px;
  background: rgba(117, 185, 255, .08);
  color: #b8dcff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

.system-console-view {
  max-height: 260px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(117, 185, 255, .07), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.18)),
    #050811;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 0 0 1px rgba(255,255,255,.018);
}

.system-console-terminal {
  display: grid;
  gap: 4px;
}

.system-console-raw-line {
  margin: 0;
  padding: 7px 10px;
  border-left: 3px solid rgba(117,185,255,.72);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: rgba(236, 242, 252, .88);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-console-raw-line code {
  font: inherit;
}

.system-console-raw-line.system-console-success { border-left-color: #39d98a; color: #d9ffe9; }
.system-console-raw-line.system-console-warning { border-left-color: #ffd166; color: #fff0bd; }
.system-console-raw-line.system-console-error { border-left-color: #ff6b8a; color: #ffd5dd; }
.system-console-raw-line.system-console-debug { border-left-color: #c893ff; color: #ead7ff; }
.system-console-raw-line.system-console-info { border-left-color: #75b9ff; color: #dcefff; }

body.system-console-fullscreen {
  overflow: hidden;
}

body.system-console-fullscreen .system-console-panel {
  position: fixed;
  inset: 22px;
  z-index: 50000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 28px;
  padding: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .18), transparent 34%),
    radial-gradient(circle at 100% 0, rgba(117, 185, 255, .10), transparent 28%),
    linear-gradient(180deg, rgba(13, 18, 30, .99), rgba(4, 7, 14, .995));
  box-shadow:
    0 0 0 1px rgba(211, 176, 255, .20),
    0 34px 120px rgba(0,0,0,.72),
    inset 0 1px 0 rgba(255,255,255,.06);
}

body.system-console-fullscreen .system-console-panel::after {
  content: '';
  position: fixed;
  inset: -22px;
  z-index: -1;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(10px);
}

body.system-console-fullscreen .system-console-view {
  max-height: none;
  min-height: 0;
  height: 100%;
  padding: 16px;
  border-radius: 20px;
}

body.system-console-fullscreen .system-console-raw-line {
  font-size: 12px;
  padding: 8px 11px;
}

body.system-console-fullscreen .system-console-actions::before {
  content: 'FULLSCREEN RAW JSONL';
}

@media (max-width: 1100px) {
  .dashboard-command-center {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-command-center-actions {
    justify-content: flex-start;
  }

  .dashboard-canvas-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-command-center {
    padding: 18px;
    border-radius: 22px;
  }

  .dashboard-home .quick-action-grid {
    grid-template-columns: 1fr;
  }

  body.system-console-fullscreen .system-console-panel {
    inset: 8px;
    padding: 14px;
    border-radius: 20px;
  }

  .system-console-actions {
    justify-content: flex-start;
  }
}

/* v0.6.7.25 Component Registry Material Fix
   All high-contrast Material-like primitives are driven by data-ui-component / data-ui-surface. */
:root {
  --kh-md-bg: #070b12;
  --kh-md-surface-1: #101722;
  --kh-md-surface-2: #151e2b;
  --kh-md-surface-3: #1b2636;
  --kh-md-surface-hero: #12172a;
  --kh-md-outline: rgba(207, 216, 230, .14);
  --kh-md-outline-strong: rgba(207, 216, 230, .26);
  --kh-md-brand-outline: rgba(190, 137, 255, .36);
  --kh-md-brand: #b984ff;
  --kh-md-brand-2: #7ab8ff;
  --kh-md-text: #f5f7fb;
  --kh-md-text-2: rgba(232, 238, 249, .86);
  --kh-md-text-3: rgba(199, 209, 225, .76);
  --kh-md-text-4: rgba(166, 177, 195, .70);
  --kh-md-focus: rgba(185, 132, 255, .28);
  --kh-md-success: #40dc91;
  --kh-md-warning: #ffd166;
  --kh-md-danger: #ff6b8a;
  --kh-md-info: #79bbff;
  --kh-md-radius-panel: 24px;
  --kh-md-radius-card: 18px;
  --kh-md-elev-1: 0 1px 2px rgba(0,0,0,.24), 0 8px 24px rgba(0,0,0,.18);
  --kh-md-elev-2: 0 2px 6px rgba(0,0,0,.22), 0 18px 48px rgba(0,0,0,.22);
  --kh-md-elev-3: 0 4px 12px rgba(0,0,0,.28), 0 28px 72px rgba(0,0,0,.26);
}

body:not(.auth-required) .workspace-main {
  background:
    linear-gradient(180deg, rgba(7, 11, 18, .90), rgba(7, 11, 18, .96)),
    radial-gradient(circle at 16% 0%, rgba(185, 132, 255, .14), transparent 28%),
    radial-gradient(circle at 86% 0%, rgba(122, 184, 255, .09), transparent 26%),
    #070b12 !important;
}

body:not(.auth-required) .workspace-main::before {
  background:
    linear-gradient(90deg, rgba(7, 11, 18, .88), rgba(9, 12, 22, .76)),
    radial-gradient(circle at 20% 6%, rgba(185, 132, 255, .10), transparent 30%);
}

[data-ui-surface],
.ui-component {
  color: var(--kh-md-text-2);
  text-rendering: optimizeLegibility;
}

[data-ui-surface="hero"] {
  border: 1px solid var(--kh-md-brand-outline) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.018)),
    radial-gradient(circle at 0 0, rgba(185, 132, 255, .18), transparent 35%),
    radial-gradient(circle at 100% 0, rgba(122, 184, 255, .10), transparent 34%),
    linear-gradient(180deg, rgba(18, 23, 42, .98), rgba(12, 17, 29, .99)) !important;
  box-shadow: var(--kh-md-elev-3), inset 0 1px 0 rgba(255,255,255,.07) !important;
}

[data-ui-surface="panel"] {
  border: 1px solid var(--kh-md-outline) !important;
  border-radius: var(--kh-md-radius-panel) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(16, 23, 34, .98), rgba(10, 15, 24, .99)) !important;
  box-shadow: var(--kh-md-elev-2), inset 0 1px 0 rgba(255,255,255,.055) !important;
}

[data-ui-surface="card"],
[data-ui-surface="metric"] {
  border: 1px solid rgba(207, 216, 230, .13) !important;
  border-radius: var(--kh-md-radius-card) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.012)),
    linear-gradient(180deg, rgba(20, 28, 40, .98), rgba(12, 17, 26, .99)) !important;
  box-shadow: var(--kh-md-elev-1), inset 0 1px 0 rgba(255,255,255,.045) !important;
}

[data-ui-surface="interactiveRow"],
.command-capability-row[data-ui-surface="interactiveRow"],
.worker-management-action[data-ui-surface="interactiveRow"] {
  border: 1px solid rgba(207, 216, 230, .13) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(17, 24, 36, .98), rgba(11, 16, 25, .99)) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.045) !important;
}

[data-ui-surface="interactiveRow"]:hover,
.command-capability-row[data-ui-surface="interactiveRow"]:hover,
.worker-management-action[data-ui-surface="interactiveRow"]:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(185, 132, 255, .34) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.072), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(23, 31, 46, .99), rgba(13, 19, 30, .99)) !important;
  box-shadow: var(--kh-md-elev-1), 0 0 0 1px rgba(185, 132, 255, .08) inset !important;
}

[data-ui-state="active"],
.command-capability-row.active,
.worker-page-capability-button.active {
  border-color: rgba(185, 132, 255, .48) !important;
  background:
    linear-gradient(180deg, rgba(185, 132, 255, .18), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(30, 28, 54, .99), rgba(14, 20, 32, .99)) !important;
  box-shadow: 0 0 0 1px rgba(185, 132, 255, .12) inset, var(--kh-md-elev-1) !important;
}

[data-ui-surface="console"] {
  border-color: rgba(122, 184, 255, .24) !important;
  background: #050811 !important;
}

[data-ui-component][data-ui-variant="field"],
[data-ui-component="select"],
[data-ui-component="file"] {
  border: 1px solid rgba(207, 216, 230, .15) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.054), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(14, 20, 31, .99), rgba(10, 15, 24, .99)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 2px rgba(0,0,0,.18) !important;
}

[data-ui-component][data-ui-variant="field"]:hover,
[data-ui-component="select"]:hover,
[data-ui-component="file"]:hover {
  border-color: rgba(207, 216, 230, .25) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.066), rgba(255,255,255,.016)),
    linear-gradient(180deg, rgba(18, 25, 38, .99), rgba(11, 16, 25, .99)) !important;
}

[data-ui-component][data-ui-variant="field"]:focus-within,
[data-ui-component="select"]:focus-within,
[data-ui-component="file"]:focus-within,
.ui-select-picker.is-open .ui-select-button {
  border-color: rgba(185, 132, 255, .58) !important;
  box-shadow:
    0 0 0 4px var(--kh-md-focus),
    inset 0 1px 0 rgba(255,255,255,.065),
    0 8px 22px rgba(0,0,0,.16) !important;
}

[data-ui-component][data-ui-variant="field"] > .ui-control-element,
[data-ui-component][data-ui-variant="field"] > .command-control-element,
.ui-select-button,
.ui-file-dropzone {
  color: var(--kh-md-text) !important;
  font-size: 14px;
  font-weight: 760;
}

[data-ui-component][data-ui-variant="field"] > .ui-control-element::placeholder,
[data-ui-component][data-ui-variant="field"] > .command-control-element::placeholder {
  color: rgba(199, 209, 225, .48) !important;
}

.command-arg-label,
.worker-page-arg-field label,
.command-field label,
.field > label,
.field.compact > label {
  color: rgba(242, 246, 252, .94) !important;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.command-arg-label em,
.ui-tab-badge,
.ui-tabs .ui-tab-button strong,
.mini-chip,
.worker-summary-pill,
.command-capability-pill,
.command-capability-badge,
.worker-page-operation-pill {
  border: 1px solid rgba(207,216,230,.13) !important;
  background: rgba(255,255,255,.075) !important;
  color: rgba(245,247,251,.92) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

[data-ui-component="tabs"],
.ui-tabs.ui-tabs-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(207,216,230,.16) !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(185,132,255,.45) rgba(255,255,255,.035);
}

[data-ui-component="tabs"] .ui-material-tab,
.ui-tabs .ui-tab-button,
.ui-tabs .tab-button.ui-tab-button {
  position: relative;
  min-height: 48px;
  padding: 0 18px;
  margin: 0 1px -1px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: transparent;
  color: var(--kh-md-text-3);
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

[data-ui-component="tabs"] .ui-material-tab:hover,
.ui-tabs .ui-tab-button:hover {
  color: var(--kh-md-text);
  border-color: rgba(207,216,230,.13);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012)),
    rgba(16, 23, 34, .72);
  transform: none;
}

[data-ui-component="tabs"] .ui-material-tab[aria-selected="true"],
[data-ui-component="tabs"] .ui-material-tab.active,
.ui-tabs .ui-tab-button.active,
.ui-tabs .ui-tab-button[aria-selected="true"] {
  color: #fff;
  border-color: rgba(207,216,230,.18) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(22, 30, 43, .99), rgba(12, 18, 29, .99)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055) !important;
}

[data-ui-component="tabs"] .ui-material-tab[aria-selected="true"]::before,
[data-ui-component="tabs"] .ui-material-tab.active::before,
.ui-tabs .ui-tab-button.active::before,
.ui-tabs .ui-tab-button[aria-selected="true"]::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--kh-md-brand), var(--kh-md-brand-2));
}

.ui-tabs .ui-tab-button.active::after,
.ui-tabs .ui-tab-button[aria-selected="true"]::after {
  display: none !important;
}

.worker-page-tab-panel {
  padding: 20px !important;
  border-top: 0 !important;
  border-radius: 0 22px 22px 22px !important;
}

.worker-page-identity h2,
.panel-title-row h2,
.panel-title-row h3,
.worker-page-overview-summary-card h3,
.worker-page-info-card h3,
.worker-page-console-panel h3,
.worker-page-capability-panel h3,
.worker-page-hardware-panel h3,
.worker-page-management-panel h3,
.worker-page-update-panel h3,
.selected-capability-card strong,
.command-capability-row strong,
.worker-management-action strong,
.worker-hardware-card-copy strong {
  color: var(--kh-md-text) !important;
  letter-spacing: -.015em;
}

.panel-title-row p,
.worker-page-overview-summary-card p,
.selected-capability-card p,
.command-capability-row small,
.worker-management-action small,
.worker-hardware-card-copy em,
.worker-detail-kv-label,
.worker-detail-stat span,
.form-hint,
.command-arg-field small {
  color: var(--kh-md-text-3) !important;
  line-height: 1.45;
}

.worker-page-identity .eyebrow,
.dashboard-command-center .eyebrow {
  color: var(--kh-md-brand) !important;
  letter-spacing: .12em;
}

.worker-page-capability-runner {
  grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
  gap: 18px;
}

.worker-page-capability-list,
.command-capability-list,
.worker-page-console-list {
  gap: 10px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(185,132,255,.45) rgba(255,255,255,.035);
}

.worker-page-console-list .command-output-card,
.command-output-card {
  border-radius: 18px !important;
}

.worker-management-action {
  min-height: 92px;
}

.worker-management-action-icon,
.command-capability-icon,
.worker-hardware-card-icon,
.ui-select-icon,
.ui-file-icon {
  border-color: rgba(207,216,230,.13) !important;
  background: rgba(185, 132, 255, .12) !important;
  color: var(--kh-md-brand) !important;
}

.badge,
.status-pill,
.worker-page-status .badge {
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 14px rgba(0,0,0,.12);
}

.ui-wait-spinner {
  width: 16px;
  height: 16px;
  border-width: 2.25px;
}

.button,
.worker-table-action,
.worker-page-refresh,
.worker-page-update-submit {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform .16s var(--kh-ease-premium, ease), border-color .16s var(--kh-ease-premium, ease), background .16s var(--kh-ease-premium, ease), box-shadow .16s var(--kh-ease-premium, ease);
}

.button:hover:not(:disabled),
.worker-table-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--kh-md-elev-1);
}

.button:focus-visible,
.worker-table-action:focus-visible,
[data-ui-component="tabs"] .ui-material-tab:focus-visible,
.command-capability-row:focus-visible,
.worker-management-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--kh-md-focus), var(--kh-md-elev-1) !important;
}

.ui-select-menu,
.command-preset-picker-menu {
  border-color: rgba(207,216,230,.18) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(18, 26, 39, .99), rgba(8, 12, 20, .995)) !important;
  box-shadow: var(--kh-md-elev-3), 0 0 0 1px rgba(255,255,255,.035) inset !important;
}

.ui-select-option:hover,
.ui-select-option:focus-visible,
.ui-select-option.is-selected {
  border-color: rgba(185,132,255,.34) !important;
  background:
    linear-gradient(180deg, rgba(185,132,255,.15), rgba(255,255,255,.018)),
    rgba(18, 25, 38, .96) !important;
}

.ui-file-dropzone.is-dragover,
.ui-file-dropzone.is-uploading {
  border-color: rgba(185,132,255,.48) !important;
  background:
    linear-gradient(180deg, rgba(185,132,255,.13), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(18, 25, 38, .99), rgba(10, 15, 24, .99)) !important;
}

@media (max-width: 1220px) {
  .worker-page-capability-runner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .worker-page-tab-panel {
    padding: 14px !important;
    border-radius: 0 18px 18px 18px !important;
  }

  [data-ui-component="tabs"] .ui-material-tab,
  .ui-tabs .ui-tab-button {
    min-height: 44px;
    padding-inline: 14px;
  }
}

/* v0.6.7.27 SPA page registry + page navigation architecture */
.workspace-topbar {
  gap: 18px;
}

.page-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.page-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
  color: var(--md-text-subtle, rgba(186, 194, 209, .72));
}

.page-breadcrumb {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 0;
  background: transparent;
  color: rgba(203, 211, 227, .78);
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color .16s ease;
}

.page-breadcrumb:hover {
  color: #f6f3ff;
}

.page-breadcrumb.active {
  color: #cfabff;
  cursor: default;
}

.page-breadcrumb-separator {
  color: rgba(203, 211, 227, .36);
  font-size: 12px;
  font-weight: 900;
}

.view-section {
  min-width: 0;
  animation: khPageFade .16s ease both;
}

.view-section.active {
  position: relative;
  isolation: isolate;
}

.view-section.active::before {
  content: '';
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), transparent),
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .045), transparent 32%);
  pointer-events: none;
}

@keyframes khPageFade {
  from { opacity: .78; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.side-nav-item.active {
  color: #f8f4ff;
}

.side-nav-item.active .nav-icon {
  color: #d1abff;
}

@media (max-width: 1180px) {
  .workspace-topbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-breadcrumbs {
    display: none;
  }
}

/* v0.6.7.29 SPA section panels + dashboard content routing */
[data-page-section-panel][hidden],
.is-page-section-hidden {
  display: none !important;
}

[data-page-section-panel] {
  min-width: 0;
}

.dashboard-home {
  display: grid;
  gap: 18px;
}

.dashboard-section-panel {
  animation: khPageSectionIn .18s ease-out both;
}

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

.dashboard-command-center.dashboard-section-panel {
  min-height: 260px;
  align-content: center;
  border: 1px solid rgba(211, 176, 255, .18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(162, 89, 255, .17), transparent 36%),
    radial-gradient(circle at 92% 10%, rgba(124, 183, 255, .10), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.014)),
    rgba(10, 15, 25, .88);
  box-shadow:
    0 18px 52px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.055);
}

.dashboard-command-center.dashboard-section-panel h2 {
  max-width: 760px;
  color: #f7f3ff;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.045em;
}

.dashboard-command-center.dashboard-section-panel p {
  max-width: 780px;
  color: rgba(226, 234, 247, .78);
  font-size: 15px;
  line-height: 1.65;
}

.dashboard-metric-grid.dashboard-section-panel,
.dashboard-charts.dashboard-section-panel,
.dashboard-grid.dashboard-section-panel,
.system-console-panel.dashboard-section-panel {
  margin-top: 0;
}

body[data-active-view='dashboard'] .workspace-main {
  --dashboard-section-gap: 18px;
}

@media (max-width: 760px) {


  .dashboard-command-center.dashboard-section-panel {
    min-height: 220px;
    border-radius: 22px;
  }
}

/* v0.6.7.31 dashboard overview + strict SPA view isolation */
[data-view][hidden],
.view-section[hidden],
.view-section:not(.active) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.view-section.active {
  display: grid !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.dashboard-home[hidden],
.dashboard-home:not(.active) {
  display: none !important;
}

body:not([data-active-view='dashboard']) [data-dashboard-section],
body:not([data-active-view='dashboard']) .dashboard-section-panel,
body:not([data-active-view='dashboard']) .dashboard-grid,
body:not([data-active-view='dashboard']) .dashboard-bottom-grid,
body:not([data-active-view='dashboard']) .quick-actions-panel {
  display: none !important;
}

.dashboard-overview-panel {
  display: grid;
  gap: 16px;
}

.dashboard-overview-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(211, 176, 255, .20);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(162, 89, 255, .18), transparent 36%),
    radial-gradient(circle at 92% 10%, rgba(124, 183, 255, .11), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.016)),
    rgba(10, 15, 25, .90);
  box-shadow:
    0 18px 52px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.dashboard-overview-hero .eyebrow {
  color: #cfa7ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dashboard-overview-hero h2 {
  max-width: 760px;
  margin: 8px 0 0;
  color: #f7f3ff;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.dashboard-overview-hero p {
  max-width: 780px;
  margin: 12px 0 0;
  color: rgba(226, 234, 247, .80);
  font-size: 15px;
  line-height: 1.65;
}

.dashboard-overview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.dashboard-overview-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-overview-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(207, 216, 230, .14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.014)),
    linear-gradient(180deg, rgba(16, 23, 34, .98), rgba(10, 15, 24, .99));
  box-shadow: 0 10px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.05);
}

.dashboard-overview-card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #cf9cff;
  background: rgba(162, 89, 255, .14);
  border: 1px solid rgba(211, 176, 255, .20);
}

.dashboard-overview-card span {
  display: block;
  color: rgba(214, 223, 237, .78);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.dashboard-overview-card strong {
  display: block;
  margin-top: 6px;
  color: #f7f3ff;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.dashboard-overview-card small {
  display: block;
  margin-top: 8px;
  color: rgba(196, 207, 224, .74);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.42;
}

.dashboard-overview-card .metric-trend {
  position: absolute;
  top: 12px;
  right: 12px;
  font-style: normal;
}

.dashboard-overview-status {
  display: grid;
}

.dashboard-overview-health {
  display: grid;
  grid-template-columns: minmax(260px, .88fr) minmax(0, 1.12fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(207, 216, 230, .14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.014)),
    rgba(9, 14, 23, .88);
}

.dashboard-overview-health.good {
  border-color: rgba(64, 220, 145, .20);
}

.dashboard-overview-health.warn {
  border-color: rgba(255, 209, 102, .22);
}

.dashboard-overview-health.bad {
  border-color: rgba(255, 107, 138, .24);
}

.dashboard-overview-health-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-overview-health-head strong {
  display: block;
  color: #f7f3ff;
  font-size: 16px;
  font-weight: 950;
}

.dashboard-overview-health-head small {
  display: block;
  margin-top: 4px;
  color: rgba(196, 207, 224, .76);
  font-size: 12px;
  font-weight: 720;
}

.dashboard-overview-health-list {
  display: grid;
  gap: 8px;
}

.dashboard-overview-health-list div {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, .65fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.055);
}

.dashboard-overview-health-list span {
  color: rgba(214, 223, 237, .70);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dashboard-overview-health-list strong {
  color: rgba(242, 247, 255, .92);
  font-size: 12px;
  font-weight: 820;
  text-align: right;
}

@media (max-width: 1180px) {
  .dashboard-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-overview-health {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-overview-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .dashboard-overview-actions {
    justify-content: flex-start;
  }

  .dashboard-overview-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-health-list div {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-health-list strong {
    text-align: left;
  }
}


/* v0.6.7.32 file-backed icons */
[data-icon] {
  display: inline-grid;
  place-items: center;
}

[data-icon] > .ui-icon {
  pointer-events: none;
}

.auth-submit-icon .ui-icon,
.auth-submit > strong[data-icon] .ui-icon {
  width: 20px;
  height: 20px;
}

.search-shell > [data-icon] .ui-icon {
  width: 17px;
  height: 17px;
  color: rgba(231, 221, 255, .72);
}

/* v0.6.7.33 worker page semantic hero + file-backed hardware icons */
.worker-avatar-xl {
  width: 92px;
  height: 92px;
  font-size: 24px;
  border-radius: 28px;
}

.worker-page-hero-managed {
  position: relative;
  grid-template-columns: minmax(280px, .95fr) minmax(420px, 1.45fr) auto;
  align-items: stretch;
  gap: 18px;
  overflow: hidden;
}

.worker-page-hero-managed::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, rgba(185,132,255,.18), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(122,184,255,.08), transparent 32%);
}

.worker-page-hero-managed > * {
  position: relative;
  z-index: 1;
}

.worker-page-hero-left,
.worker-page-hero-actions,
.worker-page-identity-copy,
.worker-page-hero-metric-copy {
  min-width: 0;
}

.worker-page-hero-left {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  align-content: start;
}

.worker-page-identity-premium {
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(207,216,230,.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    rgba(8, 13, 22, .56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.worker-page-identity-copy {
  display: grid;
  gap: 6px;
}

.worker-page-identity-copy h2 {
  overflow-wrap: anywhere;
}

.worker-page-host-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: rgba(226, 218, 238, .78);
  font-size: 12px;
  font-weight: 820;
}

.worker-page-host-name .ui-icon {
  width: 14px;
  height: 14px;
  color: var(--kh-md-brand);
}

.worker-page-host-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-page-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.worker-page-hero-metric {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  height: fit-content;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(207,216,230,.13);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.058), rgba(255,255,255,.016)),
    rgba(6, 11, 20, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 34px rgba(0,0,0,.14);
}

.worker-page-hero-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  border: 1px solid rgba(207,216,230,.14);
  background: rgba(185,132,255,.12);
  color: var(--kh-md-brand);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.worker-page-hero-metric-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.worker-page-hero-metric-copy {
  display: grid;
  gap: 3px;
}

.worker-page-hero-metric-copy small {
  color: rgba(183, 190, 205, .78);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.worker-page-hero-metric-copy strong {
  color: var(--kh-md-text);
  font-size: 13px;
  font-weight: 920;
  line-height: 1.22;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-page-hero-metric-copy em {
  color: rgba(226, 218, 238, .66);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-page-hero-actions {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 12px;
}

.worker-page-refresh,
.worker-page-profile-refresh,
.worker-page-status [data-worker-page-heartbeat] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.worker-page-refresh .ui-icon,
.worker-page-profile-refresh .ui-icon,
.worker-page-status .ui-icon {
  width: 16px;
  height: 16px;
}

.worker-page-status {
  justify-content: flex-end;
  padding: 10px;
  border: 1px solid rgba(207,216,230,.12);
  border-radius: 16px;
  background: rgba(6, 11, 20, .54);
}

.worker-page-status [data-worker-page-heartbeat] {
  color: rgba(226, 218, 238, .74);
  font-size: 12px;
  font-weight: 820;
}

.worker-page-status [data-worker-page-heartbeat] .ui-icon {
  color: var(--kh-md-brand);
}

.worker-hardware-card-icon .ui-icon,
.worker-management-action-icon .ui-icon,
.worker-page-tab-button .ui-icon,
.worker-page-hero-metric-icon .ui-icon {
  background: currentColor;
}

@media (max-width: 1320px) {
  .worker-page-hero-managed {
    grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  }

  .worker-page-hero-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 920px) {
  .worker-page-hero-managed {
    grid-template-columns: 1fr;
  }

  .worker-page-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worker-page-hero-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .worker-page-identity-premium {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-page-hero-metrics {
    grid-template-columns: 1fr;
  }

  .worker-avatar-xl {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 20px;
  }
}

/* v0.6.7.36 stable settings tabs ---------------------------------------- */
.config-shell-panel {
  position: sticky;
  top: 0;
  z-index: 3;
  overflow: hidden;
  border-color: rgba(198,136,255,.18);
  background:
    radial-gradient(circle at 0 0, rgba(142,53,255,.14), transparent 34%),
    linear-gradient(135deg, rgba(20, 18, 28, .94), rgba(12, 12, 18, .92));
  backdrop-filter: blur(18px);
}

.config-tabs-shell,
.config-group-tabs-shell {
  margin-top: 16px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.config-tabs,
.config-group-tabs {
  width: max-content;
  min-width: 100%;
}

.config-tabs .ui-tab-button,
.config-group-tabs .ui-tab-button {
  white-space: nowrap;
}

.config-group-tabs-shell {
  margin-top: 0;
  margin-bottom: 14px;
}

[data-config-tab-panel][hidden] {
  display: none !important;
}

[data-config-tab-panel].is-config-tab-active {
  animation: config-tab-in .18s ease-out;
}

.config-groups-grid {
  grid-template-columns: minmax(0, 1fr);
}

.config-groups-grid .config-group-card {
  min-height: 420px;
}

.config-groups-grid .config-field-list {
  max-height: min(58vh, 640px);
}

@keyframes config-tab-in {
  from {
    opacity: .72;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .config-shell-panel {
    position: static;
  }

  .config-tabs,
  .config-group-tabs {
    min-width: max-content;
  }
}

/* v0.6.7.37 worker live header stability -------------------------------- */
.worker-page-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.worker-page-live-pill > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.worker-page-live-pill strong {
  color: rgba(226, 218, 238, .8);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.worker-page-live-pill em {
  color: var(--kh-md-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

.worker-page-live-pill .live-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
}

.worker-page-live-pill[data-heartbeat-state="fresh"] .ui-icon,
.worker-page-hero-metric[data-worker-page-hero-metric="last_activity"] .worker-page-hero-metric-icon {
  animation: worker-live-glow 1.8s ease-in-out infinite;
}

.worker-page-hero-metric[data-worker-page-hero-metric="last_activity"] {
  border-color: rgba(88, 225, 154, .18);
  background:
    radial-gradient(circle at 0 0, rgba(88,225,154,.08), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.058), rgba(255,255,255,.016)),
    rgba(6, 11, 20, .72);
}

@keyframes worker-live-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(88,225,154,0)); }
  50% { filter: drop-shadow(0 0 10px rgba(88,225,154,.35)); }
}

@media (prefers-reduced-motion: reduce) {
  .worker-page-live-pill[data-heartbeat-state="fresh"] .ui-icon,
  .worker-page-hero-metric[data-worker-page-hero-metric="last_activity"] .worker-page-hero-metric-icon {
    animation: none;
  }
}

/* v0.6.7.38 — worker prepared commands + Windows-like worker console */
.worker-page-commands-panel,
.worker-page-console-panel {
  overflow: hidden;
}

.worker-page-command-runner {
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
}

.worker-page-command-list {
  max-height: 690px;
}

.worker-page-command-button code {
  color: rgba(198, 212, 255, .84);
}

.worker-page-selected-command {
  border-color: rgba(112, 172, 255, .20);
  background:
    radial-gradient(circle at 0 0, rgba(112, 172, 255, .10), transparent 42%),
    rgba(255,255,255,.035);
}

.worker-page-execution-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(122, 184, 255, .22) !important;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(99, 176, 255, .10), transparent 34%),
    #050811 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 36px rgba(0,0,0,.22);
}

.worker-page-execution-result header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worker-page-execution-result header strong {
  color: rgba(246, 249, 255, .96);
  font-size: 14px;
}

.worker-page-execution-disclosure {
  display: block;
}

.worker-page-execution-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.worker-page-execution-disclosure > summary::-webkit-details-marker {
  display: none;
}

.worker-page-execution-disclosure > summary::before {
  content: '▸';
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  transition: transform .16s ease;
}

.worker-page-execution-disclosure[open] > summary::before {
  transform: rotate(90deg);
}

.worker-page-execution-disclosure > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin-right: auto;
}

.worker-page-execution-disclosure > summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.worker-page-execution-disclosure-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.worker-page-execution-result > p,
.worker-page-execution-result > pre {
  margin: 0;
  color: rgba(220, 230, 244, .84);
}

.worker-page-execution-result pre,
.worker-console-output-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.worker-page-execution-result.is-pending {
  border-color: rgba(255, 209, 102, .24) !important;
}

.worker-windows-console-panel {
  padding: 0 !important;
}

.worker-windows-console-panel > .panel-title-row {
  padding: 18px 18px 0;
}

.worker-windows-console {
  margin: 18px;
  overflow: hidden;
  border: 1px solid rgba(207,216,230,.18);
  border-radius: 18px;
  background: #08090d;
  box-shadow: 0 26px 72px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.055);
}

.worker-windows-console-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.035)),
    #171b24;
  color: rgba(241,245,251,.92);
  font: 700 12px/1.2 "Segoe UI", system-ui, sans-serif;
}

.worker-windows-console-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.worker-windows-console-controls i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.13);
}

.worker-windows-console-screen {
  min-height: 390px;
  max-height: 620px;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 24%),
    #050505;
  color: #d8f7d1;
  font: 500 13px/1.45 Consolas, "Cascadia Mono", "Courier New", monospace;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 255, 170, .36) rgba(255,255,255,.04);
}

.worker-console-line,
.worker-console-entry {
  margin: 0 0 6px;
}

.worker-console-line.muted,
.worker-console-empty {
  color: rgba(216,247,209,.62);
}

.worker-console-line.pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 224, 128, .95);
}

.worker-console-prompt-text {
  color: #b6f6ff;
}

.worker-console-command-text {
  color: #f5f5f5;
}

.worker-console-output-text {
  margin: 3px 0 10px;
  color: #d8f7d1;
  font: inherit;
}

.worker-windows-console-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.10);
  background: #050505;
  color: #d8f7d1;
  font: 500 13px/1.45 Consolas, "Cascadia Mono", "Courier New", monospace;
}

.worker-console-prompt {
  padding: 12px 0 12px 14px;
  color: #b6f6ff;
  white-space: nowrap;
}

.worker-windows-console-input input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: none;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
}

.worker-windows-console-input input::placeholder {
  color: rgba(216,247,209,.42);
}

.worker-console-submit {
  margin: 6px;
  min-height: 32px;
  border-radius: 9px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

@media (max-width: 1220px) {
  .worker-page-command-runner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .worker-windows-console-input {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 8px;
  }
  .worker-console-prompt {
    padding: 0;
  }
  .worker-windows-console-input input {
    height: 38px;
  }
  .worker-console-submit {
    margin: 0;
  }
}

/* v0.6.7.40 — registry-owned console composer + terminal input style */
.worker-windows-console-panel {
  background:
    radial-gradient(circle at 16% 0%, rgba(145, 74, 255, .10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)),
    rgba(8, 12, 20, .94) !important;
}

.worker-windows-console {
  border-radius: 10px;
  border-color: rgba(255,255,255,.16);
  background: #0c0c0c;
  box-shadow:
    0 28px 78px rgba(0,0,0,.46),
    0 0 0 1px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.worker-windows-console-titlebar {
  min-height: 34px;
  padding: 0 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.025)),
    #202020;
  color: #f2f2f2;
  font: 600 12px/1 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  user-select: none;
}

.worker-windows-console-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-windows-console-controls {
  align-self: stretch;
  gap: 0;
}

.worker-windows-console-controls i {
  width: 46px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(242,242,242,.84);
  font: 400 13px/1 "Segoe UI Symbol", "Segoe UI", system-ui, sans-serif;
}

.worker-windows-console-controls i.close {
  font-size: 17px;
}

.worker-windows-console-controls i:hover {
  background: rgba(255,255,255,.10);
}

.worker-windows-console-controls i.close:hover {
  background: #c42b1c;
  color: #fff;
}

.worker-windows-console-screen {
  min-height: 460px;
  max-height: 68vh;
  padding: 12px 14px 14px;
  background: #0c0c0c;
  color: #cccccc;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: 0;
  tab-size: 4;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgba(204,204,204,.48) rgba(255,255,255,.06);
}

.worker-windows-console-screen::selection,
.worker-windows-console-screen *::selection {
  background: #ffffff;
  color: #000000;
}

.worker-console-line,
.worker-console-entry {
  margin: 0 0 4px;
}

.worker-console-line.muted,
.worker-console-empty {
  color: #b8b8b8;
}

.worker-console-line.pending {
  color: #f9f1a5;
}

.worker-console-prompt-text,
.worker-console-prompt {
  color: #cccccc;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace;
  font-weight: 400;
}

.worker-console-command-text,
.worker-windows-console-input input {
  color: #f2f2f2;
}

.worker-console-output-text {
  margin: 2px 0 10px;
  color: #cccccc;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace;
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.worker-windows-console-input {
  grid-template-columns: auto minmax(180px, 1fr) 1px;
  margin: 2px 0 0;
  border-top: 0;
  background: #0c0c0c;
  color: #cccccc;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

.worker-console-prompt {
  padding: 0;
  white-space: nowrap;
}

.worker-windows-console-input input {
  height: auto;
  min-height: 18px;
  padding: 0 0 0 1px;
  border: 0;
  outline: none;
  background: transparent;
  caret-color: #f2f2f2;
  font: inherit;
}

.worker-windows-console-input input::placeholder {
  color: rgba(204,204,204,.38);
}

.worker-windows-console-input input:disabled {
  color: rgba(204,204,204,.52);
  cursor: wait;
}

.worker-console-submit,
.worker-console-submit-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .worker-windows-console-screen {
    min-height: 360px;
    font-size: 12.5px;
  }
  .worker-windows-console-input {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 2px;
  }
  .worker-windows-console-input input {
    height: 20px;
  }
  .worker-windows-console-controls i {
    width: 38px;
  }
}


/* v0.6.7.40 — registry-owned console composer + terminal input style */
.ui-console-input[data-ui-component][data-ui-variant="terminal-line"],
.worker-console-input-shell[data-ui-component][data-ui-variant="terminal-line"] {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.ui-console-input > .ui-console-input-element,
.worker-console-input-shell > .worker-console-input-element,
.worker-console-composer-shell > .worker-console-input-element {
  min-height: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f2f2f2 !important;
  caret-color: #f2f2f2;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace !important;
  font-size: inherit !important;
  line-height: 18px !important;
}

.ui-console-input > .ui-console-input-element::placeholder,
.worker-console-input-shell > .worker-console-input-element::placeholder {
  color: transparent !important;
}

.worker-windows-console-input {
  display: block;
  margin: 4px 0 0;
  border-top: 0;
  background: transparent;
}

.worker-console-composer-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-width: 0;
}

.worker-console-composer-control {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.worker-console-composer-shell {
  flex: 1 1 auto;
  min-width: 0;
}

.worker-console-input-caret {
  display: inline-block;
  flex: 0 0 auto;
  margin-left: 1px;
  color: #f2f2f2;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace;
  line-height: 1;
  animation: worker-console-caret-blink 1s steps(1, end) infinite;
}

.worker-windows-console-input:focus-within .worker-console-input-caret {
  color: #ffffff;
}

.worker-windows-console-input input:disabled + .worker-console-input-caret,
.worker-windows-console-input .worker-console-input-element:disabled ~ .worker-console-input-caret {
  opacity: .44;
  animation: none;
}

.worker-console-prompt {
  padding: 0;
  white-space: pre;
}

.worker-console-prompt::after {
  content: "";
  display: inline-block;
  width: .25ch;
}

@keyframes worker-console-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .worker-console-input-caret {
    animation: none;
  }
}

@media (max-width: 760px) {
  .worker-console-composer-line {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* v0.6.7.43 — worker overview layout stabilization */
.worker-page-hero-managed {
  grid-template-columns: minmax(360px, 1.15fr) minmax(390px, .95fr) auto;
}

.worker-page-hero-metrics {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.worker-overview-v2 {
  display: grid;
  gap: 16px;
}

.worker-overview-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.worker-overview-command-center::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 0%, rgba(185, 132, 255, .14), transparent 34%),
    radial-gradient(circle at 95% 0%, rgba(90, 220, 180, .08), transparent 30%);
}

.worker-overview-command-copy,
.worker-overview-status-row {
  position: relative;
  z-index: 1;
}

.worker-overview-command-copy h3 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.worker-overview-command-copy p {
  margin: 0;
  max-width: 760px;
  color: rgba(232, 238, 249, .72);
  font-size: 13px;
  line-height: 1.55;
}

.worker-overview-status-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.worker-overview-status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(207, 216, 230, .14);
  border-radius: 999px;
  background: rgba(7, 11, 18, .48);
  color: rgba(245, 247, 251, .88);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.worker-overview-status-chip .ui-icon {
  width: 15px;
  height: 15px;
}

.worker-overview-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.worker-overview-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border-radius: 20px !important;
}

.worker-overview-metric-icon,
.worker-overview-machine-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(185, 132, 255, .24);
  border-radius: 15px;
  background: rgba(185, 132, 255, .10);
  color: var(--kh-md-brand);
}

.worker-overview-metric-icon .ui-icon,
.worker-overview-machine-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.worker-overview-metric-copy,
.worker-overview-machine-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-overview-metric-copy small,
.worker-overview-machine-copy small {
  color: rgba(199, 209, 225, .70);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.worker-overview-metric-copy strong,
.worker-overview-machine-copy strong {
  color: #f5f7fb;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-overview-machine-copy strong {
  font-size: 14px;
}

.worker-overview-metric-copy em,
.worker-overview-machine-copy em {
  color: rgba(199, 209, 225, .68);
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-overview-metric.is-live .worker-overview-metric-icon {
  border-color: rgba(64, 220, 145, .32);
  background: rgba(64, 220, 145, .10);
  color: var(--kh-md-success);
}

.worker-overview-metric.is-ok .worker-overview-metric-icon {
  border-color: rgba(64, 220, 145, .28);
  background: rgba(64, 220, 145, .09);
  color: var(--kh-md-success);
}

.worker-overview-metric.is-warn .worker-overview-metric-icon {
  border-color: rgba(255, 209, 102, .30);
  background: rgba(255, 209, 102, .10);
  color: var(--kh-md-warning);
}

.worker-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr) minmax(380px, 1.08fr);
  gap: 16px;
  align-items: stretch;
}

.worker-overview-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.worker-overview-card {
  min-width: 0;
  padding: 16px;
}

.worker-overview-card > header,
.worker-page-overview-summary-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.worker-overview-card > header h3,
.worker-page-overview-summary-card > header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: -.025em;
}

.worker-overview-card > header p,
.worker-page-overview-summary-card > header p {
  margin: 0;
  color: rgba(199, 209, 225, .70);
  font-size: 12px;
  line-height: 1.45;
}

.worker-overview-card > header > .ui-icon {
  width: 24px;
  height: 24px;
  color: var(--kh-md-brand);
  opacity: .88;
}

.worker-overview-identity-card .worker-avatar {
  flex: 0 0 auto;
}

.worker-overview-machine-card {
  grid-column: auto;
}

.worker-overview-machine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.worker-overview-machine-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(207, 216, 230, .11);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(7, 11, 18, .34);
}

.worker-overview-machine-row .worker-overview-machine-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.worker-overview-machine-row .worker-overview-machine-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.worker-overview-action-grid .worker-page-overview-summary-card {
  display: grid;
  align-content: start;
}

.worker-page-overview-chip-row .worker-summary-pill .ui-icon {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

@media (max-width: 1360px) {
  .worker-page-hero-managed {
    grid-template-columns: minmax(0, 1fr);
  }

  .worker-page-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .worker-page-hero-actions {
    justify-content: space-between;
  }

  .worker-overview-layout,
  .worker-overview-action-grid {
    grid-template-columns: 1fr;
  }

  .worker-overview-machine-card {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .worker-overview-command-center {
    grid-template-columns: 1fr;
  }

  .worker-overview-status-row {
    justify-content: flex-start;
  }

  .worker-overview-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worker-overview-machine-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .worker-page-hero-metrics,
  .worker-overview-metric-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.6.7.44 — terminal focus, input and history navigation */
.worker-console-composer-control {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
}

.worker-console-composer-shell,
.worker-console-input-shell[data-ui-component][data-ui-variant="terminal-line"] {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
}

.worker-console-input-shell > .worker-console-input-element,
.worker-console-composer-shell > .worker-console-input-element,
.ui-console-input > .ui-console-input-element[data-worker-console-command-input="true"] {
  width: var(--worker-console-input-width, 1ch) !important;
  min-width: 1ch !important;
  max-width: min(100%, 120ch) !important;
  caret-color: transparent !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

.worker-console-input-caret {
  align-self: center;
  margin-left: 0;
  transform: translateY(-.02em);
}

.worker-windows-console-input.has-command-text .worker-console-input-caret {
  margin-left: 0;
}

.worker-console-composer-line {
  cursor: text;
}


/* v0.6.7.43 — fix collapsed Worker Overview layout */
.worker-overview-v2.worker-page-overview-tab {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  align-items: stretch !important;
  gap: 16px !important;
  width: 100%;
  min-width: 0;
}

.worker-overview-v2.worker-page-overview-tab > * {
  grid-column: 1 / -1 !important;
  min-width: 0;
}

.worker-overview-command-center {
  min-height: auto !important;
  align-self: stretch;
}

.worker-overview-metric-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
}

.worker-overview-layout {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(300px, .9fr) minmax(300px, .9fr) minmax(480px, 1.35fr) !important;
  align-items: start;
}

.worker-overview-action-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  align-items: start;
}

.worker-overview-card,
.worker-page-overview-summary-card,
.worker-overview-metric,
.worker-overview-machine-row,
.worker-detail-kv,
.worker-detail-stat {
  min-width: 0;
  max-width: 100%;
}

.worker-overview-card > header,
.worker-page-overview-summary-card > header {
  min-width: 0;
}

.worker-overview-card > header > div,
.worker-page-overview-summary-card > header > div,
.worker-overview-command-copy,
.worker-overview-metric-copy,
.worker-overview-machine-copy {
  min-width: 0;
}

.worker-overview-identity-card .worker-detail-kv-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.worker-overview-realtime-card .worker-detail-stat-grid {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
}

.worker-overview-machine-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

.worker-detail-kv-value,
.worker-overview-metric-copy strong,
.worker-overview-metric-copy em,
.worker-overview-machine-copy strong,
.worker-overview-machine-copy em,
.worker-summary-pill {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.worker-overview-metric-copy strong,
.worker-overview-machine-copy strong,
.worker-overview-metric-copy em,
.worker-overview-machine-copy em {
  overflow: visible;
  text-overflow: clip;
}

.worker-overview-status-row {
  min-width: 0;
  justify-content: flex-end;
}

@media (max-width: 1480px) {
  .worker-overview-layout {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) !important;
  }

  .worker-overview-machine-card {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 980px) {
  .worker-overview-command-center,
  .worker-overview-layout,
  .worker-overview-action-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .worker-overview-status-row {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .worker-overview-metric-grid,
  .worker-overview-machine-grid,
  .worker-overview-identity-card .worker-detail-kv-grid,
  .worker-overview-realtime-card .worker-detail-stat-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* v0.6.7.44 — worker console focus/input hardening */
.worker-windows-console-screen[data-worker-console-output] {
  cursor: text;
  outline: none;
}

.worker-windows-console-screen[data-worker-console-output]:focus-within {
  box-shadow: inset 0 0 0 1px rgba(185, 132, 255, .18);
}

.worker-console-composer-line,
.worker-console-composer-control,
.worker-console-composer-shell,
.worker-console-input-shell {
  min-width: 0;
}

.worker-console-input-caret {
  pointer-events: none;
  user-select: none;
}

.worker-console-input-shell > .worker-console-input-element,
.worker-console-composer-shell > .worker-console-input-element,
.ui-console-input > .ui-console-input-element[data-worker-console-command-input="true"] {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: var(--worker-console-input-width, 1ch) !important;
  min-width: 1ch !important;
  max-width: calc(100vw - 160px) !important;
  opacity: 1 !important;
  color: #f2f2f2 !important;
  pointer-events: auto !important;
}

.worker-console-input-shell > .worker-console-input-element:focus,
.worker-console-composer-shell > .worker-console-input-element:focus {
  outline: none !important;
}


/* v0.6.7.45 — registry-driven worker console window controls */
.worker-page-shell {
  position: relative;
}

.worker-console-window-layer {
  position: absolute;
  left: var(--worker-console-window-x, 32px);
  top: var(--worker-console-window-y, 92px);
  width: min(var(--worker-console-window-w, 980px), calc(100% - 32px));
  height: var(--worker-console-window-h, 560px);
  z-index: 80;
  padding: 0 !important;
  border: 1px solid rgba(185, 132, 255, .34);
  border-radius: 14px;
  background: rgba(9, 12, 18, .96) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.52), 0 0 0 1px rgba(255,255,255,.06) inset;
  overflow: hidden;
}

.worker-console-window-layer.is-fullscreen {
  position: fixed;
  inset: 10px;
  width: auto;
  height: auto;
  z-index: 1000;
}

.worker-console-window-layer > .worker-windows-console,
.worker-console-window-layer .worker-windows-console-screen {
  height: 100%;
}

.worker-console-window-layer .worker-windows-console {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  border: 0;
  border-radius: inherit;
}

.worker-console-window-layer .worker-windows-console-screen {
  min-height: 0;
  max-height: none;
}

.worker-windows-console-titlebar[data-worker-console-window-drag="true"] {
  cursor: grab;
}

.worker-console-window-moving .worker-windows-console-titlebar[data-worker-console-window-drag="true"] {
  cursor: grabbing;
}

.worker-windows-console-controls {
  pointer-events: auto;
}

.worker-console-window-control {
  width: 46px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(242,242,242,.84);
  cursor: pointer;
  font: 400 13px/1 "Segoe UI Symbol", "Segoe UI", system-ui, sans-serif;
}

.worker-console-window-control i {
  width: auto !important;
  height: auto !important;
  display: inline !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
}

.worker-console-window-control:hover {
  background: rgba(255,255,255,.10);
}

.worker-console-window-control.close:hover {
  background: #c42b1c;
  color: #fff;
}

.worker-console-window-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border: 0;
  background: linear-gradient(135deg, transparent 0 45%, rgba(204,204,204,.38) 46% 54%, transparent 55% 100%);
  cursor: nwse-resize;
  opacity: .78;
}

.worker-console-minimized-bar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100% - 36px));
  padding: 8px;
  border: 1px solid rgba(185, 132, 255, .34);
  border-radius: 18px;
  background: rgba(11, 15, 24, .96);
  box-shadow: 0 20px 60px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
}

.worker-console-minimized-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f4efff;
  text-align: left;
  cursor: pointer;
}

.worker-console-minimized-main strong,
.worker-console-minimized-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-console-minimized-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--accent-3);
  background: rgba(162, 89, 255, .16);
}

.worker-console-minimized-actions {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.worker-console-minimized-actions .worker-console-window-control {
  width: 36px;
  height: 32px;
}

.worker-console-dock-placeholder {
  display: grid;
  gap: 14px;
  min-height: 260px;
}

.worker-console-placeholder-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  padding: 14px;
  border: 1px solid rgba(185, 132, 255, .22);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  color: rgba(244,239,255,.88);
}

.worker-console-placeholder-card .ui-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-3);
}

.worker-console-placeholder-card strong,
.worker-console-placeholder-card small {
  display: block;
}

@media (max-width: 760px) {
  .worker-console-window-layer {
    left: 8px;
    right: 8px;
    top: 72px;
    width: auto;
    height: min(620px, calc(100vh - 100px));
  }
  .worker-console-window-layer.is-fullscreen {
    inset: 6px;
  }
  .worker-console-minimized-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}


/* v0.6.7.48 — registry-level select icon orientation fix
   Selected/option icons must never inherit dropdown chevron rotation.
   Only the dedicated .ui-select-chevron is allowed to rotate on open/closed state. */
.ui-select-icon,
.command-preset-picker-icon,
.ui-select-option-icon,
.command-preset-option-icon {
  transform: none !important;
}

.ui-select-icon .ui-icon,
.command-preset-picker-icon .ui-icon,
.ui-select-option-icon .ui-icon,
.command-preset-option-icon .ui-icon {
  transform: none !important;
  rotate: 0deg !important;
  scale: 1 !important;
  transform-origin: center center !important;
}

.ui-select-chevron {
  transform: none;
  rotate: 0deg;
}

.ui-select-picker.is-open .ui-select-chevron,
.command-preset-picker.is-open .ui-select-chevron {
  transform: none !important;
  rotate: 180deg;
}

.ui-select-chevron::before {
  transform: translateY(-2px) rotate(45deg) !important;
  transform-origin: center center;
}

.ui-select-picker.is-open .ui-select-chevron::before,
.command-preset-picker.is-open .ui-select-chevron::before {
  transform: translateY(2px) rotate(225deg) !important;
}



/* v0.7.6 — select chevron single-source contract.
   New registry/template markup emits only .ui-select-chevron. Legacy command-preset chevron class is intentionally not emitted anymore. */
/* v0.6.7.51 — System Console terminal-first formatter + Command Deck builder-only */
.command-layout-v066 {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 1480px;
  margin: 0 auto;
}

.command-builder-panel {
  overflow: visible;
}

.command-output-panel,
.worker-update-rollout-card,
.command-submit-button {
  display: none !important;
}

.command-deck-title-row {
  align-items: center;
  gap: 18px;
}

.command-builder-form {
  gap: 18px;
}

.command-target-grid {
  grid-template-columns: minmax(280px, .62fr) minmax(320px, 1fr);
  align-items: stretch;
}

.command-capability-browser {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(360px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.command-capability-list-shell {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.command-preset-shell-v0672,
.command-args-shell,
.command-draft-preview,
.command-builder-note {
  max-width: 1120px;
}

.command-preset-shell-v0672 {
  grid-template-columns: minmax(320px, .78fr) minmax(360px, 1fr);
}

.command-builder-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(64, 220, 145, .26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(64, 220, 145, .13), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(7, 13, 18, .74);
  padding: 14px;
  color: rgba(229, 238, 248, .88);
}

.command-builder-note-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid rgba(64, 220, 145, .36);
  background: rgba(64, 220, 145, .12);
  color: var(--ok);
  font-weight: 950;
}

.command-builder-note strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 3px;
}

.command-builder-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .command-target-grid,
  .command-capability-browser,
  .command-preset-shell-v0672 {
    grid-template-columns: 1fr !important;
  }
}


/* v0.6.7.51 — System Console terminal-first formatter */
.system-console-actions::before {
  content: 'TERMINAL LOG' !important;
  border-color: rgba(57, 217, 138, .22) !important;
  background: rgba(57, 217, 138, .08) !important;
  color: #9ff8c7 !important;
}

body.system-console-fullscreen .system-console-actions::before {
  content: 'FULLSCREEN TERMINAL LOG' !important;
}

.system-console-view {
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 24%),
    #050505 !important;
  color: #cccccc;
  font-family: "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace !important;
}

.system-console-terminal {
  display: grid;
  gap: 2px;
}

.system-console-line {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #cccccc;
  font: inherit;
}

.system-console-terminal-line {
  display: flex;
  align-items: baseline;
  gap: .55ch;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.system-console-time {
  flex: 0 0 auto;
  color: #6f6f6f;
}

.system-console-prompt {
  flex: 0 0 auto;
  color: #9cdcfe;
}

.system-console-level {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.system-console-scope {
  flex: 0 0 auto;
  color: #c586c0;
  font-weight: 700;
}

.system-console-marker {
  flex: 0 0 auto;
  color: #cccccc;
}

.system-console-message {
  color: #d4d4d4;
}

.system-console-inline-payload {
  color: #b5cea8;
}

.system-console-payload-details {
  margin: 2px 0 6px 4.5ch;
  padding: 0;
  border: 0;
}

.system-console-payload-details summary {
  width: max-content;
  color: #808080;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.system-console-payload-details pre {
  max-height: 240px;
  overflow: auto;
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #c8c8c8;
  font: inherit;
  font-size: 11px;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-console-success .system-console-level,
.system-console-success .system-console-marker { color: #4ec9b0 !important; }
.system-console-warning .system-console-level,
.system-console-warning .system-console-marker { color: #dcdcaa !important; }
.system-console-error .system-console-level,
.system-console-error .system-console-marker { color: #f48771 !important; }
.system-console-debug .system-console-level,
.system-console-debug .system-console-marker { color: #808080 !important; }
.system-console-info .system-console-level,
.system-console-info .system-console-marker { color: #569cd6 !important; }

.system-console-raw-line {
  display: none !important;
}

@media (max-width: 760px) {
  .system-console-terminal-line {
    display: block;
  }

  .system-console-payload-details {
    margin-left: 0;
  }
}


/* v0.6.7.51 — dashboard cleanup: no duplicate metrics/recent feeds on home */
.dashboard-overview-health-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-overview-health-list.compact strong {
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-home .dashboard-bottom-grid {
  display: none !important;
}


/* v0.6.7.53 — standard UI render primitives */
.ui-standard-card {
  min-width: 0;
}

.ui-standard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ui-standard-card-copy {
  min-width: 0;
}

.ui-standard-card-copy h3,
.ui-standard-card-copy p {
  overflow-wrap: anywhere;
}

.ui-empty-state {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 12px;
  border: 1px dashed rgba(207, 216, 230, .16);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  color: rgba(232,238,249,.72);
}

.ui-chip-row {
  min-width: 0;
}

.ui-chip {
  min-width: 0;
}

.ui-chip .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.ui-metric-block {
  min-width: 0;
}

.ui-metric-block-copy {
  min-width: 0;
}

.ui-metric-block-copy strong,
.ui-metric-block-copy em {
  overflow-wrap: anywhere;
}


/* v0.6.7.53 — Workers table heartbeat-first layout */
.worker-realtime-table {
  min-width: 1260px;
}

.worker-realtime-table th[data-column="name"],
.worker-realtime-table td[data-column="name"] { width: 260px; }
.worker-realtime-table th[data-column="heartbeat"],
.worker-realtime-table td[data-column="heartbeat"] { width: 220px; }
.worker-realtime-table th[data-column="activity"],
.worker-realtime-table td[data-column="activity"] { width: 180px; }
.worker-realtime-table th[data-column="runtime"],
.worker-realtime-table td[data-column="runtime"] { width: 180px; }
.worker-realtime-table th[data-column="commands"],
.worker-realtime-table td[data-column="commands"] { width: 260px; }
.worker-realtime-table th[data-column="machine"],
.worker-realtime-table td[data-column="machine"] { min-width: 300px; }
.worker-realtime-table th[data-column="actions"],
.worker-realtime-table td[data-column="actions"] { display: none; }

.worker-name-cell-rich > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.worker-table-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.worker-table-status-line em,
.worker-table-stack em,
.worker-machine-cell em {
  min-width: 0;
  color: rgba(190, 198, 214, .70);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.worker-table-stack strong {
  color: #f4f2ff;
  font-size: 13px;
  font-weight: 900;
}

.worker-table-stack small {
  color: rgba(218, 224, 238, .80);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-heartbeat {
  align-items: flex-start;
}

.worker-heartbeat-meter {
  display: block;
  width: min(128px, 100%);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.045);
}

.worker-heartbeat-meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(55, 214, 139, .95), rgba(255, 209, 102, .85), rgba(255, 92, 122, .85));
}

.worker-table-heartbeat.state-fresh .worker-heartbeat-meter > i {
  background: linear-gradient(90deg, rgba(55, 214, 139, .95), rgba(103, 232, 169, .72));
}

.worker-table-heartbeat.state-stale .worker-heartbeat-meter > i {
  background: linear-gradient(90deg, rgba(255, 92, 122, .95), rgba(255, 209, 102, .72));
}

.worker-command-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(46px, 1fr));
  gap: 6px;
}

.worker-table-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}

.worker-table-stat em {
  color: rgba(190, 198, 214, .72);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-stat strong {
  color: #f7f3ff;
  font-size: 14px;
  font-weight: 950;
}

.worker-table-stat.tone-success strong { color: var(--good); }
.worker-table-stat.tone-warning strong { color: var(--warn); }
.worker-table-stat.tone-info strong { color: #7cc7ff; }
.worker-table-stat.tone-bad strong { color: var(--bad); }

.worker-machine-cell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.worker-machine-cell > span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-areas: "icon label" "icon value";
  gap: 2px 6px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.worker-machine-cell .ui-icon {
  grid-area: icon;
  width: 16px;
  height: 16px;
  align-self: center;
  color: var(--accent-3);
}

.worker-machine-cell strong {
  grid-area: label;
  color: rgba(210, 217, 232, .74);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.worker-machine-cell em {
  grid-area: value;
}

@media (max-width: 980px) {
  .worker-machine-cell {
    grid-template-columns: 1fr;
  }
}


/* v0.6.7.56 registry side tabs + settings group layout ------------------- */
.ui-tabs.ui-tabs-side,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(207,216,230,.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(185,132,255,.10), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.010)),
    rgba(7, 11, 18, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.ui-tabs.ui-tabs-side .ui-tab-button,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button {
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  white-space: normal;
  overflow: visible;
}

.ui-tabs.ui-tabs-side .ui-tab-button > span,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button > span {
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
}

.ui-tabs.ui-tabs-side .ui-tab-button > span:not(.ui-tab-badge),
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button > span:not(.ui-tab-badge) {
  text-overflow: ellipsis;
}

.ui-tabs.ui-tabs-side .ui-tab-button::after,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button::after {
  display: none !important;
}

.ui-tabs.ui-tabs-side .ui-tab-button::before,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transform: none;
  opacity: 0;
}

.ui-tabs.ui-tabs-side .ui-tab-button.active::before,
.ui-tabs.ui-tabs-side .ui-tab-button[aria-selected='true']::before,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button.active::before,
.ui-tabs.ui-tabs-rail[data-ui-layout="side"] .ui-tab-button[aria-selected='true']::before {
  background: linear-gradient(180deg, var(--kh-md-brand), var(--kh-md-brand-2));
  opacity: 1;
}

.config-group-workspace[data-ui-tabs-layout="side"] {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  margin-top: 14px;
}

.config-group-workspace[data-ui-tabs-layout="side"] > .config-group-tabs-shell {
  position: sticky;
  top: 104px;
  min-width: 0;
  max-height: min(68vh, 720px);
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.config-group-workspace[data-ui-tabs-layout="side"] .config-group-tabs {
  width: 100%;
  min-width: 0;
  max-height: inherit;
}

.config-group-editor-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.config-group-editor-panel .config-groups-grid {
  min-width: 0;
}

.config-groups-panel > .config-group-tabs-shell {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .config-group-workspace[data-ui-tabs-layout="side"] {
    grid-template-columns: 1fr;
  }

  .config-group-workspace[data-ui-tabs-layout="side"] > .config-group-tabs-shell {
    position: static;
    max-height: none;
    overflow-x: auto;
  }

  .config-group-workspace[data-ui-tabs-layout="side"] .config-group-tabs {
    flex-direction: row;
    width: max-content;
    min-width: 100%;
    max-height: none;
  }

  .config-group-workspace[data-ui-tabs-layout="side"] .config-group-tabs .ui-tab-button {
    width: auto;
    white-space: nowrap;
  }
}


/* v0.6.7.56 — operation runtime loader primitives */
.ui-operation-loader {
  --operation-color: var(--accent-3);
  --operation-track: rgba(255,255,255,.14);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(245, 240, 255, .94);
  vertical-align: middle;
}

.ui-operation-loader.is-panel {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--operation-color) 32%, transparent);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--operation-color) 13%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.014)),
    rgba(7, 11, 18, .78);
}

.ui-operation-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ui-operation-copy strong {
  overflow: hidden;
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-operation-progress {
  width: min(160px, 100%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--operation-track);
}

.ui-operation-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--operation-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--operation-color) 44%, transparent);
  transition: width .22s ease;
}

.ui-operation-accent { --operation-color: var(--accent-3); }
.ui-operation-info { --operation-color: #75b9ff; }
.ui-operation-success { --operation-color: #39d98a; }
.ui-operation-warning { --operation-color: #ffd166; }
.ui-operation-danger { --operation-color: #ff6b8a; }

.ui-operation-loader[data-ui-operation-phase="waiting"] .ui-wait-spinner,
.ui-operation-loader[data-ui-operation-phase="syncing"] .ui-wait-spinner {
  animation-duration: 1.05s;
}

.worker-page-inline-operation .ui-operation-copy strong,
.button .ui-operation-loader .ui-operation-copy strong {
  max-width: 220px;
}

.form-hint .ui-operation-loader {
  margin-top: 4px;
}


/* v0.6.7.58 — registry-owned disabled state hardening */
:root {
  --kh-disabled-opacity: .48;
  --kh-disabled-filter: grayscale(.84) saturate(.34) brightness(.78);
  --kh-disabled-border: rgba(150, 156, 168, .16);
  --kh-disabled-bg-a: rgba(150, 156, 168, .045);
  --kh-disabled-bg-b: rgba(12, 15, 20, .64);
  --kh-disabled-text: rgba(190, 196, 206, .52);
  --kh-disabled-text-strong: rgba(210, 215, 224, .62);
}

:where(button, input, select, textarea):disabled,
:where(button, input, select, textarea)[aria-disabled="true"],
:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface]).is-disabled,
:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface])[data-ui-disabled="true"],
:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch):has(:disabled) {
  cursor: not-allowed !important;
  filter: var(--kh-disabled-filter);
  opacity: var(--kh-disabled-opacity) !important;
  color: var(--kh-disabled-text) !important;
  border-color: var(--kh-disabled-border) !important;
  box-shadow: none !important;
}

:where(.button, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface]).is-disabled,
:where(.button, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface])[data-ui-disabled="true"],
:where(.ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch):has(:disabled) {
  background:
    linear-gradient(180deg, var(--kh-disabled-bg-a), rgba(150, 156, 168, .012)) !important,
    var(--kh-disabled-bg-b) !important;
}

:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface]).is-disabled *,
:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface])[data-ui-disabled="true"] *,
:where(.ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch):has(:disabled) * {
  cursor: not-allowed !important;
}

:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface]).is-disabled :where(svg, .ui-icon),
:where(.button, .ui-component, .ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch, .ui-tab-button, .worker-management-action, .worker-table-action, .command-capability-row, [data-ui-surface])[data-ui-disabled="true"] :where(svg, .ui-icon),
:where(.ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch):has(:disabled) :where(svg, .ui-icon) {
  color: var(--kh-disabled-text) !important;
  stroke: currentColor !important;
}

:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]):disabled:hover,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]).is-disabled:hover,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"])[data-ui-disabled="true"]:hover,
:where(.ui-control, .command-control, .ui-select-root, .ui-file-root, .ui-switch):has(:disabled):hover {
  transform: none !important;
  translate: none !important;
  filter: var(--kh-disabled-filter) !important;
  opacity: var(--kh-disabled-opacity) !important;
  border-color: var(--kh-disabled-border) !important;
  box-shadow: none !important;
}

:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]):disabled:active,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]).is-disabled:active,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"])[data-ui-disabled="true"]:active {
  transform: none !important;
  scale: 1 !important;
}

.command-control.is-disabled > .command-control-element,
.command-control:has(.command-control-element:disabled) > .command-control-element,
.ui-control.is-disabled > .ui-control-element,
.ui-control:has(.ui-control-element:disabled) > .ui-control-element,
.ui-native-select:disabled,
.ui-switch-input:disabled ~ .ui-switch-track,
.ui-native-file:disabled ~ .ui-file-dropzone {
  color: var(--kh-disabled-text-strong) !important;
  -webkit-text-fill-color: var(--kh-disabled-text-strong) !important;
  cursor: not-allowed !important;
}

.ui-switch.is-disabled .ui-switch-track,
.ui-switch[data-ui-disabled="true"] .ui-switch-track,
.ui-switch:has(.ui-switch-input:disabled) .ui-switch-track {
  background: rgba(150, 156, 168, .14) !important;
  border-color: var(--kh-disabled-border) !important;
}

.ui-select-root.is-disabled .ui-select-button,
.ui-select-root[data-ui-disabled="true"] .ui-select-button,
.ui-select-root:has(select:disabled) .ui-select-button,
.ui-file-root.is-disabled .ui-file-dropzone,
.ui-file-root[data-ui-disabled="true"] .ui-file-dropzone,
.ui-file-root:has(input[type="file"]:disabled) .ui-file-dropzone {
  pointer-events: none;
}

.ui-select-option:disabled,
.ui-select-option[aria-disabled="true"] {
  cursor: not-allowed !important;
  filter: var(--kh-disabled-filter);
  opacity: var(--kh-disabled-opacity) !important;
  color: var(--kh-disabled-text) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.ui-select-option:disabled:hover,
.ui-select-option[aria-disabled="true"]:hover {
  background: transparent !important;
  border-color: transparent !important;
  transform: none !important;
}

/* v0.6.7.59 — Workers table identity layout + RAM icon hardening */
.worker-realtime-table {
  table-layout: fixed;
  width: 100%;
}

.worker-realtime-table th[data-column="name"],
.worker-realtime-table td[data-column="name"] {
  width: 300px;
  min-width: 300px;
}

.worker-realtime-table td[data-column="name"] {
  overflow: visible;
}

.worker-name-cell.worker-name-cell-rich {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
}

.worker-name-avatar-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  min-width: 46px;
}

.worker-name-avatar-slot .worker-avatar {
  flex: 0 0 auto;
}

.worker-name-avatar-slot .row-dot {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  grid-area: unset !important;
}

.worker-name-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.worker-name-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.worker-name-primary strong,
.worker-name-copy small,
.worker-name-copy em {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-name-primary strong {
  flex: 1 1 auto;
  grid-area: unset !important;
  color: #f4f2ff;
  font-size: 13px;
  font-weight: 950;
}

.worker-name-primary .badge {
  flex: 0 0 auto;
}

.worker-name-copy small {
  grid-area: unset !important;
  color: rgba(218, 224, 238, .78);
  font-size: 11px;
  font-weight: 760;
}

.worker-name-copy em {
  color: rgba(190, 198, 214, .70);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.worker-machine-cell > span:nth-child(3) .ui-icon {
  color: var(--accent-3);
  --icon-url: url('/assets/icons/ram.svg');
}

@media (max-width: 980px) {
  .worker-realtime-table th[data-column="name"],
  .worker-realtime-table td[data-column="name"] {
    width: 260px;
    min-width: 260px;
  }
}

/* v0.6.7.60 — Worker profile refresh action */
.worker-page-profile-refresh {
  white-space: nowrap;
}

:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]):disabled:hover,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]).is-disabled:hover,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"])[data-ui-disabled="true"]:hover {
  transform: none !important;
  translate: none !important;
  filter: var(--kh-disabled-filter) !important;
  opacity: var(--kh-disabled-opacity) !important;
  border-color: var(--kh-disabled-border) !important;
  box-shadow: none !important;
}

:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]):disabled:active,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"]).is-disabled:active,
:where(.button, .worker-table-action, .worker-page-refresh, .worker-page-profile-refresh, .worker-page-update-submit, .ui-tab-button, .command-capability-row, .worker-management-action, [data-ui-surface="interactiveRow"])[data-ui-disabled="true"]:active {
  transform: none !important;
  scale: 1 !important;
}

/* v0.6.7.66 — search/select single-surface polish ------------------------ */
/* Problem:
   registry-backed controls inside premium shells could produce a nested/double
   border/background look (outer shell + inner control surface).
   Fix:
   - topbar search becomes a single, integrated surface;
   - registry select keeps only the outer surface, inner button becomes transparent;
   - chevron gets an explicit smooth open/close animation. */

.search-shell {
  width: min(360px, 36vw);
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(207, 216, 230, .14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.016)),
    linear-gradient(180deg, rgba(16, 23, 34, .98), rgba(11, 16, 26, .99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 28px rgba(0,0,0,.18);
  color: var(--kh-md-text-3, #c7d1e1);
  transition:
    border-color .18s var(--kh-ease-premium, ease),
    background .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease),
    transform .18s var(--kh-ease-premium, ease);
}

.search-shell:hover {
  border-color: rgba(207, 216, 230, .24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.068), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(19, 27, 40, .99), rgba(12, 18, 28, .99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 14px 34px rgba(0,0,0,.22);
}

.search-shell:focus-within {
  border-color: rgba(185, 132, 255, .58);
  box-shadow:
    0 0 0 4px var(--kh-md-focus, rgba(185, 132, 255, .18)),
    inset 0 1px 0 rgba(255,255,255,.065),
    0 14px 34px rgba(0,0,0,.24);
}

.search-shell > [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(199, 209, 225, .66);
}

.search-shell > .ui-control,
.search-shell > .command-control,
.search-shell > .ui-control-search,
.search-shell > .command-control-input {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.search-shell > .ui-control:hover,
.search-shell > .command-control:hover,
.search-shell > .ui-control-search:hover,
.search-shell > .command-control-input:hover,
.search-shell > .ui-control:focus-within,
.search-shell > .command-control:focus-within,
.search-shell > .ui-control-search:focus-within,
.search-shell > .command-control-input:focus-within {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.search-shell input,
.search-shell > .ui-control > input,
.search-shell > .command-control > input,
.search-shell > .ui-control-search > input,
.search-shell > .command-control-input > input {
  min-width: 0;
  min-height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--kh-md-text, #f4f6fb) !important;
  font-size: 14px;
  font-weight: 650;
}

.search-shell input::placeholder,
.search-shell > .ui-control > input::placeholder,
.search-shell > .command-control > input::placeholder {
  color: rgba(199, 209, 225, .48) !important;
}

.search-shell kbd {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding-left: 12px;
  border-left: 1px solid rgba(207, 216, 230, .10);
  color: rgba(199, 209, 225, .58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

[data-ui-component="select"],
.ui-select-root[data-ui-component="select"] {
  overflow: visible;
}

[data-ui-component="select"] > .ui-select-picker,
.ui-select-root > .ui-select-picker {
  width: 100%;
}

[data-ui-component="select"] .ui-select-button,
.ui-select-root .ui-select-button,
[data-ui-component="select"] .command-preset-picker-button,
.ui-select-root .command-preset-picker-button {
  min-height: 56px;
  border: 0 !important;
  border-radius: inherit;
  background: transparent !important;
  box-shadow: none !important;
  padding: 10px 14px;
}

[data-ui-component="select"] .ui-select-button:hover,
.ui-select-root .ui-select-button:hover,
[data-ui-component="select"] .command-preset-picker-button:hover,
.ui-select-root .command-preset-picker-button:hover,
[data-ui-component="select"] .ui-select-button:focus-visible,
.ui-select-root .ui-select-button:focus-visible,
[data-ui-component="select"] .command-preset-picker-button:focus-visible,
.ui-select-root .command-preset-picker-button:focus-visible,
.ui-select-picker.is-open .ui-select-button,
.ui-select-picker.is-open .command-preset-picker-button {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}

[data-ui-component="select"] .ui-select-copy,
.ui-select-root .ui-select-copy,
[data-ui-component="select"] .command-preset-picker-copy,
.ui-select-root .command-preset-picker-copy {
  gap: 4px;
}

[data-ui-component="select"] .ui-select-copy strong,
.ui-select-root .ui-select-copy strong,
[data-ui-component="select"] .command-preset-picker-copy strong,
.ui-select-root .command-preset-picker-copy strong {
  color: var(--kh-md-text, #fff);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -.01em;
}

[data-ui-component="select"] .ui-select-copy small,
.ui-select-root .ui-select-copy small,
[data-ui-component="select"] .command-preset-picker-copy small,
.ui-select-root .command-preset-picker-copy small {
  color: var(--kh-md-text-3, rgba(199,209,225,.74));
  font-size: 11px;
  font-weight: 700;
}

.ui-select-chevron {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(207, 216, 230, .10);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  color: rgba(243, 240, 255, .74);
  transition:
    rotate .22s cubic-bezier(.2, .7, .2, 1),
    background .18s var(--kh-ease-premium, ease),
    color .18s var(--kh-ease-premium, ease),
    border-color .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease);
}

.ui-select-picker.is-open .ui-select-chevron,
.command-preset-picker.is-open .ui-select-chevron {
  color: #fff;
  border-color: rgba(185, 132, 255, .26);
  background: linear-gradient(180deg, rgba(185,132,255,.18), rgba(255,255,255,.035));
  box-shadow: 0 10px 22px rgba(88, 36, 163, .18);
}

.command-capability-sort [data-ui-component="select"],
.command-capability-sort .ui-select-root {
  min-width: 0;
}

.command-capability-sort .ui-select-button,
.command-capability-sort .command-preset-picker-button {
  min-height: 52px;
}

@media (max-width: 980px) {
  .search-shell {
    width: min(100%, 420px);
  }
}

@media (max-width: 720px) {
  .search-shell {
    width: 100%;
  }

  .search-shell kbd {
    min-width: 44px;
    padding-left: 10px;
    font-size: 10px;
  }
}


/* v0.6.7.71 — worker profile header layout + non-dimming pending UI -------- */
.worker-page-hero.worker-page-hero-managed {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(430px, .85fr) minmax(260px, auto);
  align-items: stretch;
  gap: 16px;
  padding: 18px;
  min-height: 0;
}

.worker-page-hero-left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.worker-page-back {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  border-radius: 14px;
}

.worker-page-identity.worker-page-identity-premium {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 18px;
  border-radius: 24px;
}

.worker-page-identity-copy {
  gap: 8px;
  min-width: 0;
}

.worker-page-identity-copy .eyebrow {
  color: rgba(185, 132, 255, .92);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  line-height: 1.1;
  text-transform: uppercase;
}

.worker-page-identity-copy h2 {
  margin: 0;
  max-width: 100%;
  color: var(--kh-md-text, #fff);
  font-size: clamp(24px, 2.2vw, 36px);
  font-weight: 940;
  letter-spacing: -.04em;
  line-height: 1.02;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-page-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.worker-page-meta code {
  max-width: min(260px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-page-host-name {
  max-width: min(240px, 100%);
}

.worker-page-hero-metrics {
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: stretch;
  min-width: 0;
}

.worker-page-hero-metric {
  min-height: 0;
  height: auto;
  padding: 12px;
  border-radius: 18px;
}

.worker-page-hero-metric-copy strong,
.worker-page-hero-metric-copy em,
.worker-page-hero-metric-copy small {
  min-width: 0;
  max-width: 100%;
}

.worker-page-hero-metric-copy strong {
  font-size: 14px;
}

.worker-page-hero-actions {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  align-items: stretch;
  justify-items: stretch;
  gap: 12px;
  min-width: 260px;
}

.worker-page-hero-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

.worker-page-refresh,
.worker-page-profile-refresh {
  min-height: 46px;
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

.worker-page-status {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.worker-page-live-pill {
  max-width: 100%;
  min-width: 0;
}

.worker-page-live-pill > span:last-child {
  min-width: 0;
}

.worker-page-live-pill strong,
.worker-page-live-pill em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pending operations must disable only target controls, not dim whole panels. */
:where([data-ui-surface]).is-disabled,
:where([data-ui-surface])[data-ui-disabled="true"] {
  filter: none !important;
  opacity: 1 !important;
}

:where([data-ui-surface]).is-disabled:not(button):not(.button),
:where([data-ui-surface])[data-ui-disabled="true"]:not(button):not(.button) {
  cursor: inherit !important;
  background: inherit !important;
  border-color: inherit !important;
  box-shadow: inherit !important;
}

.worker-page-shell:has(:disabled),
.worker-page-hero-managed:has(:disabled),
.worker-page-tab-panel:has(:disabled),
.panel:has(:disabled) {
  filter: none !important;
  opacity: 1 !important;
}

.worker-page-refresh:disabled,
.worker-page-profile-refresh:disabled,
.worker-page-update-submit:disabled,
.worker-management-action:disabled,
.button:disabled {
  cursor: not-allowed !important;
}

@media (max-width: 1420px) {
  .worker-page-hero.worker-page-hero-managed {
    grid-template-columns: minmax(420px, 1fr) minmax(340px, .72fr);
  }

  .worker-page-hero-actions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    min-width: 0;
  }

  .worker-page-hero-action-row {
    grid-template-columns: repeat(2, minmax(180px, max-content));
    justify-content: start;
  }

  .worker-page-status {
    align-self: center;
    justify-content: flex-end;
  }
}

@media (max-width: 920px) {
  .worker-page-hero.worker-page-hero-managed {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .worker-page-hero-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .worker-page-hero-action-row {
    grid-template-columns: 1fr;
  }

  .worker-page-status {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .worker-page-identity.worker-page-identity-premium {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    min-height: 104px;
  }

  .worker-page-identity-copy h2 {
    font-size: 24px;
  }
}

/* v0.6.7.72 — Seamless text edit component ------------------------------ */
.worker-page-name-edit-shell {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 6px;
  align-items: start;
}

.ui-seamless-text-edit {
  --kh-seamless-edit-radius: 14px;
  --kh-seamless-edit-focus: rgba(185, 132, 255, .28);
  max-width: 100%;
  min-width: 0;
  color: var(--kh-md-text, #f4f6fb);
}

button.ui-seamless-text-edit {
  appearance: none;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: -4px 0 -4px -8px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--kh-seamless-edit-radius);
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: text;
  transition:
    border-color .16s var(--kh-ease-premium, ease),
    background .16s var(--kh-ease-premium, ease),
    box-shadow .16s var(--kh-ease-premium, ease),
    transform .16s var(--kh-ease-premium, ease);
}

button.ui-seamless-text-edit:hover:not(:disabled),
button.ui-seamless-text-edit:focus-visible:not(:disabled) {
  border-color: rgba(185, 132, 255, .30);
  background: linear-gradient(180deg, rgba(185, 132, 255, .12), rgba(255, 255, 255, .025));
  box-shadow: 0 0 0 4px rgba(185, 132, 255, .10), inset 0 1px 0 rgba(255,255,255,.06);
  outline: none;
}

button.ui-seamless-text-edit:disabled {
  cursor: not-allowed;
}

.ui-seamless-text-edit-value {
  min-width: 0;
  overflow: hidden;
  color: var(--kh-md-text, #f4f6fb);
  font-size: clamp(30px, 3.05vw, 46px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-seamless-text-edit-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(185, 132, 255, .18);
  border-radius: 999px;
  background: rgba(185, 132, 255, .10);
  color: rgba(224, 207, 255, .92);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .045em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateX(-4px) scale(.96);
  transition:
    opacity .16s var(--kh-ease-premium, ease),
    transform .16s var(--kh-ease-premium, ease),
    border-color .16s var(--kh-ease-premium, ease),
    background .16s var(--kh-ease-premium, ease);
}

button.ui-seamless-text-edit:hover:not(:disabled) .ui-seamless-text-edit-hint,
button.ui-seamless-text-edit:focus-visible:not(:disabled) .ui-seamless-text-edit-hint {
  opacity: 1;
  transform: translateX(0) scale(1);
}

form.ui-seamless-text-edit.is-editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 760px);
  padding: 5px 8px;
  border: 1px solid rgba(185, 132, 255, .42);
  border-radius: var(--kh-seamless-edit-radius);
  background:
    linear-gradient(180deg, rgba(185,132,255,.14), rgba(255,255,255,.028)),
    rgba(11, 16, 26, .84);
  box-shadow: 0 0 0 4px var(--kh-seamless-edit-focus), inset 0 1px 0 rgba(255,255,255,.07);
}

.ui-seamless-text-edit-input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--kh-md-text, #f4f6fb);
  font: inherit;
  font-size: clamp(30px, 3.05vw, 46px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.055em;
  outline: none;
}

.ui-seamless-text-edit-input::placeholder {
  color: rgba(199, 209, 225, .44);
}

.ui-seamless-text-edit-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ui-seamless-text-edit-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(207,216,230,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: rgba(244,246,251,.92);
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  transition:
    background .16s var(--kh-ease-premium, ease),
    border-color .16s var(--kh-ease-premium, ease),
    color .16s var(--kh-ease-premium, ease),
    transform .16s var(--kh-ease-premium, ease);
}

.ui-seamless-text-edit-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ui-seamless-text-edit-action.is-save {
  border-color: rgba(81, 214, 147, .28);
  background: rgba(81, 214, 147, .12);
  color: #d8ffe9;
}

.ui-seamless-text-edit-action.is-cancel {
  border-color: rgba(255, 118, 118, .20);
  background: rgba(255, 118, 118, .08);
  color: #ffe1e1;
}

.ui-seamless-text-edit-action:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.worker-page-name-saving {
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 880px) {
  .ui-seamless-text-edit-value,
  .ui-seamless-text-edit-input {
    font-size: clamp(26px, 8vw, 38px);
  }

  button.ui-seamless-text-edit,
  form.ui-seamless-text-edit.is-editing {
    width: 100%;
  }
}

/* v0.6.7.74 — Structured workers table ----------------------------------- */
.workers-table-shell.worker-table-v2-shell {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 24px;
  border: 1px solid rgba(207, 216, 230, .12);
  background:
    radial-gradient(circle at 0 0, rgba(185,132,255,.09), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.010)),
    rgba(6, 10, 17, .72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 18px 44px rgba(0,0,0,.20);
}

.worker-realtime-table.worker-table-v2 {
  width: 100%;
  min-width: 1260px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.worker-realtime-table.worker-table-v2 thead th {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(207, 216, 230, .10);
  background: rgba(7, 12, 20, .58);
  color: rgba(216, 224, 239, .72);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.worker-realtime-table.worker-table-v2 tbody tr[data-worker-row] {
  cursor: pointer;
  transition:
    background .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease),
    transform .18s var(--kh-ease-premium, ease);
}

.worker-realtime-table.worker-table-v2 tbody tr[data-worker-row]:hover,
.worker-realtime-table.worker-table-v2 tbody tr[data-worker-row]:focus-visible {
  background:
    linear-gradient(90deg, rgba(185,132,255,.080), rgba(76,126,255,.030)),
    rgba(255,255,255,.018);
  box-shadow: inset 3px 0 0 rgba(185,132,255,.64);
  outline: none;
}

.worker-realtime-table.worker-table-v2 td {
  padding: 16px;
  border-bottom: 1px solid rgba(207,216,230,.075);
  vertical-align: middle;
}

.worker-realtime-table.worker-table-v2 tbody tr:last-child td {
  border-bottom: 0;
}

.worker-realtime-table.worker-table-v2 th[data-column="profile"],
.worker-realtime-table.worker-table-v2 td[data-column="profile"] { width: 315px; min-width: 315px; }
.worker-realtime-table.worker-table-v2 th[data-column="status"],
.worker-realtime-table.worker-table-v2 td[data-column="status"] { width: 280px; min-width: 280px; }
.worker-realtime-table.worker-table-v2 th[data-column="workload"],
.worker-realtime-table.worker-table-v2 td[data-column="workload"] { width: 300px; min-width: 300px; }
.worker-realtime-table.worker-table-v2 th[data-column="machine"],
.worker-realtime-table.worker-table-v2 td[data-column="machine"] { width: auto; min-width: 360px; }

.worker-table-profile-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.worker-table-avatar-wrap {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
}

.worker-table-avatar-wrap .row-dot {
  position: absolute;
  right: -3px;
  bottom: 6px;
  top: auto;
  transform: none;
  box-shadow: 0 0 0 4px rgba(7, 11, 18, .92);
}

.worker-table-profile-copy,
.worker-table-profile-title,
.worker-table-profile-meta,
.worker-table-profile-foot {
  min-width: 0;
}

.worker-table-profile-copy {
  display: grid;
  gap: 5px;
}

.worker-table-profile-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.worker-table-profile-title strong {
  min-width: 0;
  overflow: hidden;
  color: #f6f3ff;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-profile-title .badge {
  flex: 0 0 auto;
}

.worker-table-profile-meta,
.worker-table-profile-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(216,224,239,.74);
  font-size: 11px;
  font-weight: 760;
}

.worker-table-profile-meta em,
.worker-table-profile-foot small {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 132px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(185,132,255,.18);
  border-radius: 999px;
  background: rgba(185,132,255,.08);
  color: rgba(235,226,255,.88);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-inline-pill .ui-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.worker-table-status-cell {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.worker-table-status-main {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.worker-table-status-main strong {
  color: #f2efff;
  font-size: 13px;
  font-weight: 920;
  white-space: nowrap;
}

.worker-table-status-main em {
  min-width: 0;
  overflow: hidden;
  color: rgba(216,224,239,.70);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-status-cell .worker-heartbeat-meter {
  width: 100%;
  max-width: 220px;
}

.worker-table-status-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.worker-table-status-meta span {
  min-width: 0;
  overflow: hidden;
  color: rgba(190,198,214,.70);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-workload-cell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.worker-table-command-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.worker-table-workload-cell .worker-table-stat {
  min-height: 48px;
  padding: 8px 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
}

.worker-table-workload-cell .worker-table-stat em {
  font-size: 9px;
  letter-spacing: .035em;
}

.worker-table-workload-cell .worker-table-stat strong {
  font-size: 15px;
}

.worker-table-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.worker-table-mini-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(207,216,230,.075);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: rgba(216,224,239,.74);
  font-size: 10px;
  font-weight: 780;
}

.worker-table-mini-meta .ui-icon {
  width: 12px;
  height: 12px;
  color: rgba(185,132,255,.86);
}

.worker-table-mini-meta strong {
  color: rgba(246,243,255,.95);
}

.worker-table-machine-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 8px;
  min-width: 0;
}

.worker-table-machine-chip {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid rgba(207,216,230,.085);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.050), rgba(255,255,255,.018)),
    rgba(255,255,255,.018);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.worker-table-machine-chip .ui-icon {
  width: 17px;
  height: 17px;
  color: rgba(185,132,255,.92);
}

.worker-table-machine-chip > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-table-machine-chip strong,
.worker-table-machine-chip em,
.worker-table-machine-chip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-table-machine-chip strong {
  color: rgba(216,224,239,.70);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.worker-table-machine-chip em {
  color: #f5f2ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 860;
}

.worker-table-machine-chip small {
  color: rgba(190,198,214,.65);
  font-size: 10px;
  font-weight: 720;
}

@media (max-width: 1360px) {
  .worker-table-machine-grid {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
  }
}

@media (max-width: 980px) {
  .worker-realtime-table.worker-table-v2 {
    min-width: 1040px;
  }

  .worker-realtime-table.worker-table-v2 th[data-column="profile"],
  .worker-realtime-table.worker-table-v2 td[data-column="profile"] { width: 285px; min-width: 285px; }
  .worker-realtime-table.worker-table-v2 th[data-column="status"],
  .worker-realtime-table.worker-table-v2 td[data-column="status"] { width: 245px; min-width: 245px; }
  .worker-realtime-table.worker-table-v2 th[data-column="workload"],
  .worker-realtime-table.worker-table-v2 td[data-column="workload"] { width: 275px; min-width: 275px; }

  .worker-table-machine-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }
}


/* v0.6.7.76 — workers table single-line fit ---------------------------
   The workers table must stay in one visible row without horizontal scroll.
   Values wrap inside their own cells/chips instead of escaping the table. */
.worker-table-v2-shell,
.workers-table-shell.worker-table-v2-shell {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-gutter: auto;
}

.worker-table-v2-shell .worker-realtime-table.worker-table-v2,
.worker-realtime-table.worker-table-v2 {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.worker-realtime-table.worker-table-v2 th,
.worker-realtime-table.worker-table-v2 td {
  min-width: 0;
  overflow: visible;
  white-space: normal;
  vertical-align: top;
}

.worker-realtime-table.worker-table-v2 th[data-column="profile"],
.worker-realtime-table.worker-table-v2 td[data-column="profile"] {
  width: 20%;
  min-width: 0;
}

.worker-realtime-table.worker-table-v2 th[data-column="status"],
.worker-realtime-table.worker-table-v2 td[data-column="status"] {
  width: 20%;
  min-width: 0;
}

.worker-realtime-table.worker-table-v2 th[data-column="workload"],
.worker-realtime-table.worker-table-v2 td[data-column="workload"] {
  width: 17%;
  min-width: 0;
}

.worker-realtime-table.worker-table-v2 th[data-column="machine"],
.worker-realtime-table.worker-table-v2 td[data-column="machine"] {
  width: 43%;
  min-width: 0;
}

.worker-table-profile-cell,
.worker-table-status-cell,
.worker-table-workload-cell,
.worker-table-machine-grid {
  min-width: 0;
  max-width: 100%;
}

.worker-table-profile-cell {
  grid-template-columns: auto minmax(0, 1fr);
}

.worker-table-profile-title,
.worker-table-profile-meta,
.worker-table-profile-foot,
.worker-table-status-meta,
.worker-table-mini-meta {
  flex-wrap: wrap;
}

.worker-table-profile-title {
  align-items: flex-start;
}

.worker-table-profile-copy,
.worker-table-status-main,
.worker-table-status-meta,
.worker-table-workload-cell,
.worker-table-mini-meta,
.worker-table-machine-chip > span {
  min-width: 0;
  max-width: 100%;
}

.worker-table-profile-title strong,
.worker-table-profile-meta em,
.worker-table-profile-foot small,
.worker-table-inline-pill,
.worker-table-status-main em,
.worker-table-status-meta span,
.worker-table-stack small,
.worker-table-stat em,
.worker-table-mini-meta > span,
.worker-table-mini-meta strong,
.worker-table-machine-chip strong,
.worker-table-machine-chip em,
.worker-table-machine-chip small {
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.worker-table-status-main {
  grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
}

.worker-table-status-cell .worker-heartbeat-meter {
  width: 100%;
  max-width: none;
}

.worker-table-status-meta {
  width: 100%;
  max-width: 100%;
}

.worker-table-command-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  gap: 6px;
}

.worker-table-stat {
  min-width: 0;
  width: auto;
  max-width: 100%;
  align-items: flex-start;
}

.worker-table-stat em {
  min-height: 2.15em;
  line-height: 1.12;
}

.worker-table-mini-meta > span {
  width: auto;
  max-width: 100%;
}

.worker-table-machine-grid {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 8px;
}

.worker-table-machine-chip {
  width: auto;
  min-width: 0;
  max-width: 100%;
  align-items: flex-start;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 9px;
}

.worker-table-machine-chip em,
.worker-table-machine-chip small {
  line-height: 1.18;
}

.worker-table-machine-chip strong {
  letter-spacing: .02em;
}

@media (max-width: 1360px) {
  .worker-realtime-table.worker-table-v2 th[data-column="profile"],
  .worker-realtime-table.worker-table-v2 td[data-column="profile"] { width: 18%; }
  .worker-realtime-table.worker-table-v2 th[data-column="status"],
  .worker-realtime-table.worker-table-v2 td[data-column="status"] { width: 18%; }
  .worker-realtime-table.worker-table-v2 th[data-column="workload"],
  .worker-realtime-table.worker-table-v2 td[data-column="workload"] { width: 18%; }
  .worker-realtime-table.worker-table-v2 th[data-column="machine"],
  .worker-realtime-table.worker-table-v2 td[data-column="machine"] { width: 46%; }
}

@media (max-width: 980px) {
  .worker-table-v2-shell .worker-realtime-table.worker-table-v2,
  .worker-realtime-table.worker-table-v2 {
    min-width: 0;
  }

  .worker-table-machine-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* v0.6.7.77 — workers table hardware data binding/fit polish ------------
   Keep the row in one visible line, but allocate enough room for hardware and
   render complete raw system_info summaries instead of visual placeholders. */
.worker-realtime-table.worker-table-v2 th[data-column="profile"],
.worker-realtime-table.worker-table-v2 td[data-column="profile"] { width: 17%; }
.worker-realtime-table.worker-table-v2 th[data-column="status"],
.worker-realtime-table.worker-table-v2 td[data-column="status"] { width: 18%; }
.worker-realtime-table.worker-table-v2 th[data-column="workload"],
.worker-realtime-table.worker-table-v2 td[data-column="workload"] { width: 13%; }
.worker-realtime-table.worker-table-v2 th[data-column="machine"],
.worker-realtime-table.worker-table-v2 td[data-column="machine"] { width: 52%; }

.worker-table-command-row {
  grid-template-columns: repeat(4, minmax(42px, 1fr));
}

.worker-table-stat {
  padding: 8px 8px;
}

.worker-table-stat em {
  min-height: 0;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.worker-table-machine-grid {
  grid-template-columns: 1.18fr 1.08fr .98fr 1.08fr 1.18fr !important;
  gap: 7px;
}

.worker-table-machine-chip {
  min-height: 72px;
  padding: 9px 9px;
}

.worker-table-machine-chip strong {
  font-size: 8.5px;
  line-height: 1.05;
}

.worker-table-machine-chip em {
  font-size: 10.5px;
  line-height: 1.12;
}

.worker-table-machine-chip small {
  font-size: 9.5px;
  line-height: 1.14;
}

@media (max-width: 1360px) {
  .worker-realtime-table.worker-table-v2 th[data-column="profile"],
  .worker-realtime-table.worker-table-v2 td[data-column="profile"] { width: 16%; }
  .worker-realtime-table.worker-table-v2 th[data-column="status"],
  .worker-realtime-table.worker-table-v2 td[data-column="status"] { width: 17%; }
  .worker-realtime-table.worker-table-v2 th[data-column="workload"],
  .worker-realtime-table.worker-table-v2 td[data-column="workload"] { width: 13%; }
  .worker-realtime-table.worker-table-v2 th[data-column="machine"],
  .worker-realtime-table.worker-table-v2 td[data-column="machine"] { width: 54%; }
}

/* v0.6.7.80 — Command Deck hydration fix + clearer capability builder */
.command-builder-panel {
  border-color: rgba(189, 124, 255, .18);
  background:
    radial-gradient(circle at 8% 0, rgba(160, 88, 255, .12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.014)),
    rgba(7, 11, 19, .86);
}

.command-deck-title-row .panel-kicker {
  border-color: rgba(189, 124, 255, .26);
  background: rgba(125, 67, 216, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.command-target-grid {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: rgba(4, 8, 14, .34);
}

.command-worker-card-inventory {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
}

.command-worker-card-stats {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}

.command-worker-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  padding: 4px 8px;
}

.command-worker-card-stats b {
  color: var(--text);
  font-weight: 900;
}

.command-capability-shell-v0672 {
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(189, 124, 255, .12), transparent 34%),
    linear-gradient(180deg, rgba(18, 24, 36, .82), rgba(8, 12, 20, .68));
}

.command-section-head-stacked {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.command-section-head-stacked strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(189, 124, 255, .28);
  background: rgba(125, 67, 216, .14);
  color: var(--text);
  font-size: 13px;
}

.command-capability-toolbar {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  background: rgba(3, 7, 12, .32);
}

.command-capability-list-shell {
  scrollbar-gutter: stable;
}

.command-capability-row {
  min-height: 112px;
}

.command-capability-row.active .command-capability-select-indicator {
  background: rgba(189, 124, 255, .18);
  color: var(--text);
}

.command-capability-availability {
  border-color: rgba(64, 220, 145, .30) !important;
  background: rgba(64, 220, 145, .09) !important;
  color: #9ff8c7 !important;
}

.selected-capability-card-v0672 {
  position: sticky;
  top: 14px;
  max-height: 560px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .selected-capability-card-v0672 {
    position: static;
    max-height: none;
  }
}


/* v0.6.7.82 — worker console synchronization + stable dock contract */
.worker-console-window-layer .worker-windows-console {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.worker-console-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    #121212;
  color: rgba(204, 204, 204, .88);
  font: 600 11px/1.2 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

.worker-console-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(100%, 360px);
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(235, 235, 235, .88);
  overflow: hidden;
}

.worker-console-status-chip > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-console-status-chip .ui-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.worker-console-status-chip.is-ready {
  border-color: rgba(76, 217, 100, .28);
  background: rgba(76, 217, 100, .08);
  color: rgba(215, 255, 224, .92);
}

.worker-console-status-chip.is-missing {
  border-color: rgba(255, 204, 102, .24);
  background: rgba(255, 204, 102, .08);
  color: rgba(255, 239, 196, .92);
}

.worker-console-status-chip.is-pending {
  border-color: rgba(255, 204, 102, .28);
  background: rgba(255, 204, 102, .09);
}

.worker-console-status-chip.is-cwd {
  flex: 1 1 280px;
  max-width: min(100%, 560px);
}

.worker-console-status-chip.is-cwd code,
.worker-console-status-chip.is-cwd span:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.worker-console-status-chip.is-sync {
  margin-left: auto;
}

.worker-console-window-layer .worker-console-status-chip.is-sync {
  margin-left: 0;
}

@media (max-width: 760px) {
  .worker-console-status-bar {
    align-items: stretch;
  }

  .worker-console-status-chip {
    max-width: 100%;
  }

  .worker-console-status-chip.is-sync {
    margin-left: 0;
  }
}

.worker-files-tab {
  display: grid;
  gap: var(--space-4);
}

.worker-files-hero {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
}

.worker-files-hero h3 {
  margin: var(--space-1) 0 var(--space-1);
}

.worker-files-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
}

.worker-files-capability-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: min(100%, 260px);
}

.worker-files-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.worker-file-transfer-card {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.worker-file-transfer-card header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
}

.worker-file-transfer-card header > div {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  min-width: 0;
}

.worker-file-transfer-card header .mini-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-file-transfer-card small {
  color: var(--text-muted);
  line-height: 1.45;
}

.worker-file-transfer-switch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.worker-file-transfer-result:empty {
  display: none;
}

@media (max-width: 920px) {
  .worker-files-hero {
    display: grid;
  }

  .worker-files-capability-row {
    justify-content: flex-start;
  }

  .worker-files-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.6.7.85 — worker console native caret and context-menu hardening */
.worker-windows-console-screen[data-worker-console-output] {
  user-select: text;
  -webkit-user-select: text;
}

.worker-console-input-shell > .worker-console-input-element,
.worker-console-composer-shell > .worker-console-input-element,
.ui-console-input > .ui-console-input-element[data-worker-console-command-input="true"] {
  caret-color: #f2f2f2 !important;
}

.worker-console-input-caret {
  display: none !important;
}

/* v0.6.7.87 — stable native caret and exact right-click selection insert */
.worker-console-composer-control {
  cursor: text;
}

.worker-console-input-shell > .worker-console-input-element,
.worker-console-composer-shell > .worker-console-input-element,
.ui-console-input > .ui-console-input-element[data-worker-console-command-input="true"] {
  caret-color: #f2f2f2 !important;
  min-width: min(24ch, 100%) !important;
  width: var(--worker-console-input-width, 24ch) !important;
  overflow: visible !important;
}

.worker-console-input-shell > .worker-console-input-element:focus,
.worker-console-composer-shell > .worker-console-input-element:focus,
.ui-console-input > .ui-console-input-element[data-worker-console-command-input="true"]:focus {
  caret-color: #ffffff !important;
}

.worker-console-input-caret {
  display: none !important;
}

/* v0.6.7.89 Command Deck: CodeMirror-style command template editor --------- */
.command-code-field {
  grid-column: 1 / -1;
}

.command-code-mirror-shell {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(189, 124, 255, .26);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(189, 124, 255, .14), transparent 38%),
    linear-gradient(180deg, rgba(7, 11, 19, .92), rgba(4, 7, 13, .84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 54px rgba(0,0,0,.22);
  overflow: hidden;
}

.command-code-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  padding: 10px;
}

.command-code-runtime {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 999px;
  background: rgba(125, 67, 216, .12);
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.command-code-runtime em {
  color: var(--muted);
  font-style: normal;
  text-transform: none;
}

.command-code-spacer {
  flex: 1 1 auto;
}

.command-template-var-name {
  max-width: 190px;
  min-height: 34px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 999px !important;
  background: rgba(2, 5, 10, .7) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  padding: 0 11px !important;
}

.command-code-editor-frame.cm-editor {
  border: 0;
  border-radius: 0;
  background: rgba(2, 5, 10, .72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.command-code-source.cm-content {
  min-height: 190px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #e9ddff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  padding: 16px !important;
  resize: vertical;
  tab-size: 2;
  white-space: pre;
}

.command-code-source.cm-content:focus {
  box-shadow: inset 0 0 0 2px rgba(189, 124, 255, .42) !important;
}

.command-code-highlight-preview {
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}

.command-code-highlight-preview summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 9px 12px;
  text-transform: uppercase;
}

.command-code-highlight-preview summary span {
  color: var(--accent-3);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.command-code-highlight {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.command-code-highlight .cm-variable,
.command-template-var-chip code {
  color: #f0abfc;
}

.command-code-highlight .cm-string {
  color: #86efac;
}

.command-code-highlight .cm-flag {
  color: #93c5fd;
}

.command-code-highlight .cm-operator {
  color: #fbbf24;
  font-weight: 900;
}

.command-template-vars {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px 12px;
}

.command-template-vars-empty {
  border: 1px dashed rgba(255,255,255,.13);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
}

.command-template-vars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-template-var-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(189, 124, 255, .26);
  border-radius: 999px;
  background: rgba(125, 67, 216, .11);
  padding: 7px 10px;
}

.command-template-var-chip em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-page-template-vars {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  border: 1px solid rgba(189, 124, 255, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(189, 124, 255, .13), transparent 34%),
    rgba(7, 11, 19, .58);
  padding: 13px;
}

.worker-page-template-vars > .command-section-head {
  grid-column: 1 / -1;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 10px;
}

.worker-page-template-var-field .command-arg-label em {
  overflow-wrap: anywhere;
  text-transform: none;
}

@media (max-width: 760px) {
  .command-code-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .command-code-spacer {
    display: none;
  }

  .command-template-var-name {
    max-width: none;
    width: 100%;
  }
}

/* v0.6.7.90 — Command Deck real CodeMirror runtime + worker command preview */
.command-code-mirror-shell.has-codemirror-runtime,
[data-command-code-editor].has-codemirror-runtime .command-code-mirror-shell {
  overflow: hidden;
}

.command-code-editor-frame .CodeMirror,
.command-codemirror-runtime.CodeMirror {
  min-height: 220px;
  height: auto;
  border: 0;
  background: rgba(2, 5, 10, .78);
  color: #eadfff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.58;
}

.command-code-editor-frame .CodeMirror-scroll {
  min-height: 220px;
  max-height: 420px;
}

.command-code-editor-frame .CodeMirror-gutters {
  border-right: 1px solid rgba(189, 124, 255, .16);
  background: rgba(7, 11, 19, .92);
}

.command-code-editor-frame .CodeMirror-linenumber {
  color: rgba(216, 197, 255, .48);
  font-size: 11px;
  padding: 0 9px 0 6px;
}

.command-code-editor-frame .CodeMirror-cursor {
  border-left-color: #ffffff;
}

.command-code-editor-frame .CodeMirror-selected {
  background: rgba(189, 124, 255, .26) !important;
}

.command-code-editor-frame .cm-variable-2,
.command-code-editor-frame .cm-def,
.command-code-editor-frame .cm-keyword {
  color: #93c5fd;
}

.command-code-editor-frame .cm-string,
.command-code-editor-frame .cm-string-2 {
  color: #86efac;
}

.command-code-editor-frame .cm-atom,
.command-code-editor-frame .cm-number,
.command-code-editor-frame .cm-property {
  color: #f0abfc;
}

.command-code-editor-frame .cm-operator,
.command-code-editor-frame .cm-punctuation {
  color: #fbbf24;
}

.command-code-editor-frame .CodeMirror-focused {
  box-shadow: inset 0 0 0 2px rgba(189, 124, 255, .42);
}

.command-code-editor-frame .command-codemirror-runtime.is-readonly,
.command-code-editor-frame .command-codemirror-runtime.is-readonly .CodeMirror-scroll {
  cursor: default;
}

.has-codemirror-runtime .command-code-highlight-preview,
.has-codemirror-runtime .command-code-readonly-fallback {
  display: none;
}

.worker-page-command-code-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.worker-page-command-code-preview small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.worker-page-command-code-head {
  margin-bottom: 0;
}

.command-code-readonly-shell .command-code-editor-frame .CodeMirror,
.command-code-readonly-shell .command-code-source.cm-content {
  min-height: 148px !important;
}

.command-code-readonly-shell .command-code-editor-frame .CodeMirror-scroll {
  min-height: 148px;
  max-height: 280px;
}

.worker-page-command-optional-settings {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  overflow: hidden;
}

.worker-page-command-optional-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 13px 15px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.worker-page-command-optional-settings > summary::-webkit-details-marker {
  display: none;
}

.worker-page-command-optional-settings > summary::before {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(189, 124, 255, .28);
  border-radius: 10px;
  background: rgba(189, 124, 255, .11);
  color: var(--accent-3);
}

.worker-page-command-optional-settings[open] > summary::before {
  content: '−';
}

.worker-page-command-optional-settings > summary span {
  flex: 1 1 auto;
}

.worker-page-command-optional-settings > summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.worker-page-command-optional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 13px;
}

@media (max-width: 760px) {
  .command-code-editor-frame .CodeMirror,
  .command-codemirror-runtime.CodeMirror {
    font-size: 12px;
  }
}

/* v0.6.7.92 — Worker System declarative stability pass */
.worker-system-shell {
  display: grid;
  gap: 14px;
}

.worker-system-tabs-panel {
  display: grid;
  gap: 14px;
}

.worker-system-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.worker-system-tab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.worker-system-tab-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.worker-system-tab-button:hover {
  border-color: rgba(189,124,255,.34);
  background: rgba(189,124,255,.08);
  color: var(--text);
  transform: translateY(-1px);
}

.worker-system-tab-button.active {
  border-color: rgba(189,124,255,.55);
  background: linear-gradient(135deg, rgba(189,124,255,.22), rgba(255,90,179,.11));
  color: var(--text);
  box-shadow: 0 16px 44px rgba(0,0,0,.22);
}

.worker-file-manager {
  display: grid;
  gap: 16px;
  position: relative;
}

.worker-file-manager-panel {
  display: grid;
  gap: 16px;
}


.worker-file-manager-pathbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
}

.worker-file-manager-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}

.worker-file-manager-browser-pane {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.worker-file-manager-sidecar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.worker-file-manager-upload {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
}

.worker-file-manager-upload-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.worker-file-manager-upload-head strong,
.worker-file-manager-upload-head small {
  display: block;
}

.worker-file-manager-upload-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.worker-file-manager-upload-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.worker-file-manager-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(189,124,255,.28);
  background: rgba(189,124,255,.14);
  color: var(--accent-3);
}

.worker-file-manager-commander {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 16px 36px rgba(0,0,0,.16);
}

.worker-file-manager-commander-head {
  display: grid;
  gap: 6px;
}

.worker-file-manager-commander-value {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.worker-file-manager-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.worker-file-manager-breadcrumb,
.worker-file-manager-breadcrumb-empty {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.worker-file-manager-breadcrumb {
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.worker-file-manager-breadcrumb:hover:not(:disabled) {
  border-color: rgba(189,124,255,.28);
  background: rgba(189,124,255,.12);
  transform: translateY(-1px);
}

.worker-file-manager-breadcrumb.is-active {
  border-color: rgba(117,185,255,.24);
  background: rgba(117,185,255,.10);
}

.worker-file-manager-breadcrumb:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.worker-file-manager-breadcrumb-separator {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.worker-file-manager-pathbar-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.worker-file-manager-path-input,
.worker-file-manager-upload label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.worker-file-manager-overview {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .8fr);
  gap: 12px;
}

.worker-file-manager-overview-card,
.worker-file-manager-overview-hints {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.worker-file-manager-overview-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.worker-file-manager-overview-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.worker-file-manager-overview-subtitle,
.worker-file-manager-overview-hints span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.worker-file-manager-loader {
  display: grid;
  gap: 8px;
}

.worker-file-manager-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.worker-file-manager-status-row > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.035);
}

.worker-file-manager-status-row > span .ui-icon {
  width: 13px;
  height: 13px;
  opacity: .9;
}

.worker-file-manager-status-row .is-info {
  border-color: rgba(117,185,255,.28);
  background: rgba(117,185,255,.08);
  color: rgba(210,232,255,.96);
}

.worker-file-manager-status-row .is-success {
  border-color: rgba(89,214,139,.28);
  background: rgba(89,214,139,.08);
  color: rgba(216,255,228,.96);
}

.worker-file-manager-status-row .is-warning {
  border-color: rgba(255,190,88,.28);
  background: rgba(255,190,88,.09);
  color: rgba(255,233,198,.96);
}

.worker-file-manager-status-row .is-cache,
.worker-file-manager-status-row .is-cache-hit {
  border-color: rgba(117,185,255,.28);
  background: rgba(117,185,255,.08);
  color: rgba(210,232,255,.94);
}

.worker-file-manager-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(8,10,18,.92), rgba(8,10,18,.78));
  box-shadow: 0 20px 52px rgba(0,0,0,.24);
}


.worker-file-manager-table.is-locked {
  border-color: rgba(255,190,88,.16);
}

.worker-file-manager-table.is-locked .worker-file-manager-rows {
  cursor: wait;
}

.worker-file-manager-row.is-locked,
.worker-file-manager-row:disabled {
  opacity: .58;
  cursor: wait;
  pointer-events: none;
}

.worker-file-manager-address-shell input:disabled {
  cursor: wait;
  opacity: .76;
}

.worker-file-manager-refresh-button:disabled .ui-spinner,
.worker-file-manager-refresh-button:disabled .ui-icon {
  opacity: .78;
}

.worker-file-manager-rows {
  display: grid;
  max-height: min(56vh, 620px);
  overflow: auto;
}

.worker-file-manager-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(120px, .7fr) minmax(100px, .6fr) minmax(160px, .9fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  transition: background .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.worker-file-manager-row:not(.is-head) {
  cursor: pointer;
}

.worker-file-manager-row:not(.is-head):hover,
.worker-file-manager-row.is-selected {
  background: rgba(189,124,255,.11);
}

.worker-file-manager-row.is-parent {
  background: rgba(117,185,255,.08);
}

.worker-file-manager-row.is-parent:hover {
  background: rgba(117,185,255,.14);
}

.worker-file-manager-row.is-head {
  min-height: 38px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.worker-file-manager-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.worker-file-type-icon {
  width: 22px;
  height: 22px;
}

.worker-file-manager-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.worker-file-manager-type[data-file-type="executable"] {
  color: rgba(255,190,126,.95);
}

.worker-file-manager-type[data-file-type="text"] {
  color: rgba(196,222,255,.95);
}

.worker-file-manager-name-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-file-manager-name-primary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.worker-file-manager-name-secondary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.worker-file-manager-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
}

.worker-file-context-menu {
  position: fixed;
  z-index: 60;
  width: 240px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(16,18,27,.985);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(16px);
}

.worker-file-context-menu-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.worker-file-context-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 11px 13px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.worker-file-context-menu button:hover:not(:disabled) {
  background: rgba(189,124,255,.14);
}

.worker-file-context-menu button.is-danger:hover:not(:disabled) {
  background: rgba(255,82,82,.14);
  color: #ffb8b8;
}

.worker-file-context-menu button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .worker-file-manager-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .worker-file-manager-pathbar,
  .worker-file-manager-main {
    grid-template-columns: 1fr;
  }

  .worker-file-manager-sidecar {
    position: static;
  }

  .worker-file-manager-pathbar-actions {
    justify-content: stretch;
  }

  .worker-file-manager-pathbar-actions .button {
    width: 100%;
  }

  .worker-file-manager-row {
    grid-template-columns: minmax(180px, 1fr) 90px;
  }

  .worker-file-manager-row > span:nth-child(3),
  .worker-file-manager-row > span:nth-child(4) {
    display: none;
  }
}


/* v0.6.8 — current patch notes and rollout metadata ---------------------- */
.release-operator-hint {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.release-copy-row .copy-value-shell code {
  white-space: pre-wrap;
  line-height: 1.55;
}

.worker-page-update-notes-field textarea {
  min-height: 158px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.5;
}


/* v0.6.8.7 — single commander address bar ------------------------------- */
.worker-file-manager-pathbar.is-commander-address {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.worker-file-manager-address-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14,18,28,.96), rgba(8,11,18,.96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.worker-file-manager-address-icon {
  opacity: .9;
}

.worker-file-manager-address-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.worker-file-manager-address-shell:focus-within {
  border-color: rgba(117,185,255,.55);
  box-shadow: 0 0 0 3px rgba(117,185,255,.12), inset 0 0 0 1px rgba(255,255,255,.04);
}

.worker-file-manager-refresh-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  justify-content: center;
}

@media (max-width: 900px) {
  .worker-file-manager-pathbar.is-commander-address {
    grid-template-columns: 1fr auto;
  }
}


/* v0.6.8.10 — address bar polish ---------------------------------------- */
.worker-file-manager-panel {
  gap: 14px;
}

.worker-file-manager-pathbar.is-commander-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: stretch;
  min-height: 60px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    linear-gradient(180deg, rgba(12,16,26,.96), rgba(7,10,17,.96));
  box-shadow:
    0 14px 34px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.worker-file-manager-address-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 0 18px;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(189,124,255,.08), transparent 30%),
    linear-gradient(180deg, rgba(8,12,22,.98), rgba(5,8,15,.98));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    inset 0 -12px 26px rgba(0,0,0,.18);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.worker-file-manager-address-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: rgba(255,190,88,.95);
  filter: drop-shadow(0 0 8px rgba(255,190,88,.14));
  opacity: 1;
}

.worker-file-manager-address-shell input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(245,248,255,.96);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.012em;
  text-overflow: ellipsis;
}

.worker-file-manager-address-shell input::placeholder {
  color: rgba(184,193,210,.58);
}

.worker-file-manager-address-shell input::selection {
  background: rgba(117,185,255,.28);
}

.worker-file-manager-address-shell:focus-within {
  border-color: rgba(117,185,255,.56);
  background:
    radial-gradient(circle at 0 0, rgba(117,185,255,.10), transparent 30%),
    linear-gradient(180deg, rgba(10,15,26,.99), rgba(5,8,15,.99));
  box-shadow:
    0 0 0 3px rgba(117,185,255,.10),
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 0 -12px 26px rgba(0,0,0,.20);
}

.worker-file-manager-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 64px;
  min-width: 64px;
  min-height: 54px;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 50% 0, rgba(255,255,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(50,58,69,.96), rgba(30,36,46,.96));
  color: rgba(245,248,255,.96);
  box-shadow:
    0 12px 28px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.worker-file-manager-refresh-button .ui-icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

.worker-file-manager-refresh-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(117,185,255,.34);
  background:
    radial-gradient(circle at 50% 0, rgba(117,185,255,.14), transparent 38%),
    linear-gradient(180deg, rgba(58,70,86,.98), rgba(36,43,55,.98));
  box-shadow:
    0 16px 34px rgba(0,0,0,.22),
    0 0 0 3px rgba(117,185,255,.06),
    inset 0 1px 0 rgba(255,255,255,.10);
}

.worker-file-manager-refresh-button:active:not(:disabled) {
  transform: translateY(0);
}

.worker-file-manager-refresh-button:disabled {
  opacity: .52;
  cursor: not-allowed;
  filter: grayscale(.18);
}

@media (max-width: 900px) {
  .worker-file-manager-pathbar.is-commander-address {
    grid-template-columns: minmax(0, 1fr) 56px;
  }

  .worker-file-manager-address-shell {
    min-height: 52px;
    padding: 0 14px;
  }

  .worker-file-manager-refresh-button {
    width: 56px;
    min-width: 56px;
    min-height: 52px;
  }
}

/* v0.6.8.15 — premium live terminal logger actions */
.system-console-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(150, 118, 255, .18) !important;
  background:
    radial-gradient(circle at 92% 6%, rgba(139, 92, 246, .16), transparent 34%),
    linear-gradient(180deg, rgba(12, 14, 27, .94), rgba(6, 8, 17, .96)) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.04);
}

.system-console-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 22%, transparent 76%, rgba(139, 92, 246, .06));
  opacity: .65;
}

.system-console-title-row {
  position: relative;
  z-index: 1;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.system-console-title-copy h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 15px;
  font-weight: 900;
}

.system-console-title-copy h2 .ui-icon {
  width: 16px;
  height: 16px;
  color: #e5dcff;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, .42));
}

.system-console-title-copy p {
  max-width: 780px;
  color: rgba(213, 219, 255, .62);
}

.system-console-actions::before {
  content: none !important;
  display: none !important;
}

.system-console-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.system-console-live-pill,
.system-console-connection-chip,
.system-console-cluster-chip,
.system-console-terminal-gear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(139, 92, 246, .20);
  border-radius: 999px;
  background: rgba(7, 10, 24, .62);
  color: rgba(230, 235, 255, .78);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.system-console-live-pill strong,
.system-console-cluster-chip strong {
  color: #f7f1ff;
  font-variant-numeric: tabular-nums;
}

.system-console-compact-action.button {
  min-height: 30px;
  padding: 7px 11px;
  border-color: rgba(139, 92, 246, .22) !important;
  background: rgba(18, 21, 38, .74) !important;
  color: rgba(240, 236, 255, .86) !important;
}

.system-console-view {
  position: relative;
  z-index: 1;
  min-height: 300px;
  max-height: 520px;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid rgba(129, 101, 255, .22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 18%),
    radial-gradient(circle at 50% -20%, rgba(132, 92, 246, .18), transparent 36%),
    #050611 !important;
  color: #dce2ff;
  font-family: "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -30px 70px rgba(0,0,0,.35), 0 16px 46px rgba(0,0,0,.22);
}

.system-console-terminal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 300px;
  max-height: 520px;
}

.system-console-terminal-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(129, 101, 255, .16);
  background: linear-gradient(180deg, rgba(18, 21, 39, .88), rgba(8, 10, 23, .68));
}

.system-console-terminal-status .ui-icon {
  width: 14px;
  height: 14px;
  color: #d8ceff;
}

.system-console-connection-chip {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(232, 237, 255, .76);
  padding: 0;
}

.system-console-cluster-chip,
.system-console-terminal-gear {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 4px 8px;
  border-color: rgba(139, 92, 246, .18);
  background: rgba(16, 18, 35, .58);
}

.system-console-terminal-gear {
  width: 28px;
  justify-content: center;
  color: #b993ff;
}

.system-console-lines {
  min-height: 0;
  overflow: auto;
  padding: 11px 14px;
  display: grid;
  align-content: start;
  gap: 2px;
  scrollbar-color: rgba(139, 92, 246, .45) rgba(255,255,255,.04);
}

.system-console-line {
  padding: 1px 0 !important;
  color: #dce2ff;
}

.system-console-terminal-line {
  display: flex;
  align-items: baseline;
  gap: .72ch;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: 12.5px;
  text-shadow: 0 0 16px rgba(129, 101, 255, .08);
}

.system-console-time {
  flex: 0 0 auto;
  color: rgba(153, 164, 205, .66);
  font-variant-numeric: tabular-nums;
}

.system-console-level {
  flex: 0 0 auto;
  font-weight: 950;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.system-console-scope {
  flex: 0 0 auto;
  color: #a78bfa;
  font-weight: 900;
  text-transform: uppercase;
}

.system-console-message {
  min-width: 0;
  color: rgba(234, 239, 255, .86);
}

.system-console-inline-payload {
  min-width: 0;
  color: #b5f3cb;
}

.system-console-success .system-console-level { color: #33e6a1 !important; }
.system-console-warning .system-console-level { color: #ffd166 !important; }
.system-console-error .system-console-level { color: #ff7a90 !important; }
.system-console-debug .system-console-level { color: #8f9fcb !important; }
.system-console-info .system-console-level { color: #40e6a7 !important; }
.system-console-success .system-console-scope { color: #b794f6 !important; }
.system-console-warning .system-console-scope { color: #f6c177 !important; }
.system-console-error .system-console-scope { color: #f0a0b8 !important; }
.system-console-debug .system-console-scope { color: #99a4cd !important; }

.system-console-command-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 14px;
  border-top: 1px solid rgba(129, 101, 255, .16);
  background: rgba(3, 4, 10, .76);
}

.system-console-shell-prompt {
  color: #31ef98;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(49, 239, 152, .18);
}

.system-console-cursor {
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #b28cff, #8a5cf6);
  box-shadow: 0 0 18px rgba(139, 92, 246, .62);
  animation: system-console-cursor-blink 1.08s steps(2, start) infinite;
}

@keyframes system-console-cursor-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: .22; }
}

.system-console-empty-line {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: rgba(204, 214, 255, .54);
  font-weight: 800;
  letter-spacing: .02em;
}

.system-console-payload-details {
  margin: 4px 0 8px 11ch !important;
}

.system-console-payload-details summary {
  color: rgba(188, 196, 235, .58) !important;
}

.system-console-payload-details pre {
  border-color: rgba(139, 92, 246, .16) !important;
  background: rgba(12, 14, 28, .74) !important;
  color: rgba(224, 231, 255, .78) !important;
}

.system-console-control-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(139, 92, 246, .18);
  border-radius: 14px;
  background: rgba(5, 7, 17, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.system-console-control-panel[hidden] {
  display: none !important;
}

.system-console-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.system-console-field > span {
  color: rgba(218, 224, 255, .66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.system-console-field select,
.system-console-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(139, 92, 246, .22) !important;
  border-radius: 12px !important;
  background: rgba(7, 10, 24, .82) !important;
  color: rgba(239, 243, 255, .92) !important;
}

.system-console-reset-action.button {
  min-height: 38px;
  gap: 8px;
  border-color: rgba(139, 92, 246, .20) !important;
  background: rgba(15, 17, 34, .78) !important;
}

.system-console-command-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.system-console-command-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(139, 92, 246, .20);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(16, 19, 36, .88), rgba(8, 10, 22, .92));
  color: rgba(235, 240, 255, .78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 26px rgba(0,0,0,.16);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.system-console-command-button .ui-icon {
  width: 15px;
  height: 15px;
  color: currentColor;
  opacity: .92;
}

.system-console-command-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(177, 139, 255, .42);
  background: linear-gradient(180deg, rgba(30, 24, 56, .94), rgba(12, 14, 30, .96));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 34px rgba(90, 62, 180, .18);
}

.system-console-command-button:disabled {
  opacity: .46;
  cursor: not-allowed;
  transform: none;
}

.system-console-command-button.is-active,
.system-console-pause-button.is-active {
  border-color: rgba(177, 139, 255, .54);
  background: linear-gradient(180deg, rgba(93, 52, 176, .72), rgba(38, 21, 78, .86));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(139, 92, 246, .10), 0 16px 36px rgba(139, 92, 246, .20);
}

body.system-console-fullscreen .system-console-panel {
  position: fixed;
  inset: 18px;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

body.system-console-fullscreen .system-console-view,
body.system-console-fullscreen .system-console-terminal {
  max-height: none;
  min-height: 0;
  height: 100%;
}

@media (max-width: 900px) {
  .system-console-control-panel {
    grid-template-columns: 1fr;
  }

  .system-console-command-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-console-pause-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .system-console-title-row,
  .system-console-terminal-status {
    align-items: stretch;
    flex-direction: column;
  }

  .system-console-actions,
  .system-console-terminal-status {
    justify-content: stretch;
  }

  .system-console-live-pill,
  .system-console-compact-action.button,
  .system-console-cluster-chip,
  .system-console-terminal-gear {
    width: 100%;
    justify-content: center;
  }

  .system-console-command-bar {
    grid-template-columns: 1fr;
  }

  .system-console-terminal-line {
    display: block;
  }

  .system-console-payload-details {
    margin-left: 0 !important;
  }
}


/* v0.6.8.16 — footer version relocation + premium workspace polish -------- */
.panel-version-badge {
  display: none !important;
}

.workspace-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 52px;
  padding: 0 24px 18px;
}

.workspace-footer-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(198,136,255,.22);
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(198,136,255,.16), transparent 72%),
    rgba(7, 11, 18, .78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.028), 0 10px 24px rgba(12, 16, 26, .16);
  color: #cbd6ee;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .workspace-footer {
    padding: 0 16px 16px;
  }

  .workspace-footer-version {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}


/* v0.6.8.18 — typed shell chrome + Corvus Net footer/status line ---------- */
.auth-username-proxy {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.status-strip.compact-status.corvus-status-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(118, 143, 180, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(110, 231, 183, .08), transparent 26%),
    radial-gradient(circle at 100% 0, rgba(157, 78, 221, .10), transparent 32%),
    linear-gradient(180deg, rgba(7, 11, 18, .96), rgba(5, 8, 14, .94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 18px 48px rgba(3, 8, 18, .18);
}

.corvus-status-pill {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: rgba(220, 229, 245, .78);
}

.corvus-status-pill .ui-icon {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  opacity: .88;
}

.corvus-status-pill span {
  min-width: 0;
  overflow: hidden;
  color: rgba(178, 190, 212, .72);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.corvus-status-pill strong {
  min-width: 0;
  overflow: hidden;
  color: #eef4ff;
  font-family: var(--mono, "JetBrains Mono", "Cascadia Mono", monospace);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.corvus-status-pill.is-success {
  border-color: rgba(110, 231, 183, .22);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .035);
}

.corvus-status-pill.is-info {
  border-color: rgba(111, 183, 255, .18);
}

.workspace-footer {
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(9, 14, 24, .08);
  background:
    radial-gradient(circle at 100% 50%, rgba(157, 78, 221, .08), transparent 32%),
    linear-gradient(180deg, rgba(232, 236, 244, .08), rgba(221, 226, 236, .30));
}

.workspace-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(43, 52, 70, .68);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workspace-footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #35f19b;
  box-shadow: 0 0 0 5px rgba(53, 241, 155, .10), 0 0 18px rgba(53, 241, 155, .32);
}

@media (max-width: 1180px) {
  .status-strip.compact-status.corvus-status-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .status-strip.compact-status.corvus-status-line {
    grid-template-columns: 1fr;
  }

  .workspace-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-footer-meta {
    justify-content: center;
  }
}


/* v0.6.8.19 — footer polish + real logger pause --------------------------- */
.workspace-footer {
  min-height: 58px;
  padding: 10px 18px 14px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at 0 50%, rgba(79, 132, 255, .08), transparent 18%),
    radial-gradient(circle at 100% 50%, rgba(157, 78, 221, .12), transparent 26%),
    linear-gradient(180deg, rgba(7, 11, 18, .98), rgba(5, 8, 14, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.workspace-footer-meta {
  color: rgba(196, 205, 223, .72);
  font-size: 10px;
  letter-spacing: .1em;
}

.workspace-footer-version {
  min-height: 32px;
  padding: 0 12px;
  border-color: rgba(159, 122, 234, .28);
  background:
    radial-gradient(circle at 0 0, rgba(159, 122, 234, .18), transparent 70%),
    linear-gradient(180deg, rgba(53, 40, 78, .92), rgba(34, 24, 54, .94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 10px 24px rgba(6, 8, 14, .26);
  color: #eef2ff;
  font-family: var(--mono, "JetBrains Mono", "Cascadia Mono", monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.system-console-pause-button.is-active {
  border-color: rgba(186, 146, 255, .34);
  background:
    radial-gradient(circle at 0 0, rgba(186, 146, 255, .18), transparent 70%),
    rgba(89, 54, 141, .34);
}

@media (max-width: 760px) {
  .workspace-footer {
    padding: 10px 14px 14px;
  }

  .workspace-footer-version {
    width: 100%;
  }
}


/* v0.6.8.24 — dashboard overview counter cards refresh */
.dashboard-overview-panel {
  display: block;
}

.dashboard-overview-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-overview-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(151, 168, 194, .16);
  background:
    radial-gradient(circle at 10% 0%, rgba(173, 92, 255, .10), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, .06), transparent 36%),
    linear-gradient(180deg, rgba(15, 22, 36, .98), rgba(8, 12, 21, .99));
  box-shadow:
    0 18px 46px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.dashboard-overview-card-shell {
  display: grid;
  gap: 14px;
  min-height: 112px;
  padding: 18px 18px 14px;
}

.dashboard-overview-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dashboard-overview-card-icon-ring {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #d9b6ff;
  border: 1px solid rgba(210, 172, 255, .24);
  background:
    radial-gradient(circle at 50% 50%, rgba(165, 99, 255, .22), rgba(116, 54, 214, .10) 60%, rgba(8, 12, 21, .08));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 8px rgba(148, 71, 255, .05);
}

.dashboard-overview-card-copy {
  min-width: 0;
}

.dashboard-overview-card-copy span {
  display: block;
  color: rgba(220, 228, 241, .82);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-overview-card-copy strong {
  display: block;
  margin-top: 8px;
  color: #f7fbff;
  font-size: clamp(28px, 2.1vw, 36px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.055em;
}

.dashboard-overview-card .metric-trend {
  position: static;
  align-self: start;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: rgba(203, 214, 230, .72);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-overview-card .metric-trend.up {
  color: #6ce8a5;
}

.dashboard-overview-card .metric-trend.down {
  color: #ff7f97;
}

.dashboard-overview-card .metric-trend.flat {
  color: rgba(203, 214, 230, .72);
}

.dashboard-overview-card-chart {
  position: relative;
  height: 28px;
  opacity: .98;
}

.dashboard-overview-card-chart::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
}

.dashboard-overview-card .sparkline {
  height: 28px;
  opacity: .94;
}

.dashboard-overview-card .sparkline svg {
  width: 100%;
  height: 28px;
}

.dashboard-overview-card .sparkline .sparkline-area {
  fill: rgba(186, 110, 255, .15);
}

.dashboard-overview-card .sparkline polyline {
  stroke: #b76dff;
  stroke-width: 2.35;
  filter: drop-shadow(0 0 8px rgba(183, 109, 255, .20));
}

.dashboard-overview-card.accent-magenta {
  border-color: rgba(181, 118, 255, .18);
  box-shadow: 0 18px 46px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(181, 118, 255, .05);
}

.dashboard-overview-card.accent-magenta .dashboard-overview-card-icon-ring,
.dashboard-overview-card.accent-violet .dashboard-overview-card-icon-ring {
  color: #deb9ff;
  border-color: rgba(210, 172, 255, .24);
  background: radial-gradient(circle at 50% 50%, rgba(165, 99, 255, .22), rgba(116, 54, 214, .10) 60%, rgba(8, 12, 21, .08));
}

.dashboard-overview-card.accent-violet .sparkline .sparkline-area,
.dashboard-overview-card.accent-magenta .sparkline .sparkline-area {
  fill: rgba(186, 110, 255, .16);
}

.dashboard-overview-card.accent-violet .sparkline polyline,
.dashboard-overview-card.accent-magenta .sparkline polyline {
  stroke: #b76dff;
  filter: drop-shadow(0 0 8px rgba(183, 109, 255, .20));
}

.dashboard-overview-card.accent-cyan .dashboard-overview-card-icon-ring {
  color: #9fe6ff;
  border-color: rgba(120, 206, 255, .24);
  background: radial-gradient(circle at 50% 50%, rgba(76, 186, 255, .22), rgba(35, 98, 186, .10) 60%, rgba(8, 12, 21, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 8px rgba(76, 186, 255, .05);
}

.dashboard-overview-card.accent-cyan .sparkline .sparkline-area {
  fill: rgba(86, 197, 255, .16);
}

.dashboard-overview-card.accent-cyan .sparkline polyline {
  stroke: #55c8ff;
  filter: drop-shadow(0 0 8px rgba(85, 200, 255, .18));
}

.dashboard-overview-card.accent-green {
  border-color: rgba(93, 224, 157, .18);
}

.dashboard-overview-card.accent-green .dashboard-overview-card-icon-ring {
  color: #9ef2c5;
  border-color: rgba(93, 224, 157, .24);
  background: radial-gradient(circle at 50% 50%, rgba(83, 219, 151, .20), rgba(30, 112, 75, .10) 60%, rgba(8, 12, 21, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 8px rgba(83, 219, 151, .05);
}

.dashboard-overview-card.accent-green .sparkline .sparkline-area {
  fill: rgba(93, 224, 157, .14);
}

.dashboard-overview-card.accent-green .sparkline polyline {
  stroke: #57d68f;
  filter: drop-shadow(0 0 8px rgba(87, 214, 143, .16));
}

@media (max-width: 1220px) {
  .dashboard-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-overview-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-card-shell {
    padding: 16px 16px 12px;
  }

  .dashboard-overview-card-copy strong {
    font-size: 30px;
  }
}


/* v0.6.8.25 — worker System unified working directory */
.worker-file-manager-unified-path-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(184, 123, 255, .18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(162, 89, 255, .12), transparent 42%),
    rgba(255,255,255,.035);
  color: rgba(232, 238, 249, .88);
}

.worker-file-manager-unified-path-note .ui-icon {
  flex: 0 0 auto;
  color: #cf9cff;
}

.worker-file-manager-unified-path-note strong,
.worker-file-manager-unified-path-note small {
  display: block;
  min-width: 0;
}

.worker-file-manager-unified-path-note strong {
  color: #f7f3ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.worker-file-manager-unified-path-note small {
  margin-top: 4px;
  color: rgba(196, 207, 224, .78);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}


/* v0.6.8.26 — clean system console renderer */
.system-console-repeat {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 .45ch;
  border-radius: 6px;
  background: rgba(139, 92, 246, .14);
  color: #c4b5fd;
  font-weight: 900;
  letter-spacing: .01em;
}

.system-console-terminal-line .system-console-level {
  min-width: 5.8ch;
}

.system-console-terminal-line .system-console-scope {
  min-width: 7.5ch;
}

.system-console-terminal-line .system-console-message,
.system-console-terminal-line .system-console-inline-payload {
  overflow-wrap: anywhere;
}

/* v0.7.1 proxy settings editor ------------------------------------------ */
.proxy-page-layout { display: grid; gap: 16px; }
.proxy-settings-layout { display: grid; grid-template-columns: minmax(520px, 1.55fr) minmax(320px, .9fr); gap: 16px; align-items: start; }
.proxy-source-panel, .proxy-settings-panel { overflow: hidden; min-width: 0; }
.proxy-source-title-row, .proxy-settings-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.proxy-settings-card-head { margin-bottom: 14px; }
.proxy-settings-actions { flex-wrap: wrap; justify-content: flex-end; }
.proxy-source-add-button { min-width: 44px; font-size: 1.05rem; font-weight: 900; }
.proxy-refresh-timer-card { display: grid; gap: 8px; margin: 12px 0 14px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: radial-gradient(circle at 15% 0%, rgba(200,42,90,.18), transparent 44%), rgba(255,255,255,.035); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.proxy-refresh-timer-card div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.proxy-refresh-timer-card span { color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.proxy-refresh-timer-card strong { color: var(--text); font-size: 1.28rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.proxy-refresh-timer-card em { color: var(--muted); font-size: .78rem; font-style: normal; line-height: 1.35; }
.proxy-settings-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 10px; }
.proxy-settings-field { display: grid; gap: 7px; min-width: 0; }
.proxy-settings-field span, .proxy-source-title-row h2, .proxy-settings-card-head h2 { color: var(--text); }
.proxy-settings-field span { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.proxy-settings-field em, .proxy-settings-status { color: var(--muted); font-size: .78rem; font-style: normal; line-height: 1.35; }
.proxy-source-editor { display: grid; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.035); }
.proxy-source-rows { display: grid; gap: 8px; }
.proxy-source-row { display: grid; grid-template-columns: minmax(140px,.78fr) minmax(260px,1.75fr) minmax(120px,.5fr) auto 38px; gap: 8px; align-items: center; padding: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(4,8,14,.28); }
.proxy-source-row .config-editor-input, .proxy-source-row .ui-select-root { min-width: 0; }
.proxy-source-enabled { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; color: var(--muted); font-size: .76rem; font-weight: 800; user-select: none; }
.proxy-source-enabled input { accent-color: var(--accent); }
.proxy-source-remove { min-width: 36px; width: 36px; height: 36px; padding: 0; border-radius: 12px; font-size: 1.3rem; line-height: 1; }
.proxy-settings-status { margin-top: 12px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: rgba(0,0,0,.16); }
.proxy-source-empty { border-radius: 14px; }
@media (max-width: 1280px) { .proxy-settings-layout { grid-template-columns: 1fr; } }
@media (max-width: 1080px) { .proxy-source-row { grid-template-columns: 1fr 1fr; } .proxy-source-url { grid-column: 1 / -1; } }
@media (max-width: 720px) { .proxy-source-title-row, .proxy-settings-card-head, .proxy-refresh-timer-card div { display: grid; } .proxy-settings-actions { justify-content: stretch; } .proxy-settings-actions .button, .proxy-source-row { grid-template-columns: 1fr; } .proxy-source-enabled, .proxy-source-remove, .proxy-source-add-button { justify-self: stretch; width: auto; } }

/* v0.7.2 worker bind URL row-list editor -------------------------------- */
.config-url-list {
  display: grid;
  gap: 8px;
  min-width: min(100%, 520px);
}

.config-url-list-rows {
  display: grid;
  gap: 8px;
}

.config-url-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 38px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(4,8,14,.28);
}

.config-url-row .config-editor-input {
  min-width: 0;
}

.config-url-remove {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  font-size: 1.3rem;
  line-height: 1;
}

.config-url-add {
  justify-self: start;
  min-height: 34px;
  border-radius: 12px;
}

.config-url-list-hint {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .config-field-row.editable:has(.config-url-list) {
    grid-template-columns: 1fr;
  }

  .config-url-row {
    grid-template-columns: 1fr;
  }

  .config-url-remove,
  .config-url-add {
    width: 100%;
    justify-self: stretch;
  }
}

.config-field-row.editable:has(.config-url-list) {
  grid-template-columns: minmax(0, .75fr) minmax(420px, 1.25fr);
}

/* v0.7.7 — worker detail bind_urls editor -------------------------------- */
.worker-overview-bind-urls-card {
  display: grid;
  gap: 12px;
}

.worker-bind-url-summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(207, 216, 230, .10);
  border-radius: 16px;
  background: rgba(4, 8, 14, .30);
  min-width: 0;
}

.worker-bind-url-summary span {
  color: rgba(199, 209, 225, .70);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.worker-bind-url-summary strong {
  color: #f5f7fb;
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.worker-bind-url-summary em {
  color: rgba(199, 209, 225, .68);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  min-width: 0;
  overflow-wrap: anywhere;
}

.worker-bind-url-editor,
.worker-bind-url-rows {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.worker-bind-url-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 38px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(4, 8, 14, .28);
  min-width: 0;
}

.worker-bind-url-row .worker-bind-url-input {
  min-width: 0;
}

.worker-bind-url-remove {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  font-size: 1.3rem;
  line-height: 1;
}

.worker-bind-url-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.worker-bind-url-status {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(0,0,0,.16);
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
  line-height: 1.35;
}

.worker-bind-url-status.is-dirty {
  color: var(--kh-md-warning, #ffd166);
}

.worker-bind-url-status.is-saving {
  color: var(--kh-md-brand, #b984ff);
}

.worker-bind-url-status.is-clean {
  color: var(--kh-md-success, #40dc91);
}

@media (max-width: 720px) {
  .worker-bind-url-summary,
  .worker-bind-url-row,
  .worker-bind-url-actions {
    grid-template-columns: 1fr;
  }

  .worker-bind-url-actions {
    display: grid;
  }

  .worker-bind-url-actions .button,
  .worker-bind-url-remove {
    justify-self: stretch;
    width: auto;
  }
}

/* v0.8.2 — worker page dynamic engine pass ------------------------------- */
.worker-page-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.worker-page-tab-shell {
  align-items: start;
}

.worker-page-tab-bar.ui-tabs,
.worker-page-tab-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 10px;
  border: 1px solid rgba(198, 136, 255, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(185, 132, 255, .12), transparent 34%),
    linear-gradient(180deg, rgba(14, 16, 25, .92), rgba(8, 10, 17, .88));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255,255,255,.045);
}

.worker-page-tab-panel {
  animation: worker-page-panel-in .18s ease-out;
}

.worker-overview-v2[data-worker-overview-tab] {
  grid-template-columns: minmax(0, 1fr);
}

.worker-overview-command-center[data-worker-overview-command-center] {
  border-color: rgba(185, 132, 255, .20);
  border-radius: 28px;
  box-shadow: 0 22px 68px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.045);
}

.worker-overview-metric[data-worker-overview-metric] {
  min-height: 92px;
  border-color: rgba(207, 216, 230, .13);
  background:
    radial-gradient(circle at 0 0, rgba(185, 132, 255, .09), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    rgba(6, 10, 18, .70);
  transition: transform .16s var(--kh-ease-premium), border-color .16s var(--kh-ease-premium), background .16s var(--kh-ease-premium);
}

.worker-overview-metric[data-worker-overview-metric]:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 132, 255, .28);
}

.worker-overview-metric[data-worker-overview-metric="last_activity"] {
  border-color: rgba(64, 220, 145, .22);
}

.worker-overview-metric[data-worker-overview-metric="queue"] .worker-overview-metric-icon {
  border-color: rgba(112, 172, 255, .28);
  background: rgba(112, 172, 255, .09);
  color: #8fbdff;
}

.worker-overview-layout {
  grid-template-columns: minmax(300px, .82fr) minmax(320px, .98fr) minmax(420px, 1.2fr) !important;
}

.worker-overview-action-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, .95fr) minmax(320px, 1.1fr) !important;
}

.worker-overview-action-card {
  min-height: 176px;
}

.worker-overview-action-card-management .worker-page-management-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.worker-overview-card,
.worker-page-overview-summary-card {
  border-color: rgba(198, 136, 255, .18) !important;
}

.worker-overview-bind-urls-card {
  display: grid;
  gap: 12px;
}

.worker-bind-url-summary {
  padding: 12px;
  border: 1px solid rgba(207, 216, 230, .11);
  border-radius: 18px;
  background: rgba(6, 10, 18, .42);
}

.worker-overview-machine-grid[data-worker-overview-machine-grid] {
  align-content: start;
}

.worker-overview-machine-row {
  min-height: 70px;
}

.worker-overview-machine-copy strong,
.worker-overview-metric-copy strong {
  min-width: 0;
  white-space: nowrap;
}

.worker-overview-machine-copy em,
.worker-overview-metric-copy em {
  white-space: nowrap;
}

@keyframes worker-page-panel-in {
  from { opacity: .76; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1360px) {
  .worker-overview-layout,
  .worker-overview-action-grid {
    grid-template-columns: 1fr !important;
  }

  .worker-overview-action-card-management .worker-page-management-mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

@media (max-width: 760px) {
  .worker-page-tab-bar.ui-tabs,
  .worker-page-tab-bar {
    position: static;
    border-radius: 20px;
  }

  .worker-overview-action-card-management .worker-page-management-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.8.5 auth refresh: cleaner premium login surface with dedicated hero background */
.auth-gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 42px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7f3ff;
  background:
    linear-gradient(180deg, rgba(2, 2, 7, .22), rgba(2, 2, 7, .72)),
    radial-gradient(circle at 50% 12%, rgba(164, 92, 255, .16), transparent 30%),
    url('/assets/auth-background-login-v2.png') center / cover no-repeat,
    #05030a;
}

.auth-gate::before {
  background:
    linear-gradient(90deg, rgba(2, 2, 8, .62), rgba(2, 2, 8, .18) 24%, rgba(2, 2, 8, .18) 76%, rgba(2, 2, 8, .62)),
    radial-gradient(circle at 50% 10%, rgba(212, 168, 255, .14), transparent 20%),
    radial-gradient(circle at 12% 82%, rgba(157, 78, 221, .12), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(157, 78, 221, .12), transparent 28%);
  mix-blend-mode: screen;
}

.auth-gate::after {
  background:
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.18) 22%, rgba(0,0,0,.36)),
    radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(0,0,0,.42) 100%);
}

.auth-card {
  width: min(960px, calc(100vw - 28px));
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(22px, 2.4vw, 30px);
  padding: clamp(28px, 3.4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(214, 170, 255, .32);
  border-radius: clamp(28px, 3vw, 36px);
  background:
    linear-gradient(180deg, rgba(18, 15, 32, .72), rgba(7, 8, 18, .88)),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 0 0 1px rgba(114, 48, 178, .14),
    0 28px 90px rgba(0, 0, 0, .56),
    0 0 56px rgba(157, 78, 221, .16);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.auth-card::before {
  left: 10%;
  right: 10%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(242, 219, 255, .85), rgba(169, 86, 255, .78), transparent);
  box-shadow: 0 0 26px rgba(186, 109, 255, .48);
}

.auth-card::after {
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(157, 78, 221, .05));
}

.auth-brand {
  grid-template-columns: clamp(138px, 16vw, 182px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: clamp(20px, 2vw, 24px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.auth-brand-logo,
.auth-brand img {
  width: clamp(128px, 15vw, 170px);
  height: clamp(128px, 15vw, 170px);
  filter:
    drop-shadow(0 0 20px rgba(157,78,221,.24))
    drop-shadow(0 0 44px rgba(157,78,221,.18));
}

.auth-brand .eyebrow {
  color: #dd9cff;
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: .34em;
  font-weight: 950;
}

.auth-brand h1 {
  margin: 10px 0 12px;
  color: #ffffff;
  font-size: clamp(52px, 6.4vw, 82px);
  line-height: .94;
  letter-spacing: -.06em;
  font-weight: 1000;
  text-wrap: balance;
}

.auth-brand p {
  max-width: 560px;
  color: rgba(233, 226, 242, .8);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.42;
}

.auth-form {
  gap: 18px;
}

.auth-field-label {
  gap: 10px;
  color: rgba(242, 236, 250, .94);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .12em;
}

.auth-token-input,
.auth-remember-row,
.auth-footer-block {
  border: 1px solid rgba(214, 170, 255, .16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(8, 9, 19, .58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 16px 34px rgba(0,0,0,.20);
}

.auth-token-input {
  min-height: 76px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 22px;
}

.auth-token-input:focus-within {
  border-color: rgba(226, 192, 255, .68);
  box-shadow:
    0 0 0 4px rgba(157,78,221,.14),
    0 0 26px rgba(157,78,221,.18),
    0 16px 34px rgba(0,0,0,.24);
}

.auth-input-icon,
.auth-row-icon,
.auth-footer-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(214, 170, 255, .14);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0, rgba(198,136,255,.18), transparent 52%),
    rgba(255,255,255,.035);
}

.auth-token-input input {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
}

.auth-token-toggle {
  min-height: 52px;
  gap: 10px;
  padding: 0 18px;
  border-color: rgba(255,255,255,.12);
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
}

.auth-token-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(198,136,255,.34);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(157,78,221,.10));
  box-shadow: 0 18px 34px rgba(0,0,0,.24), 0 0 20px rgba(157,78,221,.12);
}

.auth-remember-row {
  min-height: 84px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 22px;
}

.auth-remember-copy {
  gap: 4px;
}

.auth-remember-copy strong {
  font-size: clamp(18px, 1.6vw, 24px);
}

.auth-remember-copy span {
  color: rgba(226, 218, 238, .72);
  font-size: clamp(13px, 1.1vw, 15px);
}

.auth-switch .ui-switch-track {
  width: 78px;
  height: 42px;
}

.auth-switch .ui-switch-thumb {
  width: 32px;
  height: 32px;
}

.auth-submit {
  min-height: 84px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 0 26px;
  border-radius: 24px;
  border-color: rgba(236, 214, 255, .48);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.20), transparent 24%),
    linear-gradient(135deg, rgba(181,86,255,.96), rgba(106,34,183,.92));
  font-size: clamp(20px, 2vw, 28px);
  box-shadow:
    0 26px 52px rgba(157,78,221,.26),
    0 0 34px rgba(157,78,221,.22),
    inset 0 1px 0 rgba(255,255,255,.22);
}

.auth-submit span[data-i18n] {
  font-weight: 1000;
  letter-spacing: -.03em;
}

.auth-submit:hover {
  box-shadow:
    0 32px 64px rgba(157,78,221,.34),
    0 0 44px rgba(198,136,255,.28),
    inset 0 1px 0 rgba(255,255,255,.26);
}

.auth-submit-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 40px;
}

.auth-submit strong {
  font-size: 28px;
  font-weight: 700;
}

.auth-error {
  border-radius: 18px;
  padding: 13px 15px;
}

.auth-footer {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, .92fr);
  align-items: stretch;
  gap: 22px;
  padding-top: 2px;
}

.auth-footer-block {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
}

.auth-footer-head,
.auth-security-block {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.auth-footer-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.auth-footer-copy strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .02em;
}

.auth-footer-copy p,
.auth-locale-meta {
  margin: 0;
  color: rgba(226, 218, 238, .7);
  font-size: 13px;
  line-height: 1.4;
}

.auth-locale-meta {
  text-transform: uppercase;
  letter-spacing: .08em;
}

.auth-locale-field {
  grid-template-columns: 1fr;
  gap: 0;
}

.auth-locale-field select,
.auth-footer .select-input {
  min-height: 58px;
  padding: 0 48px 0 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(7, 8, 18, .78);
  font-size: 16px;
  font-weight: 900;
}

.auth-footer-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.16) 18%, rgba(255,255,255,.16) 82%, transparent);
}

.auth-security-block {
  gap: 14px;
}

.auth-security-hint {
  display: block;
  color: rgba(226,218,238,.72);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .auth-card {
    width: min(760px, calc(100vw - 24px));
  }

  .auth-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-footer-divider {
    display: none;
  }
}

@media (max-width: 640px) {
  .auth-gate {
    align-items: start;
    padding: 12px;
  }

  .auth-card {
    width: min(100%, calc(100vw - 24px));
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
  }

  .auth-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding-bottom: 16px;
  }

  .auth-brand-logo,
  .auth-brand img {
    width: 116px;
    height: 116px;
  }

  .auth-brand h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  .auth-brand p {
    font-size: 16px;
  }

  .auth-token-input {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 12px;
  }

  .auth-token-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .auth-remember-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .auth-switch {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .auth-submit {
    min-height: 74px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 18px;
    font-size: 18px;
  }

  .auth-submit-icon {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .auth-footer-block {
    padding: 16px;
  }
}

/* v0.8.6 auth polish: pixel-closer composition, premium typography, and refined states */
.auth-gate,
.auth-card,
.auth-card :where(h1, p, strong, span, button, label, input, select) {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

.auth-card {
  width: min(930px, calc(100vw - 28px));
  gap: clamp(24px, 2.6vw, 32px);
  padding: clamp(30px, 3.5vw, 44px);
  border-color: rgba(218, 182, 255, .34);
  background:
    radial-gradient(circle at 50% -10%, rgba(194, 130, 255, .12), transparent 36%),
    linear-gradient(180deg, rgba(18, 15, 33, .76), rgba(7, 8, 18, .90)),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.038) inset,
    0 0 0 1px rgba(114, 48, 178, .14),
    0 34px 96px rgba(0, 0, 0, .58),
    0 0 60px rgba(157, 78, 221, .18);
}

.auth-brand {
  grid-template-columns: clamp(136px, 15vw, 178px) minmax(0, 1fr);
  gap: clamp(26px, 3vw, 44px);
  padding-bottom: clamp(22px, 2.2vw, 28px);
}

.auth-brand-logo,
.auth-brand img {
  width: clamp(124px, 14vw, 168px);
  height: clamp(124px, 14vw, 168px);
  filter:
    drop-shadow(0 0 22px rgba(157,78,221,.26))
    drop-shadow(0 0 46px rgba(157,78,221,.18));
}

.auth-brand .eyebrow {
  color: #dc9aff;
  letter-spacing: .38em;
  font-size: clamp(12px, 1.12vw, 15px);
  font-weight: 980;
  text-shadow: 0 0 16px rgba(213,141,255,.18);
}

.auth-brand h1 {
  margin: 10px 0 14px;
  font-size: clamp(58px, 6.7vw, 84px);
  line-height: .9;
  letter-spacing: -.072em;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255,255,255,.08), 0 20px 46px rgba(0,0,0,.34);
}

.auth-brand p {
  max-width: 520px;
  color: rgba(236, 229, 244, .80);
  font-size: clamp(18px, 1.68vw, 22px);
  line-height: 1.46;
}

.auth-form {
  gap: 20px;
}

.auth-field-label {
  gap: 12px;
  font-size: 13px;
  letter-spacing: .14em;
}

.auth-token-input,
.auth-remember-row,
.auth-footer-block,
.auth-token-toggle,
.auth-submit,
.auth-footer .select-input,
.auth-switch .ui-switch-track {
  transition:
    transform .18s var(--kh-ease-premium, ease),
    border-color .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease),
    background .18s var(--kh-ease-premium, ease),
    filter .18s var(--kh-ease-premium, ease),
    color .18s var(--kh-ease-premium, ease);
}

.auth-token-input,
.auth-remember-row,
.auth-footer-block {
  position: relative;
  overflow: hidden;
}

.auth-token-input::before,
.auth-remember-row::before,
.auth-footer-block::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  opacity: .8;
  pointer-events: none;
}

.auth-token-input:hover,
.auth-remember-row:hover,
.auth-footer-block:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 193, 255, .24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)),
    rgba(10, 11, 22, .64);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 18px 38px rgba(0,0,0,.23),
    0 0 24px rgba(157,78,221,.08);
}

.auth-token-input {
  min-height: 78px;
  padding: 11px 15px;
}

.auth-token-input input {
  color: rgba(250, 248, 255, .98);
  font-size: clamp(20px, 1.86vw, 24px);
  font-weight: 760;
  letter-spacing: -.024em;
}

.auth-token-input input::placeholder {
  color: rgba(222, 212, 233, .44);
}

.auth-token-input:focus-within {
  transform: translateY(-1px);
  border-color: rgba(231, 201, 255, .76);
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.024)),
    rgba(10, 11, 22, .68);
  box-shadow:
    0 0 0 4px rgba(157,78,221,.14),
    0 0 30px rgba(157,78,221,.18),
    0 22px 42px rgba(0,0,0,.24);
}

.auth-token-toggle {
  position: relative;
  min-height: 52px;
  border-color: rgba(255,255,255,.13);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    rgba(14, 14, 27, .82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 12px 28px rgba(0,0,0,.22);
}

.auth-token-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(204, 155, 255, .42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(157,78,221,.10)),
    rgba(18, 15, 35, .86);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 16px 34px rgba(0,0,0,.24),
    0 0 20px rgba(157,78,221,.12);
}

.auth-token-toggle:active {
  transform: translateY(0) scale(.988);
}

.auth-token-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-footer .select-input:focus-visible {
  outline: none;
  border-color: rgba(232, 198, 255, .76);
  box-shadow:
    0 0 0 4px rgba(157,78,221,.14),
    0 0 28px rgba(157,78,221,.16),
    0 18px 36px rgba(0,0,0,.24);
}

.auth-remember-row {
  min-height: 86px;
  padding: 15px 16px;
}

.auth-remember-copy strong {
  letter-spacing: -.02em;
  text-shadow: 0 10px 28px rgba(0,0,0,.16);
}

.auth-switch .ui-switch-track {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 12px 26px rgba(0,0,0,.24);
}

.auth-switch:hover .ui-switch-track {
  border-color: rgba(211, 171, 255, .42);
  filter: brightness(1.02);
}

.auth-switch .ui-switch-input:focus-visible + .ui-switch-track {
  box-shadow:
    0 0 0 4px rgba(157,78,221,.14),
    0 0 26px rgba(157,78,221,.14),
    0 14px 28px rgba(0,0,0,.24);
}

.auth-submit {
  min-height: 86px;
  padding: 0 28px;
  border-color: rgba(236, 214, 255, .50);
  background:
    radial-gradient(circle at 14% 0%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(135deg, rgba(186,95,255,.98), rgba(111,36,191,.94));
  box-shadow:
    0 26px 56px rgba(157,78,221,.28),
    0 0 36px rgba(157,78,221,.22),
    inset 0 1px 0 rgba(255,255,255,.24);
}

.auth-submit span[data-i18n] {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 1000;
  letter-spacing: -.04em;
  text-shadow: 0 8px 24px rgba(0,0,0,.20);
}

.auth-submit strong {
  font-size: 26px;
  font-weight: 800;
  color: rgba(255,255,255,.90);
}

.auth-submit:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.66);
  filter: saturate(1.06) brightness(1.03);
  box-shadow:
    0 34px 70px rgba(157,78,221,.36),
    0 0 46px rgba(198,136,255,.28),
    inset 0 1px 0 rgba(255,255,255,.28);
}

.auth-submit:active {
  transform: translateY(0) scale(.992);
}

.auth-submit-icon {
  width: 52px;
  height: 52px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,.26), transparent 44%),
    rgba(255,255,255,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 12px 28px rgba(0,0,0,.18);
}

.auth-error {
  border-color: rgba(255,112,139,.34);
  background:
    linear-gradient(135deg, rgba(255,92,122,.16), rgba(255,92,122,.06));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 14px 34px rgba(0,0,0,.18);
}

.auth-footer {
  gap: 24px;
}

.auth-footer-block {
  gap: 14px;
  padding: 18px;
}

.auth-footer-copy strong {
  font-size: 15px;
  font-weight: 960;
  text-transform: none;
}

.auth-locale-meta {
  font-size: 12px;
  font-weight: 800;
}

.auth-locale-field {
  position: relative;
}

.auth-locale-field::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(243, 240, 255, .78);
  border-bottom: 2px solid rgba(243, 240, 255, .78);
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
  opacity: .88;
}

.auth-locale-field select,
.auth-footer .select-input {
  appearance: none;
  -webkit-appearance: none;
  min-height: 58px;
  padding: 0 54px 0 18px;
  border-color: rgba(255,255,255,.13);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: .03em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 12px 26px rgba(0,0,0,.18);
}

.auth-footer .select-input:hover {
  transform: translateY(-1px);
  border-color: rgba(204, 155, 255, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.024)),
    rgba(12, 13, 24, .82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 16px 30px rgba(0,0,0,.20),
    0 0 16px rgba(157,78,221,.08);
}

.auth-footer .select-input:active {
  transform: translateY(0);
}

.auth-security-hint {
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .auth-card {
    width: min(760px, calc(100vw - 24px));
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 18px;
  }

  .auth-brand h1 {
    font-size: clamp(42px, 14vw, 58px);
  }

  .auth-submit span[data-i18n] {
    font-size: 20px;
  }

  .auth-locale-field::after {
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-token-input,
  .auth-remember-row,
  .auth-footer-block,
  .auth-token-toggle,
  .auth-submit,
  .auth-footer .select-input,
  .auth-switch .ui-switch-track {
    transition: none !important;
  }
}


/* v0.8.7 auth hardening + stateful handoff */
html:not([data-authenticated="true"]) #app,
body.auth-required #app,
body.auth-boot #app {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.control-ready #authGate {
  display: none !important;
}

body.auth-boot {
  background:
    linear-gradient(180deg, rgba(2, 2, 7, .38), rgba(2, 2, 7, .78)),
    url('/assets/auth-background-login-v2.png') center / cover fixed no-repeat,
    #05030a;
}

.auth-gate[data-auth-state="loading"] .auth-card,
.auth-gate[data-auth-state="success"] .auth-card {
  border-color: rgba(226, 196, 255, .40);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 34px 96px rgba(0,0,0,.60),
    0 0 72px rgba(157,78,221,.22);
}

.auth-state {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 170, 255, .18);
  border-radius: 18px;
  color: rgba(246, 242, 255, .88);
  background:
    linear-gradient(180deg, rgba(255,255,255,.048), rgba(255,255,255,.018)),
    rgba(8, 9, 19, .58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 14px 32px rgba(0,0,0,.18);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.auth-state[hidden] {
  display: none !important;
}

.auth-state-orb {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(214, 170, 255, .26);
  border-top-color: rgba(236, 214, 255, .92);
  box-shadow: 0 0 20px rgba(157,78,221,.18);
}

.auth-gate[data-auth-state="loading"] .auth-state-orb {
  animation: authStateSpin .86s linear infinite;
}

.auth-gate[data-auth-state="invalid"] .auth-state {
  border-color: rgba(255, 92, 122, .42);
  color: rgba(255, 228, 235, .95);
  background:
    linear-gradient(135deg, rgba(255,92,122,.15), rgba(255,92,122,.055)),
    rgba(10, 8, 18, .70);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 16px 34px rgba(0,0,0,.20),
    0 0 24px rgba(255,92,122,.10);
}

.auth-gate[data-auth-state="invalid"] .auth-state-orb {
  border-color: rgba(255, 92, 122, .38);
  border-top-color: rgba(255, 204, 216, .96);
  box-shadow: 0 0 18px rgba(255,92,122,.18);
}

.auth-gate[data-auth-state="success"] .auth-state {
  border-color: rgba(172, 255, 210, .30);
  color: rgba(235, 255, 245, .95);
  background:
    linear-gradient(135deg, rgba(88,255,172,.10), rgba(157,78,221,.08)),
    rgba(8, 12, 20, .72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 16px 34px rgba(0,0,0,.22),
    0 0 26px rgba(88,255,172,.08);
}

.auth-gate[data-auth-state="success"] .auth-state-orb {
  border-color: rgba(172,255,210,.34);
  border-top-color: rgba(235,255,245,.96);
  box-shadow: 0 0 20px rgba(88,255,172,.14);
}

.auth-submit[disabled],
.auth-token-toggle[disabled],
.auth-switch .ui-switch-input:disabled + .ui-switch-track,
.auth-token-input input:disabled {
  cursor: wait;
  opacity: .74;
}

.auth-token-toggle[disabled],
.auth-submit[disabled] {
  transform: none !important;
  pointer-events: none;
}

.auth-gate[data-auth-state="loading"] .auth-submit,
.auth-gate[data-auth-state="success"] .auth-submit {
  filter: saturate(.96) brightness(.96);
}

.auth-gate[data-auth-state="loading"] .auth-token-input,
.auth-gate[data-auth-state="success"] .auth-token-input {
  border-color: rgba(226, 196, 255, .34);
}

@keyframes authStateSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .auth-card {
    width: min(100%, calc(100vw - 20px));
    max-height: none;
  }

  .auth-brand {
    gap: 14px;
  }

  .auth-form {
    gap: 14px;
  }

  .auth-token-input,
  .auth-remember-row,
  .auth-footer-block {
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .auth-gate {
    align-items: start;
    padding: 10px;
  }

  .auth-card {
    min-height: calc(100svh - 20px);
    padding: 18px;
    gap: 16px;
    border-radius: 24px;
  }

  .auth-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-bottom: 14px;
  }

  .auth-brand-logo,
  .auth-brand img {
    width: 108px;
    height: 108px;
  }

  .auth-brand .eyebrow {
    font-size: 11px;
    letter-spacing: .30em;
  }

  .auth-brand h1 {
    margin: 6px 0 8px;
    font-size: clamp(38px, 14vw, 54px);
    letter-spacing: -.065em;
  }

  .auth-brand p {
    font-size: 15px;
    line-height: 1.42;
  }

  .auth-token-input {
    min-height: 68px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .auth-token-toggle {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }

  .auth-remember-row {
    min-height: 76px;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 13px;
  }

  .auth-submit {
    min-height: 70px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 16px;
    border-radius: 22px;
  }

  .auth-submit span[data-i18n] {
    font-size: 19px;
    letter-spacing: -.035em;
  }

  .auth-submit-icon {
    width: 42px;
    height: 42px;
  }

  .auth-state {
    min-height: 48px;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
    border-radius: 16px;
    font-size: 13px;
  }

  .auth-state-orb {
    width: 21px;
    height: 21px;
  }

  .auth-footer {
    gap: 12px;
  }

  .auth-footer-block {
    padding: 14px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate[data-auth-state="loading"] .auth-state-orb {
    animation: none !important;
  }
}


/* v0.8.8 icon-rich UI pass + favicon polish */
.auth-brand-copy {
  display: grid;
  align-content: center;
}

.auth-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-signal {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(214, 170, 255, .16);
  border-radius: 999px;
  color: rgba(245, 240, 255, .82);
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.018)),
    rgba(8, 9, 19, .52);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 10px 22px rgba(0,0,0,.16);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .035em;
  transition:
    transform .18s var(--kh-ease-premium, ease),
    border-color .18s var(--kh-ease-premium, ease),
    color .18s var(--kh-ease-premium, ease),
    background .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease);
}

.auth-signal .ui-icon {
  width: 16px;
  height: 16px;
  color: rgba(210, 151, 255, .94);
  filter: drop-shadow(0 0 10px rgba(157,78,221,.20));
}

.auth-signal:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 170, 255, .30);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.070), rgba(157,78,221,.045)),
    rgba(10, 11, 22, .62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    0 14px 26px rgba(0,0,0,.20),
    0 0 18px rgba(157,78,221,.10);
}

.auth-icon-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-icon-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(214, 170, 255, .145);
  border-radius: 19px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.043), rgba(255,255,255,.016)),
    rgba(8, 9, 19, .50);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 12px 26px rgba(0,0,0,.16);
  transition:
    transform .18s var(--kh-ease-premium, ease),
    border-color .18s var(--kh-ease-premium, ease),
    background .18s var(--kh-ease-premium, ease),
    box-shadow .18s var(--kh-ease-premium, ease);
}

.auth-icon-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 170, 255, .30);
  background:
    linear-gradient(180deg, rgba(255,255,255,.058), rgba(157,78,221,.035)),
    rgba(10, 11, 22, .62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    0 18px 34px rgba(0,0,0,.22),
    0 0 20px rgba(157,78,221,.10);
}

.auth-icon-chip-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(214, 170, 255, .16);
  border-radius: 14px;
  color: #d798ff;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,170,255,.18), transparent 54%),
    rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.auth-icon-chip-icon .ui-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 12px rgba(157,78,221,.20));
}

.auth-icon-chip strong {
  display: block;
  color: rgba(255,255,255,.94);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .01em;
}

.auth-icon-chip small {
  display: block;
  margin-top: 2px;
  color: rgba(226,218,238,.64);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.auth-security-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: rgba(226,218,238,.62);
  font-size: 12px;
  font-weight: 760;
}

.auth-security-meta .ui-icon {
  width: 15px;
  height: 15px;
  color: rgba(210,151,255,.86);
}

.auth-state-orb {
  overflow: hidden;
  color: rgba(234, 214, 255, .98);
}

.auth-state-orb .ui-icon {
  width: 14px;
  height: 14px;
}

.auth-gate[data-auth-state="loading"] .auth-state-orb .ui-icon {
  animation: authIconPulse .86s ease-in-out infinite alternate;
}

.auth-gate[data-auth-state="success"] .auth-state-orb {
  color: rgba(207,255,229,.98);
}

.auth-gate[data-auth-state="invalid"] .auth-state-orb {
  color: rgba(255,214,224,.98);
}

.system-pill {
  gap: 9px;
}

.system-pill > span[data-icon] {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(207,216,230,.10);
  border-radius: 12px;
  color: rgba(185,132,255,.94);
  background: rgba(255,255,255,.045);
}

.system-pill > span[data-icon] .ui-icon {
  width: 17px;
  height: 17px;
}

.compact-select-label {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}

.compact-select-label .ui-icon {
  width: 16px;
  height: 16px;
  color: rgba(185,132,255,.92);
}

.sidebar-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.sidebar-logout-button .ui-icon {
  width: 15px;
  height: 15px;
}

.side-nav [data-icon],
.tabbar [data-icon],
.icon-top-button [data-icon],
.sidebar-user-card [data-icon] {
  transition:
    transform .18s var(--kh-ease-premium, ease),
    color .18s var(--kh-ease-premium, ease),
    filter .18s var(--kh-ease-premium, ease);
}

.side-nav a:hover [data-icon],
.side-nav button:hover [data-icon],
.tabbar button:hover [data-icon],
.icon-top-button:hover [data-icon] {
  transform: translateY(-1px) scale(1.035);
  filter: drop-shadow(0 0 12px rgba(185,132,255,.18));
}

.auth-input-icon .ui-icon,
.auth-row-icon .ui-icon,
.auth-footer-icon .ui-icon,
.auth-label-icon .ui-icon {
  filter: drop-shadow(0 0 12px rgba(157,78,221,.18));
}

@keyframes authIconPulse {
  from { transform: scale(.94); opacity: .72; }
  to { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 760px) {
  .auth-signal-row {
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
  }

  .auth-signal {
    min-height: 31px;
    padding: 0 10px;
    font-size: 11px;
  }

  .auth-icon-strip {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .auth-icon-chip {
    min-height: 62px;
    padding: 11px;
    border-radius: 17px;
  }

  .auth-icon-chip-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }
}

@media (max-width: 640px) {
  .auth-signal-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .auth-signal {
    justify-content: center;
  }

  .auth-icon-chip {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .auth-security-meta {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate[data-auth-state="loading"] .auth-state-orb .ui-icon,
  .side-nav a:hover [data-icon],
  .side-nav button:hover [data-icon],
  .tabbar button:hover [data-icon],
  .icon-top-button:hover [data-icon] {
    animation: none !important;
    transform: none !important;
  }
}
