:root {
  --np-bg: #EFF3F6;
  --np-surface: #FFFFFF;
  --np-ink: #10202C;
  --np-ink-soft: #55707C;
  --np-ink-faint: #8CA0A9;
  --np-primary: #0B4F6C;
  --np-primary-dark: #073349;
  --np-accent: #17C3B2;
  --np-accent-dark: #0E8F82;
  --np-warm: #FFB020;
  --np-success: #1F9D63;
  --np-success-bg: #E5F6EC;
  --np-danger: #D8433F;
  --np-danger-bg: #FBEAE9;
  --np-border: #E1E8ED;
  --np-radius: 14px;
  --np-radius-sm: 9px;
  --np-shadow: 0 1px 2px rgba(16, 32, 44, 0.04), 0 8px 24px rgba(16, 32, 44, 0.06);
  --np-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --np-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--np-bg);
  color: var(--np-ink);
  font-family: var(--np-font);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

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

.np-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--np-bg);
}

/* ---------- HEADER ---------- */
.np-header {
  background: linear-gradient(155deg, var(--np-primary) 0%, var(--np-primary-dark) 100%);
  padding: 28px 20px 32px;
  border-radius: 0 0 24px 24px;
}

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

.np-signal {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  padding: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
}
.np-signal i {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: var(--np-accent);
  animation: np-pulse 1.6s ease-in-out infinite;
}
.np-signal i:nth-child(1) { height: 6px; animation-delay: 0s; }
.np-signal i:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.np-signal i:nth-child(3) { height: 14px; animation-delay: 0.3s; }
.np-signal i:nth-child(4) { height: 18px; animation-delay: 0.45s; }

@keyframes np-pulse {
  0%, 100% { opacity: 0.5; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
}

.np-brand-text h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.np-brand-text p {
  margin: 2px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

/* ---------- MAIN ---------- */
.np-main {
  flex: 1;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- AD CAROUSEL ---------- */
.np-ads {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--np-radius);
  overflow: hidden;
  background: #DCE4E9;
  box-shadow: var(--np-shadow);
}

.np-ads-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.np-ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.np-ad-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.np-ad-slide img,
.np-ad-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-ad-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 14px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}

.np-ads-dots {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.np-ads-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}
.np-ads-dots span.is-active {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

/* ---------- WELCOME ---------- */
.np-welcome {
  margin: 0;
  font-size: 14px;
  color: var(--np-ink-soft);
  text-align: center;
}

/* ---------- TABS ---------- */
.np-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  border-radius: 999px;
  padding: 4px;
}

.np-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 11px 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--np-font);
  color: var(--np-ink-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.np-tab[aria-selected="true"] { color: #fff; }

.np-tab-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--np-primary);
  border-radius: 999px;
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 0;
}
.np-tabs--voucher .np-tab-pill {
  transform: translateX(100%);
}

/* ---------- PANELS ---------- */
.np-panels {
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius);
  padding: 18px 16px 20px;
  box-shadow: var(--np-shadow);
  min-height: 220px;
}

.np-panel[hidden] { display: none; }

.np-step {
  animation: np-fade-slide 0.35s ease;
}
.np-step[hidden] { display: none; }

@keyframes np-fade-slide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- PACKAGES ---------- */
.np-packages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.np-package-card {
  position: relative;
  text-align: left;
  border: 1.5px solid transparent;
  background: linear-gradient(160deg, #16283A 0%, #0F1E2C 100%);
  border-radius: var(--np-radius-sm);
  padding: 14px 14px 13px;
  cursor: pointer;
  font-family: var(--np-font);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.1s ease;
}
.np-package-card:active { transform: scale(0.98); }
.np-package-card.is-selected {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 1px var(--np-accent);
}
.np-package-card.is-featured {
  border-color: rgba(23, 195, 178, 0.45);
}

.np-package-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--np-accent);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.np-package-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.np-package-desc {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
  min-height: 30px;
}
.np-package-price {
  display: block;
  font-family: var(--np-font-mono);
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}
.np-package-price small {
  font-family: var(--np-font);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
}
.np-package-speed {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

.np-package-card.is-selected::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--np-accent);
  box-shadow: inset 0 0 0 3px #0F1E2C;
}

.np-package-ribbon {
  position: absolute;
  top: 11px;
  right: -30px;
  width: 110px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--np-accent), var(--np-accent-dark));
  color: #04342C;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 3px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ---------- FIELDS / BUTTONS ---------- */
.np-field {
  display: block;

  margin-bottom: 14px;
}
.np-field span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--np-ink-soft);
  margin-bottom: 6px;
}
.np-field input {
  width: 100%;
  font-family: var(--np-font);
  font-size: 16px;
  padding: 12px 14px;
  border-radius: var(--np-radius-sm);
  border: 1.5px solid var(--np-border);
  background: var(--np-bg);
  color: var(--np-ink);
  outline: none;
  transition: border-color 0.2s ease;
}
.np-field input:focus {
  border-color: var(--np-primary);
}
.np-voucher-input {
  font-family: var(--np-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 18px !important;
  text-align: center;
}

.np-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--np-radius-sm);
  font-family: var(--np-font);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.np-btn:active { transform: scale(0.98); }
.np-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.np-btn-primary {
  background: var(--np-accent);
  color: #04342C;
}
.np-btn-ghost {
  background: transparent;
  color: var(--np-ink-soft);
  margin-top: 6px;
}

.np-error {
  color: var(--np-danger);
  background: var(--np-danger-bg);
  border-radius: var(--np-radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin: 10px 0 0;
}

.np-voucher-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--np-ink-soft);
}

/* ---------- CONTACT NOTICE (shown when MoMo is disabled by admin) ---------- */
.np-contact-notice {
  text-align: center;
  padding: 20px 16px;
  border-radius: var(--np-radius-sm);
  background: linear-gradient(160deg, #16283A 0%, #0F1E2C 100%);
  border: 1px solid rgba(23, 195, 178, 0.25);
}
.np-contact-notice-text {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}
.np-contact-notice-actions {
  display: flex;
  gap: 10px;
}
.np-contact-notice-actions .np-btn[hidden] { display: none; }
.np-contact-notice-actions .np-btn {
  flex: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.np-contact-notice-actions .np-btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* ---------- WAITING / SUCCESS / FAIL ---------- */
.np-step-center {
  text-align: center;
  padding: 8px 4px 4px;
}

.np-spinner {
  width: 40px;
  height: 40px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 3px solid var(--np-border);
  border-top-color: var(--np-primary);
  animation: np-spin 0.85s linear infinite;
}
@keyframes np-spin { to { transform: rotate(360deg); } }

.np-waiting-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}
.np-waiting-sub {
  font-size: 13.5px;
  color: var(--np-ink-soft);
  margin: 0 0 14px;
}
.np-waiting-amount {
  font-family: var(--np-font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--np-primary);
  margin: 0 0 18px;
}

.np-check {
  width: 64px;
  height: 64px;
  margin: 4px auto 16px;
}
.np-check svg { width: 100%; height: 100%; }
.np-check circle {
  fill: none;
  stroke: var(--np-success);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: np-draw 0.5s ease forwards;
}
.np-check path {
  fill: none;
  stroke: var(--np-success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: np-draw 0.35s ease 0.4s forwards;
}
@keyframes np-draw { to { stroke-dashoffset: 0; } }

.np-success-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--np-success);
  margin: 0 0 6px;
}
.np-success-sub {
  font-size: 13.5px;
  color: var(--np-ink-soft);
  margin: 0 0 18px;
}
.np-fail-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--np-danger);
  margin: 8px 0 6px;
}
.np-fail-sub {
  font-size: 13.5px;
  color: var(--np-ink-soft);
  margin: 0 0 18px;
}

/* ---------- FOOTER ---------- */
.np-footer {
  padding: 22px 20px 26px;
  text-align: center;
}
.np-footer-contact {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 12px;
}
.np-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--np-primary);
  text-decoration: none;
}
.np-footer-link svg {
  width: 16px;
  height: 16px;
  fill: var(--np-primary);
}
.np-footer-hours {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--np-ink-faint);
}
.np-footer-text {
  margin: 0;
  font-size: 11.5px;
  color: var(--np-ink-faint);
  letter-spacing: 0.02em;
}
