:root {
  --ink: #172233;
  --muted: #697487;
  --line: #d9e0ea;
  --paper: #f6f8fb;
  --white: #ffffff;
  --brand: #1f67d2;
  --brand-dark: #0d3675;
  --aqua: #19b4c6;
  --green: #22a06b;
  --amber: #d9822b;
  --shadow: 0 22px 70px rgba(23, 34, 51, 0.18);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(31, 103, 210, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(25, 180, 198, 0.12), transparent 38%),
    var(--paper);
}

.demo-switcher {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: min(520px, calc(100% - 32px));
  padding: 4px;
  border: 1px solid rgba(217, 224, 234, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 40px rgba(23, 34, 51, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.demo-switcher button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.demo-switcher button.active {
  color: var(--white);
  background: var(--brand);
}

.demo-page {
  display: none;
}

.demo-page.active {
  display: grid;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.demo-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(390px, 1.1fr);
  gap: 48px;
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 74px 0 44px;
  align-items: center;
}

.story-panel {
  display: grid;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(31, 103, 210, 0.28);
}

.brand-kicker,
.app-header p,
.step-title span,
.history-head span {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 560px;
  margin: 4px 0 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: 0;
}

.process-card,
.status-legend {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 34, 51, 0.08);
  backdrop-filter: blur(14px);
}

.process-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--aqua);
  box-shadow: 0 0 0 7px rgba(25, 180, 198, 0.12);
  animation: pulse 1.8s infinite;
}

.live-dot.danger {
  background: #d64040;
  box-shadow: 0 0 0 7px rgba(214, 64, 64, 0.12);
}

.process-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 6px;
  color: var(--muted);
  transition: 260ms ease;
}

.process-list li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.process-list strong,
.status-legend strong {
  color: var(--ink);
}

.process-list p,
.status-legend p,
.microcopy,
.empty-state p,
.server-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.process-list li.active {
  background: #eaf2ff;
  color: var(--ink);
  transform: translateX(6px);
}

.process-list li.active > span {
  color: var(--white);
  border-color: var(--brand);
  background: var(--brand);
}

.receiving-shell {
  grid-template-columns: minmax(330px, 0.82fr) minmax(560px, 1.18fr);
  gap: 40px;
  width: min(1280px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 74px 0 44px;
  align-items: center;
}

.packing-shell {
  grid-template-columns: minmax(330px, 0.82fr) minmax(620px, 1.18fr);
  gap: 40px;
  width: min(1320px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 74px 0 44px;
  align-items: center;
}

.packing-stage {
  min-width: 0;
}

.packing-scene {
  position: relative;
  display: grid;
  min-height: 760px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(217, 224, 234, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 243, 250, 0.88)),
    linear-gradient(90deg, rgba(23, 34, 51, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(23, 34, 51, 0.05) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  box-shadow: var(--shadow);
}

.packing-stack {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(560px, calc(100% - 120px));
}

.packing-tablet {
  position: relative;
  width: 100%;
  aspect-ratio: 620 / 430;
  padding: 13px;
  border: 1px solid #283247;
  border-radius: 28px;
  background: #0f1725;
  box-shadow: 0 26px 70px rgba(23, 34, 51, 0.25);
}

.packing-screens {
  position: relative;
  height: calc(100% - 76px);
}

.packing-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 20px 84px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: 260ms ease;
}

.packing-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.packing-card,
.vms-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.packing-card.center {
  display: grid;
  flex: 1 1 auto;
  align-content: center;
  justify-items: center;
  min-height: 0;
  text-align: center;
}

.packing-card.compact {
  padding: 12px;
}

.packing-card.compact h3 {
  margin: 0;
  font-size: 18px;
}

.packing-card.compact p {
  font-size: 13px;
  line-height: 1.3;
}

.packing-card h3,
.vms-card h3 {
  margin: 8px 0 0;
  font-size: 21px;
  letter-spacing: 0;
}

.packing-card p,
.vms-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

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

.camera-grid div {
  min-height: 70px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(transparent 92%, rgba(255, 255, 255, 0.18) 92%),
    linear-gradient(90deg, transparent 92%, rgba(255, 255, 255, 0.14) 92%),
    #172233;
  background-size: 100% 18px, 18px 100%, auto;
}

.camera-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.camera-grid strong {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 18px;
  font-size: 12px;
}

.camera-grid strong::before {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #ff5c5c;
  content: "";
  animation: pulse 1s infinite;
}

.sector-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 86px;
}

.sector {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px dashed rgba(23, 34, 51, 0.22);
  border-radius: 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.sector.good {
  border-color: var(--green);
  color: #116244;
  background: #e6f6ef;
}

.sector.bad.moving {
  border-color: #d64040;
  color: #8e1f1f;
  background: #ffebeb;
}

.sector.bad.moving::after {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(214, 64, 64, 0.78);
  content: "";
  animation: moveDot 2.2s infinite ease-in-out;
}

.delivery-alert {
  display: grid;
  align-content: center;
  min-height: 210px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #d64040, #8e1f1f);
  box-shadow: 0 18px 36px rgba(214, 64, 64, 0.22);
}

.delivery-alert span,
.vms-card > span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-alert strong {
  margin-top: 12px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.delivery-alert p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.42;
}

.danger-action {
  background: linear-gradient(135deg, #d64040, #8e1f1f);
  box-shadow: 0 14px 28px rgba(214, 64, 64, 0.24);
}

.vms-card {
  display: grid;
  gap: 12px;
}

.vms-card > span {
  color: var(--brand);
}

.vms-links {
  display: grid;
  gap: 8px;
}

.vms-links a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #fff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.ptt-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(31, 103, 210, 0.22);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #eaf2ff;
  font-weight: 900;
}

.ptt-inline.recording {
  color: #fff;
  background: linear-gradient(135deg, #d64040, #8e1f1f);
  border-color: transparent;
}

@keyframes moveDot {
  0%, 100% { transform: translate(-34px, 28px); }
  50% { transform: translate(34px, -22px); }
}

.receiving-stage {
  min-width: 0;
}

.wall-scene {
  position: relative;
  display: grid;
  min-height: 760px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(217, 224, 234, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 243, 250, 0.88)),
    linear-gradient(90deg, rgba(23, 34, 51, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(23, 34, 51, 0.05) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  box-shadow: var(--shadow);
}

.tablet-stack {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(590px, calc(100% - 86px));
}

.image-placeholder {
  display: block;
  width: 66.666%;
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  background: #f6f5f1;
  box-shadow: 0 16px 40px rgba(23, 34, 51, 0.12);
}

.image-placeholder {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, transparent 49%, rgba(31, 103, 210, 0.16) 50%, transparent 51%),
    linear-gradient(45deg, transparent 49%, rgba(31, 103, 210, 0.16) 50%, transparent 51%),
    #f8fafc;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

img.image-placeholder {
  display: block;
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.wall-tablet {
  position: relative;
  width: 100%;
  aspect-ratio: 620 / 430;
  padding: 13px;
  border: 1px solid #283247;
  border-radius: 28px;
  background: #0f1725;
  box-shadow: 0 26px 70px rgba(23, 34, 51, 0.25);
}

.tablet-camera {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 58px;
  height: 5px;
  border-radius: 99px;
  background: #05070d;
  transform: translateX(-50%);
}

.tablet-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
}

.tablet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 10px;
}

.tablet-header p {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tablet-header h2 {
  margin: 3px 0 0;
  font-size: 24px;
  letter-spacing: 0;
}

.receiving-screens {
  position: relative;
  height: calc(100% - 76px);
}

.receiving-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: 260ms ease;
}

.receiving-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.receiving-screen > .primary-action,
.receiving-screen > .secondary-action,
.packing-screen > .primary-action,
.packing-screen > .secondary-action {
  flex: 0 0 auto;
  margin-top: auto;
}

.packing-screen > .primary-action,
.packing-screen > .secondary-action {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  width: auto;
}

.scan-invite {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 210px;
  text-align: center;
}

.scan-invite h3,
.goods-card h3,
.conclusion-card h3 {
  margin: 12px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.scan-invite p,
.goods-card p,
.conclusion-card p {
  max-width: 440px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.barcode-visual {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: stretch;
  height: 86px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.barcode-visual span {
  width: 7px;
  background: var(--ink);
}

.barcode-visual span:nth-child(2),
.barcode-visual span:nth-child(5) {
  width: 14px;
}

.barcode-visual span:nth-child(3) {
  width: 4px;
}

.barcode-visual i {
  position: absolute;
  inset: 0 auto 0 12px;
  width: 3px;
  background: rgba(214, 64, 64, 0.76);
  animation: barcodeScan 2s infinite ease-in-out;
}

.goods-card,
.conclusion-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.code-pill {
  display: inline-flex;
  padding: 7px 9px;
  color: var(--brand-dark);
  background: #eaf2ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.goods-card ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.goods-card li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.goods-card li::before {
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--green);
  content: "";
}

.photo-panel {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
}

#receive-defects {
  gap: 8px;
  padding: 10px 20px 78px;
}

#receive-defects > #confirmReceiving {
  position: absolute;
  right: 20px;
  bottom: 14px;
  left: 20px;
  width: auto;
}

#receive-defects .photo-panel {
  grid-template-columns: 148px 1fr;
  gap: 8px;
}

.photo-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 118px;
  color: var(--white);
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border-radius: 8px;
  font-weight: 900;
}

.photo-preview {
  display: grid;
  place-items: center;
  min-height: 118px;
  overflow: hidden;
  border: 1px dashed #b8c4d4;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

#receive-defects .photo-button,
#receive-defects .photo-preview {
  min-height: 84px;
}

.photo-preview span {
  display: none;
}

.photo-preview.captured {
  position: relative;
  border-style: solid;
  background:
    radial-gradient(circle at 70% 36%, rgba(214, 64, 64, 0.82) 0 9px, transparent 10px),
    linear-gradient(105deg, transparent 0 18%, #2db8bd 19% 48%, transparent 49%),
    linear-gradient(74deg, transparent 0 58%, #172233 59% 70%, transparent 71%),
    radial-gradient(ellipse at 70% 72%, #263349 0 16%, transparent 17%),
    linear-gradient(45deg, #c9d3df, #f4f7fb);
}

.photo-preview.captured span {
  display: block;
  width: 76%;
  height: 62%;
  border: 2px solid rgba(214, 64, 64, 0.9);
  border-radius: 8px;
  transform: rotate(-4deg);
}

.photo-preview.captured p {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  padding: 5px 7px;
  color: #7b1f1f;
  background: rgba(255, 235, 235, 0.9);
  border-radius: 6px;
  font-size: 12px;
}

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

.defect-buttons button {
  min-height: 42px;
  padding: 0 10px;
  color: var(--muted);
  background: #eef2f7;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.defect-buttons button.active {
  color: var(--white);
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(31, 103, 210, 0.2);
}

#receive-defects .defect-buttons {
  gap: 6px;
}

#receive-defects .defect-buttons button {
  min-height: 32px;
  font-size: 12px;
}

.act-number {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 210px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 103, 210, 0.1), transparent),
    #f8fafc;
}

.act-number span,
.conclusion-card > span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.act-number strong {
  margin: 8px 0;
  color: var(--brand-dark);
  font-size: clamp(42px, 8vw, 74px);
  letter-spacing: 0;
}

.act-number p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.transfer-line {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e1e7ef;
}

.transfer-line span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--aqua));
  animation: upload 2.2s infinite ease-in-out;
}

.confidence {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 18px;
}

.confidence label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.confidence strong {
  color: var(--brand-dark);
}

.confidence div {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e1e7ef;
}

.confidence div span {
  display: block;
  width: 87%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--green));
}

@keyframes barcodeScan {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(116px); }
}

.demo-page:not(.active) {
  display: none;
}

.status-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
}

.status-legend div {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.status-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 99px;
}

.status-dot.registered {
  background: var(--green);
}

.status-dot.sent {
  background: var(--brand);
}

.status-dot.sending {
  background: var(--amber);
}

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 720px;
}

.signal-strip {
  position: absolute;
  inset: 6% 0 auto;
  display: grid;
  gap: 20px;
  opacity: 0.55;
}

.signal-strip span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31, 103, 210, 0.65), transparent);
  animation: slideSignal 5s linear infinite;
}

.signal-strip span:nth-child(2) {
  animation-delay: -1.2s;
}

.signal-strip span:nth-child(3) {
  animation-delay: -2.4s;
}

.phone {
  width: min(390px, 92vw);
  aspect-ratio: 390 / 790;
  padding: 12px;
  border: 1px solid #273246;
  border-radius: 34px;
  background: #0f1725;
  box-shadow: var(--shadow);
}

.phone-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 16px 10px;
  color: #e9eef7;
  font-size: 12px;
  font-weight: 800;
}

.phone-top span:last-child {
  text-align: right;
}

.sensor {
  width: 86px;
  height: 22px;
  border-radius: 99px;
  background: #05070d;
}

.app-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100% - 36px);
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px 14px;
}

.app-header h2,
.step-title h3,
.history-head h3,
.empty-state h3 {
  margin: 4px 0 0;
  font-size: 25px;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--brand);
  background: #eaf2ff;
  border-radius: 8px;
}

.icon-button.dark {
  color: var(--white);
  background: var(--ink);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 20px 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f9;
}

.tab {
  min-height: 36px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.tab.active {
  color: var(--white);
  background: var(--brand);
}

.screens {
  position: relative;
  flex: 1;
  min-height: 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px 20px 22px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: 260ms ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.empty-state {
  display: grid;
  flex: 1;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.radar {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  margin-bottom: 16px;
}

.radar > span {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(31, 103, 210, 0.23);
  border-radius: 999px;
  animation: radar 3s infinite;
}

.radar > span:nth-child(2) {
  animation-delay: 0.8s;
}

.radar > span:nth-child(3) {
  animation-delay: 1.6s;
}

.camera-glyph {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(145deg, var(--brand), var(--aqua));
  border-radius: 18px;
  box-shadow: 0 20px 42px rgba(31, 103, 210, 0.32);
}

.primary-action,
.primary-small,
.secondary-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 28px rgba(31, 103, 210, 0.28);
}

.primary-small {
  min-width: 120px;
  padding: 0 18px;
  color: var(--white);
  background: var(--brand);
}

.secondary-action {
  padding: 0 16px;
  color: var(--ink);
  background: #edf1f6;
}

.step-title {
  padding-top: 8px;
}

.video-frame {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(transparent 95%, rgba(255, 255, 255, 0.18) 95%),
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.14) 95%),
    linear-gradient(145deg, #1c2c42, #101824);
  background-size: 100% 24px, 24px 100%, auto;
}

.scan-line {
  position: absolute;
  inset: 0 0 auto;
  height: 76px;
  background: linear-gradient(180deg, transparent, rgba(25, 180, 198, 0.28), transparent);
  animation: scan 2.5s infinite ease-in-out;
}

.equipment-visual {
  position: absolute;
  inset: 54px 34px 42px;
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.equipment-visual div {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.equipment-visual div:first-child {
  grid-row: span 2;
  background: linear-gradient(145deg, rgba(31, 103, 210, 0.36), rgba(25, 180, 198, 0.2));
}

.recording-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  color: var(--white);
  background: rgba(13, 22, 36, 0.76);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.recording-pill i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #ff5c5c;
  animation: pulse 1s infinite;
}

.bottom-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.voice-card {
  display: grid;
  flex: 1;
  align-content: center;
  justify-items: center;
  gap: 26px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef4fc);
}

.waveform {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 86px;
}

.waveform span {
  width: 8px;
  height: 22px;
  border-radius: 99px;
  background: var(--brand);
  animation: wave 1.1s ease-in-out infinite;
}

.waveform span:nth-child(2) { animation-delay: 0.1s; }
.waveform span:nth-child(3) { animation-delay: 0.2s; }
.waveform span:nth-child(4) { animation-delay: 0.3s; }
.waveform span:nth-child(5) { animation-delay: 0.4s; }
.waveform span:nth-child(6) { animation-delay: 0.5s; }
.waveform span:nth-child(7) { animation-delay: 0.6s; }

.ptt-button {
  display: grid;
  width: 106px;
  height: 106px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(31, 103, 210, 0.33);
}

.ptt-button.recording {
  background: linear-gradient(145deg, #d64040, #8e1f1f);
  animation: ptt 0.9s infinite;
}

.voice-card p {
  width: min(230px, 80%);
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-list button,
.server-card,
.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.review-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 16px;
  text-align: left;
}

.review-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-list strong {
  font-size: 18px;
}

.review-list em {
  grid-row: span 2;
  align-self: center;
  color: var(--brand);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.server-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.server-card svg {
  flex: 0 0 auto;
  color: var(--aqua);
}

.confirm {
  margin-top: auto;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.history-item {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.history-item.new {
  animation: popIn 0.38s ease both;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.history-item strong {
  font-size: 15px;
}

.history-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  content: "";
}

.status-pill.registered {
  color: #116244;
  background: #e6f6ef;
}

.status-pill.registered::before {
  background: var(--green);
}

.status-pill.sent {
  color: #123c7f;
  background: #eaf2ff;
}

.status-pill.sent::before {
  background: var(--brand);
}

.status-pill.sending {
  color: #7b3e0b;
  background: #fff1df;
}

.status-pill.sending::before {
  background: var(--amber);
  animation: pulse 1.2s infinite;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e1e7ef;
}

.progress-track span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--aqua));
}

.status-pill.sending + .progress-track span {
  animation: upload 2.4s infinite ease-in-out;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

@keyframes radar {
  from {
    inset: 50%;
    opacity: 0.8;
  }
  to {
    inset: 0;
    opacity: 0;
  }
}

@keyframes scan {
  0%, 100% { transform: translateY(-80px); }
  50% { transform: translateY(270px); }
}

@keyframes wave {
  0%, 100% { height: 22px; opacity: 0.55; }
  50% { height: 78px; opacity: 1; }
}

@keyframes ptt {
  50% { box-shadow: 0 0 0 15px rgba(214, 64, 64, 0.15); }
}

@keyframes upload {
  0% { width: 15%; transform: translateX(0); }
  50% { width: 82%; transform: translateX(8%); }
  100% { width: 42%; transform: translateX(140%); }
}

@keyframes slideSignal {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .demo-shell,
  .receiving-shell,
  .packing-shell {
    grid-template-columns: 1fr;
    padding: 74px 0 34px;
  }

  .phone-stage {
    min-height: auto;
  }

  .status-legend {
    grid-template-columns: 1fr;
  }

  .wall-scene {
    min-height: 720px;
  }

  .packing-scene {
    min-height: 720px;
  }

  .packing-stack {
    width: min(560px, calc(100% - 48px));
  }

  .goods-card ul,
  .defect-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 460px) {
  .demo-shell,
  .receiving-shell,
  .packing-shell {
    width: min(100% - 24px, 1180px);
    gap: 28px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  h1 {
    font-size: 34px;
  }

  .phone {
    width: 100%;
  }

  .wall-scene {
    min-height: 650px;
  }

  .packing-scene {
    min-height: 650px;
  }

  .tablet-stack {
    width: calc(100% - 24px);
    gap: 16px;
  }

  .wall-tablet {
    width: 100%;
    padding: 9px;
    border-radius: 22px;
  }

  .packing-tablet {
    width: 100%;
    padding: 9px;
    border-radius: 22px;
  }

  .tablet-screen {
    border-radius: 15px;
  }

  .tablet-header {
    padding: 14px 14px 8px;
  }

  .tablet-header h2 {
    font-size: 19px;
  }

  .receiving-screen {
    padding: 8px 14px 14px;
  }

  .packing-screen {
    padding: 8px 14px 78px;
  }

  .packing-screen > .primary-action,
  .packing-screen > .secondary-action {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .scan-invite {
    min-height: 180px;
  }

  .packing-card.center {
    min-height: 176px;
  }

  .scan-invite h3,
  .goods-card h3,
  .conclusion-card h3,
  .packing-card h3,
  .vms-card h3 {
    font-size: 21px;
  }

  .goods-card ul,
  .photo-panel,
  .defect-buttons,
  .camera-grid,
  .sector-view {
    grid-template-columns: 1fr;
  }

  #receive-defects .photo-panel {
    grid-template-columns: 1fr;
  }

  .camera-grid {
    max-height: 116px;
    overflow: auto;
  }

  .delivery-alert {
    min-height: 216px;
  }

  .delivery-alert strong {
    font-size: 30px;
  }

  .defect-buttons {
    max-height: 136px;
    overflow: auto;
  }

}
