/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:        #f4f6fb;
  --card:      #ffffff;
  --text:      #111827;
  --muted:     #6b7280;
  --accent:    #2563eb;
  --accent-h:  #1d4ed8;
  --success:   #16a34a;
  --error:     #dc2626;
  --warn:      #d97706;
  --border:    #e5e7eb;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
}

/* ─── Reset / base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.standalone-body {
  background: #ececec;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  min-height: 72px;
  background: #0f172a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 20px;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
}
.topbar-logo {
  display: block;
  height: 40px;
  width: auto;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.topnav a {
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.topnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.topnav a.active { background: rgba(255,255,255,.1); color: #fff; }
.topnav .user-badge {
  color: #64748b;
  font-size: 12px;
  padding: 0 8px;
}

@media (max-width: 800px) {
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 10px 14px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .topbar-brand {
    width: 100%;
  }
  .topbar-logo {
    height: 32px;
  }
  .topnav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    gap: 6px;
  }
  .topnav::-webkit-scrollbar {
    display: none;
  }
  .topnav a,
  .topnav .user-badge {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .topnav a {
    padding: 8px 12px;
    font-size: 14px;
  }
  .topnav .user-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
  }
  .container {
    padding: 18px 14px;
  }
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}
.container.customer-dashboard-container {
  max-width: 1560px;
}
.standalone-container {
  max-width: 1120px;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 10px;
  overflow: visible;
}
.cards-shell {
  width: 100%;
}
.cards-registration-shell {
  width: 100%;
}
.cards-panel {
  background: #f5f5f7;
  border: 1px solid #cecece;
  border-radius: 20px;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px 18px;
  width: 100%;
}
.cards-registration-panel {
  background: #f5f5f7;
}
.cards-brand {
  color: #f15022;
  text-align: center;
  padding: 24px 0 12px;
  background: #f5f5f7;
  font-weight: 500;
  font-size: 28px;
  text-transform: lowercase;
}
.cards-like-header {
  text-align: center;
  margin-bottom: 10px;
}
.cards-like-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.cards-like-header p {
  font-size: 14px;
  margin-top: 6px;
  color: var(--muted);
}
.cards-like-form {
  max-width: 100%;
}
.cards-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 24px;
}
.cards-flashes {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.cards-progress-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 12px;
}
.cards-progress-step span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #fff;
}
.cards-progress-step.active,
.cards-progress-step.done {
  color: #111827;
}
.cards-progress-step.active span {
  background: #2d2d2d;
  border-color: #2d2d2d;
  color: #fff;
}
.cards-progress-step.done span {
  background: #f15022;
  border-color: #f15022;
  color: #fff;
}
.cards-confirmation-block {
  padding-bottom: 8px;
}
.cards-confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 28px;
  font-weight: 700;
}
.cards-confirmation-icon.success {
  background: #dcfce7;
  color: #15803d;
}
.cards-confirmation-icon.processing {
  background: #dbeafe;
  color: #1d4ed8;
}
.cards-confirmation-icon.error {
  background: #fee2e2;
  color: #b91c1c;
}
.cards-summary-card {
  border: 1px solid #d1d5db;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}
.cards-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e5e7eb;
}
.cards-summary-row:last-child {
  border-bottom: 0;
}
.cards-summary-row span {
  color: #6b7280;
}

.cards-safari-required {
  display: none;
  gap: 14px;
  text-align: center;
}

.cards-safari-required h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.16;
}

.cards-safari-required p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.45;
}

.cards-safari-required small {
  color: #6b7280;
  line-height: 1.45;
}

.is-ios-non-safari-registration .cards-registration-panel > :not(.cards-safari-required) {
  display: none;
}

.is-ios-non-safari-registration .cards-safari-required {
  display: grid;
}

.cards-install-panel {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.cards-install-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cards-install-help {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.cards-install-help strong,
.cards-install-help span {
  display: block;
}

.cards-install-help strong {
  margin-bottom: 3px;
  color: #111827;
}

.cards-install-fallback {
  margin-top: 8px;
}

.cards-install-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cards-install-link,
.cards-install-copy {
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.cards-install-copy {
  cursor: pointer;
}

.submit-btn {
  margin-top: 8px;
}
.language-selector {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
}
.language-toggle {
  display: inline-block;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
}
.cards-checkbox-row {
  font-size: 14px;
  margin-top: 8px;
  gap: 12px;
  align-items: center;
}
.cards-checkbox-row input[type=checkbox] {
  width: 26px;
  height: 26px;
  accent-color: #3ba7ff;
  flex: 0 0 26px;
}
.cards-field {
  display: grid;
  gap: 8px;
}
.cards-field > span {
  font-size: 13px;
  font-weight: 600;
}
.cards-field-centered {
  justify-items: center;
}
.cards-form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dddfe4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}
.cards-details-form {
  display: block;
}
.cards-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.cards-form-section-wide {
  grid-column: 1 / -1;
}
.cards-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
}
.cards-readonly-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}
.cards-readonly-value {
  font-weight: 600;
}
.cards-readonly-link {
  justify-self: start;
}
.cards-secondary-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.cards-inline-form {
  margin: 0;
}
.cards-link-btn,
.cards-text-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.cards-link-btn:hover,
.cards-text-link:hover {
  text-decoration: underline;
}
.cards-details-note {
  text-align: left;
}
.otp-code-input {
  max-width: 240px;
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 24px;
  font-weight: 700;
}
.container.customers-container {
  max-width: 1600px;
}
.page-header {
  margin-bottom: 20px;
}
.page-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-header p  { color: var(--muted); margin-top: 4px; font-size: 13px; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card, .card + .grid, .grid + .card { margin-top: 16px; }
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.card h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.card h2 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--muted); }

/* ─── Stat grids ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-top: 4px;
  color: var(--text);
}
.stat-card .stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.customer-dashboard-container .stat-card .stat-sub {
  white-space: nowrap;
}
.customer-dashboard-container .page-header,
.customer-dashboard-container .stat-grid,
.customer-dashboard-container .dashboard-panels-grid {
  width: 100%;
}
.customer-dashboard-container .dashboard-panels-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.customer-dashboard-container .dashboard-panel-card {
  height: 100%;
}
.customer-dashboard-container .dashboard-single-stat-grid {
  grid-template-columns: 1fr;
}
.customer-dashboard-container .dashboard-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.customer-dashboard-container .dashboard-table th,
.customer-dashboard-container .dashboard-table td {
  white-space: nowrap;
  width: 1%;
}
.customer-dashboard-container .dashboard-customers-table td:first-child,
.customer-dashboard-container .dashboard-registrations-table td:first-child {
  width: auto;
  white-space: normal;
}
@media (max-width: 980px) {
  .customer-dashboard-container .dashboard-panels-grid {
    grid-template-columns: 1fr;
  }
}
.stat-card.highlight { border-left: 3px solid var(--accent); }
.stat-card.success-card { border-left: 3px solid var(--success); }

/* ─── Grid / split ───────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
@media (min-width: 860px) {
  .cards-form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 720px) {
  .standalone-container {
    max-width: 100%;
    padding: 0;
    display: block;
  }
  .cards-panel {
    border: 0;
    border-radius: 0;
    min-height: 100vh;
    padding: 0 24px 32px;
  }
  .language-selector {
    margin-top: 18px;
  }
  .cards-brand {
    padding: 44px 0 18px;
    font-size: 30px;
  }
  .cards-progress {
    gap: 6px;
  }
  .cards-progress-step small {
    font-size: 11px;
  }
  .cards-secondary-actions,
  .cards-summary-row,
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cards-linked-card-row,
  .cards-linked-card-items {
    grid-template-columns: 1fr;
  }
  .cards-linked-card-brand {
    padding-top: 0;
  }
  .cards-form-section {
    padding: 16px;
  }
  .otp-code-input {
    max-width: 100%;
  }
  .grid.grid-2 {
    grid-template-columns: 1fr;
  }
  .btn, button {
    min-height: 44px;
  }
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
label .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input[type=text], input[type=password], input[type=number], input[type=date],
select, textarea {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.input-item {
  margin: 0;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { resize: vertical; min-height: 80px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}
.checkbox-row input[type=checkbox] { margin-top: 2px; width: auto; }

/* ─── Buttons ────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-full {
  width: 100%;
}
.btn-full-mobile {
  width: 100%;
}
.cards-registration-panel input[type='text'],
.cards-registration-panel input[type='date'],
.cards-registration-panel input[type='tel'],
.cards-registration-panel input[type='email'],
.cards-registration-panel select {
  border-radius: 12px;
  background: #f5f5f7;
  margin: 0;
  min-height: 50px;
  padding: 14px 12px;
  border: 1px solid #cfd4dc;
}
.cards-registration-panel button,
.cards-registration-panel .btn {
  width: 100%;
  min-height: 50px;
  border-radius: 6px;
}
.cards-registration-panel .btn-primary,
.cards-registration-panel button[type=submit] {
  background: #2d2d2d;
  border-color: #2d2d2d;
}
.cards-registration-panel .btn-secondary {
  background: #fff;
  color: #2d2d2d;
  border-color: #d1d5db;
}
.btn-primary, button[type=submit] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover, button[type=submit]:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
}
.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); }
.btn:disabled,
.btn[disabled],
button[type=submit]:disabled {
  background: #d1d5db;
  border-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.85;
}
.btn-danger {
  background: #fff;
  color: var(--error);
  border-color: #fca5a5;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }
.customers-list-card { max-width: none; }
.customers-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.customers-table th,
.customers-table td {
  white-space: nowrap;
  width: 1%;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-warn    { background: #fef9c3; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-muted   { background: #f3f4f6; color: #6b7280; }

/* ─── Flash messages ─────────────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}
.flash.success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.flash.error   { background: #fef2f2; color: var(--error);   border: 1px solid #fecaca; }

/* ─── Misc helpers ───────────────────────────────────────────── */
.muted     { color: var(--muted); }
.top-gap   { margin-top: 16px; }
.small     { font-size: 12px; }
code {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eff6ff;
  color: #1e40af;
}
details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 0;
  user-select: none;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ─── Funnel table (audience stats) ─────────────────────────── */
.funnel-table td:first-child { font-weight: 500; }
.funnel-table td:nth-child(2) { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel-row-highlight { background: #eff6ff; }

/* ─── Send form layout ───────────────────────────────────────── */
.send-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 360px;
}
@media (max-width: 900px) { .send-layout { grid-template-columns: 1fr; } }

.send-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.send-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.send-step-body { flex: 1; }
.send-step-body label { font-weight: 700; font-size: 14px; margin-bottom: 8px; }

/* ─── Preview result panel ───────────────────────────────────── */
.preview-panel {
  background: #f8faff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  padding: 16px;
}
.preview-panel .preview-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.preview-panel .preview-row:last-child { border-bottom: none; }
.preview-panel .preview-row strong { font-variant-numeric: tabular-nums; }

/* ─── Approval gate ──────────────────────────────────────────── */
.approval-gate {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 16px;
}
.approval-gate .gate-label {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

/* ─── Narrow (login/setup) ───────────────────────────────────── */
.narrow { max-width: 400px; margin: 64px auto; }

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar { padding: 0 14px; }
  .container { padding: 16px 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .topnav a { padding: 5px 7px; font-size: 12px; }
}


.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.table-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.pagination {
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
.customer-form-layout {
  align-items:start;
}

/* ─── Standalone registration redesign (2026-05-01) ───────────────────── */
body.standalone-body {
  background:
    radial-gradient(circle at top, rgba(241, 80, 34, 0.08), transparent 28%),
    linear-gradient(180deg, #f8f6f3 0%, #f1f2f4 100%);
}

.standalone-container {
  max-width: 760px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.cards-registration-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 30px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.10);
  padding: 0 40px 40px;
  overflow: hidden;
}

.cards-registration-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 220px;
  background: linear-gradient(180deg, rgba(241, 80, 34, 0.05) 0%, rgba(241, 80, 34, 0) 100%);
  pointer-events: none;
}

.language-selector,
.cards-brand,
.cards-progress,
.cards-flashes,
.cards-like-header,
.cards-step-kicker,
.cards-like-form,
.cards-secondary-actions,
.cards-confirmation-block,
.cards-loading-overlay {
  position: relative;
  z-index: 1;
}

.language-selector {
  margin-top: 14px;
}

.language-toggle {
  font-size: 15px;
}

.language-toggle:hover,
.language-toggle:focus {
  color: #f15022;
  outline: none;
}

.cards-brand {
  padding: 18px 0 12px;
  background: transparent;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cards-progress {
  display: none;
}

.cards-step-kicker,
.cards-hero-points,
.cards-hero-point,
.cards-inline-status,
.cards-review-banner,
.cards-review-chip {
  display: none;
}

.cards-like-header {
  max-width: 520px;
  margin: 0 auto 12px;
}

.cards-like-header h2 {
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.cards-like-header p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.4;
  color: #6b7280;
}

.cards-like-header strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
}

.cards-hero-header,
.cards-like-header-compact {
  margin-bottom: 10px;
}

.cards-like-form,
.cards-confirmation-block {
  max-width: 620px;
  margin: 0 auto;
}

.cards-phone-step-form {
  margin-top: 8px;
}

.cards-like-form.form,
.cards-details-form.form {
  gap: 10px;
}

.cards-field {
  gap: 6px;
}

.cards-field > span {
  font-size: 13px;
  font-weight: 700;
}

.cards-field-placeholder-only {
  gap: 0;
}

.cards-field-placeholder-only > span {
  display: none;
}

.cards-phone-field {
  gap: 8px;
}

.cards-phone-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 54px;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid #d8dee7;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.cards-phone-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 78px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(241,80,34,0.10), rgba(241,80,34,0.04));
  border-right: 1px solid rgba(17,24,39,0.08);
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.cards-phone-input-wrap .cards-phone-input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 54px !important;
  padding-left: 14px !important;
  padding-right: 16px !important;
  font-size: 18px !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cards-phone-input-wrap:focus-within {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 10px 18px rgba(15, 23, 42, 0.06);
}

.cards-phone-input-wrap.field-invalid,
.cards-phone-input-wrap.field-invalid:focus-within {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12), 0 10px 18px rgba(15, 23, 42, 0.06);
}

.cards-input-hint {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.cards-input-hint-centered {
  text-align: center;
}

.cards-input-hint-compact {
  font-size: 12px;
  line-height: 1.3;
}

.cards-registration-panel input[type='text'],
.cards-registration-panel input[type='date'],
.cards-registration-panel input[type='tel'],
.cards-registration-panel input[type='email'],
.cards-registration-panel select,
.cards-registration-panel textarea {
  min-height: 48px;
  height: 48px;
  padding: 11px 13px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid #d8dee7;
  font-size: 18px;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.cards-registration-panel input[type='date'] {
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.35;
}

.cards-registration-panel input[type='date']::-webkit-date-and-time-value {
  text-align: left;
}

.cards-registration-panel input::placeholder,
.cards-registration-panel textarea::placeholder {
  color: #9ca3af;
}

.cards-registration-panel input:focus,
.cards-registration-panel select:focus,
.cards-registration-panel textarea:focus {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.cards-registration-panel input.field-invalid,
.cards-registration-panel select.field-invalid,
.cards-registration-panel textarea.field-invalid,
.cards-registration-panel input.field-invalid:focus,
.cards-registration-panel select.field-invalid:focus,
.cards-registration-panel textarea.field-invalid:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.cards-registration-panel button,
.cards-registration-panel .btn {
  min-height: 48px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.09);
}

.cards-registration-panel .btn-primary,
.cards-registration-panel button[type=submit] {
  background: #2d2d2d;
  border-color: #2d2d2d;
}

.cards-registration-panel .btn-primary:hover,
.cards-registration-panel button[type=submit]:hover {
  background: #1f1f1f;
  border-color: #1f1f1f;
}

.cards-secondary-actions {
  max-width: 620px;
  margin: 10px auto 0;
  padding-top: 0;
  gap: 8px;
}

.cards-secondary-actions-center {
  justify-content: center;
}

.cards-step4-secondary {
  margin-top: 18px;
}

.cards-auto-resend-form {
  display: none;
}

.cards-otp-header-compact {
  text-align: center;
  margin-bottom: 8px;
}

.cards-otp-form-compact {
  max-width: 320px;
  gap: 8px;
}

.otp-resend-text {
  margin-top: 6px;
  text-align: center;
}

.otp-resend-text small {
  font-size: 13px;
  line-height: 1.3;
  color: #6b7280;
}

.otp-resend-link {
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: default;
}

.otp-resend-link.is-enabled {
  cursor: pointer;
}

.otp-resend-text.is-resending {
  opacity: 0.82;
}

.cards-otp-field {
  gap: 4px;
}

.cards-otp-field-single {
  width: 100%;
  align-items: center;
}

.cards-link-btn,
.cards-text-link,
.cards-readonly-link {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 600;
}

.otp-code-input-single {
  width: min(100%, 220px);
  min-height: 44px !important;
  height: 44px;
  padding: 10px 14px !important;
  text-align: center;
  letter-spacing: 0.08em;
  font-size: 18px !important;
  font-weight: 700;
  border-radius: 14px !important;
}

.cards-review-banner {
  max-width: 620px;
  margin: 0 auto 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-review-chip {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.cards-review-chip span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cards-review-chip strong {
  font-size: 16px;
  line-height: 1.4;
}

.cards-form-grid {
  gap: 8px;
}

.cards-linked-cards {
  display: grid;
  gap: 8px;
  margin: 2px 0 6px;
}

.cards-linked-card-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.cards-linked-card-brand {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding-top: 8px;
}

.cards-linked-card-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cards-linked-card-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.cards-linked-card-item strong,
.cards-linked-card-item small {
  overflow-wrap: anywhere;
}

.cards-linked-card-item small {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.cards-card-kind {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.cards-card-kind-loyalty {
  background: #eef2ff;
  color: #3730a3;
}

.cards-card-kind-discount {
  background: #ecfeff;
  color: #0e7490;
}

.cards-form-section {
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.cards-details-form .cards-form-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cards-details-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.cards-consent-section {
  gap: 6px;
  padding: 4px 2px 0;
  border: 0;
  background: transparent;
}

.cards-consent-section .cards-section-title {
  display: none;
}

.cards-section-title {
  font-size: 11px;
  letter-spacing: 0.10em;
}

.cards-readonly-card {
  gap: 6px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.cards-form-section-store-compact {
  padding: 0;
  border: 0;
  background: transparent;
}

.cards-readonly-card-store {
  position: relative;
  padding-top: 12px;
}

.cards-readonly-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cards-readonly-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cards-readonly-meta {
  font-size: 12px;
  color: #6b7280;
}

.cards-readonly-value {
  font-size: 15px;
  line-height: 1.35;
}

.cards-checkbox-row {
  gap: 8px;
  align-items: flex-start;
}

.cards-checkbox-row span {
  font-size: 12px;
  line-height: 1.3;
}

.cards-checkbox-row-light input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #94a3b8;
}

.cards-terms-row {
  cursor: pointer;
}

.cards-terms-link {
  color: #6b7280;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cards-terms-link:hover,
.cards-terms-link:focus {
  color: #f15022;
  outline: none;
}

.cards-checkbox-row-subtle {
  opacity: 0.88;
}

.cards-checkbox-row-subtle span,
.cards-terms-link-subtle {
  color: #6b7280;
}

.cards-submit-stack {
  display: grid;
  gap: 8px;
}

.cards-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.45);
  z-index: 30;
}

.cards-modal-backdrop[aria-hidden='false'] {
  display: flex;
}

.cards-modal-dialog {
  width: min(100%, 560px);
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.cards-modal-header,
.cards-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.cards-modal-header {
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.cards-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 18px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cards-terms-modal-body {
  display: grid;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.cards-terms-modal-body p {
  margin: 0;
}

.cards-modal-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  box-shadow: none !important;
  min-height: auto !important;
  height: auto !important;
  padding: 0 !important;
}

.cards-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

body.modal-open {
  overflow: hidden;
}

.cards-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0 auto 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cards-status-pill.success {
  background: #dcfce7;
  color: #15803d;
}

.cards-status-pill.processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.cards-status-pill.error {
  background: #fee2e2;
  color: #b91c1c;
}

.cards-confirmation-icon {
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
  font-size: 34px;
}

.cards-summary-card {
  padding: 18px 20px;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

.cards-summary-card-confirmation {
  margin-top: 8px;
}

.cards-summary-row {
  padding: 13px 0;
  font-size: 15px;
}

.cards-summary-row strong {
  text-align: right;
}

.flash {
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.4;
}

.flash-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.cards-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 999;
}

.cards-loading-overlay[aria-hidden='false'] {
  opacity: 1;
  pointer-events: auto;
}

.cards-loading-dialog {
  width: min(100%, 320px);
  padding: 24px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.cards-loading-title {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.cards-loading-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}

.cards-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 999px;
  border: 3px solid rgba(241, 80, 34, 0.18);
  border-top-color: #f15022;
  animation: cards-spin .8s linear infinite;
}

body.registration-loading {
  overflow: hidden;
}

body.registration-loading .cards-registration-panel {
  filter: saturate(0.96) scale(0.995);
}

.cards-registration-panel button,
.cards-registration-panel .btn,
.cards-registration-panel a {
  touch-action: manipulation;
}

@keyframes cards-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  body.standalone-body {
    overflow: auto;
  }

  .standalone-container {
    display: flex;
    align-items: center;
    padding: 12px 0 24px;
    min-height: 100svh;
  }

  .cards-registration-shell {
    width: 100%;
    min-height: calc(100svh - 36px);
    display: grid;
    align-items: center;
    padding: 0 10px;
  }

  .cards-registration-panel {
    border-radius: 24px;
    padding: 24px 16px;
    min-height: auto;
  }

  .language-selector {
    margin-top: 0;
    padding-right: 4px;
  }

  .cards-brand {
    padding: 12px 0 10px;
    font-size: 24px;
  }

  .cards-progress {
    display: none;
  }

  .cards-like-header h2 {
    font-size: 20px;
  }

  .cards-like-header p {
    font-size: 12px;
  }

  .otp-resend-text {
    margin-top: 4px;
  }

  .otp-resend-text small {
    font-size: 12px;
  }

  .cards-like-header strong {
    font-size: 13px;
  }

  .cards-secondary-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .cards-secondary-actions-center {
    justify-content: center;
  }

  .cards-secondary-actions .cards-inline-form,
  .cards-secondary-actions .cards-text-link,
  .cards-secondary-actions .cards-link-btn {
    flex: 0 1 auto;
  }

  .cards-phone-prefix {
    min-width: 72px;
    padding: 0 12px;
    font-size: 16px;
  }

  .cards-form-section {
    padding: 8px;
    border-radius: 12px;
  }

  .cards-details-fields {
    gap: 6px;
  }

  .cards-modal-dialog {
    width: min(100%, 94vw);
    max-height: 84vh;
  }

  .cards-modal-header,
  .cards-modal-actions {
    padding: 14px 14px;
  }

  .cards-modal-body {
    padding: 0 14px 14px;
  }

  .cards-registration-panel input[type='text'],
  .cards-registration-panel input[type='date'],
  .cards-registration-panel input[type='tel'],
  .cards-registration-panel input[type='email'],
  .cards-registration-panel select,
  .cards-registration-panel textarea,
  .cards-registration-panel button,
  .cards-registration-panel .btn {
    min-height: 46px;
    height: 46px;
    font-size: 18px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .cards-phone-step-form {
    margin-top: 12px;
  }

  .cards-otp-form-compact {
    max-width: 300px;
  }

  .otp-code-input-single {
    width: min(100%, 200px);
    min-height: 42px !important;
    height: 42px;
    font-size: 18px !important;
    letter-spacing: 0.06em;
  }

  .cards-loading-dialog {
    border-radius: 20px;
  }
}

@media (min-width: 721px) and (max-height: 860px) {
  .standalone-container {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .cards-registration-panel {
    border-radius: 24px;
    padding: 0 32px 24px;
  }

  .language-selector {
    margin-top: 8px;
  }

  .cards-brand {
    padding: 10px 0 8px;
    font-size: 26px;
  }

  .cards-like-header {
    margin-bottom: 8px;
  }

  .cards-like-form.form,
  .cards-details-form.form,
  .cards-details-fields {
    gap: 8px;
  }

  .cards-consent-section {
    gap: 4px;
    padding-top: 2px;
  }

  .cards-checkbox-row {
    gap: 7px;
  }

  .cards-checkbox-row span,
  .cards-terms-link {
    font-size: 12px;
    line-height: 1.25;
  }

  .cards-checkbox-row-light input[type=checkbox] {
    width: 15px;
    height: 15px;
  }

  .cards-registration-panel input[type='text'],
  .cards-registration-panel input[type='date'],
  .cards-registration-panel input[type='tel'],
  .cards-registration-panel input[type='email'],
  .cards-registration-panel select,
  .cards-registration-panel textarea {
    min-height: 42px;
    height: 42px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 17px;
  }

  .cards-registration-panel button,
  .cards-registration-panel .btn {
    min-height: 44px;
    height: 44px;
    font-size: 15px;
  }

  .submit-btn {
    margin-top: 6px;
  }
}

@media (min-width: 721px) and (max-height: 700px) {
  .cards-registration-panel {
    padding-bottom: 18px;
  }

  .cards-brand {
    padding-top: 8px;
    font-size: 24px;
  }

  .cards-registration-panel input[type='text'],
  .cards-registration-panel input[type='date'],
  .cards-registration-panel input[type='tel'],
  .cards-registration-panel input[type='email'],
  .cards-registration-panel select,
  .cards-registration-panel textarea {
    min-height: 40px;
    height: 40px;
  }

  .cards-registration-panel button,
  .cards-registration-panel .btn {
    min-height: 42px;
    height: 42px;
  }
}


.customer-card-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: #f5f5f4;
}

.customer-card {
  width: min(100%, 430px);
  aspect-ratio: 430 / 546;
  container-type: inline-size;
  border-radius: 12px;
  border-radius: 2.79cqw;
  background: #c8232c;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 26px 80px rgba(75, 15, 20, 0.35);
  padding: 26px 22px 18px;
  padding: 6.05cqw 5.12cqw 4.19cqw;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.customer-card-install-guide {
  width: min(100%, 430px);
  min-height: min(640px, calc(100svh - 36px));
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 22px 70px rgba(28, 25, 23, 0.14);
  padding: 28px 24px;
  color: #1c1917;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.is-standalone-card .customer-card-install-guide {
  display: none;
}

.customer-card-install-logo {
  width: 142px;
  height: auto;
  display: block;
}

.customer-card-install-copy {
  display: grid;
  gap: 14px;
}

.customer-card-install-copy h1 {
  margin: 0;
  color: #1c1917;
  font-size: 28px;
  line-height: 1.14;
}

.customer-card-install-copy p {
  margin: 0;
  color: #57534e;
  font-size: 16px;
  line-height: 1.5;
}

.customer-card-install-copy ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 9px;
  color: #292524;
  font-weight: 700;
  line-height: 1.4;
}

.btn-install-home {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.btn-install-home:hover,
.btn-install-home:focus-visible {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.customer-card-native-install {
  width: 100%;
}

.customer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.customer-card-logo {
  width: 138px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.customer-card-brand {
  display: none;
}

.customer-card-person {
  display: grid;
  gap: 5px;
  gap: 1.16cqw;
  margin-bottom: 28px;
  margin-bottom: 6.51cqw;
}

.customer-card-person span,
.customer-card-tile span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 2.83vw;
  font-size: 3.02cqw;
  font-weight: 800;
}

.customer-card-person strong {
  font-size: 6.31vw;
  font-size: 6.74cqw;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.customer-card-barcode {
  margin: auto auto 0;
  padding: 2px;
  padding: 0.17cqw 0.65cqw;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 4px;
  border-radius: 0.93cqw;
  background: #ffffff;
  text-align: center;
  width: 66.3%;
  width: 66.3cqw;
  box-sizing: border-box;
}

.customer-card-barcode-svg {
  width: 100%;
  height: min(73px, 16vw);
  height: 16.98cqw;
  display: block;
}

.customer-card-barcode-number {
  display: block;
  margin-top: -4px;
  margin-top: -0.93cqw;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 3.05vw;
  font-size: 3.26cqw;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #1c1917;
}

.customer-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  gap: 2.33cqw;
  margin-bottom: 22px;
  margin-bottom: 5.12cqw;
}

.customer-card-tile {
  min-width: 0;
  display: grid;
  gap: 7px;
  gap: 1.63cqw;
  padding: 14px 12px;
  padding: 3.26cqw 2.79cqw;
  border-radius: 14px;
  border-radius: 3.26cqw;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.customer-card-tile strong {
  font-size: 5.0vw;
  font-size: 5.34cqw;
  overflow-wrap: anywhere;
  color: #ffffff;
}

.customer-card-tile small {
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 380px) {
  .customer-card-install-guide {
    min-height: min(504px, calc(100svh - 36px));
    padding: 22px 18px;
  }
}

/* Step 4 install tagline */
.cards-install-tagline {
  margin: 4px 0 0;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

/* Step 4 in-app browser (non-Safari iOS) notice */
.cards-step4-safari-notice {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  text-align: center;
}
.cards-step4-safari-notice strong {
  color: #78350f;
  font-size: 15px;
}
.cards-step4-safari-notice span {
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
}

/* Install coach mark — bottom-sheet modal with iOS Share-icon walkthrough */
.install-coach[hidden] {
  display: none !important;
}
.install-coach {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.install-coach-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  animation: install-coach-fade 180ms ease-out;
}
.install-coach-sheet {
  position: relative;
  width: min(100%, 460px);
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  padding: 22px 22px max(22px, env(safe-area-inset-bottom));
  box-shadow: 0 -16px 60px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 14px;
  animation: install-coach-slide 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.install-coach-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}
.install-coach-title {
  margin: 6px 36px 0 0;
  font-size: 20px;
  line-height: 1.2;
  color: #111827;
}
.install-coach-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}
.install-coach-steps {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.install-coach-step {
  display: grid;
  grid-template-columns: 26px 36px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}
.install-coach-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.install-coach-step-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}
.install-coach-step-text {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.4;
}
.install-coach-step-text strong {
  color: #111827;
}
.install-coach-dismiss {
  margin-top: 4px;
}

/* Lock background scroll while coach is open */
.is-coach-open {
  overflow: hidden;
}

@keyframes install-coach-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes install-coach-slide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Sticky bottom install banner on /loyalty/card (browser mode only) */
.customer-card-install-sticky[hidden] {
  display: none !important;
}
.customer-card-install-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom)) 16px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.32);
}
.customer-card-install-sticky-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.customer-card-install-sticky-text strong {
  font-size: 14px;
  line-height: 1.2;
}
.customer-card-install-sticky-text span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
}
.customer-card-install-sticky-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 14px;
}
.is-standalone-card .customer-card-install-sticky {
  display: none !important;
}

/* iOS install tutorial — animated finger pointing at Share, then Add to Home Screen */
.ios-install-tutorial[hidden] {
  display: none !important;
}
.ios-install-tutorial {
  margin-top: 14px;
  padding: 18px 14px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e0e7ff;
  display: grid;
  gap: 14px;
  text-align: center;
}
.ios-install-tutorial-stage {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.ios-install-tutorial-target {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.ios-install-tutorial-target-share {
  animation: ios-install-pulse-share 5s infinite;
}
.ios-install-tutorial-target-menu {
  animation: ios-install-pulse-menu 5s infinite;
}
.ios-install-tutorial-target-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ios-install-tutorial-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  animation: ios-install-arrow-bob 5s infinite;
}
.ios-install-tutorial-finger {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4);
  pointer-events: none;
  opacity: 0;
  animation: ios-install-finger-cycle 6s infinite;
}
.ios-install-tutorial-finger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.7);
  opacity: 0;
  animation: ios-install-finger-ripple 6s infinite;
}
.ios-install-tutorial-caption {
  margin: 0;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.45;
}
.ios-install-tutorial-caption strong {
  color: #111827;
}

/* Targets centered at top: 14px (Share) and top: 98px (Menu).
   6s loop:
     0-5%   fade in over Share
     5-15%  hover, gentle pulse (bounce)
     15-22% press: scale down + ripple emits
     22-30% release back to scale 1
     30-50% glide downward to menu, staying visible
     50-58% press menu: scale down + ripple
     58-66% release
     66-78% hover at menu
     78-90% fade out
     90-100% reset to Share position (hidden)                                  */
@keyframes ios-install-finger-cycle {
  0%   { top: 14px; transform: scale(0.8); opacity: 0; }
  5%   { top: 14px; transform: scale(1);   opacity: 1; }
  15%  { top: 14px; transform: scale(1);   opacity: 1; }
  20%  { top: 14px; transform: scale(0.72); opacity: 1; }
  28%  { top: 14px; transform: scale(1);   opacity: 1; }
  32%  { top: 14px; transform: scale(1);   opacity: 1; }
  50%  { top: 98px; transform: scale(1);   opacity: 1; }
  54%  { top: 98px; transform: scale(0.72); opacity: 1; }
  62%  { top: 98px; transform: scale(1);   opacity: 1; }
  78%  { top: 98px; transform: scale(1);   opacity: 1; }
  88%  { top: 98px; transform: scale(0.9); opacity: 0; }
  100% { top: 14px; transform: scale(0.8); opacity: 0; }
}
/* Press ripple — fires when finger scales down at 20% (Share) and 54% (Menu) */
@keyframes ios-install-finger-ripple {
  0%, 16%       { transform: scale(0.5); opacity: 0; }
  20%           { transform: scale(0.7); opacity: 0.9; }
  30%           { transform: scale(1.8); opacity: 0; }
  31%, 50%      { transform: scale(0.5); opacity: 0; }
  54%           { transform: scale(0.7); opacity: 0.9; }
  64%           { transform: scale(1.8); opacity: 0; }
  65%, 100%     { transform: scale(0.5); opacity: 0; }
}
@keyframes ios-install-pulse-share {
  0%, 14%   { background: #ffffff; transform: scale(1); border-color: #e5e7eb; }
  20%, 30%  { background: #dbeafe; transform: scale(1.03); border-color: #93c5fd; }
  36%, 100% { background: #ffffff; transform: scale(1); border-color: #e5e7eb; }
}
@keyframes ios-install-pulse-menu {
  0%, 50%   { background: #ffffff; transform: scale(1); border-color: #e5e7eb; }
  54%, 64%  { background: #dbeafe; transform: scale(1.03); border-color: #93c5fd; }
  72%, 100% { background: #ffffff; transform: scale(1); border-color: #e5e7eb; }
}
@keyframes ios-install-arrow-bob {
  0%, 32%, 100% { transform: translateY(-2px); opacity: 0.45; }
  40%, 48%      { transform: translateY(4px);  opacity: 0.95; }
}

/* Step 3 card-view layout: loyalty card prominent, no green check */
.cards-confirmation-block-card-view {
  padding: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 14px;
}

/* On the card-view, strip the panel chrome (gray bg, border, padding) so only the red card + action buttons show against the body background. */
.cards-panel:has(.cards-confirmation-block-card-view),
.cards-registration-panel:has(.cards-confirmation-block-card-view) {
  background: transparent;
  border: none;
  padding: 0 12px 16px;
}

/* Hide language toggle on the card-view; whiten body + every wrapper + ::before so nothing surrounds the card.
   Uses both `:has()` (modern Safari) and the JS-added `.card-view-mode` class (works on iOS 12+). */
body.standalone-body:has(.cards-confirmation-block-card-view),
body:has(.cards-confirmation-block-card-view),
body.card-view-mode,
body.card-view-mode.standalone-body {
  background: #ffffff !important;
  background-image: none !important;
}
body:has(.cards-confirmation-block-card-view) .standalone-container,
body:has(.cards-confirmation-block-card-view) .cards-shell,
body:has(.cards-confirmation-block-card-view) .cards-registration-shell,
body:has(.cards-confirmation-block-card-view) .cards-panel,
body:has(.cards-confirmation-block-card-view) .cards-registration-panel,
body.card-view-mode .standalone-container,
body.card-view-mode .cards-shell,
body.card-view-mode .cards-registration-shell,
body.card-view-mode .cards-panel,
body.card-view-mode .cards-registration-panel {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
body:has(.cards-confirmation-block-card-view) .cards-panel,
body:has(.cards-confirmation-block-card-view) .cards-registration-panel,
body.card-view-mode .cards-panel,
body.card-view-mode .cards-registration-panel {
  padding: 0 5px 16px !important;
}
body:has(.cards-confirmation-block-card-view) .cards-panel::before,
body:has(.cards-confirmation-block-card-view) .cards-registration-panel::before,
body:has(.cards-confirmation-block-card-view) .standalone-container::before,
body:has(.cards-confirmation-block-card-view) .standalone-container::after,
body.card-view-mode .cards-panel::before,
body.card-view-mode .cards-registration-panel::before,
body.card-view-mode .standalone-container::before,
body.card-view-mode .standalone-container::after {
  display: none !important;
  content: none !important;
}
body:has(.cards-confirmation-block-card-view) .language-selector,
body.card-view-mode .language-selector {
  display: none;
}
.cards-confirmation-block-card-view .customer-card {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  animation: cards-slide-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cards-step3-secondary {
  margin-top: 4px;
}
.cards-step3-secondary-stacked {
  display: grid;
  gap: 6px;
}
.cards-step3-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px auto 0;
  max-width: 430px;
  width: 100%;
  container-type: inline-size;
}
.cards-step3-actions .cards-step3-action-btn {
  flex: 1 1 calc(50% - 5px);
}
.cards-step3-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 3.5vw;
  font-size: 3.75cqw;
  font-weight: 600;
  padding: 12px 10px;
  padding: 2.79cqw 2.32cqw;
  line-height: 1.25;
  text-decoration: none;
  min-height: 48px;
  min-height: 11.16cqw;
  white-space: nowrap;
}
.cards-step3-action-btn[hidden] {
  display: none !important;
}
.cards-install-hint {
  margin: 10px auto 0;
  max-width: 430px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff5ee;
  border: 1px solid #f6c9a8;
  color: #4a2a14;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box;
}
.cards-install-hint[hidden] {
  display: none !important;
}
.cards-install-hint strong {
  font-weight: 600;
  color: #2a1709;
}
@keyframes cards-slide-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cards-confirmation-block-card-view .customer-card {
    animation: none;
  }
}

/* Dev preview slot — only renders when ?preview=install is set */
.cards-preview-slot {
  margin-top: 12px;
  padding: 4px 0 0;
}
.cards-preview-label {
  margin: 0 0 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9ca3af;
  text-transform: uppercase;
}

/* Card page Safari notice (iOS non-Safari users) */
.customer-card-install-safari-notice[hidden] {
  display: none !important;
}
.customer-card-install-safari-notice {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  text-align: center;
}
.customer-card-install-safari-notice strong {
  color: #78350f;
  font-size: 15px;
}
.customer-card-install-safari-notice span {
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
}
