/* ═══════════════════════════════════════════════
   TuftNano AI Design Studio — Ultra-Premium 3D Moss Carpet
   $65/sq-ft · DHL Express · Wayfair Aesthetic
   Nature palette: moss green, earth brown, water blue
   ═══════════════════════════════════════════════ */

/* ─── Nature Palette ─── */
.tool-page {
  --moss: #4a7c59;
  --moss-light: #6fa87a;
  --moss-dark: #2d5a3a;
  --moss-glow: rgba(74,124,89,0.25);
  --earth: #8b6f47;
  --earth-light: #b89a6a;
  --water: #3a8fb7;
  --water-light: #67b8d8;
  --leaf: #2d6a4f;
  --stone: #6c757d;
  --gold: #c9a962;
  --nature-grad: linear-gradient(135deg, #4a7c59 0%, #3a8fb7 50%, #2d6a4f 100%);
  --moss-grad: linear-gradient(135deg, #4a7c59, #6fa87a);
  --earth-grad: linear-gradient(135deg, #8b6f47, #b89a6a);
  --water-grad: linear-gradient(135deg, #3a8fb7, #67b8d8);
  --premium-grad: linear-gradient(135deg, #c9a962, #e8d5a3);
  --card-bg: rgba(255,255,255,0.025);
  --card-border: rgba(255,255,255,0.06);
}

/* ─── Tool Page Layout ─── */
.tool-page {
  min-height: 100vh;
  background: #0a0a0f;
  color: #e8e8ec;
  padding-top: 72px;
}

/* ─── Tool Nav Bar ─── */
.tool-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(10,10,15,0.96);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tool-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}
.tool-nav-brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: contain;
}
.tool-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tool-nav-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-nav-title i { color: var(--moss); }
.tool-nav-pricing {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Tool Header ─── */
.tool-header {
  text-align: center;
  padding: 36px 24px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(74,124,89,0.06) 0%, transparent 100%);
}
.tool-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 12px;
  padding: 6px 16px;
  border: 1px solid rgba(201,169,98,0.25);
  border-radius: 20px;
  background: rgba(201,169,98,0.06);
}
.tool-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.2;
}
.tool-header .gradient-text {
  background: var(--nature-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-header-desc {
  color: rgba(255,255,255,0.5);
  font-size: 0.92rem;
  max-width: 680px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.tool-header-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.tool-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tool-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}
.tool-stat-lbl {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tool-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.08);
}
.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  transition: color 0.3s;
  margin-bottom: 12px;
  text-decoration: none;
}
.tool-back:hover { color: white; }

/* ═══════════════════════════════════════
   PHASE NAVIGATION
   ═══════════════════════════════════════ */
.phase-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 24px;
  background: rgba(10,10,15,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  overflow-x: auto;
}
.phase-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  position: relative;
}
.phase-nav-item:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.015);
}
.phase-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  transition: all 0.3s;
  flex-shrink: 0;
}
.phase-nav-item.active {
  color: white;
  border-bottom-color: var(--moss);
}
.phase-nav-item.active .phase-num {
  background: var(--moss-grad);
  border-color: transparent;
  color: white;
}
.phase-nav-item.completed {
  color: var(--moss-light);
}
.phase-nav-item.completed .phase-num {
  background: rgba(74,124,89,0.15);
  border-color: var(--moss);
  color: var(--moss-light);
}
.phase-nav-item.locked {
  opacity: 0.3;
  cursor: not-allowed;
}
.phase-connector {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  align-self: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   PHASE PANELS
   ═══════════════════════════════════════ */
.phase-panels {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.phase-panel {
  display: none;
  padding: 40px 0 60px;
  animation: phaseFadeIn 0.45s ease;
}
.phase-panel.active { display: block; }
@keyframes phaseFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Upload Section ─── */
.upload-section {
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.upload-section:last-of-type { border-bottom: none; }
.upload-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-section-title i {
  color: var(--moss);
  font-size: 1rem;
}
.upload-section-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 18px;
  line-height: 1.6;
}
.upload-section-desc strong { color: rgba(255,255,255,0.7); }
.upload-section-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
}
.badge-required {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}
.badge-optional {
  background: rgba(74,124,89,0.1);
  color: var(--moss-light);
}

/* ─── Upload Grid ─── */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.upload-slot {
  border: 2px dashed rgba(74,124,89,0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(74,124,89,0.015);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.upload-slot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}
.upload-slot:hover, .upload-slot.drag-over {
  border-color: var(--moss);
  background: rgba(74,124,89,0.06);
  box-shadow: 0 0 40px rgba(74,124,89,0.06);
}
.upload-slot.filled {
  border-style: solid;
  border-color: rgba(74,124,89,0.3);
  padding: 0;
  background: transparent;
}
.upload-slot.filled img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.upload-slot-icon {
  font-size: 2rem;
  color: rgba(74,124,89,0.35);
  transition: color 0.3s;
}
.upload-slot:hover .upload-slot-icon { color: var(--moss); }
.upload-slot-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.upload-slot-hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.22);
}
.upload-slot-spec {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.18);
  font-family: 'Space Grotesk', sans-serif;
}
.upload-slot-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--moss-grad);
  color: white;
  letter-spacing: 0.04em;
}
.upload-slot-remove {
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}
.upload-slot:hover .upload-slot-remove { opacity: 1; }
.upload-slot-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  border-radius: 0 0 14px 14px;
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.7);
  font-family: 'Space Grotesk', sans-serif;
}

/* ─── Topo Slot ─── */
.topo-slot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px dashed rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.topo-slot:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.015); }
.topo-slot.filled { border-style: solid; border-color: rgba(74,124,89,0.3); }
.topo-icon { font-size: 1.5rem; color: rgba(255,255,255,0.2); }
.topo-info h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.topo-info p { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.topo-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; margin-left: auto; }
.topo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Scene Tags ─── */
.scene-tags-section { margin-top: 8px; }
.scene-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.scene-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.scene-tag:hover {
  border-color: rgba(74,124,89,0.4);
  color: rgba(255,255,255,0.8);
  background: rgba(74,124,89,0.05);
}
.scene-tag.selected {
  border-color: var(--moss);
  background: rgba(74,124,89,0.12);
  color: var(--moss-light);
}
.scene-tag i { font-size: 0.72rem; }

/* ─── Validation Toast ─── */
#validation-toast {
  margin-top: 16px;
}
.upload-validation {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.35s ease;
  transition: opacity 0.4s;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.upload-validation.error {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.15);
}
.upload-validation.success {
  background: rgba(74,124,89,0.08);
  color: var(--moss-light);
  border: 1px solid rgba(74,124,89,0.15);
}
.upload-validation.warning {
  background: rgba(234,179,8,0.08);
  color: #fde68a;
  border: 1px solid rgba(234,179,8,0.15);
}

/* ─── Upload Summary ─── */
.upload-summary {
  padding: 18px 22px;
  background: rgba(74,124,89,0.06);
  border: 1px solid rgba(74,124,89,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.upload-summary-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--moss-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 1rem;
}
.upload-summary-text h4 { font-size: 0.92rem; font-weight: 600; }
.upload-summary-text p { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 2px; }

/* ─── Phase Actions ─── */
.phase-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 20px;
}
.btn-nature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
}
.btn-nature.primary {
  background: var(--moss-grad);
  color: white;
  box-shadow: 0 4px 20px rgba(74,124,89,0.25);
}
.btn-nature.primary:hover { box-shadow: 0 6px 28px rgba(74,124,89,0.35); transform: translateY(-1px); }
.btn-nature.primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-nature.secondary {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn-nature.secondary:hover { background: rgba(255,255,255,0.08); color: white; }

/* ─── AI Badge ─── */
.ai-gen-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139,111,71,0.15), rgba(201,169,98,0.15));
  color: var(--gold);
  border: 1px solid rgba(201,169,98,0.2);
  margin-left: auto;
}

/* ─── AI Extract Results ─── */
.ai-extract-results {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 12px;
}
.ai-extract-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ai-extract-header i { color: var(--moss); font-size: 1.1rem; }
.ai-extract-header h3 { font-size: 1rem; font-weight: 600; }
.ai-extract-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(74,124,89,0.08);
  border: 1px solid rgba(74,124,89,0.15);
  color: var(--moss-light);
  font-size: 0.75rem;
  font-weight: 500;
}
.ai-chip i { font-size: 0.68rem; opacity: 0.7; }
.ai-status {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-status.success {
  background: rgba(74,124,89,0.06);
  color: var(--moss-light);
  border: 1px solid rgba(74,124,89,0.12);
}
.ai-status.error {
  background: rgba(239,68,68,0.06);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.12);
}

/* ─── Processing State ─── */
.processing-state {
  text-align: center;
  padding: 40px 20px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(74,124,89,0.15);
  border-top-color: var(--moss);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.proc-label { font-size: 0.92rem; font-weight: 500; margin-bottom: 4px; }
.proc-sub { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}
.progress-fill {
  height: 100%;
  background: var(--moss-grad);
  border-radius: 2px;
  width: 0;
  transition: width 0.4s ease;
}

/* ─── Composite Preview ─── */
.composite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.composite-card {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.composite-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.composite-card-overlay {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.composite-label { font-size: 0.82rem; font-weight: 500; }
.composite-badge {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(74,124,89,0.12);
  color: var(--moss-light);
}

/* ═══════════════════════════════════════
   PHASE 3: DESIGN & CHECKOUT
   ═══════════════════════════════════════ */
.refine-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

/* ─── Preview Tabs ─── */
.preview-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  margin-bottom: 12px;
}
.preview-tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
}
.preview-tab:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.03); }
.preview-tab.active {
  background: rgba(74,124,89,0.12);
  color: var(--moss-light);
  border: 1px solid rgba(74,124,89,0.2);
}

/* ─── Preview Viewport ─── */
.preview-viewport {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  position: relative;
  min-height: 420px;
}
.preview-viewport canvas {
  display: block;
  width: 100%;
}
.preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  color: rgba(255,255,255,0.35);
  gap: 8px;
}
.preview-viewport-label {
  position: absolute;
  bottom: 12px; left: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 4px 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  backdrop-filter: blur(8px);
}
.preview-controls-bar {
  position: absolute;
  bottom: 12px; right: 12px;
  display: flex;
  gap: 12px;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.35);
}
.preview-controls-bar span { display: flex; align-items: center; gap: 4px; }

/* ─── Preview Meta (under preview) ─── */
.preview-meta {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.preview-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preview-meta-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: white;
}
.preview-meta-lbl {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Preview Overlay for product/lifestyle/macro ─── */
.preview-image-wrap {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preview-image-wrap canvas,
.preview-image-wrap img {
  width: 100%;
  display: block;
}
.preview-badge-overlay {
  position: absolute;
  top: 14px; left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.preview-material-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
}
.preview-material-badge i { color: var(--gold); }

/* ─── Control Cards ─── */
.control-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}
.control-card-header {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.control-card-header i { color: var(--moss); font-size: 0.82rem; }
.pricing-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(201,169,98,0.1);
  color: var(--gold);
  border: 1px solid rgba(201,169,98,0.2);
}

/* ─── Sliders ─── */
.ctrl-slider-group { display: flex; flex-direction: column; gap: 18px; }
.ctrl-slider-row { }
.ctrl-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
}
.ctrl-slider-label span:last-child {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--moss-light);
}
.ctrl-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  outline: none;
  cursor: pointer;
}
.ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--moss);
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(74,124,89,0.3);
}

/* ─── Palette ─── */
.palette-group {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 6px;
  border: 1px solid transparent;
}
.palette-group:hover { background: rgba(255,255,255,0.02); }
.palette-group.selected {
  background: rgba(74,124,89,0.06);
  border-color: rgba(74,124,89,0.2);
}
.palette-row {
  display: flex;
  gap: 4px;
}
.palette-chip {
  flex: 1;
  height: 24px;
  border-radius: 4px;
  transition: transform 0.2s;
}
.palette-chip:hover { transform: scaleY(1.3); }
.palette-name {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  display: block;
}

/* ─── Size Options ─── */
.size-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.size-opt {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.size-opt:hover { border-color: rgba(74,124,89,0.3); background: rgba(74,124,89,0.04); }
.size-opt.selected {
  border-color: var(--moss);
  background: rgba(74,124,89,0.1);
}
.size-opt-dim {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.size-opt-area {
  display: block;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}
.size-opt-price {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}

/* ─── Custom Size Panel ─── */
.custom-size-panel { margin-top: 12px; }
.custom-size-notice {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(234,179,8,0.06);
  border: 1px solid rgba(234,179,8,0.15);
  color: #fde68a;
  font-size: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.custom-size-notice i { margin-top: 2px; flex-shrink: 0; }
.custom-size-inputs {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.custom-input-group label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 12px;
}
.input-with-unit input {
  width: 60px;
  background: transparent;
  border: none;
  color: white;
  font-size: 0.88rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  outline: none;
}
.input-with-unit span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
}
.custom-x {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.25);
  padding-bottom: 8px;
}
.custom-size-calc {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(201,169,98,0.04);
  border: 1px solid rgba(201,169,98,0.1);
  font-size: 0.78rem;
}

/* ─── DHL Estimate ─── */
.dhl-logo {
  height: 18px;
  margin-left: auto;
  opacity: 0.7;
  filter: brightness(1.2);
}
.dhl-estimate {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dhl-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}
.dhl-row span:first-child { color: rgba(255,255,255,0.45); }
.dhl-row span:last-child { font-weight: 500; }
.dhl-cost span:last-child {
  color: var(--gold);
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

/* ─── Order Summary ─── */
.order-card { border-color: rgba(74,124,89,0.15); }
.order-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 4px 0;
}
.order-row span:first-child { color: rgba(255,255,255,0.45); }
.order-row span:last-child { font-weight: 500; }
.order-row.subtotal { padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); }
.order-row.total {
  padding-top: 12px;
  border-top: 1px solid rgba(74,124,89,0.2);
  font-size: 1.05rem;
  font-weight: 700;
}
.order-row.total span:last-child {
  color: var(--gold);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
}
.order-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  margin-top: 8px;
  background: var(--moss-grad);
  color: white;
  box-shadow: 0 4px 20px rgba(74,124,89,0.3);
}
.order-btn:hover { box-shadow: 0 6px 28px rgba(74,124,89,0.4); transform: translateY(-1px); }
.order-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.order-btn-review {
  background: var(--earth-grad);
  box-shadow: 0 4px 20px rgba(139,111,71,0.3);
}
.order-btn-review:hover { box-shadow: 0 6px 28px rgba(139,111,71,0.4); }

/* ─── Scene Composite Badge ─── */
.scene-composite-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--moss-light);
}

/* ═══════════════════════════════════════
   MODAL
   ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-content {
  background: #141420;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  animation: modalIn 0.35s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(74,124,89,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
  color: var(--moss-light);
}
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.modal-body { margin-bottom: 24px; }
.modal-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.modal-row span:first-child { color: rgba(255,255,255,0.45); }
.modal-row span:last-child { font-weight: 500; }
.modal-row.highlight span:last-child { color: var(--gold); font-weight: 700; }
.modal-actions { display: flex; justify-content: center; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .refine-layout { grid-template-columns: 1fr; }
  .refine-controls { order: -1; }
}
@media (max-width: 768px) {
  .tool-header h1 { font-size: 1.8rem; }
  .upload-grid { grid-template-columns: 1fr 1fr; }
  .size-options { grid-template-columns: repeat(2, 1fr); }
  .phase-nav-item { padding: 12px 16px; font-size: 0.8rem; }
  .phase-label { display: none; }
  .tool-header-stats { gap: 16px; }
  .tool-nav-center { display: none; }
  .composite-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tool-header h1 { font-size: 1.4rem; }
  .upload-grid { grid-template-columns: 1fr; }
  .size-options { grid-template-columns: repeat(2, 1fr); }
  .tool-header-stats { flex-direction: column; gap: 12px; }
  .tool-stat-divider { width: 32px; height: 1px; }
  .custom-size-inputs { flex-direction: column; align-items: stretch; }
  .custom-x { text-align: center; }
}

/* ─── Carrier Tab Switching ─── */
.shipping-carrier-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.carrier-tab {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
}
.carrier-tab:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.carrier-tab.active {
  background: linear-gradient(135deg, var(--moss-dark), var(--moss));
  border-color: var(--moss);
  color: #fff;
}
.carrier-tab .carrier-logo {
  height: 16px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0) invert(0.6);
}
.carrier-tab.active .carrier-logo {
  filter: brightness(0) invert(1);
}
.fedex-tier-btn {
  padding: 4px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Space Grotesk', sans-serif;
}
.fedex-tier-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.fedex-tier-btn.active {
  background: rgba(74,0,130,0.3);
  border-color: rgba(100,0,200,0.5);
  color: #d8b4fe;
}
.shipping-estimate .dhl-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.78rem; color: rgba(255,255,255,0.6); }
