/* MAX OS Command Center — z-index · voice · exit · operator log */
.command-portal {
  z-index: 10150 !important;
}
.command-portal-shell {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.command-portal-backdrop {
  z-index: 1;
  cursor: pointer;
}

.maxos-command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(4, 6, 14, 0.98);
  border-bottom: 1px solid rgba(0, 212, 238, 0.2);
  flex-shrink: 0;
}
#maxos-command-input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 238, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: #f4f4fa;
  font-size: 0.82rem;
}
#maxos-command-input::placeholder { color: rgba(244, 244, 250, 0.35); }
#maxos-voice-btn,
#maxos-command-run {
  appearance: none;
  border: 1px solid rgba(232, 50, 138, 0.35);
  background: rgba(232, 50, 138, 0.12);
  color: #f4f4fa;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
#maxos-voice-btn.is-listening {
  border-color: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
  animation: maxosPulse 1s ease-in-out infinite;
}
@keyframes maxosPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
#maxos-live-badge {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 244, 250, 0.45);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#maxos-live-badge.is-live {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.35);
}

.maxos-operator-log {
  flex-shrink: 0;
  max-height: 88px;
  overflow-y: auto;
  padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  line-height: 1.45;
}
.maxos-log-line { margin: 0 0 0.2rem; color: rgba(244, 244, 250, 0.55); }
.maxos-log-ok { color: #00ff88; }
.maxos-log-cmd { color: #00d4ee; }
.maxos-log-ai { color: #e8328a; }
.maxos-log-err { color: #ff6b6b; }
.maxos-log-sync { color: rgba(255, 201, 64, 0.85); }
.maxos-log-think { color: rgba(244, 244, 250, 0.35); }

.command-portal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(4, 4, 10, 0.98);
  border-top: 1px solid rgba(232, 50, 138, 0.25);
  flex-shrink: 0;
  z-index: 10;
}
.command-portal-foot span {
  font-size: 0.62rem;
  color: rgba(244, 244, 250, 0.4);
  letter-spacing: 0.06em;
}
.command-close-x {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(232, 50, 138, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.command-portal-bar {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}
.command-portal-bar .command-close-x {
  position: absolute;
  top: 0.65rem;
  right: 1rem;
}
.command-portal-bar .btn-primary.pm-pill {
  margin-right: 2.5rem;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.command-cockpit {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
}
.cockpit-loading {
  padding: 2rem;
  text-align: center;
  color: rgba(244, 244, 250, 0.5);
  font-size: 0.85rem;
}

body.maxos-portal-open .chat-widget,
body.maxos-portal-open .pm-sticky-cta {
  z-index: 100 !important;
}
