@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #071018;
  --panel: #0b141e;
  --panel-2: #101b27;
  --panel-3: #071018;
  --line: rgba(108, 231, 255, .18);
  --line-strong: rgba(108, 231, 255, .42);
  --text: #f2fbff;
  --muted: #91a6b8;
  --dim: #617789;
  --cyan: #6ce7ff;
  --green: #55f0a8;
  --amber: #ffcb6b;
  --red: #ff5d7a;
  --shadow: rgba(0, 0, 0, .42);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(10, 27, 38, .96), rgba(3, 7, 12, 1) 58%, #020409),
    repeating-linear-gradient(90deg, rgba(108, 231, 255, .045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(180deg, rgba(108, 231, 255, .035) 0 1px, transparent 1px 28px);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 22% -10%, rgba(85, 240, 168, .16), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(108, 231, 255, .12), transparent 30%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: .84;
}

body::after {
  position: fixed;
  left: 0;
  right: 0;
  top: -28%;
  z-index: -1;
  height: 26%;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(108, 231, 255, .12), transparent);
  animation: sweep 7s linear infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  display: block;
}

.stage {
  width: min(100%, 430px);
  min-height: auto;
  margin: 0 auto;
  padding: 10px 10px 14px;
}

.phone-shell {
  position: relative;
  min-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(108, 231, 255, .18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 25, 36, .88), rgba(4, 8, 14, .94)),
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 5px);
  box-shadow: 0 22px 70px var(--shadow), inset 0 0 0 1px rgba(255,255,255,.025);
}

.phone-shell::before,
.phone-shell::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.phone-shell::before {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(108, 231, 255, .09), transparent 34%),
    radial-gradient(circle at 82% 9%, rgba(85, 240, 168, .12), transparent 24%);
  opacity: .8;
}

.phone-shell::after {
  top: 0;
  left: 0;
  width: 92px;
  height: 92px;
  border-top: 2px solid rgba(108, 231, 255, .5);
  border-left: 2px solid rgba(108, 231, 255, .5);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.phone-inner {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px;
}

.phone-inner > * {
  flex: 0 0 auto;
}

@media (max-height: 760px) {
  .phone-shell,
  .phone-inner {
    min-height: calc(100dvh - 16px);
  }
}

.topbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  animation: slideDown 520ms ease both;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(7, 16, 24, .78);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  box-shadow: 0 0 28px rgba(85, 240, 168, .24);
  font-family: var(--mono);
  font-weight: 900;
}

.brand-copy,
.brand-copy span {
  min-width: 0;
}

.brand-title,
.brand-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-title {
  color: #dffaff;
  font-family: var(--mono);
  font-size: 1.02rem;
  line-height: 1;
}

.brand-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1;
  font-weight: 700;
}

.top-action {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(108, 231, 255, .13);
  border-radius: 8px;
  color: #dffaff;
  background: rgba(3, 8, 14, .78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 168, .86);
  animation: pulse 1.8s ease-in-out infinite;
}

.page-title {
  margin-top: clamp(14px, 3.4dvh, 24px);
  animation: riseIn 560ms ease both 80ms;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9f8ff;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  content: "";
  background: currentColor;
  box-shadow: 0 0 14px rgba(108, 231, 255, .78);
}

h1,
h2,
p {
  margin: 0;
}

.page-title h1 {
  margin-top: clamp(8px, 1.6dvh, 12px);
  max-width: 100%;
  font-size: clamp(1.86rem, 8vw, 2.22rem);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(108, 231, 255, .1);
  overflow-wrap: anywhere;
}

.page-title p {
  margin-top: clamp(8px, 1.6dvh, 12px);
  color: #c3d3df;
  font-size: .86rem;
  line-height: 1.68;
}

.terminal,
.info-panel {
  margin-top: clamp(14px, 3dvh, 22px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 25, 36, .98), rgba(6, 11, 18, .98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .36), inset 0 0 0 1px rgba(255,255,255,.025);
  animation: riseIn 560ms ease both 150ms;
}

.terminal-head,
.panel-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(108, 231, 255, .18);
  background: rgba(6, 12, 20, .72);
}

.traffic {
  display: flex;
  gap: 6px;
}

.traffic i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.traffic i:nth-child(1) { background: var(--red); }
.traffic i:nth-child(2) { background: var(--amber); }
.traffic i:nth-child(3) { background: var(--green); }

.terminal-head strong,
.panel-head strong {
  color: #dffaff;
  font-family: var(--mono);
  font-size: .66rem;
  white-space: nowrap;
}

.terminal-body,
.panel-body {
  padding: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tab,
.query-tabs button {
  min-height: 40px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(108, 231, 255, .16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(3, 8, 14, .78);
  font-size: .74rem;
  font-weight: 900;
  line-height: 1.2;
}

.tab span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.active,
.query-tabs button.active {
  color: #061219;
  border-color: rgba(108, 231, 255, .7);
  background: var(--cyan);
}

.tab-icon svg {
  width: 16px;
  height: 16px;
}

.query-tabs {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 8px;
  margin-bottom: 13px;
}

.form-row {
  display: grid;
  gap: 9px;
  margin-bottom: 13px;
}

.form-row label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #dcf7ff;
  font-size: .84rem;
  font-weight: 800;
}

.form-row label small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: .6rem;
}

.input-shell {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  border: 1px solid rgba(108, 231, 255, .22);
  border-radius: 8px;
  background: rgba(3, 8, 14, .82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.input-shell:focus-within {
  border-color: rgba(108, 231, 255, .72);
  box-shadow: 0 0 0 3px rgba(108, 231, 255, .08), inset 0 0 0 1px rgba(255,255,255,.04);
}

.phone-input-shell {
  grid-template-columns: 72px 1fr;
}

.input-icon {
  min-height: 54px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border-right: 1px solid rgba(108, 231, 255, .12);
}

.area-code {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #dffaff;
  border-right: 1px solid rgba(108, 231, 255, .18);
  background: rgba(108, 231, 255, .07);
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 900;
}

.area-code input {
  width: 54px;
  min-height: 36px;
  padding: 0;
  text-align: center;
  color: #c8fff0;
  font-family: var(--mono);
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 54px;
  border: 0;
  outline: 0;
  color: #c8fff0;
  background: transparent;
  font-family: var(--sans);
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 12px rgba(108, 231, 255, .14);
}

input::placeholder {
  color: #506675;
  text-align: center;
}

.buy-row,
.notice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.4;
}

.buy-row a,
.notice-row b {
  color: #bff9ff;
  font-weight: 900;
  white-space: nowrap;
}

.buy-row a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.primary,
.ghost,
.btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  font-size: .94rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.primary,
.btn {
  border: 1px solid rgba(108, 231, 255, .72);
  color: rgba(4, 22, 26, .94);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 24px rgba(108, 231, 255, .22);
}

.ghost {
  margin-top: 10px;
  border: 1px solid rgba(108, 231, 255, .18);
  color: #dffaff;
  background: rgba(3, 8, 14, .78);
}

.primary:active,
.ghost:active,
.btn:active,
.top-action:active {
  transform: translateY(1px);
}

.primary:disabled,
.btn:disabled {
  opacity: .72;
  cursor: default;
}

.error-msg {
  min-height: 18px;
  margin-top: -4px;
  margin-bottom: 8px;
  color: var(--red);
  font-size: .78rem;
}

.steps {
  margin-top: clamp(10px, 2.2dvh, 16px);
  display: grid;
  gap: 8px;
  animation: riseIn 560ms ease both 220ms;
}

.step {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(108, 231, 255, .12);
  border-radius: 8px;
  background: rgba(6, 12, 20, .58);
}

.step-no {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #071018;
  background: rgba(108, 231, 255, .9);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 900;
}

.step strong {
  display: block;
  color: #edfaff;
  font-size: .78rem;
  line-height: 1.1;
}

.step span {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-size: .66rem;
  line-height: 1.25;
}

.step-state {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 168, .86);
}

.data-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.data-cell {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(108, 231, 255, .13);
  border-radius: 8px;
  background: rgba(3, 8, 14, .58);
}

.data-cell small,
.info-label,
.oi-label {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: .58rem;
  line-height: 1;
}

.data-cell strong {
  display: block;
  margin-top: 9px;
  color: #f2fbff;
  font-size: .82rem;
  line-height: 1;
  font-weight: 950;
}

.progress-panel {
  padding: 14px;
  border: 1px solid rgba(108, 231, 255, .22);
  border-radius: 8px;
  background: rgba(2, 6, 8, .86);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #35d7cc;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 900;
}

.progress-head strong {
  color: #57f4d2;
}

.bar,
.track {
  position: relative;
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(108, 231, 255, .16);
  border-radius: 8px;
  background: #03080d;
}

.bar span,
.fill,
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
  box-shadow: 0 0 18px rgba(85, 240, 168, .34);
  transition: width .36s ease;
}

.waiting-list {
  margin-top: 14px;
  list-style: none;
  display: grid;
  gap: 0;
}

.waiting-list li {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  color: #aebfc7;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.35;
  padding: 4px 18px 4px 0;
}

.waiting-list time {
  color: #8ca9a9;
  font-family: var(--mono);
  font-size: .66rem;
}

.waiting-list .task-label {
  color: #42c8bd;
}

.task-marker {
  position: absolute;
  right: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(108, 231, 255, .3);
}

.task-item.active .task-marker,
.task-item.done .task-marker {
  background: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 168, .86);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--muted);
}

.timeline-item i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(108, 231, 255, .24);
  border-radius: 8px;
  background: rgba(3, 8, 14, .78);
}

.timeline-item i::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--dim);
}

.timeline-item.done i::before,
.timeline-item.active i::before {
  background: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 168, .86);
}

.timeline-item b {
  display: block;
  color: #edfaff;
  font-size: .78rem;
}

.timeline-item small {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-size: .66rem;
  line-height: 1.38;
}

.result-badge {
  min-height: 126px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 240, 168, .32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 30, 22, .84), rgba(3, 10, 8, .9)),
    repeating-linear-gradient(135deg, rgba(85, 240, 168, .05) 0 1px, transparent 1px 9px);
  text-align: center;
}

.result-badge i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: #061611;
  background: var(--green);
  box-shadow: 0 0 30px rgba(85, 240, 168, .32);
  font-style: normal;
  font-weight: 950;
}

.result-badge strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.2;
}

.result-badge span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .72rem;
}

.info-card,
.order-info {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border: 1px solid rgba(108, 231, 255, .18);
  border-radius: 8px;
  background: rgba(4, 10, 15, .72);
}

.info-row,
.oi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(108, 231, 255, .08);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}

.info-row:last-child,
.oi-row:last-child {
  border-bottom: 0;
}

.info-value,
.oi-value {
  color: #eefbff;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 900;
  text-align: right;
  word-break: break-word;
}

.success-note {
  padding: 10px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
  text-align: center;
}

.done-btn {
  margin-top: 12px;
}

.result-empty,
.result-count {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}

.result-count {
  margin-bottom: 10px;
  color: #dffaff;
  font-family: var(--mono);
  font-weight: 900;
}

.order-item {
  border: 1px solid rgba(108, 231, 255, .18);
  border-radius: 8px;
  background: rgba(4, 10, 15, .72);
  overflow: hidden;
}

.order-item + .order-item {
  margin-top: 10px;
}

.oi-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 203, 107, .28);
  border-radius: 8px;
  color: var(--amber);
  background: rgba(255, 203, 107, .08);
}

.oi-badge.shipped {
  color: #d9fff0;
  border-color: rgba(85, 240, 168, .28);
  background: rgba(85, 240, 168, .1);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  width: min(100%, 360px);
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(15, 25, 36, .98), rgba(6, 11, 18, .98));
  box-shadow: 0 22px 70px var(--shadow);
}

.confirm-dialog h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.confirm-message {
  color: var(--muted);
  line-height: 1.7;
  font-size: .86rem;
}

.confirm-code {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(108, 231, 255, .16);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(108, 231, 255, .04);
  font-family: var(--mono);
  font-size: .82rem;
}

.confirm-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.confirm-actions .btn {
  flex: 1;
  min-height: 44px;
  margin-top: 0;
}

.confirm-actions .btn-ghost {
  color: #dffaff;
  border: 1px solid rgba(108, 231, 255, .18);
  background: rgba(3, 8, 14, .78);
  box-shadow: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.42); opacity: .65; }
}

@keyframes sweep {
  0% { transform: translateY(0); opacity: 0; }
  16% { opacity: .7; }
  100% { transform: translateY(560%); opacity: 0; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
  .stage {
    padding: 14px 10px 18px;
  }
}

@media (max-height: 760px) {
  .phone-inner {
    padding: 12px;
  }

  .topbar {
    min-height: 44px;
  }

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

  .top-action {
    width: 36px;
    height: 36px;
  }

  .terminal-body,
  .panel-body {
    padding: 12px;
  }

  .data-cell {
    min-height: 52px;
  }

  .step {
    padding: 8px;
  }
}

@media (max-width: 370px) {
  .stage {
    padding-left: 8px;
    padding-right: 8px;
  }

  .phone-inner {
    padding: 13px;
  }

  .page-title h1 {
    font-size: 1.9rem;
  }

  .tabs,
  .query-tabs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
