/* ═══════════════════════════════════════════════════════════
   LOTIZACIÓN CSS - Compatible iOS · Android · Desktop
   ═══════════════════════════════════════════════════════════ */

/* ─── Hotspot del plano en el suelo ─── */
/* Resolución 2× de la proporción exacta del plano (3178.59×2245.04):
   rasteriza con más píxeles → bordes suaves, sin dientes de sierra */
.lotizacion-hotspot-container {
  position: relative;
  width: 3600px;
  height: 2542.68px;
  transform-origin: center center;
  /* Permite que los hijos participen del espacio 3D real (movimiento XYZ) */
  transform-style: preserve-3d;
  /* Anti-aliasing suave */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* RENDIMIENTO: Marzipano reescribe el transform de este contenedor en
     CADA frame al mover la cámara. Con will-change el navegador lo
     rasteriza UNA vez como textura GPU y al girar solo mueve esa textura,
     sin re-dibujar las ~177.000 formas del SVG. No toca el 360. */
  will-change: transform;
}

/* Wrapper interno: rotación y desplazamiento (lotes-data.js → plano) */
.lotizacion-plano-transform {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Fondo inline del plano (div que contiene el <svg> inyectado) */
.lotizacion-plano-img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.lotizacion-plano-img svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lotizacion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: all;
}

/* ─── Manzanas en el SVG overlay ─── */
.manzana-group {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lote-path {
  -webkit-tap-highlight-color: transparent;
  transition: fill 0.15s ease;
}

/* ─── Overlay oscuro (fondo panel) ─── */
#overlay-oscuro {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 900;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#overlay-oscuro.visible {
  display: block;
}

/* ─── Panel de manzana ─── */
#panel-manzana {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: linear-gradient(160deg, #0d1b2a 0%, #112233 100%);
  color: #fff;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  border-left: 1px solid rgba(0, 200, 100, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#panel-manzana.visible {
  display: flex;
  transform: translateX(0);
}

/* Mobile: panel a pantalla completa */
@media (max-width: 500px) {
  #panel-manzana {
    width: 100%;
    top: auto;
    bottom: 0;
    height: 75%;
    border-left: none;
    border-top: 1px solid rgba(0, 200, 100, 0.3);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  #panel-manzana.visible {
    display: flex;
    transform: translateY(0);
  }
}

/* ─── Header del panel ─── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 200, 100, 0.08);
  flex-shrink: 0;
}

.panel-header-info h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #00ff88;
  letter-spacing: 0.5px;
}

#panel-manzana-total {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
  display: block;
}

.panel-cerrar {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.2s;
}

.panel-cerrar:hover {
  background: rgba(255, 60, 60, 0.3);
}

/* ─── Cuerpo del panel ─── */
.panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}

/* ─── Preview SVG de la manzana ─── */
.panel-preview {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-preview svg {
  max-width: 100%;
  max-height: 100%;
}

/* ─── Info del lote seleccionado ─── */
.panel-lote-info {
  margin: 10px 14px 0;
  padding: 10px 14px;
  background: rgba(0, 200, 100, 0.1);
  border: 1px solid rgba(0, 200, 100, 0.3);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.badge-disponible   { color: rgba(255,255,255,0.8); font-weight: 700; }
.badge-reservado    { color: #FFB400; font-weight: 700; }
.badge-vendido      { color: #FF5555; font-weight: 700; }
.badge-nodisponible { color: #6FB7FF; font-weight: 700; }

/* ─── Leyenda ─── */
.panel-leyenda {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.ley-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}

.ley-item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.ley-disponible::before  { background: transparent;        border: 1px solid #9aa5b1; }
.ley-reservado::before   { background: rgb(255, 180, 0);   border: 1px solid #FFB400; }
.ley-vendido::before     { background: rgb(255, 60, 60);   border: 1px solid #FF3C3C; }
.ley-cuotas::before      { background: rgb(255, 140, 0);   border: 1px solid #FF8C00; }
.ley-nodisponible::before{ background: rgb(41, 128, 185);  border: 1px solid #2980B9; }

/* ─── Lista de lotes ─── */
.panel-lista-lotes {
  padding: 0 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s;
  font-size: 12px;
}

.lote-item:hover,
.lote-item:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.lote-num {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.lote-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 5px;
  border-radius: 3px;
}

.estado-disponible .lote-badge {
  background: transparent;
  color: rgba(255,255,255,0.85);
}

.estado-reservado .lote-badge {
  background: rgba(255, 180, 0, 0.25);
  color: #FFD700;
}

.estado-vendido .lote-badge {
  background: rgba(255, 60, 60, 0.25);
  color: #FF5555;
}

.estado-cuotas .lote-badge {
  background: rgba(255, 140, 0, 0.3);
  color: #FFA500;
}

.estado-nodisponible .lote-badge {
  background: rgba(41, 128, 185, 0.3);
  color: #6FB7FF;
}

/* ─── Safe area para iOS (notch/home indicator) ─── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #panel-manzana,
  #panel-lote {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══════════════════════════════════════════════════════════
   MODO AJUSTE DEL PLANO (mover XYZ + esquinas)
   ═══════════════════════════════════════════════════════════ */

/* Capa de arrastre sobre el plano (solo en modo ajuste) */
.plano-drag-layer {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  cursor: move;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

body.plano-editando .lotizacion-overlay {
  pointer-events: none;
}

body.plano-editando .plano-drag-layer {
  display: block;
}

body.plano-editando .lotizacion-plano-img {
  opacity: 0.92;
}

/* Handles de las 4 esquinas */
.plano-corner {
  display: none;
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.18);
  border: 3px solid #FFD700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.55), inset 0 0 8px rgba(255, 215, 0, 0.35);
  z-index: 30;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: nwse-resize;
}

.plano-corner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22%;
  height: 22%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #FFD700;
}

body.plano-editando .plano-corner {
  display: block;
}

/* ─── Botón ⚙ modo ajuste ─── */
#plano-editar-btn {
  position: fixed;
  bottom: 128px;
  right: 14px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFD700;
  cursor: pointer;
  z-index: 500;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

#plano-editar-btn:hover {
  background: rgba(255, 215, 0, 0.18);
  border-color: #FFD700;
  transform: scale(1.05);
}

#plano-editar-btn:active {
  transform: scale(0.95);
}

#plano-editar-btn.activo {
  background: rgba(255, 215, 0, 0.28);
  border-color: #FFD700;
}

#plano-editar-btn svg {
  pointer-events: none;
}

/* ─── Panel del editor ─── */
#plano-editor {
  display: none;
  position: fixed;
  bottom: 10px;
  left: 10px;
  width: min(92vw, 360px);
  max-height: min(70vh, 520px);
  background: linear-gradient(160deg, rgba(13, 27, 42, 0.96), rgba(17, 34, 51, 0.96));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  color: #fff;
  z-index: 1300;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#plano-editor.visible {
  display: block;
}

.pe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.08);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  position: sticky;
  top: 0;
}

.pe-cerrar {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pe-cerrar:hover {
  background: rgba(255, 60, 60, 0.35);
}

.pe-cuerpo {
  padding: 10px 14px 14px;
}

.pe-hint {
  margin: 4px 0 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.pe-fila {
  display: grid;
  grid-template-columns: 108px 1fr 52px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
}

.pe-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pe-rango {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.pe-rango::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.pe-rango::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #FFD700;
  border: 2px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.pe-rango::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.pe-rango::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFD700;
  border: 2px solid rgba(0, 0, 0, 0.4);
}

.pe-val {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #FFD700;
  font-weight: 600;
}

.pe-botones {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pe-btn {
  flex: 1;
  padding: 9px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s;
}

.pe-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.pe-btn-primary {
  background: rgba(255, 215, 0, 0.16);
  border-color: rgba(255, 215, 0, 0.55);
  color: #FFD700;
}

.pe-btn-primary:hover {
  background: rgba(255, 215, 0, 0.28);
}

.pe-nota {
  margin: 10px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
}

/* ─── Toast ─── */
#plano-toast {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  max-width: min(88vw, 480px);
  padding: 10px 18px;
  background: rgba(13, 27, 42, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 24px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#plano-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile adjustments */
@media (max-width: 500px) {
  #plano-editar-btn {
    bottom: 138px;
    right: 10px;
    width: 44px;
    height: 44px;
  }

  .pe-fila {
    grid-template-columns: 96px 1fr 46px;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #plano-editar-btn {
    bottom: calc(128px + env(safe-area-inset-bottom) * 0.4);
  }
}

/* ═══════════════════════════════════════════════════════════
   PANEL DE DETALLE DE UN SOLO LOTE · diseño claro
   (croquis y medidas se mantienen intactos)
   ═══════════════════════════════════════════════════════════ */

#panel-lote {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: #ffffff;
  color: #2c3e50;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.28);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#panel-lote.visible {
  display: flex;
  transform: translateX(0);
}

/* ─── Encabezado (lp-header) ─── */
#panel-lote .lp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a2e6e 0%, #233d8f 100%);
  border-bottom: 3px solid #f5c518;
}

#panel-lote .lp-header h3 {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

#panel-lote .lp-close {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.15s;
}

#panel-lote .lp-close:hover { background: rgba(255, 255, 255, 0.25); }
#panel-lote .lp-close:active { transform: scale(0.92); }

/* ─── Cuerpo ─── */
#panel-lote .lp-body {
  flex: 1;
  padding-bottom: 20px;
}

.lp-subtitle {
  margin: 2px 16px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #8a94a6;
}

/* Fila: badge de estado + consulta rápida */
.lp-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 14px;
}

.lp-status-badge {
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lp-badge-disponible { background: #eef1f4; color: #495057;
                        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.lp-badge-reservado  { background: #f39c12; }
.lp-badge-vendido    { background: #e74c3c; }
.lp-badge-cuotas     { background: #FF8C00; }
.lp-badge-nodisponible { background: #2980b9; }

.ll-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(73 231 68 / 34%);
  color: #128c1e;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.15s;
}

.ll-btn-wa:hover { background: rgb(73 231 68 / 55%); }
.ll-btn-wa:active { transform: scale(0.96); }

.ll-btn-wa svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: #128c1e;
}

/* ─── Divisor y filas etiqueta/valor ─── */
.lp-divider {
  height: 1px;
  background: #e8ecf1;
  margin: 2px 16px 14px;
}

.lp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 14px;
  font-size: 14.5px;
}

.lp-label {
  color: #7b8794;
  font-weight: 600;
}

.lp-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: #bcddff;
  color: #1f2d3d;
  font-weight: 800;
  line-height: 1;
}

/* Mobile: hoja inferior a pantalla completa */
@media (max-width: 500px) {
  #panel-lote {
    width: 100%;
    top: auto;
    bottom: 0;
    height: 75%;
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  #panel-lote.visible {
    display: flex;
    transform: translateY(0);
  }
}

/* ─── Croquis del lote (fondo blanco, marco azul) ─── */
.panel-lote-croquis {
  margin: 0 14px;
  background: #ffffff;
  border: 5px solid rgb(0 15 133);
  border-radius: 10px;
  padding: 6px;
}

.croquis-vacio {
  padding: 30px 10px;
  text-align: center;
  color: #8a94a6;
  font-size: 13px;
}

/* ─── Sin datos ─── */
.lote-sin-datos {
  margin: 16px 14px;
  padding: 18px 16px;
  background: rgba(243, 156, 18, 0.09);
  border: 1px dashed rgba(243, 156, 18, 0.55);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: #5a6672;
}

.lote-sin-datos strong { color: #1f2d3d; }

.lote-sin-datos .hint {
  font-size: 11px;
  color: #98a2ae;
}

/* ═══════════════════════════════════════════════════════════
   BOTÓN DE WHATSAPP (visible para compradores)
   ═══════════════════════════════════════════════════════════ */

#whatsapp-btn {
  position: fixed;
  bottom: 70px;
  left: 14px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(37, 211, 102, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

#whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(37, 211, 102, 0.3);
}

#whatsapp-btn:active {
  transform: scale(0.94);
}

#whatsapp-btn svg {
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

@media (max-width: 500px) {
  #whatsapp-btn {
    bottom: 80px;
    left: 10px;
    width: 52px;
    height: 52px;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #whatsapp-btn {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════
   DETALLES DEL LOTE · precio establecido (visible compradores)
   ═══════════════════════════════════════════════════════════ */

.cotizador-title {
  margin: 0 16px 12px;
  font-size: 15.5px;
  font-weight: 800;
  color: #1f2d3d;
}

.cot-contado-box {
  margin: 0 16px 14px;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.cot-contado-header {
  padding: 10px 14px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px dashed #e3e8ef;
  font-size: 13.5px;
}

.cot-row-label {
  color: #7b8794;
  font-weight: 600;
}

.cot-row-value--blue {
  color: #2980b9;
  font-weight: 800;
}

.cot-contado-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.cot-contado-label {
  color: #7b8794;
  font-size: 13.5px;
  font-weight: 600;
}

.cot-contado-value {
  font-size: 22px;
  font-weight: 800;
  color: #27ae60;
  line-height: 1;
}

/* Botón grande de WhatsApp */
.cot-wa-btn {
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 3px 14px rgba(37, 211, 102, 0.35);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s, transform 0.15s;
}

.cot-wa-btn:hover { filter: brightness(1.08); }
.cot-wa-btn:active { transform: scale(0.98); }

.cot-wa-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ─── Pie del panel (mensaje final) ─── */
.lp-footer {
  margin: 0 16px 6px;
}

.lp-footer-titulo {
  color: #f39c12;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.lp-footer-sub {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   MODO ADMINISTRADOR · botón 🔑 · login · edición de lotes
   ═══════════════════════════════════════════════════════════ */

#admin-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(140, 140, 150, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  z-index: 520;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}

#admin-btn:hover {
  opacity: 1;
  background: rgba(140, 140, 150, 0.4);
}

#admin-btn.activo {
  opacity: 1;
  background: rgba(80, 170, 255, 0.35);
  border-color: rgba(120, 190, 255, 0.55);
  color: #d6ecff;
}

#admin-btn svg {
  pointer-events: none;
  width: 15px;
  height: 15px;
}

@media (max-width: 500px) {
  #admin-btn {
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
  }
}

@supports (top: env(safe-area-inset-top)) {
  #admin-btn {
    top: calc(10px + env(safe-area-inset-top));
  }
}

/* ─── Botón 🔗 Links de asesores (SOLO ADMIN) ─── */
/* Oculto por defecto; aparece bajo el 🔑 solo con sesión admin activa */
#links-btn {
  position: fixed;
  top: 54px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.3);
  border: 1px solid rgba(150, 140, 255, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  color: #dcd8ff;
  cursor: pointer;
  z-index: 520;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.15s;
}

body.modo-admin #links-btn {
  display: flex;
}

#links-btn:hover {
  background: rgba(108, 99, 255, 0.55);
}

#links-btn:active {
  transform: scale(0.92);
}

#links-btn svg {
  pointer-events: none;
  width: 18px;
  height: 18px;
}

body:not(.modo-admin) #links-btn,
body:not(.modo-admin) #links-panel {
  display: none !important;
}

@media (max-width: 500px) {
  #links-btn {
    top: 50px;
    left: 10px;
    width: 32px;
    height: 32px;
  }
}

@supports (top: env(safe-area-inset-top)) {
  #links-btn {
    top: calc(52px + env(safe-area-inset-top));
  }
}

/* ─── Panel 🔗 Links de asesores (SOLO ADMIN) ─── */
#links-panel {
  display: none;
  position: fixed;
  top: 96px;
  left: 12px;
  width: min(92vw, 360px);
  max-height: min(78vh, 620px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  background: linear-gradient(160deg, #0d1b2a 0%, #112233 100%);
  border: 1px solid rgba(108, 99, 255, 0.45);
  border-radius: 14px;
  color: #fff;
  z-index: 1400;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

#links-panel.visible {
  display: flex;
}

.links-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.links-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.links-subtitle {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.links-cerrar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.links-cerrar:hover {
  background: rgba(255, 60, 60, 0.35);
}

.links-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.links-form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.links-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.links-input:focus {
  border-color: #8f86ff;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.links-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

textarea.links-input {
  resize: vertical;
  min-height: 42px;
}

.links-crear {
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6c63ff, #4a90e2);
  border: 1px solid rgba(160, 150, 255, 0.5);
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.15s;
}

.links-crear:hover {
  filter: brightness(1.12);
}

.links-crear:disabled {
  opacity: 0.6;
}

.links-msg {
  min-height: 16px;
  font-size: 12px;
  text-align: center;
  color: #2ecc71;
}

.links-list-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.65);
}

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

.links-vacio {
  padding: 12px 0;
  font-size: 12.5px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}

.links-error {
  padding: 12px 0;
  font-size: 12.5px;
  text-align: center;
  color: #ff8080;
}

.links-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.links-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.links-card-display {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.links-card-slug {
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
  color: #9d94ff;
}

.links-card-wa {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}

.links-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.links-card-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.links-card-btn.copy {
  background: #6c63ff;
}

.links-card-btn.edit {
  background: #0055a5;
}

.links-card-btn.del {
  background: #e63946;
}

.links-card-btn.save {
  background: #2ecc71;
}

.links-card-btn.cancel {
  background: rgba(255, 255, 255, 0.15);
}

.links-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 500px) {
  #links-panel {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 72%;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}

/* ─── Modal de acceso ─── */
#admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#admin-modal.visible {
  display: flex;
}

.admin-card {
  position: relative;
  width: min(88vw, 320px);
  background: linear-gradient(160deg, #0d1b2a 0%, #112233 100%);
  border: 1px solid rgba(80, 170, 255, 0.4);
  border-radius: 14px;
  padding: 22px 20px 20px;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

.admin-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #6fb7ff;
  text-align: center;
}

.admin-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.admin-cerrar:hover {
  background: rgba(255, 60, 60, 0.35);
}

#admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#admin-form input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#admin-form input:focus {
  border-color: #6fb7ff;
  box-shadow: 0 0 0 2px rgba(80, 170, 255, 0.25);
}

.admin-enviar,
.admin-logout {
  width: 100%;
  padding: 11px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, #2f7fd6, #22558f);
  border: 1px solid rgba(120, 190, 255, 0.5);
  border-radius: 9px;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.15s;
}

.admin-enviar:hover { filter: brightness(1.15); }
.admin-enviar:disabled { opacity: 0.6; }

.admin-vista-sesion p {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}

.admin-logout {
  background: rgba(255, 60, 60, 0.16);
  border-color: rgba(255, 100, 100, 0.5);
}

/* Vista según sesión */
body.modo-admin #admin-modal .admin-vista-login { display: none; }
body:not(.modo-admin) #admin-modal .admin-vista-sesion { display: none; }

/* Defensa extra: sin sesión admin nunca se ven controles de edición */
body:not(.modo-admin) .admin-box,
body:not(.modo-admin) .admin-select-estado { display: none !important; }

/* ─── Editor dentro del panel del lote ─── */
.admin-box {
  margin: 14px 14px 18px;
  padding: 12px 14px 14px;
  background: linear-gradient(160deg, rgba(47, 127, 214, 0.12), rgba(34, 85, 143, 0.08));
  border: 1px dashed rgba(80, 170, 255, 0.5);
  border-radius: 10px;
}

.admin-box-titulo {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #6fb7ff;
  margin-bottom: 10px;
}

.admin-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.admin-fila label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.admin-box select,
.admin-box input[type="number"] {
  flex: 1;
  max-width: 170px;
  padding: 8px 10px;
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  outline: none;
}

.admin-box select:focus,
.admin-box input[type="number"]:focus {
  border-color: #6fb7ff;
}

.admin-guardar-btn {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, #2f7fd6, #22558f);
  border: 1px solid rgba(120, 190, 255, 0.5);
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.15s;
}

.admin-guardar-btn:hover { filter: brightness(1.15); }
.admin-guardar-btn:disabled { opacity: 0.6; }

/* Selector rápido por lote en la lista de la manzana */
.lote-item .admin-select-estado {
  padding: 3px 4px;
  font-size: 9.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(80, 170, 255, 0.45);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

/* ─── Editor de WhatsApp general (solo admin, dentro del modal) ─── */
.admin-wa {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(80, 170, 255, 0.25);
  text-align: left;
}

.admin-wa-titulo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #6fb7ff;
  margin-bottom: 9px;
}

.admin-wa input,
.admin-wa textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}

.admin-wa input:focus,
.admin-wa textarea:focus {
  border-color: #6fb7ff;
}

.admin-enviar-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-color: rgba(37, 211, 102, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   ADMIN DENTRO DEL PANEL CLARO DEL LOTE (solo sesión admin)
   ═══════════════════════════════════════════════════════════ */

#panel-lote .admin-box {
  background: linear-gradient(160deg, #0d1b2a 0%, #112233 100%);
  border: 1px dashed rgba(80, 170, 255, 0.5);
}
/* ─── Menú hamburguesa general ─── */
#lotizacion-menu-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 27, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 9px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2200;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#lotizacion-menu-btn .menu-export-icon {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 27px;
  line-height: 52px;
  text-align: center;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

#lotizacion-menu-btn:hover,
#lotizacion-menu-btn[aria-expanded="true"] {
  background: rgba(47, 127, 214, 0.9);
  border-color: rgba(170, 215, 255, 0.8);
}

#lotizacion-menu {
  position: fixed;
  right: 16px;
  bottom: 78px;
  width: min(84vw, 250px);
  padding: 10px;
  display: none;
  background: rgba(13, 27, 42, 0.97);
  border: 1px solid rgba(120, 190, 255, 0.46);
  border-radius: 12px;
  z-index: 701;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#lotizacion-menu.visible {
  display: block;
}

.lotizacion-menu-titulo {
  padding: 5px 9px 8px;
  color: #9ed3ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

#lotizacion-menu button {
  width: 100%;
  padding: 10px 9px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

#lotizacion-menu button span {
  vertical-align: middle;
}

#lotizacion-menu .menu-item-icon {
  display: inline-flex;
  width: 25px;
  margin-right: 5px;
  align-items: center;
  justify-content: center;
  color: #9ed3ff;
  font-size: 18px;
  font-weight: 700;
}

#lotizacion-menu button:hover,
#lotizacion-menu button:focus-visible {
  background: rgba(111, 183, 255, 0.2);
  outline: none;
}

.lotizacion-menu-separador {
  height: 1px;
  margin: 6px 5px;
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 500px) {
  #lotizacion-menu-btn {
    right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  #lotizacion-menu {
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
}

/* ─── Lista global de lotes ─── */
#panel-lista-general {
  position: fixed;
  top: 5vh;
  right: 4vw;
  width: min(92vw, 680px);
  height: min(90vh, 760px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(47, 127, 214, 0.35);
  border-radius: 14px;
  z-index: 1400;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

#panel-lista-general.visible {
  display: flex;
}

.lista-general-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #12395b, #236ca1);
}

.lista-general-cabecera h2 {
  margin: 0 0 3px;
  font-size: 18px;
}

.lista-general-cabecera span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

#lista-general-cerrar {
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
}

.lista-general-tabla-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.lista-general-filtros {
  padding: 10px 10px 2px;
  background: #f8fafc;
}

#lista-general-filtro {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  color: #1f2d3d;
  background: #fff;
  border: 1px solid #ccd7e3;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
}

#lista-general-filtro:focus {
  border-color: #2f7fd6;
  box-shadow: 0 0 0 3px rgba(47, 127, 214, 0.14);
}

.lista-filtro-grupo { margin-top: 8px; }
.lista-filtro-grupo > span {
  display: block;
  margin: 0 0 5px;
  color: #687585;
  font-size: 11px;
  font-weight: 700;
}

.lista-filtro-botones { display: flex; flex-wrap: wrap; gap: 5px; }

.filtro-chip {
  padding: 6px 10px;
  color: #456071;
  background: #fff;
  border: 1px solid #ccd7e3;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  touch-action: manipulation;
}

.filtro-chip:hover,
.filtro-chip.activo {
  color: #fff;
  background: #2f7fd6;
  border-color: #2f7fd6;
}

.lista-filtro-precio {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) minmax(110px, 1.2fr);
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-bottom: 8px;
  color: #687585;
  font-size: 11px;
}

.lista-filtro-precio input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 7px;
  border: 1px solid #ccd7e3;
  border-radius: 6px;
  font-size: 11px;
}

.lista-filtro-precio input[type="range"] {
  min-width: 90px;
  padding: 0;
  accent-color: #2f7fd6;
}

@media (max-width: 620px) {
  .lista-filtro-precio {
    grid-template-columns: auto minmax(80px, 1fr);
  }
  .lista-filtro-precio input[type="range"] { grid-column: 2; }
}

.lista-general-fila {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 7px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2ecc71;
  border-radius: 8px;
}

.lista-general-fila[hidden] {
  display: none !important;
}

.lista-general-fila.estado-reservado { border-left-color: #f1c40f; }
.lista-general-fila.estado-vendido { border-left-color: #e74c3c; }
.lista-general-fila.estado-cuotas { border-left-color: #FF8C00; }
.lista-general-fila.estado-nodisponible { border-left-color: #1a2e6e; }

.lista-general-info {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) repeat(3, minmax(80px, 1fr));
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: #5b6775;
  font-size: 12px;
}

.lista-general-info strong { color: #1f2d3d; font-size: 13px; }
.lista-general-estado { font-weight: 700; }

.lista-general-consulta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  color: #128c1e;
  background: #e3f9e5;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.lista-general-consulta svg { width: 16px; height: 16px; fill: currentColor; }
.lista-general-vacia { padding: 30px 10px; color: #687585; text-align: center; }

/* ─── Selector de plano para exportación ─── */
#exportar-selector {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  z-index: 2900;
}

#exportar-selector.visible { display: flex; }

.exportar-selector-caja {
  position: relative;
  width: min(90vw, 360px);
  padding: 22px;
  color: #fff;
  background: linear-gradient(160deg, #0d1b2a, #173957);
  border: 1px solid rgba(120, 190, 255, 0.5);
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55);
}

.exportar-selector-caja h3 { margin: 0 0 7px; font-size: 17px; }
.exportar-selector-caja p { margin: 0 0 16px; color: rgba(255,255,255,0.72); font-size: 12px; }

.exportar-selector-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  cursor: pointer;
}

.exportar-selector-opciones { display: grid; gap: 8px; }

.exportar-selector-opciones button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  color: #fff;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.exportar-selector-opciones button:hover,
.exportar-selector-opciones button:focus-visible {
  background: rgba(111,183,255,0.25);
  border-color: rgba(158,211,255,0.8);
  outline: none;
}

.exportar-opcion-icon { width: 22px; color: #9ed3ff; font-size: 19px; text-align: center; }
.exportar-opcion-ambos { border-color: rgba(46,204,113,0.55) !important; }

@media (max-width: 620px) {
  #panel-lista-general { top: 2vh; right: 2vw; width: 96vw; height: 94vh; }
  .lista-general-fila { align-items: flex-start; }
  .lista-general-info { grid-template-columns: 1fr 1fr; }
  .lista-general-info strong { grid-column: 1 / -1; }
}


/* ─── Botón ver plano lotización — ELIMINADO (pedido cliente) ─── */
#plano-toggle-btn,
.plano-toggle-btn,
#ver-plano-btn,
#btn-ver-plano {
  display: none !important;
}

/* ─── Lista de escenas oculta (una sola escena, sin botón) ─── */
#sceneListToggle,
#sceneList {
  display: none !important;
}
