/* ============================================================================
 *  VIP ESTHETICS LECHERÍA — DARK LUXURY + ICE CYAN UI
 * ============================================================================ */

:root {
  --bg-deep: #06080c;
  --bg-surface: #0d1118;
  --bg-card: #121822;
  --bg-card-hover: #17202e;
  --bg-glass: rgba(13, 17, 24, 0.78);

  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-active: rgba(0, 212, 255, 0.6);

  --cyan: #00d4ff;
  --cyan-soft: #38bdf8;
  --cyan-glow: rgba(0, 212, 255, 0.22);
  --gold: #f5c542;
  --gold-glow: rgba(245, 197, 66, 0.18);
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebe5b;
  --danger: #f87171;
  --warn: #fbbf24;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --topbar-h: 62px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* =========================== TOPBAR =========================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.22);
}

.brand-svg,
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ffffff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.icon-pill:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.icon-pill--accent {
  border-color: rgba(0, 212, 255, 0.28);
  color: var(--cyan-soft);
}

.icon-pill--wa {
  background: rgba(37, 211, 102, 0.14);
  border-color: rgba(37, 211, 102, 0.45);
  color: #4ade80;
}

.icon-pill--wa:hover {
  background: rgba(37, 211, 102, 0.24);
  border-color: var(--whatsapp);
  color: #86efac;
}

/* =========================== APP SHELL LAYOUT =========================== */
.app-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

/* =========================== 3D STAGE SECTION (ESTUDIO CLARO) =========================== */
.stage-section {
  position: relative;
  background: radial-gradient(circle at 50% 36%, #f5f8fc 0%, #dfe7f2 58%, #c7d3e2 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.stage-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#carCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#carCanvas:active {
  cursor: grabbing;
}

.model-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(6, 10, 16, 0.88);
  border: 1px solid rgba(0, 212, 255, 0.45);
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.loader-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.25);
  border-top-color: var(--cyan);
  animation: spin 0.75s linear infinite;
}

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

/* HUD Superior */
.stage-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--dirty {
  background: #a16207;
  box-shadow: 0 0 8px rgba(161, 98, 7, 0.8);
}

.status-dot--mid {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.status-dot--vip {
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.vip-meter {
  min-width: 130px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
}

.vip-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.vip-meter-label strong {
  color: var(--cyan);
  font-family: var(--font-display);
}

.vip-meter-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vip-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Badges de capas activas */
.active-layers {
  position: absolute;
  top: 62px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 75%;
  pointer-events: none;
}

.layer-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 13, 22, 0.86);
  border: 1px solid rgba(0, 212, 255, 0.55);
  color: #e0f2fe;
  backdrop-filter: blur(8px);
  animation: popIn 0.25s ease-out;
}

.layer-chip--gold {
  background: rgba(18, 14, 6, 0.88);
  border-color: rgba(245, 197, 66, 0.7);
  color: #fde047;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* HUD Inferior: Cámaras */
.stage-hud-bottom {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.camera-presets {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
}

.cam-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.cam-btn:hover {
  color: var(--text-main);
}

.cam-btn.active {
  background: var(--cyan);
  color: #041019;
  font-weight: 700;
  box-shadow: 0 0 14px var(--cyan-glow);
}

.cam-btn--icon {
  padding: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.cam-btn--icon[aria-pressed="true"] {
  border-color: var(--border-active);
  color: var(--cyan);
}

.drag-hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
  pointer-events: none;
}

/* =========================== CONFIGURATOR PANEL =========================== */
.config-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  overflow: hidden;
}

/* Step Tabs */
.step-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.step-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.step-tab:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.step-tab.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--border-active);
  color: #ffffff;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.step-tab.active .step-num {
  background: var(--cyan);
  color: #041019;
}

.step-count {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #0b0e13;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Scrollable Viewport */
.steps-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.step-panel {
  display: none;
  animation: fadeSlide 0.24s ease-out;
}

.step-panel.active {
  display: block;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================== PASO 1: VEHÍCULO =========================== */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.vehicle-card {
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vehicle-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.35);
}

.vehicle-card.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.35), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.vehicle-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vehicle-emoji {
  font-size: 1.35rem;
}

.vehicle-size-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.vehicle-card.active .vehicle-size-pill {
  background: rgba(0, 212, 255, 0.2);
  color: var(--cyan);
}

.vehicle-card strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.vehicle-card small {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Color Swatches */
.field-block {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.optional-tag {
  font-weight: 400;
  color: var(--text-dim);
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
}

.swatch-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.35);
  transform: scale(1.1);
}

.custom-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.custom-color-label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.selected-color-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.82rem;
}

#customColorInput {
  width: 38px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.text-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.86rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.text-area {
  resize: vertical;
  min-height: 68px;
}

/* =========================== PASO 2: SERVICIOS =========================== */
.combo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.12), rgba(0, 212, 255, 0.08));
  border: 1px solid rgba(245, 197, 66, 0.35);
  font-size: 0.8rem;
  color: #fef3c7;
  margin-bottom: 14px;
}

.combo-banner.combo-active {
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.22), rgba(0, 212, 255, 0.16));
  border-color: var(--gold);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  color: var(--text-main);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.32);
}

.service-card.active {
  background: rgba(0, 212, 255, 0.09);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.28);
}

.service-main {
  flex: 1;
}

.service-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 4px;
}

.service-title-row strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.service-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.14);
  color: var(--cyan-soft);
}

.service-badge--gold {
  background: rgba(245, 197, 66, 0.2);
  color: var(--gold);
}

.service-card--courtesy {
  border-color: rgba(245, 197, 66, 0.55) !important;
  background: rgba(245, 197, 66, 0.06) !important;
}

.price-courtesy {
  font-size: 0.86rem;
  color: var(--gold);
}

.price-included {
  font-size: 0.86rem;
  color: var(--cyan-soft);
}

.service-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.service-meta {
  font-size: 0.71rem;
  color: var(--text-dim);
  display: flex;
  gap: 10px;
}

.service-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.service-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.service-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  transition: all 0.2s;
}

.service-card.active .service-toggle {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #041019;
}

/* =========================== PASO 3: PROBLEMAS =========================== */
.issues-group {
  margin-bottom: 16px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 9px;
}

.tag {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.tag--cyan {
  background: rgba(0, 212, 255, 0.14);
  color: var(--cyan-soft);
}

.tag--gold {
  background: rgba(245, 197, 66, 0.15);
  color: var(--gold);
}

.issues-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.issue-chip {
  text-align: left;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.issue-chip:hover {
  background: var(--bg-card-hover);
}

.issue-chip.active {
  background: rgba(0, 212, 255, 0.11);
  border-color: var(--cyan);
}

.issue-chip.active.issue-chip--inspection {
  background: rgba(245, 197, 66, 0.12);
  border-color: var(--gold);
}

.issue-chip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.issue-zone {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.issue-cost {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan-soft);
}

.issue-chip--inspection .issue-cost {
  color: var(--gold);
}

.issue-name {
  font-size: 0.8rem;
  font-weight: 600;
}

/* =========================== PASO 4: AGENDAR =========================== */
.modality-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.modality-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.modality-btn.active {
  background: rgba(0, 212, 255, 0.11);
  border-color: var(--cyan);
}

.mod-icon {
  font-size: 1.35rem;
}

.modality-btn strong {
  display: block;
  font-size: 0.88rem;
}

.modality-btn small {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.info-card p {
  color: var(--text-muted);
  margin-top: 2px;
}

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.maps-link:hover {
  text-decoration: underline;
}

.notice-card {
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.notice-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
}

.notice-card p,
.notice-card li {
  color: var(--text-muted);
}

.notice-card ul {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notice-card--cyan {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.notice-card--warn {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.req-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.78rem;
}

.check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--cyan);
  flex-shrink: 0;
}

.date-time-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 16px;
}

.chip-time {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-time:hover,
.chip-time.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
}

.form-error {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* =========================== BUTTONS =========================== */
.step-footer-nav {
  margin-top: 10px;
}

.step-footer-nav--split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s, background 0.2s, box-shadow 0.2s;
}

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

.btn--full {
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0ea5e9 100%);
  color: #041019;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.24);
}

.btn--primary:hover {
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.36);
}

.btn--ghost {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn--ghost:hover {
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.35);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: #041f0e;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.28);
}

.btn--whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn--outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  padding: 10px 12px;
}

.btn--outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--cta {
  background: linear-gradient(135deg, var(--cyan) 0%, #0284c7 100%);
  color: #03111a;
  padding: 11px 16px;
  font-size: 0.84rem;
  white-space: nowrap;
}

/* =========================== SUMMARY BAR =========================== */
.summary-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(6, 8, 12, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.summary-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.discount-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.2);
  color: var(--gold);
}

.summary-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.summary-total {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.summary-inspection {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.summary-duration {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* =========================== MODAL =========================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.14);
  color: var(--cyan);
  margin-bottom: 8px;
}

.modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.modal-summary {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  line-height: 1.55;
  margin-bottom: 16px;
  white-space: pre-line;
  color: #e2e8f0;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.modal-footnote {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

.bcv-note {
  margin: -8px 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan-soft);
  text-align: center;
}

/* =========================== RESPONSIVE MOBILE (MOBILE-FIRST) =========================== */
@media (max-width: 920px) {
  :root {
    --topbar-h: 56px;
  }

  .topbar {
    padding: 0 12px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-text h1 {
    font-size: 0.95rem;
  }

  .brand-sub {
    font-size: 0.62rem;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - var(--topbar-h));
    overflow: visible;
  }

  .stage-section {
    position: sticky;
    top: var(--topbar-h);
    z-index: 20;
    height: 36dvh;
    min-height: 235px;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .stage-hud-top {
    top: 8px;
    left: 10px;
    right: 10px;
    gap: 6px;
  }

  .status-pill {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .vip-meter {
    min-width: 102px;
    padding: 5px 9px;
  }

  .active-layers {
    top: 46px;
    left: 10px;
    gap: 4px;
    max-width: 85%;
  }

  .layer-chip {
    font-size: 0.64rem;
    padding: 3px 7px;
  }

  .stage-hud-bottom {
    bottom: 24px;
    gap: 6px;
  }

  .drag-hint {
    bottom: 6px;
    font-size: 0.64rem;
  }

  .config-section {
    overflow: visible;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .step-tabs {
    position: sticky;
    top: calc(var(--topbar-h) + clamp(235px, 36dvh, 300px));
    z-index: 18;
    padding: 9px 10px;
    gap: 5px;
  }

  .step-tab {
    padding: 8px 4px;
    min-height: 40px;
    gap: 4px;
  }

  .steps-viewport {
    overflow: visible;
    padding: 14px 14px 20px;
  }

  .text-input {
    font-size: 16px; /* Evita zoom automático en iOS Safari */
    padding: 12px 13px;
  }

  .summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.55);
  }

  .summary-total {
    font-size: 1.3rem;
  }

  .btn--cta {
    padding: 12px 16px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .hide-xs {
    display: none;
  }

  .icon-pill {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .step-num {
    width: 18px;
    height: 18px;
    font-size: 0.66rem;
  }

  .step-label {
    font-size: 0.68rem;
  }

  .vehicle-grid {
    gap: 8px;
  }

  .vehicle-card {
    padding: 10px;
  }

  .vehicle-card strong {
    font-size: 0.86rem;
  }

  .vehicle-card small {
    font-size: 0.68rem;
  }

  .issues-grid,
  .date-time-grid,
  .calendar-btns {
    grid-template-columns: 1fr;
  }

  .cam-btn {
    padding: 5px 9px;
    font-size: 0.7rem;
  }

  .modal-card {
    padding: 18px 16px;
  }
}
