/* SafeLink Spy — member deliverable (funnel palette) */
:root {
  --brand-primary: #00a884;
  --brand-primary-strong: #008f6f;
  --brand-accent: #25d366;
  --brand-success: #25d366;
  --brand-gradient: linear-gradient(135deg, #00a884 0%, #25d366 100%);
  --bg-dark: #0b141a;
  --bg-primary: #111b21;
  --bg-secondary: #1f2c33;
  --bg-card: #1a272f;
  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-muted: #667781;
  --divider: rgba(255, 255, 255, 0.08);
  --red-alert: #ff3b30;
  --orange-alert: #ff9500;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-dark);
  color: var(--text-primary);
}
body {
  background:
    radial-gradient(ellipse 100% 60% at 50% -20%, rgba(0, 168, 132, 0.12), transparent 55%),
    var(--bg-dark);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); }

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 16px calc(32px + var(--safe-bottom));
  min-height: 100vh;
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 4px 2px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, #00b894 0%, #00a884 50%, #008f6f 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(0, 168, 132, 0.35);
}
.logo svg,
.logo .icon-tracker {
  width: 26px;
  height: 26px;
  display: block;
}
.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.brand strong .spy,
.brand strong .ai {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand small {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--divider);
}
.session button {
  width: auto;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text-primary);
}
.card .lead {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

input, select {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 14px 14px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.22);
}
input.invalid, input.invalid:focus {
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
input::placeholder { color: var(--text-muted); }

.field-error {
  margin: -6px 0 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #fca5a5;
  font-weight: 600;
}
.field-error[hidden] { display: none !important; }

.once-warn {
  margin: 0 0 16px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  font-size: 12.5px;
  line-height: 1.55;
}
.once-warn strong {
  display: block;
  color: #fef3c7;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Confirm number modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(5, 12, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.confirm-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.confirm-overlay[hidden] { display: none !important; }
.confirm-overlay.show[hidden] { display: flex !important; }

.confirm-modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.confirm-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}
.confirm-modal h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.confirm-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.confirm-details {
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(0, 168, 132, 0.3);
  background: rgba(0, 168, 132, 0.08);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.confirm-details div + div { margin-top: 10px; }
.confirm-details span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.confirm-details strong {
  font-size: 15px;
  color: var(--text-primary);
  word-break: break-word;
}
.confirm-modal .btn { margin-top: 0; }
.confirm-modal .btn.secondary { margin-top: 8px; }

.phone-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.phone-row select#targetCountryCode {
  width: 118px;
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 14px 8px;
  font-size: 14px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8696a0 50%),
    linear-gradient(135deg, #8696a0 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 3px), calc(100% - 9px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 22px;
}
.phone-row input#phone {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}

button.primary, .btn, button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px 16px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(180deg, #00b894 0%, #00a884 50%, #008f6f 100%);
  box-shadow: 0 8px 22px rgba(0, 168, 132, 0.35);
  font-family: inherit;
  transition: transform 0.12s, filter 0.12s;
}
button.primary:active, .btn:active, button[type="submit"]:active {
  transform: scale(0.98);
}
button.primary:disabled, button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.secondary, .btn.secondary {
  background: transparent;
  border: 1.5px solid var(--divider);
  box-shadow: none;
  color: var(--text-primary);
  margin-top: 10px;
}

.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.trust span {
  font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  background: rgba(0, 168, 132, 0.06);
}
.note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.case-item {
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-primary);
}
.case-item .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.case-item strong { font-size: 15px; color: var(--text-primary); }
.case-item .meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.45;
}
.pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.proc { background: rgba(255, 149, 0, 0.15); color: #ffb340; }
.pill.scan { background: rgba(0, 168, 132, 0.18); color: #34d399; }
.pill.ready { background: rgba(37, 211, 102, 0.18); color: #25d366; }
.case-item a, #goWait {
  display: inline-flex;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--brand-primary);
}

.hero-status { text-align: center; margin-bottom: 18px; }
.hero-status .ring {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid rgba(0, 168, 132, 0.2);
  border-top-color: var(--brand-primary);
  animation: spin 0.9s linear infinite;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--brand-success);
}
.hero-status .ring.done {
  animation: none;
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.1);
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-status h1 { font-size: 20px; margin: 0 0 6px; color: var(--text-primary); }
.hero-status p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

.eta-box {
  border-radius: 14px;
  border: 1px solid rgba(0, 168, 132, 0.35);
  background: linear-gradient(135deg, rgba(0, 168, 132, 0.14), rgba(0, 0, 0, 0.2));
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
}
.eta-box .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.eta-box .big {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.eta-box .sub { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }

.steps { list-style: none; margin: 0 0 14px; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  color: var(--text-muted);
}
.steps li:last-child { border-bottom: 0; }
.steps li.on { color: var(--text-primary); }
.steps li.done { color: #86efac; }
.steps .ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
}
.steps li.done .ic { background: rgba(37, 211, 102, 0.2); color: #86efac; }
.steps li.on .ic { background: rgba(0, 168, 132, 0.25); color: #5eead4; }

.trigger {
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-primary);
}
.trigger h3 {
  margin: 0 0 4px;
  font-size: 13px;
  color: #5eead4;
}
.trigger p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.email-promise {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(0, 168, 132, 0.35);
  background: rgba(0, 168, 132, 0.1);
  padding: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #a7f3d0;
}
.email-promise strong { color: #ecfdf5; }
.email-promise.ready {
  border-color: rgba(37, 211, 102, 0.55);
  background: rgba(37, 211, 102, 0.14);
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.12);
}
#openReport {
  margin-top: 14px;
  margin-bottom: 8px;
}

.warn-refund {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 3px solid rgba(0, 168, 132, 0.5);
  padding-left: 10px;
}

.security-alert {
  margin: 14px 0 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(248, 113, 113, 0.5);
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.5), rgba(28, 25, 23, 0.9));
  box-shadow: 0 8px 28px rgba(127, 29, 29, 0.35);
  padding: 15px 15px 16px;
}
.security-alert .sa-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.security-alert .sa-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(254, 202, 202, 0.12);
  border: 1px solid rgba(252, 165, 165, 0.4);
  display: grid;
  place-items: center;
  font-size: 17px;
}
.security-alert .sa-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #fecaca;
  line-height: 1.35;
}
.security-alert .sa-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #fecaca;
}
.security-alert .sa-body strong { color: #fff; font-weight: 700; }
.security-alert .sa-foot {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid rgba(252, 165, 165, 0.28);
  font-size: 12.5px;
  font-weight: 700;
  color: #fef2f2;
  line-height: 1.45;
}

.pre-scan {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0b141a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.pre-scan.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.pre-scan-inner {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.pre-scan-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #00b894, #008f6f);
  border: 2px solid rgba(37, 211, 102, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 0 0 6px rgba(0, 168, 132, 0.12), 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: pulseRing 1.6s ease-in-out infinite;
}
.pre-scan-avatar svg {
  width: 44px;
  height: 44px;
  display: block;
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 6px rgba(0, 168, 132, 0.12), 0 12px 40px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(0, 168, 132, 0.08), 0 12px 40px rgba(0, 0, 0, 0.4); }
}
.pre-scan h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text-primary);
}
.pre-scan .target-line {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.pre-scan .target-line strong { color: var(--brand-success); }
.pre-bars {
  text-align: left;
  margin-bottom: 16px;
}
.pre-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.pre-bar-row.on { color: var(--text-primary); }
.pre-bar-row.done { color: #86efac; }
.pre-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.pre-bar-track > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #00a884, #25d366);
  transition: width 0.4s ease;
}
.pre-scan .hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.release-promise {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 168, 132, 0.4);
  background: rgba(0, 168, 132, 0.1);
  font-size: 13px;
  line-height: 1.55;
  color: #a7f3d0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.release-promise strong {
  color: #ecfdf5;
  font-size: 13.5px;
}
.release-promise.ready {
  border-color: rgba(37, 211, 102, 0.55);
  background: rgba(37, 211, 102, 0.14);
  color: #bbf7d0;
}
