:root {
  --bg: #03130c;
  --panel: #081d13;
  --panel-2: #0e2b1c;
  --ink: #ecfff5;
  --muted: #9ec4ad;
  --faint: #557a62;
  --line: #1e4932;
  --line-2: #2b6746;
  --green: #39e29c;
  --green-2: #12b978;
  --yellow: #facc15;
  --red: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(57, 226, 156, .16), transparent 280px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 38px),
    var(--bg);
}

.page-index,
.page-recharge {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
}

.mobile-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 6px 0 28px;
}

.app-hero {
  padding: 18px 4px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-badge {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background:
    linear-gradient(145deg, rgba(57, 226, 156, .22), rgba(57, 226, 156, .04)),
    var(--panel);
  border: 1px solid rgba(57, 226, 156, .3);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
}

.icon-badge svg { width: 25px; height: 25px; }

.auth-logo h1,
.search-page-header h1 {
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: 0;
}

.auth-logo .sub,
.search-page-header .sub,
.step .desc {
  color: var(--muted);
  font-size: .9rem;
}

.hero-panel {
  margin-top: 22px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(57, 226, 156, .12), rgba(57, 226, 156, .025)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--green);
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-panel strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.3;
}

.hero-panel p {
  margin-top: 8px;
  color: var(--faint);
  font-size: .86rem;
}

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

.badge {
  padding: 8px 6px;
  text-align: center;
  border-radius: 999px;
  background: rgba(8, 29, 19, .82);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}

.action-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0 10px;
  padding: 4px;
  background: rgba(8, 29, 19, .72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.action-tab,
.nav-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  border-radius: 12px;
}

.action-tab.active,
.nav-link:hover {
  color: #052016;
  background: var(--green);
}

.auth-card,
.recharge-card,
.search-page-card {
  margin-top: 12px;
  padding: 18px;
  background: rgba(8, 29, 19, .88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 26px 80px rgba(0,0,0,.32);
}

.form-field { margin-bottom: 14px; }

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.input,
.phone-group {
  width: 100%;
  min-height: 50px;
  color: var(--ink);
  background: #06170f;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.input {
  padding: 13px 14px;
  font-size: .98rem;
  font-family: var(--font);
}

.code-input {
  font-family: var(--mono);
  letter-spacing: .03em;
}

.input::placeholder { color: #42634e; }
.input:focus,
.phone-group:focus-within {
  border-color: rgba(57, 226, 156, .7);
  box-shadow: 0 0 0 4px rgba(57, 226, 156, .08);
}

.error-msg {
  min-height: 18px;
  margin-top: 6px;
  color: var(--red);
  font-size: .76rem;
}

.btn {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .98rem;
  font-weight: 850;
  cursor: pointer;
}

.btn-primary {
  color: #04170f;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent),
    linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 16px 38px rgba(18, 185, 120, .26);
}

.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.btn-ghost {
  color: var(--muted);
  background: #06170f;
  border: 1px solid var(--line);
  box-shadow: none;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(1, 10, 6, .76);
  backdrop-filter: blur(12px);
}

.confirm-dialog {
  width: min(100%, 420px);
  padding: 24px 18px 20px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(57, 226, 156, .12), rgba(57, 226, 156, .025)),
    var(--panel);
  border: 1px solid rgba(57, 226, 156, .24);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0,0,0,.48);
}

.confirm-dialog h2 {
  text-align: center;
  font-size: 1.28rem;
  line-height: 1.3;
}

.confirm-dialog p {
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
}

.confirm-code {
  min-height: 86px;
  margin: 20px 0 16px;
  padding: 18px 16px;
  background: #06170f;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.confirm-code span {
  display: block;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 800;
}

.confirm-code strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.confirm-message {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.process-strip div {
  padding: 12px 8px;
  background: rgba(8, 29, 19, .58);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.process-strip span {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: .68rem;
}

.process-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .76rem;
}

.card-footer {
  margin-top: 16px;
  text-align: center;
  color: var(--faint);
  font-size: .8rem;
}

.card-footer a { color: var(--green); text-decoration: none; }

.compact-topbar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: .82rem;
}

.back-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 800;
}

.step-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.step-index {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 900;
  background: rgba(57, 226, 156, .1);
  border: 1px solid rgba(57, 226, 156, .24);
  border-radius: 14px;
}

.step { text-align: left; }
.step h2 { font-size: 1.25rem; }
.step .desc { margin-top: 3px; }

.phone-group {
  display: flex;
  overflow: hidden;
}

.phone-prefix-input {
  width: 70px;
  flex-shrink: 0;
  padding: 0 8px;
  color: var(--green);
  background: rgba(57, 226, 156, .06);
  border: 0;
  border-right: 1px solid var(--line);
  text-align: center;
  font-family: var(--mono);
  outline: none;
}

.phone-group input[type="tel"] {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: .98rem;
}

.progress-group { margin: 8px 0 14px; }
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.progress-label {
  color: var(--faint);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.progress-value {
  color: var(--green);
  font-family: var(--mono);
  font-weight: 900;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #06170f;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: 999px;
  transition: width .35s ease;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: .86rem;
}

.task-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #06170f;
  overflow: hidden;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 73, 50, .72);
  opacity: .38;
}

.task-item:last-child { border-bottom: 0; }
.task-item.active,
.task-item.done { opacity: 1; }

.task-marker {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}

.task-item.active .task-marker {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(57, 226, 156, .12);
}

.task-item.done .task-marker { background: var(--green); }
.task-label { flex: 1; color: var(--muted); font-size: .86rem; }
.task-check { color: var(--green); opacity: 0; font-size: .76rem; }
.task-item.done .task-check { opacity: 1; }

.success-ring {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--green);
  background: rgba(57, 226, 156, .1);
  border: 1px solid rgba(57, 226, 156, .3);
  border-radius: 22px;
}

#stepSuccess { text-align: center; }

.info-card {
  margin: 16px 0;
  padding: 14px;
  background: #06170f;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.info-row,
.oi-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(30, 73, 50, .6);
}

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

.info-label,
.oi-label {
  color: var(--faint);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.info-value,
.oi-value {
  color: var(--ink);
  font-family: var(--mono);
  font-size: .82rem;
  text-align: right;
}

.search-page-header { margin-bottom: 18px; }
.search-page-header .sub { margin-top: 6px; }
.search-form { display: grid; gap: 12px; }
.result-area { margin-top: 16px; }
.result-empty,
.result-count {
  color: var(--faint);
  font-size: .84rem;
  text-align: center;
  padding: 14px;
}

.order-item {
  margin-top: 10px;
  padding: 14px;
  background: #06170f;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.oi-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: .74rem;
  font-weight: 800;
}

.oi-badge.pending { color: var(--yellow); background: rgba(250, 204, 21, .12); }
.oi-badge.shipped { color: var(--green); background: rgba(57, 226, 156, .12); }

@media (min-width: 720px) {
  .mobile-shell { max-width: 460px; padding-top: 20px; }
}
