/* ============================================================================
   Onetap Connect – Guest Wi-Fi Portal (Admin Harmony Redesign)
   ----------------------------------------------------------------------------
   * Hybrid Theme: Dark Navy Header (#0f172a) + Soft Ice Light Canvas (#f4f6fb)
   * Crisp White Cards (#ffffff) with subtle borders (1px solid #e2e8f0)
   * Neat, modest border-radius (8px - 12px), zero harsh dark shadows or blur filters
   * Vibrant Electric Blue & Sky Blue accents matching Admin Harmony dashboard
   ========================================================================== */

/* ========== 0) FONT & BASE RESET ======================================== */
* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
ul {
  margin: 0;
  padding: 0;
}
li {
  list-style: none;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto;
}

/* =========================================================================
   1) CSS VARIABLES (Admin Harmony Palette)
   ========================================================================= */
:root {
  /* Main Colors */
  --bg-header: #0f172a;       /* Dark midnight navy top bar */
  --bg-body: #f4f6fb;         /* Soft off-white / ice canvas */
  --bg-card: #ffffff;         /* Pure crisp white card background */
  
  /* Borders & Shadows */
  --brd-card: #e2e8f0;        /* Crisp, clean light slate border */
  --brd-input: #cbd5e1;       /* Input border */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07);
  
  /* Text */
  --text-main: #0f172a;       /* Deep slate heading text */
  --text-muted: #64748b;      /* Muted secondary text */
  --text-light: #94a3b8;      /* Placeholder text */

  /* Accents */
  --primary: #2563eb;         /* Royal electric blue */
  --primary-hover: #1d4ed8;   /* Darker royal blue */
  --secondary: #0284c7;       /* Sky blue accent */
  --grad-primary: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --grad-primary-hover: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  
  /* States & Badges */
  --badge-blue-bg: #eff6ff;
  --badge-blue-txt: #2563eb;
  --badge-amber-bg: #fffbeb;
  --badge-amber-txt: #d97706;
  --badge-red-bg: #fef2f2;
  --badge-red-txt: #dc2626;

  /* Radii - Neat and crisp, no weird extreme rounding */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =========================================================================
   2) BODY & LAYOUT
   ========================================================================= */
body.portal {
  margin: 0;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background-color: var(--bg-body);
}

.container {
  width: min(100%, 92vw);
  margin-inline: auto;
}

.unified-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  gap: 20px;
}

.unified-layout > .card {
  width: 100%;
}

@media (min-width: 900px) {
  .unified-layout {
    gap: 24px;
  }
}

/* =========================================================================
   3) HEADER (Midnight Navy Harmony Top Bar)
   ========================================================================= */
.site-header {
  z-index: 50;
  background-color: var(--bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo.main-logo {
  height: 52px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

/* =========================================================================
   4) CARDS (Clean White Harmony Layout)
   ========================================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--brd-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* =========================================================================
   HERO BANNER & ACCOUNT CARD (Mobile-First Harmony System)
   ========================================================================= */
.hero-card {
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--brd-card);
  box-shadow: var(--shadow-sm);
}

.hero-image-wrap {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  background: #0f172a;
}

.hero-image {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.hero-text-wrap {
  padding: 16px 20px;
}

.hero-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.hero-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Account Vouchers Card */
.account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--brd-card);
  padding: 20px;
}

.account-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--badge-blue-bg);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.account-icon {
  width: 22px;
  height: 22px;
}

.account-info {
  flex: 1;
}

.account-title {
  margin: 0 0 3px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
}

.account-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-account-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.btn-account-login:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}

.card-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.muted {
  color: var(--text-muted);
}
.muted.small {
  font-size: 13px;
  line-height: 1.45;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--badge-blue-bg);
  color: var(--badge-blue-txt);
  border: 1px solid #bfdbfe;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

/* =========================================================================
   5) FORMS & VOUCHER INPUT
   ========================================================================= */
.site-main {
  margin-top: 24px;
  margin-bottom: 40px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  margin-bottom: 16px;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
}

.oper-section-item,
.input {
  width: 100%;
  height: 46px;
  border-radius: var(--r-md);
  border: 1px solid var(--brd-input);
  background-color: #ffffff;
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oper-section-item::placeholder,
.input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.oper-section-item:focus,
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#voucherCode {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#voucherCode::placeholder {
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

/* Input with Paste Button */
.input-with-button {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.input-with-button .input {
  width: 100%;
  padding-right: 92px;
}

.btn-paste-voucher {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--badge-blue-bg);
  border: 1px solid #bfdbfe;
  color: var(--primary);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 5;
}

.btn-paste-voucher:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.btn-paste-voucher:active {
  transform: translateY(-50%) scale(0.96);
}

.paste-icon {
  width: 14px;
  height: 14px;
}

/* Input with Peek Button (Eye icon) */
.input-with-icon {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.input-with-icon .input {
  width: 100%;
  padding-right: 44px;
}

.peek-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 4px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 4px;
  z-index: 5;
}

.peek-btn:hover {
  color: var(--primary, #0284c7);
  background: transparent !important;
}

.peek-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.highlight-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* Buttons */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: var(--r-md);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.btn-primary,
#button-login {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3) !important;
}

.btn-primary:hover,
#button-login:hover {
  background: linear-gradient(135deg, #fb923c 0%, #c2410c 100%) !important;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4) !important;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--brd-card);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.button[disabled],
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  color: #d97706;
  margin: 4px 0 12px;
  font-size: 13px;
  min-height: 1.25rem;
}

#oper-hint.error {
  color: #dc2626 !important;
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   "Already paid?" recovery — a returning customer whose device could not be
   reconnected on its own (changed MAC, no token). Quiet by default, promoted
   to a bordered callout by .is-prominent when the portal has reason to think
   this person already holds an entitlement.
   ------------------------------------------------------------------------- */
.recover-block {
  margin-top: 18px;
  text-align: center;
}

.recover-heading {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin: 0 0 2px;
}

.recover-block.is-prominent {
  border: 1px solid var(--badge-blue-txt);
  background: var(--badge-blue-bg);
  border-radius: var(--r-md);
  padding: 16px 14px;
}

.recover-block.is-prominent .recover-heading {
  font-size: 15px;
}

.recover-block .hint {
  color: var(--text-muted);
}

/* =========================================================================
   6) PACKAGES GRID

   Two columns on a phone means ~150px per card, so the layout is built for
   that width: name and price share the top row, everything below is a wrapping
   row of small pills plus a 2-line description, and the CTA is pinned to the
   bottom (margin-top:auto) so every card in a row ends level regardless of how
   long its description is.
   ========================================================================= */
.packages-card {
  width: 100%;
}

.packages-card-head {
  margin-bottom: 16px;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

/* Very narrow phones: one column reads better than a cramped two. */
@media (max-width: 340px) {
  .package-grid { grid-template-columns: 1fr; }
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 15px 13px 13px;
  background: #ffffff;
  border: 1px solid var(--brd-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.package-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-primary);
}

.package-card:hover,
.package-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
  outline: none;
}

.package-card:active { transform: translateY(0); }

.package-card.selected {
  border-color: var(--primary);
  background: var(--badge-blue-bg);
}

.package-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.package-card.is-disabled::before { filter: grayscale(1); opacity: 0.5; }

.package-card.is-disabled:hover {
  transform: none;
  border-color: var(--brd-card);
  box-shadow: none;
}

/* ── Header: name + price ────────────────────────────────────────────── */
.pc-head {
  display: flex;
  align-items: flex-start;   /* price stays at the top if the name wraps */
  justify-content: space-between;
  gap: 8px;
}

.pc-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-price {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  white-space: nowrap;
  padding-top: 1px;
}

.pc-price b {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.pc-price i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── Pills: duration / speed / data ──────────────────────────────────── */
.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pc-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

.pc-tag-dur   { background: var(--badge-blue-bg); color: var(--badge-blue-txt); border-color: #bfdbfe; }
.pc-tag-speed { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.pc-tag-data  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* ── Description ─────────────────────────────────────────────────────
   Clamped to 3 lines. Cards in a row are the same height (CSS grid stretches
   them) and the CTA is margin-top:auto, so buttons stay aligned regardless of
   how much description each card carries. */
.pc-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Footer: CTA or unavailable note, pinned to the bottom ───────────── */
.pc-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  background: var(--grad-primary);
  border-radius: var(--r-sm);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.18);
  transition: background 0.15s ease;
}

.package-card:hover .pc-cta { background: var(--grad-primary-hover); }

.pc-note {
  margin-top: auto;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-sm);
}

/* =========================================================================
   7) DOWNLOAD CARD & FOOTER
   ========================================================================= */
.download-card {
  background: #ffffff;
  border: 1px solid var(--brd-card);
}

.btn-download {
  width: 100%;
  background: var(--grad-primary);
  color: #ffffff;
  border-radius: var(--r-md);
}

.site-footer {
  padding: 24px 0 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--brd-card);
  background: #ffffff;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tagline {
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-nav .link {
  color: var(--primary);
  font-weight: 600;
}

.copyright {
  margin: 4px 0 0;
  font-size: 12px;
}

/* =========================================================================
   8) GLOBAL ACTION OVERLAY & MODALS
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.status-box,
.modal-box {
  background: #ffffff;
  border: 1px solid var(--brd-card);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.status-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 12px 0 6px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-title { color: #dc2626; }
.error-echo {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  margin: 12px 0;
  width: 100%;
}
.echo-val {
  font-family: monospace;
  color: #b91c1c;
  font-weight: 700;
}

.success-title { color: #16a34a; }
.success-icon {
  width: 48px;
  height: 48px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-size: 24px;
  font-weight: 800;
}

/* =========================================================================
   "Your Recent Access" / "Your Current Package"

   One card, several states switched by data-state in index.js. Deliberately
   compact — it sits above the package grid (expired state) or briefly instead
   of it (restoring / restored), and must read at a glance on a phone.
   ========================================================================= */
.recent-access-card .ra-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.recent-access-card .ra-head .success-icon {
  width: 34px;
  height: 34px;
  font-size: 18px;
  flex: none;
}
.recent-access-card .ra-title {
  margin: 0;
  font-size: 17px;
}
.ra-pill {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ra-pill.is-active {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.ra-pill.is-expired {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.ra-message {
  margin: 0 0 12px;
  text-align: left;
}
.ra-restoring {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 3px;
  flex: none;
}
.ra-connected-note {
  margin: 14px 0 0;
  font-weight: 700;
  color: #15803d;
}
.ra-expired-note {
  margin: 14px 0 0;
}

#form-auth-msg {
  display: none !important;
}

/* =========================================================================
   9) IN-PORTAL M-PESA PURCHASE MODAL
   ========================================================================= */
.purchase-box {
  position: relative;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  padding-top: 32px;
}

.purchase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  gap: 10px;
}

.purchase-summary {
  width: 100%;
  background: var(--badge-blue-bg);
  border: 1px solid #bfdbfe;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 4px 0 6px;
}

.purchase-summary-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.purchase-pkg-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.purchase-pkg-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--badge-blue-txt);
  white-space: nowrap;
}

.purchase-pkg-meta {
  margin: 4px 0 0;
  text-align: left;
}

.purchase-label {
  align-self: flex-start;
  margin-bottom: -4px;
}

.purchase-box .input {
  width: 100%;
  text-align: center;
  font-size: 17px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.purchase-error {
  width: 100%;
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.purchase-fineprint {
  margin: 2px 0 0;
  line-height: 1.45;
}

.purchase-step .status-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
}

.purchase-step .spinner {
  margin: 6px auto 2px;
}

/* Credentials panel — the customer's copy of what they just bought */
.cred-box {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--brd-card);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin: 6px 0 2px;
  text-align: left;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--brd-card);
}

.cred-row:last-child {
  border-bottom: 0;
}

.cred-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cred-value .echo-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  color: var(--text-main);
  word-break: break-all;
}

.cred-copy {
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid var(--brd-input);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.cred-copy:hover {
  background: var(--badge-blue-bg);
}

.top-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.top-close-btn:hover {
  color: var(--text-main);
}

.modern-action-grid {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.modern-action-grid .action-btn {
  flex: 1;
  height: 42px;
  font-size: 13px;
  text-decoration: none;
}

/* Live status while sign-in keeps retrying behind the credentials screen */
.purchase-still-note {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  background: var(--badge-amber-bg);
  border: 1px solid #fde68a;
  border-radius: var(--r-sm);
  color: var(--badge-amber-txt);
  font-size: 12px;
  font-weight: 600;
}

.package-tagline {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}

/* Referenced by the markup but previously unstyled */
.btn-xl {
  height: 52px;
  font-size: 16px;
}

.checkout-btn {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--brd-card);
}

.modal-actions {
  width: 100%;
}
