/* HAL Command Center M17 — additive shared website/Desktop shell.
   Reuses existing HAL surfaces; no execution, approval or routing authority. */
.hx-command-center {
  position: sticky;
  top: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 14px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--divider-strong, #3a5174) 82%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(120deg, color-mix(in srgb, #7cf7ff 7%, transparent), transparent 28%),
    linear-gradient(240deg, color-mix(in srgb, #d48cff 6%, transparent), transparent 34%),
    color-mix(in srgb, var(--panel-2, #111b2e) 94%, #05070c);
  box-shadow: 0 10px 30px rgb(0 0 0 / .18), inset 0 1px 0 rgb(255 255 255 / .045);
  backdrop-filter: blur(18px) saturate(1.08);
}
.hx-command-center::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, #64e8ff, #9f8cff 42%, #ff79bc 72%, #8cffc7);
  opacity: .08;
  mask: linear-gradient(#000 0 0) border-box, linear-gradient(#000 0 0) padding-box;
  mask-composite: exclude;
}
.hx-command-surfaces {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hx-command-surfaces::-webkit-scrollbar { display: none; }
.hx-command-surface {
  appearance: none;
  min-width: 88px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-content: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted, #a6b6cf);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.hx-command-surface:hover {
  color: var(--text, #f0f5ff);
  background: rgb(255 255 255 / .045);
}
.hx-command-surface:active { transform: translateY(1px); }
.hx-command-surface[aria-pressed="true"] {
  color: var(--text, #f0f5ff);
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 50%, var(--divider-strong, #3a5174));
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 10%, var(--panel-3, #17233b));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .025);
}
.hx-command-surface:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}
.hx-command-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  font: 900 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.hx-command-label {
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: .01em;
}
.hx-command-sub {
  margin-top: 3px;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
}
.hx-command-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: max-content;
}
.hx-command-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--divider, #263956);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel, #0d1729) 92%, transparent);
  color: var(--muted, #a6b6cf);
  font: 750 10px/1 system-ui, sans-serif;
  white-space: nowrap;
}
.hx-command-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7e8ca2;
}
.hx-command-chip[data-state="good"]::before {
  background: var(--ok, #42d392);
  box-shadow: 0 0 9px color-mix(in srgb, var(--ok, #42d392) 58%, transparent);
}
.hx-command-chip[data-state="live"]::before {
  background: var(--hx-blue, #70cfff);
  box-shadow: 0 0 9px color-mix(in srgb, var(--hx-blue, #70cfff) 62%, transparent);
}
.hx-command-chip[data-state="attention"] {
  color: #ffd28a;
  border-color: color-mix(in srgb, #ffb454 50%, var(--divider, #263956));
}
.hx-command-chip[data-state="attention"]::before {
  background: #ffb454;
  box-shadow: 0 0 9px rgb(255 180 84 / .5);
}
.hx-command-chip[data-state="offline"]::before { background: #ff6f7d; }
.hx-command-center[data-work-active="true"] {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 50%, var(--divider-strong, #3a5174));
}
html[data-hal-work-focus="true"] .hx-command-center {
  margin-top: 6px;
}
@media (max-width: 1080px) {
  .hx-command-center { grid-template-columns: minmax(0, 1fr); }
  .hx-command-status { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .hx-command-status::-webkit-scrollbar { display: none; }
}
@media (max-width: 720px) {
  .hx-command-center { margin: 6px 8px 0; padding: 6px; gap: 7px; border-radius: 12px; }
  .hx-command-surface { min-width: 64px; min-height: 44px; grid-template-columns: 20px auto; column-gap: 6px; padding: 5px 7px; }
  .hx-command-icon { width: 20px; height: 20px; font-size: 11px; }
  .hx-command-sub { display: none; }
  .hx-command-label { font-size: 11px; }
  .hx-command-chip { min-height: 30px; padding-inline: 8px; font-size: 9px; }
}
@media (max-width: 480px) {
  .hx-command-status .hx-command-chip[data-kind="work"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-command-surface { transition: none; }
  .hx-command-chip::before { box-shadow: none !important; }
}
@media (forced-colors: active) {
  .hx-command-center, .hx-command-surface[aria-pressed="true"], .hx-command-chip { border-color: CanvasText; }
}
