/* ============================================================
   FLEET UPGRADES - styles for Live Agent Mode + Maximus HUD
   Loaded after styles.css
   ============================================================ */

/* ---------------- LIVE AGENT MODE ---------------- */
.lam-wrap {
  --lam-bg: #050b12;
  --lam-panel: #0a1622;
  --lam-line: rgba(0, 229, 255, .15);
  --lam-cyan: #00e5ff;
  --lam-text: #e6f1ff;
  --lam-dim: #9fb3c8;
  background: radial-gradient(120% 100% at 50% 0%, #0b1a2a 0%, var(--lam-bg) 60%);
  border: 1px solid var(--lam-line);
  border-radius: 18px;
  padding: 14px;
  color: var(--lam-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 0 40px rgba(0, 229, 255, .08), inset 0 0 60px rgba(0, 229, 255, .03);
}

.lam-hud {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 10px 14px;
  flex-wrap: wrap;
}

.lam-title {
  font-weight: 800;
  letter-spacing: .18em;
  font-size: 15px;
  color: var(--lam-cyan);
  text-shadow: 0 0 12px rgba(0, 229, 255, .6);
}

.lam-sub {
  display: block;
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--lam-dim);
  font-weight: 600;
}

.lam-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.lam-chip {
  background: rgba(0, 229, 255, .06);
  border: 1px solid var(--lam-line);
  border-radius: 10px;
  padding: 5px 12px;
  text-align: center;
}

.lam-chip span {
  display: block;
  font-size: 8px;
  letter-spacing: .2em;
  color: var(--lam-dim);
}

.lam-chip b {
  font-size: 15px;
  font-family: monospace;
  color: var(--lam-text);
}

.lam-clock {
  font-family: monospace;
  font-size: 18px;
  color: var(--lam-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, .6);
  min-width: 92px;
  text-align: right;
}

.lam-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 12px;
}

@media (max-width: 980px) {
  .lam-main {
    grid-template-columns: 1fr;
  }
}

.lam-floor {
  position: relative;
  height: 440px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--lam-line);
  background: linear-gradient(180deg, #04121e 0%, #02080e 100%);
}

.lam-floor canvas {
  position: absolute;
  inset: 0;
}

.lam-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 229, 255, .015) 3px 4px);
}

.lam-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(0, 229, 255, .05), transparent);
  animation: lamScan 7s linear infinite;
}

@keyframes lamScan {
  from {
    top: -90px;
  }

  to {
    top: 100%;
  }
}

.lam-side {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--lam-line);
  border-radius: 14px;
  background: var(--lam-panel);
  overflow: hidden;
  max-height: 440px;
}

.lam-panel-h {
  font-size: 10px;
  letter-spacing: .25em;
  font-weight: 700;
  color: var(--lam-dim);
  padding: 10px 12px;
  border-bottom: 1px solid var(--lam-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lam-live {
  color: #69f0ae;
  animation: lamBlink 1.6s infinite;
  font-size: 9px;
}

@keyframes lamBlink {
  50% {
    opacity: .3;
  }
}

.lam-feed {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.lam-feed-item {
  border-left: 3px solid var(--lam-dim);
  background: rgba(255, 255, 255, .02);
  border-radius: 0 8px 8px 0;
  padding: 7px 10px;
  margin-bottom: 7px;
}

.lam-feed-item.ok {
  border-left-color: #69f0ae;
}

.lam-feed-item.warn {
  border-left-color: #ffd740;
}

.lam-fi-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.lam-fi-top b {
  color: var(--lam-text);
}

.lam-fi-top span {
  color: var(--lam-dim);
  font-family: monospace;
  font-size: 10px;
}

.lam-feed-item p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--lam-dim);
  line-height: 1.4;
}

.lam-inspector {
  margin-top: 12px;
  border: 1px solid var(--lam-line);
  border-radius: 14px;
  background: var(--lam-panel);
  min-height: 70px;
}

.lam-insp-empty {
  padding: 26px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--lam-dim);
}

.lam-insp-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 300px 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .lam-insp-card {
    grid-template-columns: 1fr;
  }
}

.lam-insp-id {
  display: flex;
  gap: 12px;
  align-items: center;
  grid-row: span 2;
}

.lam-avatar {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font: 800 26px monospace;
  color: var(--lam-text);
  background: linear-gradient(160deg, #0e2233, #071019);
  border: 2px solid var(--ac, var(--lam-cyan));
  box-shadow: 0 0 18px color-mix(in srgb, var(--ac, #00e5ff) 50%, transparent);
}

.lam-lvl {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ac, var(--lam-cyan));
  color: #04121e;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: .1em;
}

.lam-insp-id h3 {
  margin: 0;
  font-size: 17px;
}

.lam-insp-id p {
  margin: 2px 0 6px;
  font-size: 11px;
  color: var(--lam-dim);
}

.lam-xp {
  height: 5px;
  width: 150px;
  background: rgba(255, 255, 255, .08);
  border-radius: 3px;
  overflow: hidden;
}

.lam-xp i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #69f0ae);
  box-shadow: 0 0 8px rgba(0, 229, 255, .8);
}

.lam-health {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  padding: 4px 9px;
  border-radius: 7px;
}

.lam-h-healthy {
  background: rgba(105, 240, 170, .14);
  color: #69f0ae;
}

.lam-h-attention {
  background: rgba(255, 215, 64, .14);
  color: #ffd740;
}

.lam-h-na {
  background: rgba(255, 255, 255, .08);
  color: var(--lam-dim);
}

.lam-insp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.lam-bar span {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--lam-dim);
  margin-bottom: 3px;
}

.lam-bar b {
  color: var(--lam-text);
  font-family: monospace;
}

.lam-bar-t {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

.lam-bar-t i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #00e5ff, #b388ff);
}

.lam-insp-nums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.lam-num {
  background: rgba(0, 229, 255, .05);
  border: 1px solid var(--lam-line);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.lam-num b {
  display: block;
  font-family: monospace;
  font-size: 15px;
  color: var(--lam-text);
}

.lam-num span {
  font-size: 8px;
  letter-spacing: .18em;
  color: var(--lam-dim);
}

.lam-mission {
  grid-column: 2 / -1;
  background: rgba(0, 229, 255, .05);
  border: 1px solid var(--lam-line);
  border-radius: 10px;
  padding: 8px 12px;
}

.lam-mission.next {
  background: rgba(179, 136, 255, .06);
}

.lam-mission span {
  font-size: 8px;
  letter-spacing: .25em;
  color: var(--lam-cyan);
  font-weight: 700;
}

.lam-mission.next span {
  color: #b388ff;
}

.lam-mission p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--lam-text);
  line-height: 1.45;
}

.lam-analytics {
  margin-top: 12px;
  border: 1px solid var(--lam-line);
  border-radius: 14px;
  background: var(--lam-panel);
}

.lam-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  padding: 12px;
}

.lam-chart {
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--lam-line);
  border-radius: 10px;
  padding: 10px;
}

.lam-ch-t {
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--lam-dim);
  font-weight: 700;
  margin-bottom: 6px;
}

.lam-chart canvas {
  width: 100%;
  height: auto;
}

/* ---------------- MAXIMUS HUD ---------------- */
#maximusHud {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 320px;
  background: linear-gradient(165deg, rgba(6, 16, 26, .96), rgba(3, 8, 14, .98));
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 14px;
  padding: 12px 14px;
  color: #e6f1ff;
  font-family: monospace;
  box-shadow: 0 0 30px rgba(0, 229, 255, .15), 0 12px 40px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
}

.mx-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.mx-shield {
  color: #567;
  font-size: 16px;
  cursor: pointer;
  transition: all .3s;
}

.mx-shield.mx-online {
  color: #00e5ff;
  text-shadow: 0 0 14px rgba(0, 229, 255, .9);
  animation: mxPulse 1.8s infinite;
}

@keyframes mxPulse {
  50% {
    opacity: .55;
  }
}

.mx-name {
  font-weight: 800;
  letter-spacing: .2em;
  font-size: 12px;
  color: #00e5ff;
}

.mx-name em {
  font-style: normal;
  color: #9fb3c8;
  font-size: 9px;
  letter-spacing: .1em;
}

.mx-state {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: .2em;
  color: #9fb3c8;
}

.mx-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.mx-btn {
  flex: 1;
  background: rgba(0, 229, 255, .07);
  color: #cfe8f5;
  border: 1px solid rgba(0, 229, 255, .3);
  border-radius: 8px;
  font: 700 9px monospace;
  letter-spacing: .12em;
  padding: 6px 4px;
  cursor: pointer;
  transition: all .2s;
}

.mx-btn:hover {
  background: rgba(0, 229, 255, .18);
  box-shadow: 0 0 10px rgba(0, 229, 255, .3);
}

.mx-btn.mx-on {
  background: rgba(105, 240, 170, .15);
  color: #69f0ae;
  border-color: rgba(105, 240, 170, .5);
}

.mx-code {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.mx-code input {
  flex: 1;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 8px;
  color: #e6f1ff;
  font: 12px monospace;
  padding: 6px 10px;
  letter-spacing: .3em;
}

.mx-code input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 229, 255, .35);
}

.mx-wave {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
  margin-bottom: 7px;
}

.mx-wave i {
  flex: 1;
  height: 3px;
  background: rgba(0, 229, 255, .35);
  border-radius: 2px;
  transition: height .15s;
}

.mx-wave.mx-speaking i {
  animation: mxWave .7s infinite ease-in-out;
  background: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, .8);
}

.mx-wave.mx-speaking i:nth-child(2) {
  animation-delay: .12s;
}

.mx-wave.mx-speaking i:nth-child(3) {
  animation-delay: .24s;
}

.mx-wave.mx-speaking i:nth-child(4) {
  animation-delay: .36s;
}

.mx-wave.mx-speaking i:nth-child(5) {
  animation-delay: .48s;
}

@keyframes mxWave {
  50% {
    height: 15px;
  }
}

.mx-log {
  font-size: 9px;
  color: #9fb3c8;
  line-height: 1.5;
  max-height: 58px;
  overflow: hidden;
}

.mx-log div:first-child {
  color: #cfe8f5;
}

/* Hide any legacy Jarvis widget remnants. */
#jarvisWidget,
.jarvis-widget,
[data-jarvis] {
  display: none !important;
}
