/* ==========================================================================
   E4Pay / Firepay Global Stylesheet
   - Admin Layout: Collapsible hover sidebar, metric cards, data tables, modals.
   - 6-Step Checkout Wizard (Firepay Style): Modelos, Funil, Configurações,
     Order Bump com Live Preview, Aparência, Concluir.
   - Public Checkout: Desktop 2-column layout (max-width ~1050px), responsive mobile
     collapse (<768px), dynamic CSS variables, Order Bump box, Payment tabs.
   ========================================================================== */

:root {
  --admin-bg: #f8fafc;
  --admin-sidebar-bg: #0b132b;
  --admin-sidebar-hover: #1c2541;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-card-bg: #ffffff;
  --admin-border: #e2e8f0;
  --admin-primary: #2563eb;
  --admin-primary-hover: #1d4ed8;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbe6;
  
  /* Dynamic CSS variables overridden by individual checkout settings */
  --primary-color: #16a34a;
  --primary-hover: #15803d;
  --bg-color: #f1f5f9;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   ADMIN LAYOUT & COLLAPSIBLE HOVER SIDEBAR
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 72px;
  background-color: var(--admin-sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar:hover {
  width: 260px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
}

.brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand span {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .brand span {
  opacity: 1;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item .icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item span:not(.icon) {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .nav-item span:not(.icon) {
  opacity: 1;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--admin-sidebar-hover);
  color: #ffffff;
}

.nav-item.active {
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.1);
}

.merchant-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  margin-top: auto;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

.merchant-card div {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
}

.sidebar:hover .merchant-card div {
  opacity: 1;
}

.merchant-card strong {
  font-size: 0.85rem;
  color: #ffffff;
}

.merchant-card small {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Workspace */
.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid var(--admin-border);
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-muted);
  font-weight: 600;
}

.topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text);
}

.view {
  display: none;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-heading p {
  color: var(--admin-muted);
  font-size: 0.9rem;
}

/* Metric Cards */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--admin-muted);
  font-weight: 500;
}

.metric-card strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--admin-text);
  margin: 0.35rem 0;
}

.metric-card small {
  font-size: 0.8rem;
  color: var(--admin-muted);
}

/* Tables */
.table-wrap {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th {
  background-color: #f8fafc;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--admin-muted);
  border-bottom: 1px solid var(--admin-border);
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge.aprovado, .badge.acesso_liberado, .badge.ativo {
  background-color: var(--success-bg);
  color: var(--success);
}

.badge.recusado, .badge.falha_liberacao, .badge.inativo {
  background-color: var(--danger-bg);
  color: var(--danger);
}

.badge.pendente {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

.btn-primary {
  background-color: var(--admin-primary);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--admin-primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
}

.btn-danger {
  background-color: #ffffff;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-danger:hover {
  background-color: var(--danger-bg);
}

/* Forms */
.form-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--admin-text);
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

input[type="text"], input[type="number"], input[type="url"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--admin-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-picker-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker-input input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 0.35rem;
  cursor: pointer;
  padding: 0;
}

/* ==========================================================================
   WIZARD DE CRIAÇÃO DE CHECKOUT EM 6 PASOS (FIREPAY STYLE)
   ========================================================================== */

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  background-color: #ffffff;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--admin-border);
}

.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  overflow-x: auto;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background-color: #f1f5f9;
  color: var(--admin-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;

  transition: all 0.2s;
}

.step-item.active {
  background-color: var(--admin-primary);
  color: #ffffff;
}

.step-item.completed {
  background-color: #dbeafe;
  color: var(--admin-primary);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
}

.step-item.active .step-number {
  background: rgba(255, 255, 255, 0.25);
}

.step-connector {
  width: 20px;
  height: 2px;
  background-color: var(--admin-border);
  flex-shrink: 0;
}

.btn-back-link {
  background: none;
  border: none;
  color: var(--admin-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
}

.wizard-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--admin-text);
  margin-bottom: 0.35rem;
}

.wizard-subtitle {
  font-size: 0.9rem;
  color: var(--admin-muted);
  margin-bottom: 1.75rem;
  max-width: 850px;
  line-height: 1.5;
}

/* Models Grid (Step 1) */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.model-card {
  background-color: #ffffff;
  border: 2px solid var(--admin-border);
  border-radius: 0.85rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-2px);
}

.model-card.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.model-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.model-preview-thumb {
  height: 180px;
  background-color: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.model-footer {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--admin-border);
}

.model-footer strong {
  font-size: 0.95rem;
  display: block;
}

.model-footer small {
  font-size: 0.8rem;
  color: var(--admin-muted);
}

.btn-select-model {
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.model-card.selected .btn-select-model {
  background-color: var(--admin-primary);
  color: #ffffff;
  border-color: var(--admin-primary);
}

/* Funnels List (Step 2) */
.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.funnel-card {
  background-color: #ffffff;
  border: 2px solid var(--admin-border);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.funnel-card.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.funnel-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.funnel-info p {
  font-size: 0.85rem;
  color: var(--admin-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.btn-choose-funnel {
  background-color: var(--admin-primary);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.funnel-diagram {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  font-size: 0.8rem;
  font-weight: 700;
}

.node-box {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.node-box.green {
  background-color: var(--success-bg);
  border-color: #bbf7d0;
  color: var(--success);
}

.node-box.orange {
  background-color: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.node-box.pink {
  background-color: #fdf2f8;
  border-color: #fbcfe8;
  color: #be185d;
}

.arrow {
  color: var(--admin-muted);

  font-size: 0.8rem;
}

/* Order Bump & Appearance Wizard 2-Column Grid (Steps 4 & 5) */
.order-bump-wizard-grid, .appearance-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .funnel-card, .order-bump-wizard-grid, .appearance-editor-grid {
    grid-template-columns: 1fr;
  }
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--admin-border);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   PUBLIC CHECKOUT PAGE (FIREPAY 2-COLUMN DESKTOP + RESPONSIVE MOBILE)
   ========================================================================== */

#public-checkout-view {
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 3rem 0;
}

.checkout-top-banner {
  width: 100%;
  background-color: #dc2626;
  color: #ffffff;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  margin-bottom: 2rem;
}

.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.checkout-container {
  width: 100%;
  max-width: 1050px;
  padding: 0 1.25rem;
  margin: 0 auto;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.product-sidebar-card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.75rem;
  text-align: center;
  position: sticky;
  top: 1.5rem;
}

.product-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  margin: 0 auto 1.25rem auto;
  display: block;
}

.product-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.product-price-box {
  background-color: #f8fafc;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
}

.anchor-price {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.installment-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0.2rem 0;
}

.sight-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.includes-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: left;
}

.includes-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.includes-list {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 1.1rem;
}

.checkout-main-card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-bump-box {
  border: 2px dashed #f59e0b;
  background-color: #fffbeb;
  border-radius: 0.85rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.order-bump-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 0.75rem;
}

.order-bump-card-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.order-bump-thumb {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #fde68a;
}

.order-bump-info {
  flex: 1;
}

.order-bump-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #78350f;
}

.order-bump-item-desc {
  font-size: 0.8rem;
  color: #92400e;
  margin: 0.2rem 0;
  line-height: 1.3;
}

.order-bump-item-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: #d97706;
}

.btn-order-bump-cta {
  width: 100%;
  background-color: #ea580c;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.btn-order-bump-cta:hover {
  background-color: #c2410c;
}

.btn-order-bump-cta input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ea580c;
  cursor: pointer;
}

.payment-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background-color: #f1f5f9;
  padding: 0.35rem;
  border-radius: 0.65rem;
}

.payment-tab {
  padding: 0.75rem 0.5rem;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.payment-tab.active {
  background-color: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.pix-box {
  text-align: center;
  padding: 1.25rem 0;
}

.qr-code-img {
  width: 180px;
  height: 180px;
  border-radius: 0.5rem;
  border: 1px solid var(--admin-border);
  margin: 0.85rem 0;
}

.pix-code-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pix-code-input {
  font-family: monospace;
  font-size: 0.75rem;
  background-color: #f8fafc;
}

.summary-box {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.total-amount {
  color: var(--primary-color);
}

.btn-checkout-cta {
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-checkout-cta:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-checkout-cta:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

.checkout-footer {
  text-align: center;
  padding: 1.5rem 0 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.security-seals {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.seal-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #475569;
}

.alert-error {
  background-color: var(--danger-bg);
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: none;
}

.upsell-screen {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.upsell-badge {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.btn-upsell-accept {
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  margin-top: 1.25rem;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.btn-upsell-decline {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  margin-top: 0.85rem;
  cursor: pointer;
}

.success-screen {
  text-align: center;
  padding: 2.5rem 1.5rem;
  max-width: 540px;
  margin: 0 auto;
}

.success-icon {
  width: 76px;
  height: 76px;
  background-color: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.25rem auto;
}
