/* 1b — live session: portrait stage on a wide surface + meter rail. */

.screen--live { position: relative; }

.stage {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--plate);
}

/* Backdrop: the same stream sampled into a tiny canvas, then blurred up. */
.stage__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(48px) saturate(140%) brightness(0.5);
  transform: scale(1.14);
  display: block;
}

.stage__veil {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 11, 0.34);
}

/* The feed keeps its native 9:16 — never cover-cropped into the wide box. */
.stage__portrait {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 0 90px rgba(0, 0, 0, 0.6);
}

.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* No configured stream: the ink "no signal" stripe, not a broken player. */
.stage__no-signal {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, #14181d 0 14px, var(--land) 14px 28px);
}

.stage__wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(76% 52% at 58% 34%, rgba(255, 77, 77, 0.14), transparent 72%);
  pointer-events: none;
}

.stage__scrim {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.stage__scrim--top {
  top: 0;
  height: 190px;
  background: linear-gradient(rgba(8, 9, 11, 0.76), rgba(8, 9, 11, 0.16) 62%, transparent);
}

.stage__scrim--bottom {
  bottom: 0;
  height: 150px;
  background: linear-gradient(transparent, rgba(8, 9, 11, 0.72));
}

.stage__tl {
  position: absolute;
  left: 24px;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

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

.stage__badge,
.stage__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  border-radius: var(--r-pill);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--bone76);
}

.stage__chip--demo {
  background: rgba(245, 165, 36, 0.16);
  border-color: rgba(245, 165, 36, 0.45);
  color: var(--credit-light);
  font-weight: 600;
}

.stage__badge {
  font-weight: 600;
  letter-spacing: 1.4px;
  background: rgba(255, 77, 77, 0.26);
  border-color: rgba(255, 128, 128, 0.5);
  color: var(--live-pale);
}

.stage__codename {
  font: 900 52px/1 var(--font-display);
  letter-spacing: -0.05em;
}

/* Desktop's real gain: the reason you are watching stays on screen. */
.stage__context {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r-card);
  background: rgba(255, 77, 77, 0.16);
  border-color: rgba(255, 128, 128, 0.4);
  width: max-content;
}

.stage__context-meta {
  font: 500 9.5px/1 var(--font-mono);
  letter-spacing: 1.2px;
  white-space: nowrap;
  color: var(--live-pale);
}

.stage__tr { position: absolute; right: 24px; top: 22px; }
.stage__bl { position: absolute; left: 24px; bottom: 22px; display: flex; align-items: center; gap: 9px; }
.stage__br { position: absolute; right: 24px; bottom: 22px; }

.icon-btn--off { opacity: 0.55; }

/* Connection trouble reads on the quality chip, so no extra chrome appears. */
.stage__chip--alert {
  background: rgba(255, 77, 77, 0.18);
  border-color: rgba(255, 128, 128, 0.45);
  color: var(--live-pale);
}

.glyph-play {
  width: 0;
  height: 0;
  border-left: 11px solid rgba(237, 235, 230, 0.85);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}

.glyph-pause {
  width: 11px;
  height: 13px;
  border-left: 3px solid rgba(237, 235, 230, 0.85);
  border-right: 3px solid rgba(237, 235, 230, 0.85);
}

.glyph-bars-eq { display: flex; gap: 2px; align-items: flex-end; }
.glyph-bars-eq > i { width: 2px; background: rgba(237, 235, 230, 0.85); }
.glyph-bars-eq > i:nth-child(1) { height: 7px; }
.glyph-bars-eq > i:nth-child(2) { height: 11px; }
.glyph-bars-eq > i:nth-child(3) { height: 5px; }

.glyph-square {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(237, 235, 230, 0.85);
  border-radius: 2px;
}

/* --- locator ------------------------------------------------------------- */

.locator {
  width: 216px;
  border-radius: var(--r-card);
}

.locator__map {
  position: relative;
  height: 132px;
  overflow: hidden;
  background: var(--plate);
}

.locator__tile {
  position: absolute;
  left: -128px;
  top: -128px;
  width: 256px;
  height: 256px;
  display: block;
}

.locator__alert,
.locator__agent {
  position: absolute;
  width: 0;
  height: 0;
}

.locator__alert-dot {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 14px rgba(255, 77, 77, 0.85);
}

.locator__ring {
  position: absolute;
  left: -20px;
  top: -20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 77, 77, 0.5);
  animation: sp-pulse var(--pulse-dur) ease-out infinite;
}

.locator__agent::after {
  content: "";
  position: absolute;
  left: -4.5px;
  top: -4.5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bone);
  box-shadow: 0 0 12px rgba(237, 235, 230, 0.7), 0 0 0 3px rgba(8, 9, 11, 0.7);
}

.locator__foot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px 12px;
}

.locator__label {
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--bone45);
}

.locator__coords {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bone76);
}

/* --- meter rail ---------------------------------------------------------- */

.meter__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px;
}

.meter__row { display: flex; align-items: flex-start; gap: 16px; }

.meter__block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meter__block--end { flex: 0 0 auto; align-items: flex-end; }

.meter__label {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--bone50);
}

.meter__clock {
  font: 800 50px/1 var(--font-mono);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.meter__spend {
  font: 800 30px/1 var(--font-display);
  letter-spacing: -0.035em;
  color: var(--live-light);
  text-shadow: 0 0 22px rgba(255, 77, 77, 0.45);
}

.meter__prepaid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* 12 prepaid minute blocks in an inset trough. */
.meter__blocks {
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 9px;
  background: rgba(8, 9, 11, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meter__blocks-cell {
  flex: 1;
  height: 9px;
  border-radius: 3px;
  background: rgba(237, 235, 230, 0.14);
  transition: background var(--dur-state) var(--ease-out);
}

.meter__blocks-cell--filled {
  background: linear-gradient(180deg, var(--live-light), var(--live-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 10px rgba(255, 77, 77, 0.45);
}

.meter__captions {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.meter__caption {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--bone55);
}

.meter__caption--credit { color: var(--credit); }

.meter__actions { display: flex; gap: 9px; }
.meter__topup { flex-shrink: 0; padding: 17px 20px; }
.meter__disconnect { flex: 1; padding: 17px 0; }

.meter__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
}

.meter__others { display: flex; flex-direction: column; gap: 9px; }

.agent-card--compact { padding: 12px; }
.agent-card--compact .agent-card__thumb { width: 72px; height: 50px; }
.agent-card--compact .agent-card__name { font-size: 15px; }

.meter__note {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border-radius: var(--r-card);
  background: rgba(237, 235, 230, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.meter__note-label {
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--bone42);
}

.meter__note-body {
  margin: 0;
  font: 400 12px/1.5 var(--font-display);
  color: var(--bone60);
}

/* --- receipt ------------------------------------------------------------- */

.receipt {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 11, 0.88);
}

.receipt__slab {
  width: 560px;
  max-width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--divider);
}

.receipt__eyebrow {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bone45);
}

.receipt__codename {
  font: 900 34px/1 var(--font-display);
  letter-spacing: -0.04em;
}

.receipt__rows { display: flex; flex-direction: column; gap: 12px; }

.receipt__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.receipt__row-label {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--bone50);
}

.receipt__row-value {
  font: 600 13px/1 var(--font-mono);
  letter-spacing: 0.4px;
}

.receipt__actions { display: flex; gap: 9px; }
.receipt__primary { flex: 1; }
.receipt__secondary { padding: 0 18px; }

/* --- empty live state ---------------------------------------------------- */

.stage__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--stage);
}

.stage__empty-title {
  font: 800 22px/1 var(--font-display);
  letter-spacing: -0.02em;
}

.stage__empty-body {
  margin: 0;
  font: 400 13px/1.5 var(--font-display);
  color: var(--bone60);
}
