/* ============ FLOPAB 360 · estilos ============ */
/* Paleta de lujo: negro cálido + dorado champaña */
:root {
  --bg: #0d0c0a;
  --panel: rgba(20, 18, 15, 0.9);
  --panel-solid: #16140f;
  --borde: rgba(214, 190, 140, 0.16);
  --texto: #f3eee5;
  --suave: #a99f8d;
  --acento: #c9a96e;
  --acento-2: #e8d3a2;
  --acento-txt: #17130c;
  --ok: #3fbf7f;
  --warn: #e0a84a;
  --bad: #d9534f;
  --radio: 4px;
  --sombra: 0 14px 44px rgba(0, 0, 0, 0.55);
  --fuente: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fuente-titulo: 'Tinos', 'Times New Roman', Times, serif; /* Tinos = Times New Roman web (igual en Android, iPhone y PC) */
}
/* Muestra en vivo de paleta + letra en el administrador */
.muestra-letra { background: var(--bg); color: var(--texto); border: 1px solid var(--borde); border-radius: 3px; padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.muestra-letra h2 { font-family: var(--fuente-titulo); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; font-size: 17px; margin: 0; }
.muestra-letra .etq-lote { pointer-events: none; }
.muestra-letra.letra-script h2 { text-transform: none; letter-spacing: 0.01em; font-size: 24px; }
.muestra-letra.letra-cursiva h2, .muestra-letra.letra-cursiva .marca b { font-style: italic; }

/* Letras cursivas/caligráficas: sin mayúsculas forzadas y un poco más grandes para que se lean */
.letra-script .intro h1, .letra-script .ficha h2, .letra-script .marca b, .letra-script .etq-lote b, .letra-script .firma b, .letra-script .intro-firma b, .letra-script .barra-top .titulo .nom { text-transform: none !important; letter-spacing: 0.01em !important; }
.letra-script .intro h1 { font-size: clamp(32px, 6vw, 46px); }
.letra-script .ficha h2 { font-size: 24px; }
.letra-script .marca b { font-size: 1.5em; }
.letra-script .etq-lote b { font-size: 16px; font-weight: 600; }
.letra-script .barra-top .titulo .nom { font-size: 19px; }
.letra-cursiva .intro h1, .letra-cursiva .ficha h2, .letra-cursiva .barra-top .titulo .nom, .letra-cursiva .marca b { font-style: italic; }

/* Paletas alternativas (se eligen por proyecto); la predeterminada es negro y dorado */
[data-tema="bosque"] {          /* verde bosque y dorado: naturaleza, fincas, parcelaciones */
  --bg: #0b1410;
  --panel: rgba(13, 26, 20, 0.9);
  --panel-solid: #10201a;
  --borde: rgba(201, 169, 110, 0.18);
  --texto: #f1eee4;
  --suave: #a3ab9c;
  --acento: #c9a96e;
  --acento-2: #e6cf9b;
  --acento-txt: #10180f;
}
[data-tema="noche"] {           /* azul noche y dorado: elegante, corporativo */
  --bg: #0a0f1a;
  --panel: rgba(13, 20, 35, 0.9);
  --panel-solid: #111a2c;
  --borde: rgba(201, 169, 110, 0.18);
  --texto: #f1efe8;
  --suave: #9ea6b6;
  --acento: #cdae72;
  --acento-2: #e9d3a0;
  --acento-txt: #0f1420;
}
[data-tema="vino"] {            /* vino tinto y dorado: exclusivo, cálido */
  --bg: #160b0e;
  --panel: rgba(32, 14, 19, 0.9);
  --panel-solid: #241016;
  --borde: rgba(214, 178, 120, 0.2);
  --texto: #f6ede6;
  --suave: #b49d98;
  --acento: #d6b278;
  --acento-2: #ecd3a4;
  --acento-txt: #1c0c10;
}
[data-tema="petroleo"] {        /* azul petróleo y arena: fresco, natural */
  --bg: #0a1618;
  --panel: rgba(12, 30, 33, 0.9);
  --panel-solid: #0f2528;
  --borde: rgba(216, 195, 165, 0.2);
  --texto: #f0ece4;
  --suave: #9fb0ae;
  --acento: #d8c3a5;
  --acento-2: #ecdcc4;
  --acento-txt: #0d1c1e;
}
[data-tema="plata"] {           /* carbón y plata: sobrio, tecnológico */
  --bg: #0e0f11;
  --panel: rgba(22, 24, 27, 0.9);
  --panel-solid: #1a1c20;
  --borde: rgba(200, 206, 214, 0.18);
  --texto: #f2f4f6;
  --suave: #9ba1a9;
  --acento: #c3cad3;
  --acento-2: #e3e8ee;
  --acento-txt: #121418;
}
[data-tema="marfil"] {          /* marfil, negro y dorado: tema claro, editorial */
  --bg: #efe9dd;
  --panel: rgba(250, 247, 240, 0.93);
  --panel-solid: #f7f2e8;
  --borde: rgba(60, 48, 30, 0.16);
  --texto: #1d1a15;
  --suave: #6f6656;
  --acento: #a8813f;
  --acento-2: #c19a55;
  --acento-txt: #fffaf0;
  --sombra: 0 14px 40px rgba(60, 45, 20, 0.22);
}
[data-tema="marfil"] .btn { background: rgba(0, 0, 0, 0.04); color: var(--texto); }
[data-tema="marfil"] .btn:hover { background: rgba(0, 0, 0, 0.08); }
[data-tema="marfil"] .btn.prim { background: var(--acento); color: var(--acento-txt); }
[data-tema="marfil"] .ficha .dato, [data-tema="marfil"] .st-kpis > div { background: rgba(0, 0, 0, 0.04); }
[data-tema="marfil"] .ficha p { color: var(--suave); }
[data-tema="marfil"] input, [data-tema="marfil"] select, [data-tema="marfil"] textarea { background: rgba(0, 0, 0, 0.03); }
[data-tema="marfil"] .intro { background: radial-gradient(ellipse at center, rgba(239, 233, 221, 0.6), rgba(239, 233, 221, 0.94)); }
[data-tema="marfil"] .intro p, [data-tema="marfil"] .intro .tips { color: var(--suave); }
[data-tema="cobre"] {           /* grafito y cobre: cálido, moderno */
  --bg: #111010;
  --panel: rgba(24, 22, 21, 0.9);
  --panel-solid: #1b1918;
  --borde: rgba(200, 135, 90, 0.2);
  --texto: #f3ede8;
  --suave: #aa9f97;
  --acento: #c8875a;
  --acento-2: #e2a982;
  --acento-txt: #1a110b;
}

/* Títulos con Times New Roman: clásica, elegante y con números rectos */
h1, h2, h3, .intro h1, .ficha h2, .barra-top .titulo .nom { font-family: var(--fuente-titulo); font-weight: 400; letter-spacing: 0.04em; font-variant-numeric: lining-nums; }
.intro h1 { text-transform: uppercase; letter-spacing: 0.07em; font-size: clamp(20px, 3.6vw, 30px); }
.ficha h2 { text-transform: uppercase; letter-spacing: 0.06em; font-size: 16px; }
.barra-top .titulo .nom { font-size: 14px; }
label.campo > span, .sec h4, .st-kpis small, .ficha .dato small { letter-spacing: 0.1em; text-transform: uppercase; font-size: 10.5px; }
.ficha .dato b { font-size: 15px; font-weight: 500; }

/* Mezcla de formas: paneles rectos, botones de acción redondeados */
.btn.prim, .btn.wa, .chip, .badge, .intro .btn.prim { border-radius: 999px; }
.btn.prim { padding: 10px 22px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--texto); font-family: var(--fuente); font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acento); }

.marca { display: inline-flex; align-items: center; gap: 8px; }
/* Logo: oculto hasta que exista marca/logo.png (por ahora solo el nombre) */
.marca .logo { display: none; width: 30px; height: 30px; border-radius: 3px; position: relative; overflow: hidden; flex: none; font-size: 0; }
.marca .logo:has(img) { display: block; }
.marca .logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.marca b { font-family: var(--fuente-titulo); font-weight: 400; font-size: 1.15em; letter-spacing: 0.22em; color: var(--acento); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--borde); background: rgba(255, 255, 255, 0.06); padding: 9px 14px; border-radius: 3px; cursor: pointer; transition: 0.15s; white-space: nowrap; text-decoration: none; color: var(--texto); }
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn.prim { background: var(--acento); border-color: var(--acento); color: var(--acento-txt); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11.5px; }
.btn.prim:hover { background: var(--acento-2); border-color: var(--acento-2); }
.btn.peligro { color: #fecaca; border-color: rgba(239, 68, 68, 0.4); }
.btn.peligro:hover { background: rgba(239, 68, 68, 0.15); }
.btn.activo { background: var(--acento); border-color: var(--acento); color: var(--acento-txt); }
.btn.ico { padding: 9px; }
.btn.peq { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

label.campo { display: block; margin-bottom: 12px; }
label.campo > span { display: block; font-size: 12px; color: var(--suave); margin-bottom: 5px; font-weight: 500; }
input[type=text], input[type=number], input[type=tel], input[type=email], input[type=password], select, textarea {
  width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--borde); border-radius: 3px; padding: 9px 11px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 25%, transparent); }
select option { background: var(--panel-solid); }
textarea { resize: vertical; min-height: 70px; }
.fila { display: flex; gap: 10px; }
.fila > * { flex: 1; min-width: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c) 20%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--panel-solid); border: 1px solid var(--borde); padding: 11px 18px; border-radius: 3px; box-shadow: var(--sombra); opacity: 0; transition: 0.25s; z-index: 9999; pointer-events: none; max-width: calc(100% - 32px); }
.toast.ver { opacity: 1; transform: translateX(-50%); }

/* ---------- Marcadores dentro del 360 ---------- */
/* Punto para ir a otra foto / al lote: círculo pequeño blanco semitransparente */
.hotspot { position: relative; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, 0.35); border: 1.5px solid rgba(255, 255, 255, 0.95); backdrop-filter: blur(3px); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); transition: transform 0.2s, background 0.2s; animation: pulso 2.4s infinite; }
.hotspot::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.hotspot .hs-ico { display: none !important; }
.hotspot .hs-txt { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none; white-space: nowrap; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(14, 12, 9, 0.8); padding: 4px 10px; border-radius: 999px; transition: 0.2s; }
.hotspot:hover { animation: none; transform: scale(1.2); background: rgba(255, 255, 255, 0.5); }
.hotspot:hover .hs-txt { opacity: 1; transform: translateX(-50%); }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } }

/* Flecha en el piso (estilo Street View) */
.flecha-piso { position: relative; cursor: pointer; perspective: 260px; display: grid; justify-items: center; }
.flecha-piso .fp-flecha { width: 72px; height: 72px; transform: rotateX(58deg); transition: transform 0.2s; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.55)); animation: respira 2.2s ease-in-out infinite; }
.flecha-piso .fp-flecha svg { width: 100%; height: 100%; }
.flecha-piso:hover .fp-flecha { transform: rotateX(48deg) scale(1.15); animation: none; }
.flecha-piso .fp-txt { margin-top: -8px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(14, 12, 9, 0.7); padding: 3px 9px; border-radius: 3px; white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: 0.2s; }
.flecha-piso:hover .fp-txt { opacity: 1; transform: none; }
@keyframes respira { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* Espacio libre para el aviso "Powered by Netlify" (plan gratis): nada importante queda debajo de él */
.con-insignia .firma { right: 224px; }
@media (max-width: 760px) {
  .con-insignia .tira { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .con-insignia .ficha { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .con-insignia .panel-lotes .lista { padding-bottom: 80px; }
  .con-insignia .toast { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .con-insignia .firma { right: 10px; }
}

/* Video de "cómo llegar" */
.video-modal { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, 0.82); display: grid; place-items: center; padding: 16px; }
.video-modal .vm-caja { position: relative; width: min(900px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; box-shadow: var(--sombra); }
.video-modal iframe { width: 100%; height: 100%; border: 0; }
.video-modal .vm-x { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0, 0, 0, 0.6); }

/* Vías y puntos de acceso */
.ruta { cursor: pointer; }
.ruta-flujo { animation: flujo 1.1s linear infinite; }
@keyframes flujo { to { stroke-dashoffset: -24; } }
.etq-ruta { pointer-events: auto; cursor: pointer; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: rgba(14, 12, 9, 0.72); border-left: 3px solid var(--c); padding: 3px 8px; border-radius: 2px; white-space: nowrap; }
.acceso { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.acceso .ac-pin { width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--acento); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); order: 2; margin-bottom: 2px; }
.acceso .ac-txt { order: 1; margin-bottom: 4px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--acento-txt); background: var(--acento); padding: 3px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.acceso:hover .ac-pin { transform: rotate(-45deg) scale(1.15); }

.etq-lote { pointer-events: auto; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 4px 10px; border-radius: 3px; background: rgba(14, 12, 9, 0.8); backdrop-filter: blur(4px); color: #fff; border: 1.5px solid var(--c); white-space: nowrap; text-shadow: 0 1px 2px #000; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4); }
.etq-lote b { font-family: var(--fuente-titulo); font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.etq-lote small { font-size: 9.5px; font-weight: 500; color: color-mix(in srgb, var(--c) 45%, #fff); }
.psv-marker--poly { cursor: pointer; }
.psv-tooltip-content { font-family: var(--fuente); font-size: 13px; }

.capturando .psv-marker, .capturando .psv-marker * { pointer-events: none !important; }
/* los puntos del dibujo sí se pueden tomar y arrastrar */
.capturando .psv-marker.marcador-vertice, .capturando .psv-marker.marcador-vertice * { pointer-events: auto !important; cursor: grab !important; touch-action: none; }
.arrastrando, .arrastrando * { cursor: grabbing !important; }
.capturando .psv-canvas-container, .capturando .psv-container { cursor: crosshair !important; }
.vertice { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--acento); box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.vertice.primero { background: var(--acento); border-color: #fff; width: 18px; height: 18px; }
.vertice { transition: transform 0.12s; }
.vertice:hover { transform: scale(1.35); }
@media (pointer: coarse) { .vertice { width: 20px; height: 20px; } .vertice.primero { width: 24px; height: 24px; } }

/* =================== VISOR =================== */
.visor { position: fixed; inset: 0; overflow: hidden; }
#pano { position: absolute; inset: 0; }
.capa { position: absolute; z-index: 20; }
.vidrio { background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }

.barra-top { top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.barra-top > * { pointer-events: auto; }
.barra-top .titulo { padding: 8px 14px 8px 10px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.barra-top .titulo .txt { min-width: 0; }
.barra-top .titulo .nom { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-top .titulo .sub { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-top .esp { flex: 1; }
.barra-top .acciones { display: flex; gap: 8px; padding: 6px; }

.leyenda { left: 14px; bottom: 120px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.leyenda .it { display: flex; align-items: center; gap: 8px; cursor: pointer; opacity: 0.95; }
.leyenda .it i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.leyenda .it b { margin-left: auto; padding-left: 14px; }

.tira { left: 50%; transform: translateX(-50%); bottom: 14px; max-width: calc(100% - 28px); padding: 8px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.tira .esc { position: relative; flex: none; width: 128px; height: 74px; border-radius: 3px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: #000 center/cover; transition: 0.2s; }
.tira .esc:hover { transform: translateY(-2px); }
.tira .esc.act { border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 35%, transparent); }
.tira .esc span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; font-weight: 600; padding: 14px 7px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 4px; align-items: center; }
.tira .esc span svg { width: 13px; height: 13px; flex: none; }

.panel-lotes { top: 80px; right: 14px; bottom: 120px; width: 320px; display: flex; flex-direction: column; transition: transform 0.3s, opacity 0.3s; }
.panel-lotes.oculto { transform: translateX(calc(100% + 20px)); opacity: 0; pointer-events: none; }
.panel-lotes .cab { padding: 14px 14px 8px; }
.panel-lotes .cab h3 { margin: 0 0 10px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 5px 10px; border-radius: 3px; border: 1px solid var(--borde); cursor: pointer; background: transparent; }
.chip.act { background: var(--texto); color: var(--bg); font-weight: 600; }
.panel-lotes .lista { flex: 1; overflow-y: auto; padding: 6px 8px 10px; }
.item-lote { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 3px; cursor: pointer; }
.item-lote:hover, .item-lote.act { background: rgba(255, 255, 255, 0.07); }
.item-lote .cuad { width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); flex: none; }
.item-lote .inf { flex: 1; min-width: 0; }
.item-lote .inf b { display: block; font-size: 14px; }
.item-lote .inf small { color: var(--suave); font-size: 12px; }
.item-lote .pr { font-size: 12px; font-weight: 700; text-align: right; }
.vacio { color: var(--suave); text-align: center; padding: 30px 10px; font-size: 13px; }

/* En computador la ficha va a la derecha para no tapar el lote, que queda en el centro */
.ficha { right: 14px; bottom: 110px; width: min(380px, calc(100% - 28px)); padding: 18px; transition: 0.3s; }
.ficha.oculto { opacity: 0; transform: translateX(20px); pointer-events: none; }
.ficha .x { position: absolute; top: 10px; right: 10px; }
.ficha h2 { margin: 0 0 6px; font-size: 22px; }
.ficha .datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.ficha .dato { background: rgba(255, 255, 255, 0.05); border-radius: 3px; padding: 10px 12px; }
.ficha .dato small { display: block; color: var(--suave); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.ficha .dato b { font-size: 16px; }
.ficha p { color: #cdd3ea; font-size: 14px; line-height: 1.5; margin: 0 0 14px; white-space: pre-line; }
.ficha .acc { display: flex; gap: 8px; flex-wrap: wrap; }
.ficha .acc .btn { flex: 1; }
.btn.wa { background: #22c55e; color: #fff; border-color: transparent; font-weight: 600; }

.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(11, 16, 32, 0.55), rgba(11, 16, 32, 0.92)); transition: opacity 0.5s; padding: 16px; }
.intro.fuera { opacity: 0; pointer-events: none; }
.intro .caja { text-align: center; max-width: 520px; }
.intro h1 { font-size: clamp(28px, 6vw, 46px); margin: 18px 0 10px; letter-spacing: -0.03em; }
.intro p { color: #c8cfea; line-height: 1.6; margin: 0 0 26px; }
.intro .tips { display: flex; gap: 18px; justify-content: center; color: var(--suave); font-size: 13px; margin-top: 26px; flex-wrap: wrap; }
.intro .btn.prim { padding: 13px 30px; font-size: 12px; }

/* Marca de la empresa cliente */
.cli-logo { height: 40px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 3px; padding: 3px 6px; flex: none; }
.intro-cliente { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 6px; }
.intro-cliente img { max-height: 90px; max-width: 240px; object-fit: contain; background: #fff; border-radius: 3px; padding: 10px 14px; box-shadow: var(--sombra); }
.intro-cliente .pres { font-size: 12px; color: var(--suave); text-transform: uppercase; letter-spacing: 0.1em; }
.intro-cliente .nom { font-weight: 700; font-size: 18px; }
.intro-cliente .cont { font-size: 13px; color: var(--suave); }
.intro-firma { margin-top: 22px; font-size: 12px; color: var(--suave); }
.firma { right: 14px; bottom: 14px; font-size: 11px; color: rgba(255, 255, 255, 0.75); background: rgba(14, 12, 9, 0.55); padding: 5px 10px; border-radius: 3px; text-decoration: none; backdrop-filter: blur(6px); }
.firma b { color: #fff; }
@media (max-width: 760px) { .firma { bottom: auto; top: 118px; right: 10px; } .cli-logo { height: 32px; max-width: 80px; } }

.cargando { position: fixed; inset: 0; display: grid; place-items: center; z-index: 200; background: var(--bg); color: var(--suave); text-align: center; padding: 16px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--acento); animation: gira 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes gira { to { transform: rotate(360deg); } }

.solo-movil { display: none !important; }
@media (max-width: 760px) {
  .solo-movil { display: inline-flex !important; }
  .solo-escritorio { display: none !important; }
  .barra-top { top: 10px; left: 10px; right: 10px; }
  .barra-top .titulo .sub { display: none; }
  .leyenda { left: 10px; bottom: auto; top: 72px; flex-direction: row; flex-wrap: wrap; padding: 6px 10px; font-size: 11px; gap: 10px; }
  .leyenda .it b { padding-left: 2px; }
  .panel-lotes { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 62vh; border-radius: 2px 2px 0 0; z-index: 40; }
  .panel-lotes.oculto { transform: translateY(105%); }
  .tira { bottom: 10px; }
  .tira .esc { width: 96px; height: 60px; }
  .ficha { left: 0; right: 0; bottom: 0; width: 100%; transform: none; border-radius: 2px 2px 0 0; z-index: 50; padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 72vh; overflow-y: auto; }
  .ficha::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
  .ficha h2 { font-size: 20px; }
  .ficha .acc .btn { min-height: 46px; flex: 1 1 100%; }
  .ficha .acc .btn.wa { order: -1; font-size: 16px; }
  .barra-top .acciones { gap: 4px; padding: 4px; }
  .barra-top .acciones .btn { padding: 9px; min-width: 40px; min-height: 40px; }
  .barra-top .titulo { padding: 6px 10px 6px 6px; gap: 8px; flex: 1; min-width: 0; }
  .barra-top .esp, #btnPantalla { display: none; }
  .barra-top .titulo .nom { font-size: 14px; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .chip { padding: 8px 12px; font-size: 13px; }
  .item-lote { padding: 12px 10px; }
  .flecha-piso .fp-flecha { width: 86px; height: 86px; }
  .hotspot { width: 26px; height: 26px; }
  .ficha.oculto { transform: translateY(100%); }
}

/* =================== ADMIN =================== */
.admin { display: flex; flex-direction: column; height: 100vh; }
.admin header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--borde); background: var(--panel-solid); flex-wrap: wrap; }
.admin header .esp { flex: 1; }
.admin header .nom-proy { font-weight: 600; color: var(--suave); }
.inicio-admin { max-width: 1100px; margin: 0 auto; padding: 32px 16px; width: 100%; overflow-y: auto; }
.inicio-admin h1 { margin: 0 0 6px; }
.inicio-admin > p { color: var(--suave); margin: 0 0 24px; }
.grid-proy { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tarjeta { background: var(--panel-solid); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; }
.tarjeta:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--acento) 50%, transparent); }
.tarjeta .img { height: 140px; background: #221e17 center/cover; display: grid; place-items: center; color: var(--suave); }
.tarjeta .cuerpo { padding: 14px; }
.tarjeta .cuerpo b { display: block; margin-bottom: 4px; }
.tarjeta .cuerpo small { color: var(--suave); }
.tarjeta.nueva { border-style: dashed; justify-content: center; align-items: center; min-height: 220px; color: var(--suave); gap: 10px; }
.tarjeta.nueva .mas { font-size: 38px; line-height: 1; color: var(--acento); }

.editor { flex: 1; display: grid; grid-template-columns: 270px 1fr 320px; min-height: 0; }
.editor aside { background: var(--panel-solid); overflow-y: auto; min-height: 0; }
.editor aside.izq { border-right: 1px solid var(--borde); }
.editor aside.der { border-left: 1px solid var(--borde); }
.sec { padding: 14px; border-bottom: 1px solid var(--borde); }
.sec h4 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--suave); display: flex; justify-content: space-between; align-items: center; }
.lista-esc { display: flex; flex-direction: column; gap: 8px; }
.it-esc { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.it-esc:hover { background: rgba(255, 255, 255, 0.05); }
.it-esc.act { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 12%, transparent); }
.it-esc .mini { width: 74px; height: 42px; border-radius: 3px; background: #000 center/cover; flex: none; }
.it-esc .inf { min-width: 0; flex: 1; }
.it-esc .inf b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-esc .inf small { color: var(--suave); font-size: 11px; }
.zona-subir { display: block; border: 2px dashed var(--borde); border-radius: 3px; padding: 16px; text-align: center; color: var(--suave); cursor: pointer; font-size: 13px; transition: 0.2s; }
.zona-subir:hover, .zona-subir.sobre { border-color: var(--acento); color: var(--texto); background: color-mix(in srgb, var(--acento) 8%, transparent); }
.zona-subir input { display: none; }

.centro { position: relative; min-width: 0; min-height: 0; background: #000; }
.centro #pano { position: absolute; inset: 0; }
.herramientas { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; gap: 6px; padding: 6px; }
.aviso-modo { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 30; padding: 10px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.aviso-modo kbd { background: rgba(255, 255, 255, 0.12); border-radius: 3px; padding: 1px 6px; font-size: 12px; }
.sin-escena { position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); text-align: center; padding: 20px; }

.lista-lotes-adm .item-lote { padding: 7px 8px; }
.ayuda { font-size: 12px; color: var(--suave); line-height: 1.5; }
.progreso { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 500; display: grid; place-items: center; }
.progreso .vidrio { padding: 26px 30px; text-align: center; min-width: 260px; }

.modal { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; }
.modal .vidrio { width: min(560px, 100%); padding: 22px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }
.modal ol { padding-left: 20px; line-height: 1.7; color: #cdd3ea; }

/* Detalles sobrios (estilo inmobiliaria de lujo) */
.intro .tips { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; gap: 0; }
.intro .tips span + span::before { content: ''; display: inline-block; width: 1px; height: 10px; background: var(--borde); margin: 0 14px; vertical-align: middle; }
.intro p { font-weight: 300; }
.intro-cliente .pres, .intro-firma, .firma { letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; }

.badge { text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; font-weight: 500; }
.chip { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

.firma b, .intro-firma b { font-family: var(--fuente-titulo); font-weight: 400; color: var(--acento); letter-spacing: 0.22em; }

/* Selector de colores */
.paleta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.muestra { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); background: var(--m); cursor: pointer; padding: 0; position: relative; transition: transform 0.12s; }
.muestra:hover { transform: scale(1.12); }
.muestra.act { border-color: var(--acento-2); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--acento); }
.muestra.ninguno { background: transparent; color: var(--suave); font-size: 11px; display: grid; place-items: center; }
.muestra.propia { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.muestra.propia.act { background: var(--m); }
.muestra.propia input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }

/* Ingreso */
.login { flex: 1; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #2a2318, var(--bg) 60%); min-height: 100vh; }
.caja-login { width: min(400px, 100%); padding: 26px; }
.caja-login .tabs { display: flex; gap: 8px; margin: 18px 0; }
.caja-login .tabs .chip { flex: 1; padding: 9px; }

/* Tablas de administración */
.tabla { background: var(--panel-solid); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.fila-t { display: grid; grid-template-columns: 1.3fr 1.6fr 0.7fr 0.9fr 0.8fr 1.3fr; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--borde); align-items: center; font-size: 13px; }
.fila-t.cab { border-top: 0; color: var(--suave); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.fila-t > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fila-t code { font-size: 13px; color: var(--acento-2); }
@media (max-width: 760px) {
  .fila-t { grid-template-columns: 1fr 1fr; }
  .fila-t.cab { display: none; }
}

/* Estadísticas */
.st-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.st-kpis > div, .st-caja { background: rgba(255, 255, 255, 0.05); border-radius: 3px; padding: 12px 14px; }
.st-kpis small, .st-caja > small { display: block; color: var(--suave); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.st-kpis b { display: block; font-size: 28px; margin: 4px 0; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.st-fila { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--borde); font-size: 13px; }
.st-caja > small + .st-fila { margin-top: 6px; }
@media (max-width: 760px) { .st-kpis, .st-grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 1000px) {
  .editor { display: flex; flex-direction: column; overflow-y: auto; }
  .editor .centro { order: -1; height: 55vh; flex: none; }
  .editor aside { overflow: visible; flex: none; border: 0 !important; }
  .herramientas { flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100% - 16px); }
}
