/* ========================================
   CAMPUS STUDIO — Premium Design System
   Diseñado para chompas de graduación
   ======================================== */

:root {
  /* Paleta de acento — Indigo moderno */
  --accent: #6366F1;
  --accent-dark: #4F46E5;
  --accent-darker: #3730A3;
  --accent-light: rgba(99, 102, 241, 0.10);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-grad: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);

  /* Highlight secundario */
  --highlight: #0EA5E9;
  --highlight-light: rgba(14, 165, 233, 0.10);

  /* Estado */
  --success: #10B981;
  --danger: #EF4444;

  /* Fondos */
  --bg-app: #0A0A0A;
  --bg-panel: rgba(255, 255, 255, 0.97);
  --bg-preview: #111111;

  /* Texto */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* Bordes */
  --border: #E2E8F0;
  --border-hover: #CBD5E1;

  /* Sombras (Mucho más difusas y premium) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 32px 64px rgba(15, 23, 42, 0.16);
  --shadow-product: 0 40px 80px rgba(15, 23, 42, 0.20), 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Radios */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Transiciones */
  --t-fast: 130ms ease;
  --t-normal: 220ms ease;
  --t-slow: 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  /* height 100vh & hidden removed for Scroll! */
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Lenis Smooth Scroll Setup ──────────────── */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ══════════════════════════════════════
   HERO & FLUID BG
══════════════════════════════════════ */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fluid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../image-6b83da4e-2670-4703-961d-f7e1c759ecae.avif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.orb {
  display: none;
}

.orb-1 {
  width: 60vw;
  height: 60vw;
  background: #6366F1;
  /* Indigo */
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 50vw;
  height: 50vw;
  background: #FF4D4D;
  /* Neon Red */
  bottom: -20%;
  right: -10%;
  animation-delay: -3s;
}

.orb-3 {
  width: 45vw;
  height: 45vw;
  background: #10B981;
  /* Mint Green */
  top: 40%;
  left: 30%;
  animation-delay: -6s;
  mix-blend-mode: screen;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(15%, 15%) scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  pointer-events: none;
  /* Let clicks pass through to 3D canvas */
}

.hero-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(80px, 12vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.magnetic-btn {
  pointer-events: auto;
  /* Re-enable clicks */
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 40px;
  border-radius: var(--r-full);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.magnetic-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

#hero-model-container {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ══════════════════════════════════════
   APP CONTAINER (Post-Hero)
══════════════════════════════════════ */
.app-container {
  height: 100vh;
  /* Takes full window height once scrolled into view */
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}

/* ── Scrollbar ────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #C7D2E0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A0AEBF;
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: #0A0A0A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  z-index: 50;
  gap: 0;
}

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

.brand-logo-img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 14px;
}

.brand-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 7px 14px;
  border-radius: var(--r-full);
  transition: all var(--t-fast);
}

.btn-text:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ══════════════════════════════════════
   MAIN WORKSPACE
══════════════════════════════════════ */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ══════════════════════════════════════
   SIDE PANEL
══════════════════════════════════════ */
.side-panel {
  width: 360px;
  min-width: 360px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
  /* Sombra hacia la preview */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform var(--t-slow), opacity var(--t-normal), width var(--t-slow);
  z-index: 20;
  /* Flota sobre la cuadrícula */
}

.side-panel.hidden {
  transform: translateX(-100%);
  opacity: 0;
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}

.panel-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.panel-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   PREVIEW AREA
══════════════════════════════════════ */
.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-preview);
  /* Dot grid subtle */
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  position: relative;
  overflow: hidden;
}

/* Gradiente radial suave en el centro */
.preview-area::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 40%,
      rgba(255, 255, 255, 0.50) 0%,
      transparent 70%);
  pointer-events: none;
}

/* SVG Container */
.svg-wrap {
  position: relative;
  display: inline-block;
  z-index: 2;
  transition: opacity var(--t-normal), transform var(--t-slow);
}

/* Photo canvas — same display size as the SVG */
#photo-canvas {
  display: block;
  width: min(500px, 68vw);
  height: auto;
}

.svg-wrap svg {
  width: min(500px, 68vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(15, 23, 42, 0.18)) drop-shadow(0 8px 16px rgba(15, 23, 42, 0.10));
}

/* View toggle */
.view-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--r-full);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  letter-spacing: 0.01em;
}

.view-btn.active {
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.view-btn:not(.active):hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

/* ══════════════════════════════════════
   PRODUCT GRID (Step 1)
══════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 680px;
  width: 100%;
  padding: 36px 40px;
  z-index: 2;
}

.product-grid-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.grid-header-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--accent-light);
}

.product-grid-header h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #FFFFFF !important;
  line-height: 1.1;
}

.product-grid-header p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}

/* Product Card */
.product-card {
  background: var(--bg-panel);
  border-radius: var(--r-xl);
  padding: 22px 20px 18px;
  cursor: pointer;
  transition: all var(--t-normal);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

/* Fondo degradado sutil al hover */
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity var(--t-normal);
  border-radius: inherit;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

.product-card:hover::before {
  opacity: 0.03;
}

.product-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}

.product-card.selected::before {
  opacity: 0.04;
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: white;
  background: var(--accent-grad);
  padding: 3px 8px;
  border-radius: var(--r-full);
  z-index: 1;
}

.product-card-preview {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 130px;
  position: relative;
  z-index: 1;
}

.product-card-info {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.product-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.product-card-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ══════════════════════════════════════
   ZONE CHIPS
══════════════════════════════════════ */
.zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zone-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-xs);
}

.zone-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.zone-chip.active {
  border-color: transparent;
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: translateY(-2px);
}

.zone-chip-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.zone-chip.active .zone-chip-dot {
  border-color: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════
   COLOR PALETTE
══════════════════════════════════════ */
.color-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#color-palette {
  max-height: 52vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

#color-palette::-webkit-scrollbar {
  width: 10px;
}

#color-palette::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
}

#color-palette::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

#color-palette::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.color-group-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--bg-panel);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10), var(--shadow-xs);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10), var(--shadow-sm);
}

.color-swatch.active {
  box-shadow: 0 0 0 3px var(--accent), inset 0 0 0 1px rgba(0, 0, 0, 0.10);
  transform: scale(1.12);
}

.custom-color-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--bg-app);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border);
}

.custom-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.custom-color-input {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}

.custom-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.custom-color-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.custom-hex-input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  padding: 0 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex: 1;
  min-width: 0;
}

.custom-hex-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.custom-color-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.color-extract-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
  background: white;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.color-extract-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.color-extract-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.color-hint {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ══════════════════════════════════════
   IMAGE UPLOAD
══════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  background: rgba(0, 0, 0, 0.01);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone-icon {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1;
}

.upload-zone-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.upload-zone-text strong {
  color: var(--accent);
  font-weight: 600;
}

/* ══════════════════════════════════════
   IMAGE OVERLAYS
══════════════════════════════════════ */
.img-overlay {
  position: absolute;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.img-overlay img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.img-overlay.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: none;
  cursor: pointer;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.img-overlay.selected .handle {
  display: flex;
}

.handle-del {
  background: var(--danger);
  color: #fff;
  top: -9px;
  right: -9px;
}

.handle-rot {
  background: var(--accent);
  color: #fff;
  top: -9px;
  left: -9px;
  cursor: grab;
}

.handle-res {
  background: var(--text-primary);
  color: #fff;
  bottom: -9px;
  right: -9px;
  cursor: se-resize;
}

/* ══════════════════════════════════════
   LAYERS
══════════════════════════════════════ */
.layer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.layer-item:hover {
  border-color: var(--border-hover);
}

.layer-item.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.layer-thumb {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  background: #EDF0F7;
  flex-shrink: 0;
}

.layer-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--t-fast);
  line-height: 1;
}

.layer-btn:hover {
  color: var(--text-primary);
}

.layer-btn.del:hover {
  color: var(--danger);
}

/* ══════════════════════════════════════
   CONTROLS (sliders)
══════════════════════════════════════ */
.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  width: 58px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.control-row input[type=range] {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.control-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px var(--accent-glow);
}

.control-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════
   TEXT EDITING
══════════════════════════════════════ */
.text-input-field {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  background: var(--bg-panel);
}

.text-input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.font-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-panel);
  outline: none;
  cursor: pointer;
}

.font-select:focus {
  border-color: var(--accent);
}

.toggle-group {
  display: flex;
  gap: 5px;
}

.toggle-btn {
  flex: 1;
  padding: 8px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-fast);
}

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

.toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}

/* ══════════════════════════════════════
   TEXT LIST
══════════════════════════════════════ */
.text-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}

.text-item:hover {
  border-color: var(--border-hover);
}

.text-item.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.text-item-preview {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  color: #0b1222;
  border: none;
  border-radius: var(--r-full);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.65), 0 0 28px rgba(255, 255, 255, 0.38);
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.78), 0 0 36px rgba(255, 255, 255, 0.45);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: none;
  color: var(--danger);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: var(--danger);
}

.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1.5px dashed var(--accent);
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all var(--t-fast);
}

.btn-add:hover {
  background: rgba(99, 102, 241, 0.16);
}

/* Export button */
.export-section {
  margin-top: 8px;
}

.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent-grad);
  color: white;
  border: none;
  border-radius: var(--r-lg);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
  letter-spacing: 0.01em;
}

.btn-export:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px var(--accent-glow);
}

.btn-export:active {
  transform: scale(0.98);
}

.btn-export-icon {
  font-size: 18px;
}

.export-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* ══════════════════════════════════════
   BOTTOM BAR
══════════════════════════════════════ */
.bottom-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  z-index: 50;
}

.bottom-left,
.bottom-center,
.bottom-right {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.bottom-left {
  justify-content: flex-start;
  gap: 12px;
}

.bottom-center {
  justify-content: center;
}

.bottom-right {
  justify-content: flex-end;
}

.bottom-brand {
  transform: scale(0.92);
  transform-origin: left center;
}

.bottom-brand .brand-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
}

.step-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0 6px;
  transition: opacity var(--t-fast);
}

.step-dot-wrap:hover {
  opacity: 0.8;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  transition: all var(--t-normal);
}

.step-dot.active {
  border-color: transparent;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #eef2ff 70%, #dde6ff 100%);
  color: #3f46d8;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75), 0 0 24px rgba(255, 255, 255, 0.42);
}

.step-dot.completed {
  border-color: transparent;
  background: var(--success);
  color: white;
}

.step-dot-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--t-fast);
  white-space: nowrap;
}

.step-dot-wrap.active .step-dot-label {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.step-dot-wrap.completed .step-dot-label {
  color: var(--success);
}

.step-line {
  width: 36px;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  transition: background var(--t-normal);
  flex-shrink: 0;
}

.step-line.completed {
  background: var(--success);
}

/* ══════════════════════════════════════
   REVIEW PANEL
══════════════════════════════════════ */
.review-product-card {
  background: var(--bg-app);
  border-radius: var(--r-md);
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.review-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.review-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.10);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.review-hex {
  font-family: 'Inter', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
}

.review-count {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
}

/* ══════════════════════════════════════
   PROPERTIES PANEL
══════════════════════════════════════ */
.props-panel {
  width: 260px;
  min-width: 260px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 16px;
}

.props-panel.visible {
  display: flex;
}

/* ══════════════════════════════════════
   CHECKBOX
══════════════════════════════════════ */
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}

.checkbox-wrap:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.checkbox-wrap input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════
   PLACEMENT ZONES
══════════════════════════════════════ */
.placement-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.placement-btn {
  padding: 9px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-fast);
}

.placement-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.placement-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}

/* ══════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 22px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  background: var(--bg-app);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border);
}

/* ══════════════════════════════════════
   SVG ZONE HIGHLIGHT & TEXT
══════════════════════════════════════ */
.zone-highlight {
  pointer-events: none;
}

.svg-text-element {
  cursor: move;
  user-select: none;
}
