/* Duskstone Design System: Seamless Dark/Light Canvas with Emerald Accents */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Readex+Pro:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root, [data-theme="dark"] {
  --bg-canvas: #09090b;
  --bg-surface: #121215;
  --bg-surface-elevated: #18181d;
  --border-subtle: #27272a;
  --border-highlight: #3f3f46;
  
  --emerald-primary: #10b981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --emerald-subtle: rgba(16, 185, 129, 0.1);
  --emerald-border: rgba(16, 185, 129, 0.35);

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --heading-color: #ffffff;

  --accent-cyan: #06b6d4;
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-highlight: #cbd5e1;

  --emerald-primary: #0d9488;
  --emerald-hover: #0f766e;
  --emerald-glow: rgba(13, 148, 136, 0.15);
  --emerald-subtle: rgba(13, 148, 136, 0.08);
  --emerald-border: rgba(13, 148, 136, 0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --heading-color: #0f172a;

  --accent-cyan: #0284c7;
  --danger: #dc2626;
  --danger-subtle: rgba(220, 38, 38, 0.08);
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 24px;
  min-height: 100vh;
}

.dashboard-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: 18px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-primary);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-ctrl {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-ctrl:hover {
  border-color: var(--emerald-primary);
  color: var(--text-primary);
}

.current-plan-badge {
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-border);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 10px var(--emerald-glow);
}

/* Metric Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.metric-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading-color);
}

.metric-highlight {
  color: var(--emerald-primary);
  text-shadow: 0 0 12px var(--emerald-glow);
}

/* Navigation Tabs */
.tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
  border-color: var(--emerald-border);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.tab-btn:hover:not(.active) {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
}

/* Form Inputs */
.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.input-field {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}

.input-field:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.btn-primary {
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 15px var(--emerald-glow);
  transition: all 0.2s;
}

[data-theme="dark"] .btn-primary {
  color: #09090b;
}

.btn-primary:hover {
  background: var(--emerald-hover);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.btn-action {
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-border);
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--emerald-primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--emerald-glow);
}

[data-theme="dark"] .btn-action:hover {
  color: #09090b;
}

/* Product Preview Grid */
.product-preview-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  background: var(--bg-surface-elevated);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  margin-top: 16px;
}

.preview-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 14px;
}

[dir="ltr"] .data-table {
  text-align: left;
}

.data-table th {
  background: var(--bg-surface-elevated);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.badge-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ready {
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-border);
}

.badge-shipped {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-return {
  background: var(--danger-subtle);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.pricing-card {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  background: var(--bg-surface-elevated);
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pricing-card:hover {
  border-color: var(--border-highlight);
}

.pricing-card.featured {
  border: 1px solid var(--emerald-border);
  box-shadow: 0 0 24px var(--emerald-glow);
}

.pricing-header {
  margin-bottom: 20px;
  text-align: center;
}

.pricing-price {
  font-size: 34px;
  font-weight: 800;
  color: var(--heading-color);
  margin: 10px 0;
}

.pricing-features {
  list-style: none;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li span {
  color: var(--emerald-primary);
}

/* ==========================================================================
   Merchant-Validated Enhancements: Wizard, Model Isolation, Matrix, Policies
   ========================================================================== */

/* 3-Step Guided Onboarding Wizard */
.onboarding-wizard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s;
}

.wizard-step.active {
  opacity: 1;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}

.wizard-step.active .step-num {
  background: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-primary);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading-color);
}

.step-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.wizard-arrow {
  font-size: 16px;
  color: var(--border-highlight);
  user-select: none;
}

/* Smart Model Isolation Banner */
.model-isolation-banner {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.isolation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.isolation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-primary);
}

.isolation-tag {
  font-size: 11px;
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-border);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.isolation-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.isolation-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s;
}

.radio-label:hover {
  border-color: var(--emerald-border);
}

.radio-label input[type="radio"] {
  accent-color: var(--emerald-primary);
  cursor: pointer;
}

/* 1:1 Variant Matrix Card & Table */
.variant-matrix-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading-color);
}

.safety-badge {
  font-size: 11px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.variant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.variant-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  padding: 8px 10px;
  text-align: start;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

.variant-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

.tag-safe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald-primary);
  font-weight: 600;
}

.tag-zeroed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Shipping & Returns Transparency Policy Card */
.policy-transparency-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.policy-col {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.policy-icon {
  font-size: 22px;
  line-height: 1;
}

.policy-content {
  display: flex;
  flex-direction: column;
}

.policy-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.policy-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 2px;
}

.policy-sub {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .onboarding-wizard {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .wizard-arrow {
    display: none;
  }
  .policy-transparency-card {
    grid-template-columns: 1fr;
  }
}

