/* ==========================================================================
   AKO Language School — Payment Ticket Printer Animation
   ========================================================================== */

/* Design Tokens & Theme Variables — AKO Palette (Navy / Coral / Burgundy) */
:root {
  --bg-primary: #f6f5f7;

  --ako-navy: #1a1a2e;
  --ako-coral: #ff5252;
  --ako-burgundy: #6b2737;
  --ako-red: #E83547;

  --text-dark: #1a1a2e;
  --text-muted: #6b6b7d;

  /* Authentic Thermal Paper Tokens — real receipt paper is plain white with faint warm tint */
  --paper-bg: #fefefe;
  --paper-ink: #1a1a2e;
  --paper-subtle: #6b6b7d;
  --paper-border: #e4e3e8;

  /* Typography — AKO uses Futura; Jost is the closest free geometric-sans (Futura isn't on Google Fonts) */
  --font-ui: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Realistic paper shadow — soft, natural depth like a piece of paper on a desk */
  --shadow-paper:
    0 1px 2px rgba(26, 26, 46, 0.06),
    0 4px 12px rgba(26, 26, 46, 0.06),
    0 16px 40px rgba(26, 26, 46, 0.08),
    0 32px 70px -10px rgba(26, 26, 46, 0.10);

  --shadow-slot: inset 0 6px 12px rgba(25, 12, 2, 0.95), inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-primary) !important;
  font-family: var(--font-ui);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   Main Layout & Centered Viewport
   ========================================================================== */
.app-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3.5rem 1.5rem 6rem 1.5rem;
  background: var(--bg-primary) !important;
  position: relative;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Printer Stage & Single Unified 3D Metallic Dispenser Machine
   ========================================================================== */
.printer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 540px;
  position: relative;
}

/* Unified Metallic Gold Machine Unit */
.machine-unit {
  width: min(400px, 88vw);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 30;
}

/* Top 3D Metallic Hood */
.machine-hood-top {
  width: 100%;
  height: 46px;
  border-radius: 16px 16px 4px 4px;
  background: linear-gradient(180deg,
    #ffffff 0%,
    #fbf4e8 15%,
    #e9cf9f 45%,
    #d19e54 75%,
    #b37f35 100%
  );
  box-shadow:
    0 -2px 6px rgba(255, 255, 255, 0.9),
    0 10px 20px rgba(179, 127, 53, 0.28),
    inset 0 2px 2px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(105, 68, 16, 0.45);
  position: relative;
  overflow: hidden;
  z-index: 25;
}

/* Dispenser Status LED */
.hood-status-led {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  z-index: 26;
}

.hood-status-led.printing {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.95);
  animation: ledPulse 0.45s ease-in-out infinite alternate;
}

@keyframes ledPulse {
  from { opacity: 0.5; transform: translateY(-50%) scale(0.85); }
  to   { opacity: 1; transform: translateY(-50%) scale(1.25); }
}

.hood-highlight {
  position: absolute;
  top: 3px;
  left: 5%;
  width: 90%;
  height: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%);
  border-radius: 999px;
  filter: blur(1px);
}

/* Dark Slit Opening in middle where paper emerges */
.machine-slot-slit {
  width: 87.5%;
  height: 12px;
  margin-top: -6px;
  background: #0f0a03;
  border-radius: 2px;
  box-shadow: var(--shadow-slot);
  position: relative;
  z-index: 5;
}

/* Flash line during cutter blade slice action */
.cutter-blade-flash {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #ffffff 50%, rgba(255,255,255,0) 100%);
  box-shadow: 0 0 10px #ffffff;
  z-index: 35;
  opacity: 0;
  pointer-events: none;
}

.cutter-blade-flash.active {
  animation: cutterBladeFlash 0.35s ease-out forwards;
}

@keyframes cutterBladeFlash {
  0% { opacity: 0; transform: translateX(-50%) scaleX(0.1); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(1); }
}

/* Bottom Machine Lip Base attached directly under slit */
.machine-hood-bottom {
  width: 100%;
  height: 14px;
  margin-top: -4px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #9e6d2b 0%, #d8b478 40%, #fff7ea 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}

.hood-shadow {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
}

/* Paper Viewport — Emerges directly from dark slit line (top: 41px) */
.paper-viewport {
  position: absolute;
  top: 41px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  /* Inset clip mask: Clips 0px at top (slit line), but -60px on sides & bottom so shadows cast freely! */
  clip-path: inset(0px -60px -1200px -60px);
  z-index: 8;
  padding-bottom: 20px;
  pointer-events: none;
  /* 3D Stage Perspective */
  perspective: 1200px;
  perspective-origin: 50% 0%;
  /* Filter drop-shadow projects shadow around the exact 3D serrated paper shape! */
  filter: drop-shadow(0 12px 20px rgba(20, 15, 5, 0.14));
}

/* ==========================================================================
   Ticket Paper Component — Authentic Thermal Paper Look
   ========================================================================== */
.receipt-paper-wrapper {
  width: 86.8%;
  margin: 0 auto;
  background-color: var(--paper-bg);
  position: relative;
  transform-origin: top center;
  transform-style: preserve-3d;
  user-select: none;
  pointer-events: auto;
  border-radius: 22px 22px 0 0;
  /* Authentic POS Thermal Cutter Serrated Teeth Clip-Path at Bottom */
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% calc(100% - 10px),
    98.33% 100%, 96.67% calc(100% - 10px),
    95.00% 100%, 93.33% calc(100% - 10px),
    91.67% 100%, 90.00% calc(100% - 10px),
    88.33% 100%, 86.67% calc(100% - 10px),
    85.00% 100%, 83.33% calc(100% - 10px),
    81.67% 100%, 80.00% calc(100% - 10px),
    78.33% 100%, 76.67% calc(100% - 10px),
    75.00% 100%, 73.33% calc(100% - 10px),
    71.67% 100%, 70.00% calc(100% - 10px),
    68.33% 100%, 66.67% calc(100% - 10px),
    65.00% 100%, 63.33% calc(100% - 10px),
    61.67% 100%, 60.00% calc(100% - 10px),
    58.33% 100%, 56.67% calc(100% - 10px),
    55.00% 100%, 53.33% calc(100% - 10px),
    51.67% 100%, 50.00% calc(100% - 10px),
    48.33% 100%, 46.67% calc(100% - 10px),
    45.00% 100%, 43.33% calc(100% - 10px),
    41.67% 100%, 40.00% calc(100% - 10px),
    38.33% 100%, 36.67% calc(100% - 10px),
    35.00% 100%, 33.33% calc(100% - 10px),
    31.67% 100%, 30.00% calc(100% - 10px),
    28.33% 100%, 26.67% calc(100% - 10px),
    25.00% 100%, 23.33% calc(100% - 10px),
    21.67% 100%, 20.00% calc(100% - 10px),
    18.33% 100%, 16.67% calc(100% - 10px),
    15.00% 100%, 13.33% calc(100% - 10px),
    11.67% 100%, 10.00% calc(100% - 10px),
    8.33% 100%, 6.67% calc(100% - 10px),
    5.00% 100%, 3.33% calc(100% - 10px),
    1.67% 100%, 0% calc(100% - 10px)
  );
}

/* Subtle thermal paper grain texture overlay */
.receipt-paper-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* 3D Paper Light Reflection Sheen Overlay */
.receipt-paper-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 35%,
    rgba(0, 0, 0, 0.02) 75%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
  z-index: 3;
}

/* Retracted State (Only bottom shift cutter edge peeks out under slit!) */
.receipt-paper-wrapper.retracted {
  transform: translateY(-93%) rotateX(-16deg) translateZ(-25px);
}

/* Printed State (Fully extended down out of slit) */
.receipt-paper-wrapper.printed {
  transform: translateY(0%) rotateX(0deg) translateZ(0px);
}

/* Classic Mechanical Step 3D Animation — 3D stepper feed (2.5s) */
.receipt-paper-wrapper.printing-classic {
  animation: printMechanical3D 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes printMechanical3D {
  0% {
    transform: translateY(-93%) rotateX(-16deg) translateZ(-25px);
    opacity: 0.6;
  }
  15% {
    transform: translateY(-78%) rotateX(-12deg) translateZ(14px);
    opacity: 0.85;
  }
  35% {
    transform: translateY(-56%) rotateX(-8deg) translateZ(22px);
    opacity: 0.95;
  }
  60% {
    transform: translateY(-30%) rotateX(-5deg) translateZ(18px);
    opacity: 1;
  }
  82% {
    transform: translateY(-8%) rotateX(-2deg) translateZ(8px);
  }
  100% {
    transform: translateY(0%) rotateX(0deg) translateZ(0px);
    opacity: 1;
  }
}

/* Smooth Fluid Easing 3D Animation — continuous 3D unroll curve (2.5s) */
.receipt-paper-wrapper.printing-smooth {
  animation: printSmooth3D 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes printSmooth3D {
  0% {
    transform: translateY(-93%) rotateX(-18deg) translateZ(-30px) scale(0.97);
    opacity: 0.4;
  }
  20% {
    transform: translateY(-70%) rotateX(-12deg) translateZ(20px) scale(0.985);
    opacity: 0.85;
  }
  45% {
    transform: translateY(-40%) rotateX(-6deg) translateZ(26px) scale(0.995);
    opacity: 1;
  }
  75% {
    transform: translateY(-12%) rotateX(-2deg) translateZ(10px) scale(1);
  }
  90% {
    transform: translateY(1%) rotateX(0.8deg) translateZ(2px) scale(1);
  }
  100% {
    transform: translateY(0%) rotateX(0deg) translateZ(0px) scale(1);
    opacity: 1;
  }
}

/* Micro-vibration effect during classic mode */
.receipt-paper-wrapper.vibrating {
  animation: receiptVibrate 0.05s infinite alternate ease-in-out;
}

@keyframes receiptVibrate {
  0% { transform: translateX(-0.4px); }
  100% { transform: translateX(0.4px); }
}

/* Authentic Hand-Tear Tear-Away Animation */
.receipt-paper-wrapper.tearing {
  animation: paperTearAway 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
  transform-origin: top right;
}

@keyframes paperTearAway {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  20% {
    transform: translateY(6px) translateX(18px) rotate(-3deg);
    opacity: 1;
  }
  50% {
    transform: translateY(14px) translateX(55px) rotate(-8deg) scale(0.98);
    opacity: 0.8;
  }
  100% {
    transform: translateY(22px) translateX(110px) rotate(-14deg) scale(0.94);
    opacity: 0;
  }
}

/* ==========================================================================
   Ticket Content — Payment Ticket Layout (Order ID / Amount / Date / Status / Card / Barcode)
   ========================================================================== */
.receipt-content {
  padding: 1.75rem 1.5rem 1.75rem 1.5rem;
  color: var(--paper-ink);
  position: relative;
  z-index: 2;
}

/* 1. Ticket Header: Badge + Title + Subtitle */
.ticket-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.4rem;
}

.status-badge-wrap {
  margin-bottom: 0.75rem;
}

.status-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff0f0 0%, #ffd9d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b2737;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 2px 6px rgba(255, 82, 82, 0.18);
}

.ticket-title {
  font-family: var(--font-ui);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a1a2e;
  margin-bottom: 0.35rem;
}

.ticket-sub {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b6b7d;
  line-height: 1.4;
  max-width: 240px;
}

/* 2. Perforation Divider with Side Notches */
.ticket-perforation {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 -1.5rem 1.3rem -1.5rem;
  padding: 0 1.5rem;
}

.ticket-perforation .dash-line {
  flex: 1;
  height: 0;
  border-bottom: 2px dashed #e3e6ec;
}

.ticket-perforation .notch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.ticket-perforation .notch-left { margin-right: -9px; margin-left: -9px; }
.ticket-perforation .notch-right { margin-left: -9px; margin-right: -9px; }

/* 3. Ticket Details */
.ticket-details {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.detail-col {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.detail-col.align-right {
  align-items: flex-end;
  text-align: right;
}

.detail-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9797a6;
}

.detail-val {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a1a2e;
}

.detail-val.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.detail-val.amount-val {
  color: #ff5252;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Payment Method Pill */
.payment-card-pill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f6f7f9;
  margin-top: 0.2rem;
}

.card-brand-logo {
  position: relative;
  width: 30px;
  height: 20px;
  flex-shrink: 0;
}

.mc-circle {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.mc-circle.mc-red { left: 0; background: #eb001b; }
.mc-circle.mc-yellow { left: 10px; background: #f79e1b; mix-blend-mode: multiply; }

.payment-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cardholder-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a2e;
}

.card-dots {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8b8b9c;
}

/* 4. Barcode Footer */
.ticket-code-section {
  display: flex;
  justify-content: center;
  padding-top: 0.4rem;
}

.barcode-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.barcode-lines {
  width: 200px;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #222 0px,
    #222 1.5px,
    transparent 1.5px,
    transparent 3px,
    #222 3px,
    #222 4px,
    transparent 4px,
    transparent 5.5px,
    #222 5.5px,
    #222 8px,
    transparent 8px,
    transparent 9.5px
  );
}

.barcode-num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #6b6b7d;
}

/* serrated-edge padding spacer */
.serrated-edge {
  width: 100%;
  height: 12px;
}

/* ==========================================================================
   Centered Action Status & Dynamic Layout Spacing
   ========================================================================== */
.stage-info {
  margin-top: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 40;
  transition: margin-top 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When ticket is fully printed down, push stage-info down smoothly! */
.printer-stage.has-printed .stage-info {
  margin-top: 31rem;
}

.status-heading {
  font-size: 1.7rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  font-family: var(--font-ui);
}

.status-subtext {
  font-size: 0.92rem;
  color: #6b6b7d;
  margin-bottom: 1.6rem;
  font-family: var(--font-ui);
}

/* Centered Main Buttons Bar */
.centered-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0 0.5rem;
}

/* Print Action Button — AKO Navy */
.print-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.78rem 1.75rem;
  border-radius: 12px;
  border: 1px solid #1a1a2e;
  background: linear-gradient(180deg, #2b2b47 0%, #1a1a2e 100%);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.22), 0 2px 4px rgba(26, 26, 46, 0.08);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.print-action-btn:hover {
  background: linear-gradient(180deg, #35355a 0%, #23233d 100%);
  border-color: #23233d;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26, 26, 46, 0.3), 0 4px 8px rgba(26, 26, 46, 0.1);
}

.print-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(26, 26, 46, 0.15);
}

.print-action-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.secondary-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.25rem;
  border-radius: 12px;
  border: 1px dashed #c9c9d6;
  background: rgba(246, 245, 247, 0.8);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.22s ease;
}

.secondary-action-btn:hover {
  background: #ff5252;
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ==========================================================================
   Final WhatsApp CTA Card — Shown after "Continue"
   ========================================================================== */
.final-card {
  width: 100%;
  max-width: 380px;
  margin: 1.5rem auto 0 auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow-paper);
  padding: 2.2rem 1.8rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: finalCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes finalCardIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.final-check-icon,
.success-icon-stage {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem auto;
  z-index: 1;
}

.success-icon-wrapper {
  width: 72px;
  height: 72px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.30), inset 0 -4px 0 rgba(0,0,0,0.1);
  position: relative;
  z-index: 2;
}

.success-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin-top: -36px;
  margin-left: -36px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.6);
  z-index: -1;
  opacity: 0;
  animation: ringPulse 1.2s ease-out var(--ring-delay, 0s) infinite;
}

@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.6); opacity: 0; }
}

.final-title {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.final-body {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.55;
  margin-bottom: 1.2rem;
}

.final-secure-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: #f6f7f9;
  color: #4b5563;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.final-secure-line svg {
  flex-shrink: 0;
  color: #16a34a;
}

.final-divider {
  width: 100%;
  height: 0;
  border-bottom: 1px dashed #e3e6ec;
  margin-bottom: 1.3rem;
}

.final-nextstep {
  width: 100%;
  text-align: center;
  margin-bottom: 1.4rem;
}

.final-nextstep-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ako-red);
  margin-bottom: 0.4rem;
}

.final-nextstep-desc {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  color: #4b5563;
  line-height: 1.5;
}

.whatsapp-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  background: var(--ako-red);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(232, 53, 71, 0.28), 0 2px 6px rgba(232, 53, 71, 0.15);
  transition: all 0.22s ease;
  margin-bottom: 0.7rem;
}

.whatsapp-btn:hover {
  background: #d42638;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(232, 53, 71, 0.34), 0 4px 8px rgba(232, 53, 71, 0.18);
}

.secondary-action-btn.full-width {
  width: 100%;
  justify-content: center;
  border: 1px solid var(--ako-red);
  background: transparent;
  color: var(--ako-red);
}

.secondary-action-btn.full-width:hover {
  background: #fff0f1;
  color: var(--ako-red);
  transform: translateY(-2px);
}



/* ==========================================================================
   Verification Stage — shown when clicking Continue, before the final card
   ========================================================================== */
.verification-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  min-height: 380px;
  margin: 1.5rem auto 0 auto;
}

.ripple-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  z-index: 1;
  pointer-events: none;
}

.ripple-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, rgba(34, 197, 94, 0.005) 100%);
  transform: scale(0);
  opacity: 0;
  animation: rippleExpand 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: calc(var(--ring-i) * 0.15s);
}

@keyframes rippleExpand {
  from { transform: scale(0); opacity: 0; }
  15%  { opacity: 1; }
  to   { transform: scale(24); opacity: 0; }
}

.token-container {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.icon-morph-container {
  width: 56px;
  height: 56px;
  background: #22c55e;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.28);
  z-index: 2;
  transition: background-color 0.4s ease, border-radius 0.4s ease, box-shadow 0.4s ease;
}

.icon-morph-container.success-bg {
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
}

.icon-morph-container svg {
  color: white;
  animation: iconPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes iconPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.verification-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transform: rotate(-90deg);
}

#progressRing {
  transition: stroke 0.3s ease;
}

#progressRing.unlocked {
  stroke: #22c55e;
}

.verification-text-container {
  position: absolute;
  bottom: -44px;
  width: 100%;
  text-align: center;
}

.verify-title {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: #6b6b7d;
  margin-bottom: 4px;
  font-weight: 500;
}

.verify-percent {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
}
