/* ============================================================
   Jivenu Subscription Portal — Design System v2.1
   Premium, modern aesthetic with depth, motion, and polish.
   Grid: 4px/8px base. Transitions: 200-300ms for purposeful motion.
   ============================================================ */

:root {
  /* Primary palette — refined blue with better contrast */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-primary-subtle: rgba(79, 70, 229, 0.08);

  /* Semantic colors */
  --color-success: #059669;
  --color-success-light: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-light: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;

  /* Neutrals — warmer gray scale for premium feel */
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  /* Radius — slightly larger for softer feel */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Shadows — layered for realistic depth */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12), 0 8px 24px -8px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 0 4px var(--color-primary-subtle);

  /* Motion — purposeful, fast, consistent */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip-to-content link — visible only on focus for keyboard users */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 8px;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cancel flow fieldsets — remove default browser chrome */
.cancel-flow-modal fieldset.cancel-step {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* Inter font import — progressive enhancement */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
}

/* Page entrance animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.main { animation: fadeInUp 0.4s var(--ease-out) backwards; }

/* ---- Nav ---- */
.nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.4px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.nav-email {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-right a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
}
.nav-right a:hover {
  color: var(--color-text);
  background: var(--color-border-light);
}

/* ---- Layout ---- */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ---- Page Header ---- */
.page-header { margin-bottom: 16px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.page-header .subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 6px;
}
.page-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--duration-fast);
}
.breadcrumb a:hover { opacity: 0.75; }

/* ---- Section Headers ---- */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 36px;
}
.section-label:first-child { margin-top: 0; }

/* ---- Grid ---- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   Cards — elevated with shadow, subtle hover lift
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--color-text);
  letter-spacing: -0.2px;
}
.card-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ============================================================
   Subscription Card (Dashboard) — hover lift + shadow scale
   ============================================================ */
.sub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sub-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}
.sub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border);
}
.sub-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.sub-card-img-wrap {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  overflow: hidden;
  position: relative;
}
.sub-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.sub-card:hover .sub-card-img {
  transform: scale(1.04);
}
.sub-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}
.sub-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.sub-card-body { padding: 16px 20px 20px; }
.sub-card-name {
  font-size: 15px;
  font-weight: 650;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.sub-card-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.sub-card-meta strong {
  color: var(--color-text);
  font-weight: 600;
}
.sub-card-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 10px;
  letter-spacing: -0.3px;
}

/* ============================================================
   Next Order Hero — refined gradient with depth
   ============================================================ */
.next-order-card {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 40%, #ede9fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.next-order-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.next-order-date {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

.hero-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.next-order-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   Badges — pill-shaped, subtle glow
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.5;
}
.badge-active { background: var(--color-success-light); color: #047857; }
.badge-paused { background: var(--color-warning-light); color: #92400e; }
.badge-cancelled { background: var(--color-danger-light); color: #991b1b; }

/* ============================================================
   Buttons — refined states, better feedback
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
  position: relative;
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}
.btn:focus-visible {
  box-shadow: var(--shadow-glow);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled, .btn.loading {
  opacity: 0.55;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}

/* Secondary */
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: var(--shadow-sm);
}

/* Danger */
.btn-danger {
  background: var(--color-surface);
  color: var(--color-danger);
  border-color: #fca5a5;
}
.btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* Success */
.btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}
.btn-success:hover {
  background: #047857;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

/* Sizes */
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; font-weight: 600; }
.btn-block { width: 100%; }

/* Loading spinner */
.btn.loading { color: transparent !important; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
}
.btn-primary.loading::after,
.btn-success.loading::after {
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Forms — refined inputs with smooth focus ring
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.form-input, textarea.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.form-input:hover {
  border-color: #d1d5db;
}
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.form-input::placeholder {
  color: var(--color-text-muted);
}
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  cursor: pointer;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.form-inline { display: flex; gap: 8px; align-items: flex-end; }

/* ============================================================
   Info Rows — clean dividers
   ============================================================ */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--color-text-secondary); font-weight: 500; }
.info-value { font-weight: 600; color: var(--color-text); }

/* ============================================================
   Line Items — refined layout with hover
   ============================================================ */
.line-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.line-item:last-child { border-bottom: none; }
.line-item:first-child { padding-top: 0; }
.line-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}
.line-item-img-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: #f3f4f6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}
.line-item-info { flex: 1; min-width: 120px; }
.line-item-name { font-size: 14px; font-weight: 600; color: var(--color-text); }
.line-item-variant { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.line-item-price { font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--color-text); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price-original { text-decoration: line-through; color: var(--color-text-muted); font-weight: 400; font-size: 12px; }
.price-current { color: var(--color-text); }
.line-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-end;
  padding-top: 4px;
  margin-left: 70px; /* align with text after image */
}

/* ---- Quantity Controls ---- */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-bg);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast);
}
.qty-btn:hover { background: var(--color-border-light); color: var(--color-text); }
.qty-btn:active { background: var(--color-border); }
.qty-value {
  width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  height: 32px;
  line-height: 32px;
  color: var(--color-text);
}
.qty-input {
  width: 40px;
  height: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  outline: none;
  font-family: inherit;
  padding: 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input:focus {
  background: var(--color-primary-light);
}

/* Swap button — variant context label */
.swap-variant-context {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 11px;
}

/* ============================================================
   Alerts — subtle with icon space
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.3s var(--ease-out) both;
}
.alert-success { background: var(--color-success-light); color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: var(--color-danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--color-primary-light); color: #3730a3; border: 1px solid #c7d2fe; }
.alert-warning { background: var(--color-warning-light); color: #92400e; border: 1px solid #fde68a; }

/* ============================================================
   Toast Notifications — glass effect
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px) scale(0.95);
  opacity: 0;
  transition: all 0.3s var(--ease-out);
  pointer-events: auto;
}
.toast-text { flex: 1; }
.toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.toast-close:hover { color: #fff; }
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: var(--color-primary); }

/* ============================================================
   Modals — glass backdrop, smooth entrance
   ============================================================ */
body.modal-open {
  overflow: hidden;
}
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.active {
  display: flex;
  animation: overlayIn 0.2s var(--ease-out) both;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.25s var(--ease-out) both;
}
@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
  letter-spacing: -0.3px;
}
.modal p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--color-text-muted);
}
.empty-state-icon { margin-bottom: 16px; opacity: 0.4; }
.empty-state-text { font-size: 15px; font-weight: 500; }

/* ============================================================
   Order Rows
   ============================================================ */
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}
.order-row:last-child { border-bottom: none; }
.order-name { font-weight: 600; color: var(--color-text); }
.order-date { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }
.order-total { font-weight: 600; color: var(--color-text); }
.order-status { font-size: 12px; color: var(--color-text-muted); text-transform: capitalize; margin-top: 3px; }

/* ---- Address Display ---- */
.address-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 16px 0;
}

/* ---- Danger Zone ---- */
.danger-zone {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #ffffff 0%, #fffbfb 100%);
}
.danger-zone .card-title { color: var(--color-danger); }

/* ---- Action Buttons Group ---- */
.action-group, .actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- Stat Card ---- */
.stat-card {
  text-align: center;
  padding: 20px 16px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ============================================================
   Login Page — centered, premium feel
   ============================================================ */
.login-wrap {
  max-width: 400px;
  margin: 100px auto;
  text-align: center;
  animation: fadeInUp 0.5s var(--ease-out) both;
}
.login-brand {
  font-size: 30px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.8px;
}
.login-tagline {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
}
.login-card {
  text-align: left;
  box-shadow: var(--shadow-md);
}
.login-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
  letter-spacing: -0.3px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.login-icon {
  color: var(--color-primary);
  margin-bottom: 16px;
}
.login-help {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 28px;
}
.login-alt-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity var(--duration-fast);
}
.login-alt-link:hover { opacity: 0.75; }

/* ---- Cancel Alternatives List ---- */
.cancel-alternatives {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  padding-left: 20px;
  line-height: 1.8;
}
.cancel-alternatives strong { color: var(--color-text); }

/* ============================================================
   Responsive — mobile-first refinements
   ============================================================ */
@media (max-width: 768px) {
  .sub-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .sub-card-img-wrap { height: 200px; }
  .main { padding: 24px 20px 64px; }
}
@media (max-width: 640px) {
  .nav { padding: 0 16px; height: 48px; }
  .nav-email { max-width: 140px; font-size: 12px; }
  .main { padding: 12px 14px 48px; }
  .page-header { margin-bottom: 12px; }
  .page-header h1 { font-size: 20px; }
  .breadcrumb { margin-bottom: 4px; font-size: 13px; }
  .page-header-row { gap: 8px; }
  /* Strategy banner mobile handled by its own @media block */
  .card { padding: 18px; border-radius: var(--radius-md); }
  .modal { padding: 24px; width: 95%; border-radius: var(--radius-lg); }
  .line-item { gap: 10px; }
  .line-item-actions { margin-left: 0; padding-top: 0; }
  .info-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .form-row { flex-direction: column; }
  .next-order-card { padding: 12px 14px 10px; margin-bottom: 8px; }
  .next-order-label { margin-bottom: 1px; font-size: 9px; letter-spacing: 0.6px; }
  .next-order-date { font-size: 17px; }
  .hero-date-row { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 4px; }
  .hero-date-row .next-order-date { margin-right: auto; }
  .value-badges-row { margin-bottom: 0; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
  .value-badge { padding: 2px 6px; font-size: 10px; gap: 2px; }
  .value-badge svg { width: 10px; height: 10px; }
  .hero-actions-row { margin-top: 8px; gap: 0; justify-content: space-around; }
  .action-icon-btn { padding: 4px 6px; gap: 2px; }
  .action-icon-circle { width: 36px; height: 36px; box-shadow: none; border-width: 1px; }
  .action-icon-circle svg { width: 16px; height: 16px; }
  .action-icon-label { font-size: 10px; }
  .dropdown-wrap .action-icon-btn .action-icon-circle { width: 36px; height: 36px; }
  .next-order-actions { flex-direction: column; gap: 8px; }
  .next-order-actions .btn { width: 100%; }
  .action-group, .actions-bar { flex-direction: column; }
  .action-group .btn, .actions-bar .btn { width: 100%; }
  .cf-skip-options, .cf-freq-options { flex-direction: column; }
  .cf-skip-option, .cf-freq-option { width: 100%; }
  .sub-card-body { padding: 14px 16px 18px; }
  .login-wrap { margin: 60px auto; padding: 0 16px; }
}

/* ============================================================
   Multi-Step Cancel Flow V2 — Skio/Grüns-inspired
   ============================================================ */
.cancel-flow-modal {
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 16px;
  position: relative;
}

/* Close button — top right circle */
.cf-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  transition: background var(--duration-fast), color var(--duration-fast);
  z-index: 2;
}
.cf-close-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Step container */
#cancel-step-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px 24px;
  scroll-behavior: smooth;
}
.cancel-step { display: none; }
.cancel-step.active {
  display: block;
  animation: cfSlideIn 0.35s var(--ease-out) both;
}
@keyframes cfSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.cancel-step.cf-slide-back.active {
  animation: cfSlideBack 0.35s var(--ease-out) both;
}
@keyframes cfSlideBack {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Step 1 visual (GIF / image) */
.cf-step1-visual {
  display: block;
  max-width: 140px;
  max-height: 140px;
  margin: 0 auto 14px;
  border-radius: 10px;
  object-fit: cover;
}

/* Back row — arrow + text at top-left */
.cf-back-row {
  text-align: left;
  margin-bottom: 8px;
}
.cf-back-row .cf-back-link {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 2px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast);
}
.cf-back-row .cf-back-link:hover {
  color: var(--color-text);
}

/* Step headings */
.cancel-step h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.cancel-step-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Reason buttons — check on RIGHT, green accent */
.cancel-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  text-align: left;
}
.cancel-reason-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: all var(--duration-fast) var(--ease-out);
}
.cancel-reason-btn .cf-reason-label {
  flex: 1;
  min-width: 0;
}
.cancel-reason-btn:hover {
  border-color: #10b981;
  background: #f0fdf4;
}
.cancel-reason-btn.selected {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px #10b981;
}
.cancel-reason-btn .cf-reason-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
}
.cancel-reason-btn.selected .cf-reason-check {
  border-color: #059669;
  background: #059669;
}
.cancel-reason-btn .cf-reason-check svg {
  display: none;
  width: 13px;
  height: 13px;
  color: #fff;
}
.cancel-reason-btn.selected .cf-reason-check svg {
  display: block;
}

/* Skip / Frequency option pills — green accent */
.cf-skip-options,
.cf-freq-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.cf-skip-option,
.cf-freq-option {
  padding: 11px 22px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.cf-skip-option:hover,
.cf-freq-option:hover {
  border-color: #10b981;
  background: #f0fdf4;
}
.cf-skip-option.selected,
.cf-freq-option.selected {
  border-color: #059669;
  background: #059669;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Swap line item picker */
.cf-line-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.cf-line-pick-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  cursor: pointer;
  text-align: left;
  transition: all var(--duration-fast) var(--ease-out);
}
.cf-line-pick-btn:hover {
  border-color: #10b981;
  background: #f0fdf4;
}
.cf-line-pick-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg);
}
.cf-line-pick-img-placeholder {
  border: 1px dashed var(--color-border);
}
.cf-line-pick-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

/* Education body text */
.cf-education-body {
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--color-bg);
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  max-height: 220px;
  overflow-y: auto;
}
.cf-education-body::-webkit-scrollbar { width: 4px; }
.cf-education-body::-webkit-scrollbar-track { background: transparent; }
.cf-education-body::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.cf-education-body p { margin: 0 0 10px; }
.cf-education-body p:last-child { margin-bottom: 0; }

/* Tip list (from cfFormatBody arrow lines) */
.cf-tip-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.cf-tip-list li {
  position: relative;
  padding: 5px 0 5px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.cf-tip-list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 600;
}

/* Offer card — bold green card */
.cf-offer-card {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #6ee7b7;
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: cfOfferPop 0.5s var(--ease-out) both;
}
@keyframes cfOfferPop {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
.cf-offer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
}
.cf-offer-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #059669;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.cf-offer-amount {
  font-size: 40px;
  font-weight: 900;
  color: #065f46;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.cf-offer-desc {
  font-size: 14px;
  font-weight: 500;
  color: #064e3b;
  margin-bottom: 0;
  line-height: 1.45;
}

/* Blocked offer state (active cooldown) */
.cf-offer-card-blocked {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  opacity: 0.75;
}
.cf-offer-card-blocked::before {
  background: #94a3b8;
}
.cf-offer-card-blocked .cf-offer-tag {
  background: #94a3b8;
}
.cf-offer-card-blocked .cf-offer-amount {
  color: #64748b;
}
.cf-offer-card-blocked .cf-offer-desc {
  color: #64748b;
}
.cf-offer-blocked-msg {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.btn-blocked {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Offer option buttons within the card */
.cf-offer-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.cf-offer-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid rgba(6, 95, 70, 0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--duration-fast);
  text-align: left;
}
.cf-offer-option:hover {
  border-color: #059669;
  background: rgba(255,255,255,0.9);
}
.cf-offer-option.selected {
  border-color: #059669;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}
.cf-offer-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(6, 95, 70, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
}
.cf-offer-option.selected .cf-offer-option-radio {
  border-color: #059669;
  background: #059669;
}
.cf-offer-option-radio svg {
  display: none;
  width: 12px;
  height: 12px;
  color: #fff;
}
.cf-offer-option.selected .cf-offer-option-radio svg {
  display: block;
}
.cf-offer-option-label {
  font-size: 13px;
  font-weight: 600;
  color: #065f46;
  line-height: 1.4;
}

/* Footer actions */
.cf-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
.cf-footer .cf-primary-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.cf-footer .cf-primary-btn.cf-btn-positive {
  background: #059669;
  color: #fff;
}
.cf-footer .cf-primary-btn.cf-btn-positive:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}
.cf-footer .cf-primary-btn.cf-btn-positive:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cf-footer .cf-primary-btn.cf-btn-danger {
  background: #dc2626;
  color: #fff;
}
.cf-footer .cf-primary-btn.cf-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}
.cf-footer .cf-primary-btn.cf-btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cf-footer .cf-secondary-link {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--duration-fast);
}
.cf-footer .cf-secondary-link:hover {
  color: var(--color-text);
}

/* Savings bar pinned to modal bottom */
.cancel-savings-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-top: 1px solid #a7f3d0;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
}
.cancel-savings-bar svg {
  flex-shrink: 0;
  color: #059669;
}

/* Success animation */
.cf-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cfSuccessPop 0.5s var(--ease-out) both;
}
@keyframes cfSuccessPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.cf-success-icon svg {
  width: 28px;
  height: 28px;
  color: #059669;
}

/* Cancelled state */
.cf-cancelled-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Confirmation danger zone */
.cf-danger-zone {
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--color-bg);
  text-align: left;
}
.cf-danger-zone label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.cf-danger-zone textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 48px;
  transition: border-color var(--duration-fast);
  box-sizing: border-box;
}
.cf-danger-zone textarea:focus {
  outline: none;
  border-color: #059669;
}

/* Responsive */
@media (max-width: 540px) {
  .cancel-flow-modal { max-height: 85vh; border-radius: 14px; }
  #cancel-step-container { padding: 14px 18px 20px; }
  .cancel-step h2 { font-size: 18px; }
  .cancel-step-subtitle { font-size: 13px; }
  .cancel-reason-btn { padding: 12px 14px; font-size: 13px; }
  .cf-skip-options, .cf-freq-options { flex-direction: column; }
  .cf-skip-option, .cf-freq-option { width: 100%; text-align: center; }
  .cf-close-btn { top: 10px; right: 10px; }
  .cf-offer-amount { font-size: 34px; }
  .cf-offer-card { padding: 20px 16px; }
  .cf-education-body { max-height: 180px; padding: 12px 14px; font-size: 13px; }
}

/* ============================================================
   Product Picker
   ============================================================ */
.product-picker-modal {
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.picker-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}
.picker-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--duration-fast);
}
.picker-close:hover {
  color: var(--color-text);
}

.picker-search {
  position: relative;
  padding: 16px 24px;
}
.picker-search-icon {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}
.picker-search .form-input {
  padding-left: 40px;
}

/* Filter chips */
.picker-filters {
  padding: 0 24px 8px;
}
.picker-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.picker-filter-group:last-child {
  margin-bottom: 0;
}
.picker-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
  white-space: nowrap;
}
.picker-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast);
  user-select: none;
}
.picker-filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.picker-filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.picker-filter-clear {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast);
}
.picker-filter-clear:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.picker-loading, .picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.picker-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
/* @keyframes spin is defined once near .btn.loading (line ~523) */

.picker-product-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.picker-product-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.picker-product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.picker-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picker-product-placeholder {
  color: var(--color-text-muted);
}

.picker-product-name {
  font-size: 13px;
  font-weight: 550;
  color: var(--color-text);
  padding: 10px 10px 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.picker-product-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 2px 10px 4px;
}
.picker-product-price .price-compare {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-right: 4px;
}
.picker-product-price .price-sub-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-success, #059669);
  margin-top: 1px;
}
.picker-product-variants {
  font-size: 11px;
  color: var(--color-text-muted);
  padding: 0 10px 10px;
}

/* Variant selection panel */
.picker-variant-panel {
  padding: 0 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.picker-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  transition: color var(--duration-fast);
}
.picker-back:hover {
  color: var(--color-primary-hover);
}

.picker-selected-product {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
}
.picker-selected-img-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f4f6;
}
.picker-selected-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picker-selected-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.picker-variant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.picker-variant-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast);
}
.picker-variant-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.picker-variant-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.picker-variant-btn.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.picker-variant-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.picker-variant-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-align: right;
}
.picker-variant-price .price-compare {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 12px;
  margin-right: 4px;
}
.picker-variant-sold-out {
  font-size: 11px;
  color: var(--color-danger);
  font-weight: 500;
}

.picker-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.picker-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picker-qty-row .form-label {
  margin: 0;
}

.picker-type-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.picker-type-row .form-label {
  margin: 0;
}
.picker-type-options {
  display: flex;
  gap: 12px;
}
.picker-type-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
}
.picker-type-option input[type="radio"] {
  accent-color: var(--color-primary);
}

.picker-confirm {
  width: 100%;
}
.picker-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-picker-modal {
    max-height: 90vh;
  }
  .picker-filters {
    padding: 0 16px 6px;
  }
  .picker-filter-chip {
    padding: 3px 10px;
    font-size: 12px;
  }
}

/* ============================================================
   Strategy Banners — Upgrade / Upsell offers
   ============================================================ */

/* ── Strategy Banner — compact inline layout ─────────────── */
.strategy-banner {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  position: relative;
  animation: fadeInUp var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

.strategy-banner-upgrade {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #d1fae5 100%);
  border: 1.5px solid #86efac;
}

.strategy-banner-dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #166534;
  font-size: 18px;
  line-height: 1;
  padding: 2px 5px;
  opacity: 0.4;
  transition: opacity var(--duration-fast);
  border-radius: 4px;
  z-index: 1;
}
.strategy-banner-dismiss:hover { opacity: 1; }

.strategy-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 2px 0;
}

.strategy-banner-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.6);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  margin-top: 2px;
}

.strategy-banner-content {
  flex: 1;
  min-width: 0;
}

.strategy-banner-badge {
  display: inline-flex;
  align-items: center;
  background: #16a34a;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 4px;
}

.strategy-banner-title {
  font-size: 15px;
  font-weight: 800;
  color: #14532d;
  line-height: 1.3;
  margin-bottom: 4px;
}

.strategy-banner-body {
  font-size: 13px;
  color: #166534;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Bottom row: comparison items + CTA inline on desktop */
.strategy-banner-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.strategy-banner-comparison {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.comparison-item {
  background: rgba(255,255,255,0.75);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
  min-width: 100px;
}

.comparison-item-from .comparison-value {
  text-decoration: line-through;
  color: #94a3b8;
}

.comparison-item-to {
  border-color: #4ade80;
  background: rgba(255,255,255,0.9);
}

.comparison-item-to .comparison-value {
  color: #16a34a;
  font-weight: 800;
}

.comparison-label {
  font-size: 11px;
  color: #4b7c59;
  font-weight: 500;
  margin-bottom: 2px;
}

.comparison-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a3c2a;
  letter-spacing: -0.3px;
}

.comparison-arrow {
  color: #16a34a;
  flex-shrink: 0;
  opacity: 0.6;
  display: flex;
  align-items: center;
}

/* CTA — sits inline with comparison on desktop, full-width on mobile */
.strategy-banner-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.btn-upgrade {
  background: #16a34a;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2);
}
.btn-upgrade:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
}
.btn-upgrade:active { transform: translateY(0); }
.btn-upgrade.loading { opacity: 0.7; cursor: wait; }

/* Strategy banner — mobile */
@media (max-width: 640px) {
  .strategy-banner { padding: 12px 14px; }
  .strategy-banner-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .strategy-banner-icon { display: none; }
  .strategy-banner-title { font-size: 14px; }
  .strategy-banner-body { font-size: 12px; margin-bottom: 8px; }
  .strategy-banner-bottom {
    flex-direction: column;
    gap: 10px;
  }
  .strategy-banner-comparison {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .comparison-item { min-width: 80px; padding: 6px 10px; flex-shrink: 0; }
  .comparison-label { font-size: 10px; }
  .comparison-value { font-size: 13px; }
  .strategy-banner-cta {
    width: 100%;
  }
  .btn-upgrade {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}

/* ============================================================
   Price Summary
   ============================================================ */
.price-summary { padding: 0 4px; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-light);
}
.price-row:last-child { border-bottom: none; }
.price-row-discount span:last-child { color: var(--color-success); font-weight: 600; }
.price-row-total {
  border-top: 2px solid var(--color-border);
  border-bottom: none;
  margin-top: 4px;
  padding-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

/* ============================================================
   Phase 4: Two-Column Detail Layout
   ============================================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.detail-main { min-width: 0; }
.detail-sidebar { position: sticky; top: 20px; min-width: 0; }
@media (max-width: 1023px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

/* ============================================================
   Icon Action Buttons
   ============================================================ */
.hero-actions-row {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.action-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background var(--duration-fast), transform var(--duration-fast);
}
.action-icon-btn:hover { background: rgba(0,0,0,0.05); }
.action-icon-btn:active { transform: scale(0.95); }
.action-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.action-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  color: var(--color-text);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.action-icon-btn:hover .action-icon-circle {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(79,70,229,0.15);
}
.action-icon-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* ============================================================
   Value Reinforcement Badges
   ============================================================ */
.value-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2px;
}
.value-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.9);
  color: var(--color-text-secondary);
}
.value-badge-green {
  background: rgba(5,150,105,0.1);
  border-color: rgba(5,150,105,0.2);
  color: #065f46;
}
.value-badge-blue {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.15);
  color: #1e40af;
}

/* ============================================================
   Dropdown Menu
   ============================================================ */
.dropdown-wrap { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  min-width: 200px;
  overflow: hidden;
  z-index: 100;
  animation: dropdownIn 0.15s ease;
}
.dropdown-menu.open { display: block; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  text-align: left;
  transition: background var(--duration-fast);
}
.dropdown-item:hover { background: var(--color-bg-secondary); }
.dropdown-item-danger { color: var(--color-danger); }
.dropdown-item-danger:hover { background: #fef2f2; }
.dropdown-divider { height: 1px; background: var(--color-border-light); margin: 2px 0; }

/* ============================================================
   Info Pair Card (Shipping + Payment side by side)
   ============================================================ */
.info-pair-card { display: flex; gap: 0; padding: 0 !important; }
.info-pair-col { flex: 1; padding: 16px; min-width: 0; }
.info-pair-divider {
  width: 1px;
  background: var(--color-border-light);
  align-self: stretch;
  flex-shrink: 0;
}
.info-pair-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.info-pair-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.info-pair-text { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }
.info-pair-col .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 12px; }
.btn-link-small {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-small:hover { color: #3730a3; }
@media (max-width: 480px) {
  .info-pair-card { flex-direction: column; }
  .info-pair-divider { width: auto; height: 1px; }
}

/* ============================================================
   Recommendations — "You Might Also Like"
   ============================================================ */
.reco-card .card-header { margin-bottom: 4px; }
.reco-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.reco-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.reco-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(79,70,229,0.1);
}
.reco-item-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reco-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reco-item-img-placeholder {
  color: #cbd5e1;
}
.reco-item-body {
  padding: 10px 12px 4px;
  flex: 1;
}
.reco-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reco-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 4px;
}
.reco-item-variants {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.reco-add-btn {
  margin: 8px 12px 12px;
  text-align: center;
}
.reco-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 20px;
}
@media (max-width: 640px) {
  .reco-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .reco-item-body { padding: 8px 10px 4px; }
  .reco-item-title { font-size: 12px; }
  .reco-add-btn { margin: 6px 10px 10px; font-size: 12px; }
}

/* ── Phase 7: Order History Timeline ─────────────────────────────────── */
.order-timeline { padding: 0; }
.order-timeline-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.order-timeline-item:last-child { border-bottom: none; }
.order-timeline-item:hover { background: #fafbfc; }

.order-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 5px;
  flex-shrink: 0;
  position: relative;
}
.order-timeline-item:not(:last-child) .order-timeline-dot::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 4px;
  width: 2px;
  height: calc(100% + 18px);
  background: #e2e8f0;
}

.order-timeline-content { flex: 1; min-width: 0; }
.order-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.order-timeline-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.order-timeline-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.order-timeline-date {
  font-size: 12px;
  color: var(--color-text-muted);
}
.order-timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}
.order-timeline-status.status-paid { background: #dcfce7; color: #166534; }
.order-timeline-status.status-pending { background: #fef9c3; color: #854d0e; }
.order-timeline-status.status-failed { background: #fee2e2; color: #991b1b; }
.order-timeline-status.status-refunded { background: #f1f5f9; color: #64748b; }

.order-timeline-tracking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 4px;
  margin-left: 6px;
  text-decoration: none;
}
.order-timeline-tracking:hover { text-decoration: underline; }

/* Tracking info container — enhanced display for tracking data */
.tracking-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #f0f4ff;
  border: 1px solid #dbe4ff;
  border-radius: 8px;
}
.tracking-info-icon {
  flex-shrink: 0;
  color: var(--color-primary);
}
.tracking-info-number {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.tracking-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: background var(--duration-fast), transform var(--duration-fast);
}
.tracking-info-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.order-timeline-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.order-timeline-hidden {
  display: none;
}
.order-timeline-hidden.show {
  display: block;
}

/* ── Phase 7: Lifetime Stats ─────────────────────────────────────────── */
.lifetime-stats {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  flex-wrap: wrap;
}
.lifetime-stat {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 10px 8px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.lifetime-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}
.lifetime-stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Phase 7: Upcoming Orders ────────────────────────────────────────── */
.upcoming-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.upcoming-order:last-child { border-bottom: none; }
.upcoming-order-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.upcoming-order-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}
.upcoming-order-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .lifetime-stats { gap: 8px; padding: 10px 12px; }
  .lifetime-stat { padding: 8px 6px; }
  .lifetime-stat-value { font-size: 15px; }
  .lifetime-stat-label { font-size: 10px; }
  .order-timeline-item { padding: 10px 12px; gap: 10px; }
}

/* ── Skip Modal (Grün-style radio options) ───────────────────────────── */
.skip-modal {
  max-width: 400px;
  padding: 0;
}
.skip-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.skip-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close-btn:hover { color: var(--color-text); }
.skip-modal-desc {
  padding: 8px 24px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}
.skip-sub-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
}
.skip-sub-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.skip-sub-info {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.4;
}
.skip-sub-info strong {
  font-weight: 700;
}
.skip-sub-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}
.skip-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px;
}
.skip-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #fff;
}
.skip-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.skip-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.skip-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.skip-option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.skip-modal-actions {
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-block { width: 100%; }

/* ── Frequency Modal ─────────────────────────────────────────────────── */
.frequency-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.frequency-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #fff;
}
.frequency-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.frequency-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.frequency-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.frequency-option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  flex: 1;
}
.frequency-option-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.frequency-option-current {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* ── Strategy Countdown Timer ────────────────────────────────────────── */
.strategy-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
}
.strategy-countdown svg { flex-shrink: 0; }
.strategy-countdown-text { white-space: nowrap; }
@media (max-width: 640px) {
  .strategy-countdown { font-size: 12px; padding: 6px 10px; gap: 6px; }
}

/* ── Announcement Bars ────────────────────────────────────────────────── */
.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  position: relative;
}
.announcement-bar-text {
  text-align: center;
  flex: 1;
}
.announcement-bar-dismiss {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.announcement-bar-dismiss:hover {
  opacity: 1;
}
@media (max-width: 640px) {
  .announcement-bar { font-size: 12px; padding: 8px 12px; border-radius: 8px; }
}

/* ============================================================
   Alert Banners (Payment failure / Card expiry)
   ============================================================ */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.alert-banner-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.alert-banner-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.alert-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.alert-banner-content {
  flex: 1;
}
.alert-banner-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.alert-banner-content p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 4px 0 0;
}
@media (max-width: 640px) {
  .alert-banner { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .alert-banner .btn { width: 100%; margin-top: 4px; }
}

/* ============================================================
   Payment Card Display
   ============================================================ */
.payment-card-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.card-brand-icon {
  width: 38px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.card-brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
  flex-shrink: 0;
}
.card-brand-visa { background: #1a1f71; }
.card-brand-mastercard { background: linear-gradient(135deg, #eb001b, #f79e1b); }
.card-brand-amex { background: #006fcf; }
.card-brand-discover { background: #ff6600; }
.card-brand-shopify, .card-brand-shop_pay { background: #5a31f4; }
.card-brand-paypal-bg { background: #003087; }
.card-brand-unknown { background: #6b7280; }
.card-number {
  font-size: 14px;
  font-weight: 500;
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
  letter-spacing: 1px;
}
.card-expiry {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-left: auto;
}

/* ============================================================
   Status Badges — additional states
   ============================================================ */
.badge-expired { background: #f3f4f6; color: #6b7280; }
.badge-failed { background: #fef2f2; color: #dc2626; }
.badge-unknown { background: #f9fafb; color: #9ca3af; border: 1px solid #e5e7eb; }
.badge-warning {
  background: #fffbeb;
  color: #d97706;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

/* ============================================================
   Hero — unknown / fallback state
   ============================================================ */
.sub-hero-unknown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.sub-hero-unknown .hero-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}
.sub-hero-unknown .hero-subtitle a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================================================================
   Strategy Banner V2 — Redesigned upgrade banner
   ================================================================ */
.strategy-banner-v2 {
  position: relative;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #f0fdf4 100%);
  border: 1.5px solid #6ee7b7;
  border-radius: 16px;
  padding: 28px 24px 24px;
  margin-bottom: 20px;
  text-align: center;
}
.strategy-v2-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 4px;
}
.strategy-v2-badge {
  display: inline-block;
  background: #059669;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.strategy-v2-headline {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.3;
}
.strategy-v2-body {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 16px;
  line-height: 1.5;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.strategy-v2-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
}
.strategy-v2-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.strategy-v2-compare-box {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 130px;
  text-align: center;
}
.strategy-v2-compare-from {
  border-color: #d1d5db;
}
.strategy-v2-compare-to {
  border-color: #059669;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}
.strategy-v2-compare-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}
.strategy-v2-compare-value {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.strategy-v2-compare-to .strategy-v2-compare-value {
  color: #059669;
}
.strategy-v2-arrow {
  color: #9ca3af;
  flex-shrink: 0;
}
.strategy-v2-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  max-width: 340px;
  justify-content: center;
}
.strategy-v2-cta:hover {
  background: #047857;
  transform: translateY(-1px);
}
.strategy-v2-cta:active {
  transform: translateY(0);
}
.strategy-v2-cta.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Mobile adjustments for strategy banner */
@media (max-width: 480px) {
  .strategy-banner-v2 {
    padding: 20px 16px 18px;
    border-radius: 12px;
  }
  .strategy-v2-headline {
    font-size: 18px;
  }
  .strategy-v2-compare-box {
    padding: 10px 14px;
    min-width: 100px;
  }
  .strategy-v2-compare-value {
    font-size: 15px;
  }
  .strategy-v2-cta {
    padding: 12px 24px;
    font-size: 15px;
  }
}

/* ================================================================
   Compact Address Modal
   ================================================================ */
.address-modal-compact {
  max-width: 520px !important;
}
.address-modal-compact .modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.address-modal-compact .modal-header-row h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.address-grid .form-group {
  margin-bottom: 0;
}
.address-grid .address-full-width {
  grid-column: 1 / -1;
}
.address-grid .form-label {
  font-size: 12px;
  margin-bottom: 3px;
}
.address-grid .form-input {
  padding: 8px 10px;
  font-size: 14px;
}
.address-modal-compact .modal-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* Mobile: stack to single column on very small screens */
@media (max-width: 400px) {
  .address-grid {
    grid-template-columns: 1fr;
  }
  .address-grid .address-full-width {
    grid-column: 1;
  }
}

/* PayPal brand badge */
.card-brand-paypal {
  background: #003087;
  color: #fff;
}
