/**
 * ValOS Platform Shell — base geometry
 * tab rail | workbench | ops screen | inspector
 * v1.1.0-base
 */

:root {
  --select-view: #3b82f6;
  --select-view-strong: #60a5fa;
  --select-view-soft: rgba(59, 130, 246, 0.22);
  --select-view-border: #3b82f6;
  --story-select: #e4b45a;
  --story-select-strong: #f3d19a;
  --story-select-fill: #2c2412;
  --select-execute: #3b82f6;
  --select-execute-strong: #60a5fa;
  --select-execute-soft: rgba(59, 130, 246, 0.14);
  --select-execute-soft-strong: rgba(59, 130, 246, 0.28);

  --void-950: #05070a;
  --space-900: #0b1018;
  --surface-800: #141b24;
  --signal-blue: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #a8b3c3;
  --text-tertiary: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --pane-edge: rgba(226, 232, 240, 0.26);
  --header-height: 52px;
  --rail-width: 56px;
  /* L0 owns workbench column width — packs fill the slot; never set width in pack-*.css */
  --workbench-width: 400px;
  --inspector-width: 480px; /* shell owns inspector width */
  --inspector-width-expanded: 560px;
  --font-primary: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--void-950);
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.shell-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
}

/* ── Header ── */
.shell-header {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: rgba(11, 16, 24, 0.92);
  border-bottom: 1px solid var(--pane-edge);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 5;
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shell-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a2330 0%, #0b1018 55%, #141b24 100%);
  color: var(--signal-blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.shell-brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.shell-brand-valos {
  color: var(--text-secondary);
  margin-right: 0.25em;
}

.shell-brand-name {
  color: var(--text-primary);
  font-weight: 800;
}

.shell-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.shell-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-person-tile {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--space-900);
  color: var(--text-primary);
  cursor: default;
  font: inherit;
}

.shell-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: #1e3a5f;
  color: #93c5fd;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.shell-person-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.shell-person-name {
  font-size: 12px;
  font-weight: 650;
}

.shell-person-role {
  font-size: 10px;
  color: var(--text-tertiary);
}


/* Inspector expand — shell owns width tokens; pack only toggles data-attr */
.shell-root[data-inspector-expanded="1"],
.hub-next-root[data-inspector-expanded="1"] {
  --inspector-width: var(--inspector-width-expanded, 560px);
}

/* Theme host — L2 color owns palettes; Active may set data-theme */
html[data-theme="light"] .shell-root,
.shell-root[data-theme="light"] {
  /* token overrides applied by pack-bpaas from L2 themes.light */
}

/* ── Body: 4 panes ── */
.shell-body {
  flex: 1;
  display: grid;
  grid-template-columns:
    var(--rail-width)
    var(--workbench-width)
    minmax(0, 1fr)
    var(--inspector-width);
  min-height: 0;
  background: #06090e;
}

/* 1. Tab rail */
.shell-tab-rail {
  background: var(--space-900);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  gap: 8px;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.35);
  z-index: 2;
  overflow: hidden;
}

.shell-tab-rail .shell-pane-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  opacity: 0.7;
}

.shell-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding-top: 8px;
}

.shell-slot-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

/* ── Blueprint: tab rail items — colors = Hub shell rail (shell.css accents) ── */
.shell-tab-rail[data-blueprint] {
  padding: 10px 6px;
  gap: 4px;
}

.shell-tab-rail[data-blueprint] .shell-pane-label {
  display: none;
}

.shell-tab-item {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f3f4f6;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.shell-tab-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.shell-tab-icon {
  display: inline-flex;
  line-height: 0;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px currentColor);
}

/* Idle accent hues — same hex as Hub .hub-rail-item.accent-* */
.shell-tab-item.accent-blue .shell-tab-icon {
  color: #38bdf8;
}
.shell-tab-item.accent-cyan .shell-tab-icon {
  color: #00e5ff;
}
.shell-tab-item.accent-orange .shell-tab-icon {
  color: #fb923c;
}
.shell-tab-item.accent-purple .shell-tab-icon {
  color: #8b5cf6;
}
.shell-tab-item.accent-rose .shell-tab-icon {
  color: #fb7185;
}
.shell-tab-item.accent-yellow .shell-tab-icon {
  color: #fbbf24;
}
.shell-tab-item.accent-green .shell-tab-icon {
  color: #00e58f;
}

.shell-tab-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.shell-tab-item.accent-blue.active {
  background: rgba(56, 189, 248, 0.14);
  box-shadow: inset 2px 0 0 #38bdf8, 0 0 12px rgba(56, 189, 248, 0.14);
}
.shell-tab-item.accent-blue.active .shell-tab-icon {
  color: #7dd3fc;
  filter: drop-shadow(0 0 6px #38bdf8);
}

.shell-tab-item.accent-cyan.active {
  background: rgba(0, 229, 255, 0.12);
  box-shadow: inset 2px 0 0 #00e5ff, 0 0 12px rgba(0, 229, 255, 0.12);
}
.shell-tab-item.accent-cyan.active .shell-tab-icon {
  color: #67f6ff;
  filter: drop-shadow(0 0 6px #00e5ff);
}

.shell-tab-item.accent-orange.active {
  background: rgba(251, 146, 60, 0.14);
  box-shadow: inset 2px 0 0 #fb923c, 0 0 12px rgba(251, 146, 60, 0.14);
}
.shell-tab-item.accent-orange.active .shell-tab-icon {
  color: #fdba74;
  filter: drop-shadow(0 0 6px #fb923c);
}

.shell-tab-item.accent-purple.active {
  background: rgba(139, 92, 246, 0.14);
  box-shadow: inset 2px 0 0 #8b5cf6, 0 0 12px rgba(139, 92, 246, 0.14);
}
.shell-tab-item.accent-purple.active .shell-tab-icon {
  color: #c4b5fd;
  filter: drop-shadow(0 0 6px #8b5cf6);
}

.shell-tab-item.accent-rose.active {
  background: rgba(251, 113, 133, 0.14);
  box-shadow: inset 2px 0 0 #fb7185, 0 0 12px rgba(251, 113, 133, 0.14);
}
.shell-tab-item.accent-rose.active .shell-tab-icon {
  color: #fda4af;
  filter: drop-shadow(0 0 6px #fb7185);
}

.shell-tab-item.accent-yellow.active {
  background: rgba(251, 191, 36, 0.12);
  box-shadow: inset 2px 0 0 #fbbf24, 0 0 12px rgba(251, 191, 36, 0.12);
}
.shell-tab-item.accent-yellow.active .shell-tab-icon {
  color: #fde68a;
  filter: drop-shadow(0 0 6px #fbbf24);
}

.shell-tab-item.accent-green.active {
  background: rgba(0, 229, 143, 0.12);
  box-shadow: inset 2px 0 0 #00e58f, 0 0 12px rgba(0, 229, 143, 0.12);
}
.shell-tab-item.accent-green.active .shell-tab-icon {
  color: #6ee7b7;
  filter: drop-shadow(0 0 6px #00e58f);
}

.shell-tab-item.grey,
.shell-tab-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shell-tab-tip {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.shell-tab-item:hover .shell-tab-tip,
.shell-tab-item:focus-visible .shell-tab-tip {
  display: block;
}

.bp-ops-iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  background: #05070a;
  display: block;
}

.shell-ops:has(.bp-ops-iframe) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.bp-ops-panel {
  max-width: 520px;
  margin: 8vh auto 0;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.bp-ops-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 700;
}

.bp-ops-meta {
  margin: 16px 0 0;
  font-size: 12px;
  color: #64748b;
}

.bp-ops-meta code {
  font-family: var(--font-mono);
  color: #7dd3fc;
  font-size: 11px;
}

.bp-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #334155;
}

.bp-chip.live {
  border-color: #14532d;
  color: #00e58f;
  background: #052e1a;
}

.bp-chip.warn {
  border-color: #854d0e;
  color: #fbbf24;
  background: #422006;
}

/* 2. Workbench */
.shell-workbench {
  background: #0c1118;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.3);
}

/* 3. Ops screen */
.shell-ops {
  min-width: 0;
  min-height: 0;
  overflow: hidden !important;
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: #080b10 !important;
  background-image: none !important;
  isolation: isolate;
  contain: paint;
  scrollbar-width: none;
}
.shell-ops:focus,
.shell-ops:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.shell-ops::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
/* Hairline kill — 1px purple/blue stripe across every tab ops pane. */
.shell-ops::before,
.shell-ops::after,
.shell-ops .sig-ops-stage::before,
.shell-ops .sig-ops-stage::after,
.shell-ops .hub-next-ops::before,
.shell-ops .hub-next-ops::after,
.shell-ops .hub-next-work-ops::before,
.shell-ops .hub-next-work-ops::after,
.shell-ops .hub-next-signals-ops::before,
.shell-ops .hub-next-signals-ops::after,
.shell-ops .msp-ops::before,
.shell-ops .msp-ops::after,
.shell-ops .msp-ops-body::before,
.shell-ops .msp-ops-body::after,
.shell-ops .msp-ops--pop::before,
.shell-ops .msp-ops--pop::after,
.shell-ops .act-ops::before,
.shell-ops .act-ops::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 0 !important;
  width: 0 !important;
}
.shell-ops .sig-ops-stage,
.shell-ops .hub-next-ops,
.shell-ops .hub-next-work-ops,
.shell-ops .hub-next-signals-ops,
.shell-ops .msp-ops,
.shell-ops .msp-ops-body,
.shell-ops .act-ops {
  outline: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  overflow-x: hidden !important;
  max-width: 100%;
}
.shell-ops .sig-action-slider {
  left: auto !important;
  width: auto !important;
  max-width: 340px;
  overflow: hidden;
}
.shell-ops .hub-next-ops-grid--iado4 {
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  clip-path: inset(0);
  transform: translateZ(0);
}
.shell-ops .sig-email-iframe-host {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 8px);
  transform: translateZ(0);
  position: relative !important;
}
.shell-ops .sig-email-iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* 4. Inspector */
.shell-inspector {
  background: #0a0f16;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-shadow: -1px 0 0 rgba(0, 0, 0, 0.3);
}

/* Shared pane chrome */
.shell-pane-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.shell-pane-meta {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  font-size: 10px;
}

.shell-pane-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
}

.shell-pane-body--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shell-slot-blurb {
  margin: 0;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  letter-spacing: 0.02em;
}

.shell-ops-empty {
  max-width: 440px;
  margin: auto;
  padding: 28px 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.35);
}

.shell-stage-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.shell-stage-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
}

.shell-stage-blurb {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.shell-stage-blurb code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal-blue);
}

.shell-muted {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.45;
}

.shell-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 10px;
  font-size: 12px;
}

.shell-dl dt {
  margin: 0;
  color: var(--text-tertiary);
  font-weight: 600;
}

.shell-dl dd {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
}

@media (max-width: 960px) {
  .shell-body {
    grid-template-columns: var(--rail-width) minmax(0, 1fr) minmax(240px, 32vw);
  }
  .shell-workbench {
    display: none;
  }
}

@media (max-width: 720px) {
  .shell-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .shell-tab-rail,
  .shell-workbench {
    display: none;
  }
  .shell-inspector {
    max-height: 36vh;
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }
}

/* ── Operator session (multi-op Phase A) ── */
.shell-operator-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  max-width: 280px;
}
.shell-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 10px/1 system-ui, sans-serif;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.45);
  flex-shrink: 0;
}
.shell-operator-name {
  font: 600 12px/1.2 system-ui, sans-serif;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.shell-op-btn {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  font: 600 11px/1 system-ui, sans-serif;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.shell-op-btn--primary {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.28);
  color: #e0e7ff;
}
.shell-op-btn--ghost {
  background: transparent;
  color: #94a3b8;
}
.operator-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 14, 0.82);
  backdrop-filter: blur(6px);
}
.operator-gate[hidden] { display: none !important; }
.operator-gate-card {
  width: min(440px, 92vw);
  padding: 28px 26px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0f172a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.operator-gate-kicker {
  font: 800 10px/1 system-ui, sans-serif;
  letter-spacing: 0.12em;
  color: #64748b;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.operator-gate-title {
  margin: 0 0 10px;
  font: 700 20px/1.25 system-ui, sans-serif;
  color: #f1f5f9;
}
.operator-gate-blurb {
  margin: 0 0 18px;
  font: 400 13px/1.55 system-ui, sans-serif;
  color: #94a3b8;
}
.operator-gate-device {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #cbd5e1;
  font-size: 13px;
}
.operator-user-code {
  font: 800 22px/1.2 ui-monospace, monospace !important;
  letter-spacing: 0.16em;
  color: #e0e7ff !important;
  margin: 10px 0 !important;
}
.operator-gate-foot { margin: 14px 0 0; font-size: 12px; }
.operator-auth-banner {
  padding: 8px 14px;
  font: 600 12px/1.4 system-ui, sans-serif;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}
.operator-auth-banner[hidden] { display: none !important; }
html[data-operator-gate="1"] .shell-body {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

/* ── Full-page hub login ── */
.hub-login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hub-login-screen[hidden]:not(.is-visible) {
  display: none !important;
}
.hub-login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(14, 165, 233, 0.12), transparent 50%),
    #05070a;
}
.hub-login-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 32px 28px 28px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}
.hub-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.hub-login-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 16px/1 system-ui, sans-serif;
  color: #e0e7ff;
  background: linear-gradient(145deg, #6366f1, #0ea5e9);
}
.hub-login-product {
  margin: 0;
  font: 700 14px/1.2 system-ui, sans-serif;
  color: #f1f5f9;
}
.hub-login-sub {
  margin: 2px 0 0;
  font: 500 11px/1.2 system-ui, sans-serif;
  color: #64748b;
  letter-spacing: 0.04em;
}
.hub-login-title {
  margin: 0 0 10px;
  font: 700 24px/1.2 system-ui, sans-serif;
  color: #f8fafc;
}
.hub-login-lead {
  margin: 0 0 20px;
  font: 400 13px/1.55 system-ui, sans-serif;
  color: #94a3b8;
}
.hub-login-primary {
  width: 100%;
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font: 700 14px/1 system-ui, sans-serif;
  color: #0f172a;
  background: linear-gradient(180deg, #e0e7ff, #a5b4fc);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}
.hub-login-primary:hover {
  filter: brightness(1.05);
}
.hub-login-device {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.12);
  text-align: center;
}
.hub-login-device-label {
  margin: 0 0 6px;
  font: 600 12px/1.3 system-ui, sans-serif;
  color: #c7d2fe;
}
.hub-login-device-link {
  margin: 0 0 10px;
  font: 500 12px/1.3 system-ui, sans-serif;
}
.hub-login-device-link a {
  color: #a5b4fc;
}
.hub-login-code {
  margin: 0 0 8px !important;
  font: 800 26px/1.2 ui-monospace, monospace !important;
  letter-spacing: 0.18em;
  color: #eef2ff !important;
}
.hub-login-device-hint {
  margin: 0;
  font: 500 11px/1.3 system-ui, sans-serif;
  color: #94a3b8;
}
.hub-login-status {
  min-height: 1.2em;
  margin: 14px 0 0;
  font: 500 12px/1.4 system-ui, sans-serif;
  color: #fbbf24;
  text-align: center;
}
.hub-login-note {
  margin: 18px 0 0;
  font: 400 11px/1.45 system-ui, sans-serif;
  color: #64748b;
  text-align: center;
}
body.hub-login-open .shell-root {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}
html[data-hub-login="1"] .shell-root {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

/* operator-panel */
.shell-header-actions { position: relative; }
.shell-op-panel-btn {
  position: relative;
}
.shell-op-panel-btn[data-graph="on"]::after,
.shell-op-panel-btn[data-graph="off"]::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}
.shell-op-panel-btn[data-graph="on"]::after {
  background: #34d399;
}
.shell-op-panel-btn[data-graph="off"]::after {
  background: #f59e0b;
}
.op-panel {
  position: absolute;
  right: 12px;
  top: calc(100% + 8px);
  z-index: 80;
  width: min(380px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #121a24;
  color: #e7ecf3;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.op-panel h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
}
.op-panel-row { margin: 12px 0; }
.op-panel-k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b9bb4;
}
.op-panel-v { font-size: 13px; margin: 4px 0 8px; }
.op-panel-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.op-panel-device { margin-top: 8px; }
.op-panel-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 6px 0;
}
.op-panel-hint { font-size: 12px; color: #8b9bb4; margin: 0; }
.op-panel-status { font-size: 12px; color: #93c5fd; min-height: 1.2em; }
.op-panel a { color: #93c5fd; }
