/* Mi Predio GeoVuelo: estilos compartidos (visor, acceso y 3D). Colores del brochure GeoVuelo. */
:root { --navy:#123a6b; --navy2:#0b2547; --green:#14937a; --mint:#e3f4ee; --ink:#1c2b36; --muted:#5d6b75; --line:#dbe4e2;
        --bg:#f4f7f8; --ok:#14937a; --warn:#c0392b; --amber:#f5b301; --rojo:#c62828; }
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body { font-family:Inter, system-ui, sans-serif; color:var(--ink); background:var(--bg); font-size:15px; }
h1, h2, h3, .marca { font-family:Montserrat, Inter, sans-serif; }
button { font:inherit; cursor:pointer; }
a { color:var(--navy); }

/* ---------- Botones comunes ---------- */
.btn-principal { display:inline-block; width:100%; padding:13px; border:0; border-radius:10px; background:var(--green); color:#fff; text-align:center;
                 font:700 16px Montserrat, sans-serif; text-decoration:none; }
.btn-principal:hover { background:#0f7d68; }
.btn-principal:disabled { opacity:.6; }
.link { color:var(--green); font-weight:600; }

/* ---------- Acceso (/) ---------- */
.portada { min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:16px;
           background:linear-gradient(160deg, var(--navy2), var(--navy) 55%, var(--green)); }
.caja { background:#fff; border-radius:16px; width:100%; max-width:430px; padding:28px 24px 22px; box-shadow:0 20px 60px rgba(0,0,0,.35); text-align:center; }
.caja img.logo { width:150px; }
.caja h1 { font-size:22px; color:var(--navy); margin:10px 0 2px; }
.caja p.sub { color:var(--muted); margin:0 0 18px; font-size:14px; }
.campo { text-align:left; margin-bottom:12px; }
.campo label { display:block; font-size:13px; font-weight:600; color:var(--navy); margin-bottom:4px; }
.campo input { width:100%; padding:12px; border:1px solid var(--line); border-radius:10px; font-size:16px; }
.campo input:focus { outline:2px solid var(--green); border-color:transparent; }
.msg { font-size:13.5px; min-height:18px; margin:8px 0; line-height:1.45; }
.msg.error { color:var(--warn); } .msg.ok { color:var(--ok); }
.separa { margin:18px 0 12px; color:var(--muted); font-size:13px; }
.btn-demo { display:block; padding:12px; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--navy); font-weight:700; }
.btn-demo:hover { border-color:var(--green); }
.lista-predios { text-align:left; margin:8px 0 14px; }
.lista-predios a { display:block; padding:12px; border:1px solid var(--line); border-radius:10px; margin-bottom:8px; text-decoration:none; color:var(--ink); }
.lista-predios a:hover { border-color:var(--green); }
.lista-predios b { color:var(--navy); display:block; }
.lista-predios small { color:var(--muted); }
.pie { margin-top:16px; font-size:12px; color:var(--muted); line-height:1.5; }
.mensaje-error { max-width:420px; margin:12vh auto; padding:24px; background:#fff; border-radius:16px; text-align:center; box-shadow:0 6px 30px rgba(0,0,0,.12); }
.mensaje-error img { width:120px; }
.mensaje-error .btn-principal { margin:10px 0; }

/* ---------- Visor 2D ---------- */
#app.visor { display:grid; grid-template-columns:380px 1fr; grid-template-rows:auto 1fr; height:100vh; height:100dvh; }
header.barra { grid-column:1 / -1; display:flex; align-items:center; gap:12px; padding:8px 16px; background:var(--navy2); color:#fff; }
header.barra img { height:40px; background:#fff; border-radius:8px; padding:2px 4px; display:block; }
header.barra .titulo { font-weight:800; font-size:17px; letter-spacing:.3px; }
header.barra .titulo span { color:#6fd8bf; }
header.barra .cliente { margin-left:auto; font-size:13px; opacity:.85; text-align:right; }
header.barra .salir { background:transparent; border:1px solid rgba(255,255,255,.4); color:#fff; border-radius:8px; padding:5px 10px; font-size:13px;
                      margin-left:8px; text-decoration:none; white-space:nowrap; }
aside#panel { overflow-y:auto; background:#fff; border-right:1px solid var(--line); padding:16px; }
#mapa-wrap { position:relative; min-height:0; }
#mapa { position:absolute; inset:0; background:#cfd8dc; }
.demo-panel { background:#fdecea; border:1px solid #f5b5ae; color:#8e1c12; border-radius:10px; padding:10px 12px; font-size:13px; margin-bottom:14px; line-height:1.45; }
#rotulo-demo { position:absolute; top:10px; left:56px; z-index:790; background:rgba(198,40,40,.92); color:#fff; font:800 12.5px Montserrat, sans-serif;
               padding:6px 10px; border-radius:8px; pointer-events:none; box-shadow:0 2px 8px rgba(0,0,0,.3); }
#aviso-mapa { position:absolute; bottom:24px; right:10px; z-index:780; background:rgba(255,247,224,.95); border:1px solid #f1d58a; color:#6b5200;
              border-radius:8px; padding:4px 8px; font-size:11px; max-width:60%; display:none; }
#aviso-mapa.visible { display:block; }
.tarjeta { border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:14px; background:#fff; }
.tarjeta h2 { font-size:15px; color:var(--navy); margin:0 0 10px; display:flex; align-items:center; gap:8px; }
.tarjeta h2 .ico { width:22px; height:22px; border-radius:6px; background:var(--mint); color:var(--green); display:inline-flex; align-items:center; justify-content:center; font-size:13px; }
.predio-nombre { font-size:18px; font-weight:800; color:var(--navy); margin:0 0 2px; font-family:Montserrat, sans-serif; }
.predio-sub { color:var(--muted); font-size:13.5px; margin:0 0 12px; }
.cifras { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.cifra { background:var(--mint); border-radius:10px; padding:10px; }
.cifra .v { font-size:20px; font-weight:800; color:var(--navy); font-family:Montserrat, sans-serif; }
.cifra .l { font-size:12px; color:var(--muted); }
dl.datos { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; margin:12px 0 0; font-size:13.5px; }
dl.datos dt { color:var(--muted); } dl.datos dd { margin:0; font-weight:500; }
table.deslindes { width:100%; border-collapse:collapse; font-size:13.5px; }
table.deslindes td { padding:8px 4px; border-top:1px solid var(--line); vertical-align:top; }
table.deslindes tr:first-child td { border-top:0; }
table.deslindes .n { font-weight:700; color:var(--navy); white-space:nowrap; }
table.deslindes .m { text-align:right; font-weight:700; white-space:nowrap; font-variant-numeric:tabular-nums; }
table.deslindes .col { color:var(--muted); font-size:12.5px; }
table.deslindes tr { cursor:pointer; } table.deslindes tr:hover td { background:#f6faf9; }
.cuadro { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; }
.botones { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.btn { border:1px solid var(--line); background:#fff; color:var(--navy); border-radius:10px; padding:10px 8px; font-weight:600; font-size:14px;
       display:flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; }
.btn:hover { border-color:var(--green); }
.btn.activo { background:var(--navy); color:#fff; border-color:var(--navy); }
.btn.gps { grid-column:1 / -1; background:var(--green); color:#fff; border-color:var(--green); font-size:15px; padding:12px; }
.btn.gps:hover { background:#0f7d68; }
#medida, #gps-res { margin-top:10px; font-size:13.5px; }
.resultado { background:var(--mint); border-radius:10px; padding:10px 12px; line-height:1.55; }
.resultado b { color:var(--navy); }
.estado { font-weight:800; font-size:15px; } .estado.dentro { color:var(--ok); } .estado.fuera { color:var(--warn); }
.nota { font-size:12px; color:var(--muted); margin-top:6px; line-height:1.4; }
.link-sim { background:none; border:0; color:var(--green); text-decoration:underline; padding:0; font-size:12.5px; }
.descargas a { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--ink); margin-bottom:8px; }
.descargas a:hover { border-color:var(--green); }
.descargas .tipo { width:44px; height:30px; border-radius:6px; background:var(--navy); color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:none; }
.descargas .tipo.kml { background:var(--green); } .descargas .tipo.csv { background:#5b7083; }
.descargas small { display:block; color:var(--muted); font-size:12px; }
.contacto a { color:var(--navy); font-weight:600; text-decoration:none; }
.contacto p { margin:5px 0; font-size:14px; }
.btn-wsp { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:10px; background:#25d366; color:#fff !important; border-radius:10px; padding:11px; font-weight:700 !important; }
.legal { font-size:11.5px; color:var(--muted); line-height:1.45; }
.num-vertice { background:var(--amber); color:#1b1b1b; border:2px solid #fff; border-radius:50%; width:24px; height:24px; display:flex; align-items:center;
               justify-content:center; font:700 11px Inter, sans-serif; box-shadow:0 1px 4px rgba(0,0,0,.5); }
.mapa-pequeno .num-vertice { width:12px; height:12px; font-size:0; }
.etq-deslinde { background:rgba(11,37,71,.85); color:#fff; border:0; border-radius:6px; padding:3px 7px; font:700 11.5px Montserrat, sans-serif; box-shadow:none; white-space:nowrap; }
.etq-deslinde::before { display:none; }
.leaflet-popup-content { font-size:13px; line-height:1.5; margin:12px 14px; }
.pop h3 { margin:0 0 4px; font-size:14px; color:var(--navy); } .pop table td { padding:1px 6px 1px 0; } .pop .gr { color:var(--muted); }
.yo { width:18px; height:18px; border-radius:50%; background:#1a73e8; border:3px solid #fff; box-shadow:0 0 0 2px rgba(26,115,232,.35), 0 1px 4px rgba(0,0,0,.4); }
#gps-flot { position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:800; background:#fff; border-radius:10px; padding:7px 12px; font-size:13px;
            box-shadow:0 2px 10px rgba(0,0,0,.3); display:none; text-align:center; max-width:70%; }
#gps-flot.visible { display:block; }
#comparar-barra { position:absolute; left:50%; transform:translateX(-50%); bottom:22px; z-index:800; width:min(92%, 520px); background:rgba(255,255,255,.96);
                  border-radius:12px; padding:8px 12px 10px; box-shadow:0 4px 18px rgba(0,0,0,.25); display:none; }
#comparar-barra.visible { display:block; }
#comparar-barra .fila { display:flex; justify-content:space-between; align-items:center; font-size:12.5px; font-weight:600; color:var(--navy); gap:8px; }
#comparar-barra select { font-size:12.5px; padding:3px 4px; border-radius:6px; border:1px solid var(--line); max-width:150px; }
#comparar-barra input[type=range] { width:100%; margin:6px 0 0; accent-color:var(--green); }
#divisor { position:absolute; top:0; bottom:0; width:3px; margin-left:-1px; background:#fff; z-index:700; pointer-events:none; box-shadow:0 0 6px rgba(0,0,0,.6); display:none; }
#divisor.visible { display:block; }
.etq-fecha { position:absolute; bottom:100px; z-index:750; background:rgba(11,37,71,.85); color:#fff; font:700 12px Montserrat, sans-serif; padding:4px 8px; border-radius:6px; display:none; }
.etq-fecha.visible { display:block; } #etq-antes { left:10px; } #etq-despues { right:10px; }
#leyenda-esc { position:absolute; left:10px; bottom:34px; z-index:780; background:rgba(255,255,255,.96); border-radius:10px; padding:8px 10px; width:250px; font-size:12px;
               box-shadow:0 2px 10px rgba(0,0,0,.3); display:none; }
#leyenda-esc.visible { display:block; }
#leyenda-esc b { color:var(--navy); font-size:12.5px; }
#leyenda-esc .rampa { height:10px; border-radius:3px; margin:6px 0 2px; border:1px solid #ccc;
  background:linear-gradient(90deg, rgba(198,233,247,0), rgba(158,202,225,.45), rgba(66,146,198,.7), rgba(8,81,156,.85), rgba(8,30,90,.95)); }
#leyenda-esc .fila-l { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; margin-bottom:4px; }
#leyenda-esc .it { display:flex; align-items:center; gap:6px; margin:3px 0; }
#leyenda-esc .sw { width:22px; height:10px; flex:none; border-radius:2px; }
#leyenda-esc .sw.linea { background:#00ace6; height:4px; box-shadow:0 0 0 1px #fff; }
#leyenda-esc .sw.apoz { background:rgba(236,0,140,.6); border:1px solid #a0005f; }
#leyenda-esc .adv { margin-top:6px; background:#fff7e0; border:1px solid #f1d58a; color:#6b5200; border-radius:6px; padding:5px 7px; font-size:11px; line-height:1.35; }
.flecha-esc { color:#fff; font-size:13px; line-height:13px; text-shadow:0 0 2px #00557f, 0 0 2px #00557f; }
.capa-esc-img { image-rendering:pixelated; }
.modo-medir #mapa { cursor:crosshair; }
#aviso-medir { position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:800; background:var(--navy); color:#fff; padding:7px 12px; border-radius:8px;
               font-size:13px; display:none; box-shadow:0 2px 8px rgba(0,0,0,.3); }
.modo-medir #aviso-medir { display:block; }

/* ---------- Vista 3D ---------- */
body.v3d { background:#0b2547; overflow:hidden; font-size:14px; }
#app.vista3d { display:grid; grid-template-columns:1fr 330px; grid-template-rows:auto 1fr; height:100vh; height:100dvh; }
#escena { position:relative; min-height:0; overflow:hidden; background:linear-gradient(#cfe3f1, #eef4f7); }
#escena canvas { display:block; touch-action:none; }
.vista3d aside { background:#fff; overflow-y:auto; padding:14px; border-left:1px solid var(--line); }
.vista3d h2 { font:700 14px Montserrat, sans-serif; color:var(--navy); margin:0 0 8px; }
.bloque { border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:12px; }
.exa { display:flex; justify-content:space-between; font-weight:700; color:var(--navy); }
.vista3d input[type=range] { width:100%; accent-color:var(--green); }
.btn.lluvia { background:var(--green); color:#fff; border-color:var(--green); grid-column:1 / -1; font-size:15px; }
.fila3 { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; font-size:13px; }
.fila3 select { padding:5px; border-radius:8px; border:1px solid var(--line); }
.stats { font-size:13px; line-height:1.6; } .stats b { color:var(--navy); }
.barra-st { height:8px; border-radius:4px; background:#e8eef0; overflow:hidden; margin:2px 0 6px; }
.barra-st i { display:block; height:100%; background:#1e90ff; } .barra-st i.otro { background:#8aa; }
.adv3 { background:#fff7e0; border:1px solid #f1d58a; color:#6b5200; border-radius:10px; padding:9px 11px; font-size:12.5px; line-height:1.45; }
.dron { margin-top:8px; background:var(--mint); color:#0f5e4f; border-radius:10px; padding:8px 11px; font-size:12.5px; font-weight:600; }
.etq { background:rgba(11,37,71,.85); color:#fff; font:700 12px Montserrat, sans-serif; padding:3px 7px; border-radius:6px; white-space:nowrap; pointer-events:none; }
.etq.salida { background:#c62828; } .etq.salida2 { background:#e65100; }
#exa-flot { position:absolute; left:10px; top:10px; background:rgba(255,255,255,.92); color:var(--navy); font:700 12.5px Montserrat, sans-serif; padding:5px 9px; border-radius:8px; pointer-events:none; }
#rotulo-demo3d { position:absolute; left:10px; top:44px; background:rgba(198,40,40,.92); color:#fff; font:800 12px Montserrat, sans-serif; padding:5px 9px; border-radius:8px; pointer-events:none; }
#brujula { position:absolute; right:10px; top:10px; width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,.92); display:flex; align-items:center; justify-content:center; pointer-events:none; }
#brujula div { font:800 12px Montserrat, sans-serif; color:var(--navy); text-align:center; line-height:1; }
#cargando { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--navy); font-weight:600; }
#adv-flot { position:absolute; left:10px; bottom:10px; right:10px; max-width:520px; background:rgba(255,247,224,.95); border:1px solid #f1d58a; color:#6b5200;
            border-radius:8px; padding:5px 8px; font-size:11px; line-height:1.35; pointer-events:none; }

/* ---------- Celular ---------- */
@media (max-width: 820px) {
  #app.visor { display:flex; flex-direction:column; height:auto; }
  header.barra { position:sticky; top:0; z-index:1200; padding:8px 12px; }
  header.barra img { height:34px; } header.barra .cliente { display:none; } header.barra .salir { margin-left:auto; }
  #mapa-wrap { order:1; height:62vh; height:62dvh; } aside#panel { order:2; border-right:0; padding:14px 16px 24px; }
  .leaflet-control-attribution { font-size:9px; max-width:70%; }
  #gps-flot, #aviso-medir { max-width:60%; }
  #leyenda-esc { width:190px; font-size:10.5px; padding:6px 8px; bottom:30px; } #leyenda-esc .adv { font-size:10px; padding:4px 6px; }
  #rotulo-demo { font-size:11px; left:52px; }
  #app.vista3d { grid-template-columns:1fr; grid-template-rows:auto 58vh auto; grid-template-rows:auto 58dvh auto; height:auto; min-height:100dvh; }
  body.v3d { overflow:auto; } .vista3d aside { border-left:0; }
}
