/* VENTAS 4R — estilos. Paleta y tipografías de la marca 4R (Outfit + Inter, negro #141618). */

@font-face { font-family: Outfit; font-weight: 300; font-display: swap; src: url(fonts/outfit-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(fonts/outfit-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(fonts/outfit-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }

:root {
  --ink: #141618;
  --ink-2: #2E3134;
  --muted: #626568;
  --muted-2: #8A8D90;
  --line: #E3E3E1;
  --line-2: #CFD1D3;
  --bg: #F4F4F2;
  --card: #FFFFFF;
  --dark: #1C1F22;
  --dark-2: #2B2E31;

  --ok: #1D6E46;
  --ok-bg: #E4F1E9;
  --res: #8A5A00;
  --res-bg: #FBEFD2;
  --vend: #5E6164;
  --vend-bg: #E9E9E8;
  --err: #A4251F;
  --err-bg: #FBE9E7;

  --display: Outfit, "Avenir Next", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 3px;
  --top: 60px;
  --bottom: 0px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; display: block; }
.ic.inline { display: inline-block; vertical-align: -2px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.splash img { width: 230px; height: auto; }
.splash-bar { width: 120px; height: 2px; background: rgba(255,255,255,.15); overflow: hidden; position: relative; }
.splash-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: #fff; animation: barra 1.1s ease-in-out infinite; }
@keyframes barra { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.splash-msg { color: #fff; max-width: 420px; text-align: center; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.splash-msg p { margin: 0; color: #C9CBCD; }

/* ---------- estructura ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--ink); color: #fff;
}
.topbar-in { height: var(--top); display: flex; align-items: center; gap: 20px; }
.topbar .logo { display: flex; align-items: center; text-decoration: none; margin-right: auto; gap: 12px; }
.topbar .logo img { height: 26px; width: auto; }
.topbar .logo span { font: 500 11px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: #A3A6AA; border-left: 1px solid #3A3E42; padding-left: 12px; }
.nav-top { display: none; gap: 4px; align-items: center; }
.nav-top a { text-decoration: none; color: #C9CBCD; font-size: 14px; padding: 8px 12px; border-radius: var(--r); }
.nav-top a:hover { color: #fff; }
.nav-top a.on { color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
.top-user { background: none; border: 1px solid #3A3E42; color: #fff; height: 36px; padding: 0 12px; border-radius: 18px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.top-user b { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
main.contenido { padding-bottom: calc(96px + var(--safe-b)); min-height: calc(100vh - var(--top)); }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: var(--safe-b);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; position: relative; }
.bottomnav a.on { color: var(--ink); }
.bottomnav a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--ink); }
.bottomnav .punto { position: absolute; top: 9px; left: calc(50% + 6px); width: 8px; height: 8px; background: var(--ink); border-radius: 50%; border: 2px solid #fff; }

.aviso-offline { background: var(--res-bg); color: var(--res); font-size: 13px; padding: 8px var(--gutter); text-align: center; }

.pie-version { text-align: center; font-size: 12px; color: var(--muted-2); padding: 32px 0 8px; letter-spacing: .04em; }

@media (min-width: 860px) {
  :root { --gutter: 32px; }
  .nav-top { display: flex; }
  .bottomnav { display: none; }
  main.contenido { padding-bottom: 64px; }
}

/* ---------- tipografía ---------- */
.eyebrow { font: 500 11.5px/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.h1 { font: 300 34px/1.08 var(--display); letter-spacing: -.02em; margin: 6px 0 0; }
.h2 { font: 400 24px/1.15 var(--display); letter-spacing: -.01em; margin: 0; }
.h3 { font: 500 17px/1.25 var(--display); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
@media (min-width: 860px) { .h1 { font-size: 46px; } .h2 { font-size: 28px; } }

.cabecera { padding: 28px 0 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.cabecera > div:first-child { min-width: 0; }
.cabecera p { margin: 8px 0 0; color: var(--muted); }
.migas { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding-top: 18px; flex-wrap: wrap; }
.migas a { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.migas a:hover { color: var(--ink); }

/* ---------- botones y controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r);
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font: 500 14px/1 var(--body); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.line { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.line:hover { border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn.ghost:hover { background: rgba(20,22,24,.06); }
.btn.peligro { background: #fff; color: var(--err); border-color: #E6B8B4; }
.btn.peligro:hover { border-color: var(--err); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.xs { height: 30px; padding: 0 9px; font-size: 12.5px; gap: 5px; }
.btn.ancho { width: 100%; }
.btn.icono { width: 40px; padding: 0; }
.btn.sm.icono { width: 36px; }
.btn.xs.icono { width: 30px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.chip { text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { font-weight: 400; opacity: .7; }

.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > span, .campo > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.campo .ayuda { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: #fff; padding: 0 12px; font-size: 15px;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input.mal { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141618' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.prefijo { position: relative; }
.prefijo > em { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.prefijo > .input { padding-left: 46px; }
.grilla { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grilla.c2 { grid-template-columns: 1fr 1fr; } .grilla.c3 { grid-template-columns: repeat(3, 1fr); } .grilla.c4 { grid-template-columns: repeat(4, 1fr); } .grilla .span2 { grid-column: span 2; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; margin: 0; transition: background .15s; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.card.pad { padding: 18px; }
@media (min-width: 860px) { .card.pad { padding: 24px; } }
.seccion { margin-top: 28px; }
.seccion > .eyebrow { display: block; margin-bottom: 12px; }
.vacio { padding: 40px 20px; text-align: center; color: var(--muted); }
.vacio .h3 { color: var(--ink); margin-bottom: 6px; }
.caja-nota { background: #FFF8E6; border: 1px solid #F0DDA8; border-radius: 4px; padding: 14px 16px; font-size: 14px; }
.caja-nota b { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--res); margin-bottom: 4px; }
.caja-info { background: #F0F1F1; border-radius: 4px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.pre { white-space: pre-wrap; }

/* ---------- estado de unidades ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font: 600 11.5px/1 var(--body); letter-spacing: .02em; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.disponible { background: var(--ok-bg); color: var(--ok); }
.badge.reservada { background: var(--res-bg); color: var(--res); }
.badge.vendida { background: var(--vend-bg); color: var(--vend); }
.badge.no_venta { background: #fff; color: var(--vend); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.neutro { background: #EFEFEE; color: var(--ink-2); }
.badge.neutro::before { display: none; }

/* ---------- etapas de obra ---------- */
.etapas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.etapas > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.etapas i { height: 4px; background: var(--line); display: block; }
.etapas .hecha i { background: var(--ink); }
.etapas .actual i { background: linear-gradient(90deg, var(--ink) var(--p, 50%), var(--line) var(--p, 50%)); }
.etapas span { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etapas .hecha span { color: var(--muted); }
.etapas .actual span { color: var(--ink); font-weight: 600; }
.etapas.mini span { display: none; }
@media (max-width: 639px) { .etapas:not(.mini) > div:not(.actual) span { visibility: hidden; } .etapas .actual span { overflow: visible; } }
.etapas.mini i { height: 3px; }

/* ---------- inicio: obras ---------- */
.buscador-rapido { padding: 16px; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.buscador-rapido .eyebrow { grid-column: 1 / -1; }
.buscador-rapido .btn { grid-column: 1 / -1; }
@media (min-width: 720px) { .buscador-rapido { grid-template-columns: auto 1fr 1fr auto; padding: 14px 18px; } .buscador-rapido .eyebrow { grid-column: auto; align-self: center; } .buscador-rapido .btn { grid-column: auto; } }

.obras { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 22px; }
@media (min-width: 640px) { .obras { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .obras { grid-template-columns: repeat(3, 1fr); } }
.obra-card { display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: border-color .15s, transform .15s; }
.obra-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.foto { position: relative; background: var(--dark); overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto.sin { display: flex; align-items: center; justify-content: center; background: var(--dark) repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 22px); }
.foto.sin img { width: auto; height: 46%; max-height: 120px; opacity: .55; object-fit: contain; }
.obra-card .foto { aspect-ratio: 4 / 3; }
.obra-card .etiqueta { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--ink); font: 600 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 2px; }
.obra-card .oculta { position: absolute; right: 12px; top: 12px; background: var(--res-bg); color: var(--res); font: 600 11px/1 var(--body); padding: 7px 10px; border-radius: 2px; display: flex; gap: 5px; align-items: center; }
.obra-card .cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.obra-card .nombre { font: 400 23px/1.1 var(--display); letter-spacing: -.01em; }
.obra-card .lugar { font-size: 13px; color: var(--muted); margin-top: 4px; }
.datos3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 12px; gap: 8px; margin-top: auto; }
.datos3 > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.datos3 small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
.datos3 b { font: 500 15px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- obra ---------- */
.hero { position: relative; background: var(--dark); color: #fff; }
.hero .foto { height: 260px; }
.hero .foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,18,19,.25) 0%, rgba(16,18,19,0) 35%, rgba(16,18,19,.82) 100%); }
.hero .titulo { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 22px; }
.hero .titulo .eyebrow { color: #D4D6D8; }
.hero .titulo .h1 { color: #fff; }
.hero .titulo a { color: #D4D6D8; font-size: 14px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }
.hero .volver { position: absolute; top: 14px; left: var(--gutter); z-index: 2; background: rgba(20,22,24,.55); color: #fff; border: 0; height: 34px; padding: 0 12px 0 8px; border-radius: 17px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 13px; backdrop-filter: blur(6px); }
.hero .foto.sin { align-items: flex-start; padding-top: 34px; }
.hero .foto.sin img { opacity: .2; height: 58%; max-height: 220px; }
@media (min-width: 860px) { .hero .foto { height: 420px; } .hero .titulo { padding-bottom: 36px; } }

.banda { background: var(--ink); color: #fff; }
.banda .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.banda .celda { padding: 16px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.banda .celda:nth-child(2n) { padding-left: 16px; border-left: 1px solid #34383C; }
.banda .celda:nth-child(n+3) { border-top: 1px solid #34383C; }
.banda small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #A3A6AA; font-weight: 500; }
.banda b { font: 300 22px/1.15 var(--display); }
@media (min-width: 860px) {
  .banda .wrap { grid-template-columns: repeat(4, 1fr); }
  .banda .celda { padding: 26px 0 26px 28px; border-left: 1px solid #34383C; border-top: 0 !important; }
  .banda .celda:first-child { padding-left: 0; border-left: 0; }
  .banda b { font-size: 30px; }
}
.avance { padding: 20px 0 6px; }
.avance .fila { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin-top: 18px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); background: var(--bg); z-index: 5; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 14px 14px 12px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a small { color: var(--muted-2); font-weight: 400; margin-left: 3px; }

.barra-filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 16px 0 12px; }
.barra-filtros .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); max-width: calc(100% + var(--gutter) * 2); }
.barra-filtros .chips::-webkit-scrollbar { display: none; }
@media (min-width: 860px) { .barra-filtros .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }

/* lista de unidades (celular) */
.u-lista { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.u-fila { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; text-decoration: none; border-top: 1px solid var(--line); }
.u-fila:first-child { border-top: 0; }
.u-fila:hover { background: #FAFAF9; }
.u-fila .cod { font: 400 21px/1 var(--display); letter-spacing: -.01em; }
.u-fila .cod small { display: block; font: 500 10.5px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-top: 6px; }
.u-fila .med { min-width: 0; }
.u-fila .med b { display: block; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-fila .med span { font-size: 13px; color: var(--muted); }
.u-fila .der { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.u-fila .precio { font: 500 16px/1 var(--display); white-space: nowrap; }
.u-fila.apagada .cod, .u-fila.apagada .med b, .u-fila.apagada .precio { color: var(--muted-2); }
.u-fila .obra-mini { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; display: block; }

/* tabla de unidades (escritorio) */
.tabla { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.tabla th { text-align: left; font: 600 10.5px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--ink); background: #fff; white-space: nowrap; }
.tabla td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr.click { cursor: pointer; }
.tabla tbody tr.click:hover td { background: #FAFAF9; }
.tabla .r { text-align: right; white-space: nowrap; }
.tabla .cod { font: 400 19px/1 var(--display); }
.tabla .precio { font: 500 16px/1 var(--display); white-space: nowrap; }
.tabla tr.apagada td { color: var(--muted-2); }
.solo-cel { display: block; }
.solo-pc { display: none; }
@media (min-width: 860px) { .solo-cel { display: none; } .solo-pc { display: block; } table.solo-pc { display: table; } }

/* proyecto */
.amenities { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 24px; grid-template-columns: 1fr; }
.amenities li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.amenities li .ic { margin-top: 2px; color: var(--ok); }
@media (min-width: 640px) { .amenities { grid-template-columns: 1fr 1fr; } }
.ficha { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.ficha > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ficha > div > span:first-child { color: var(--muted); }
.ficha > div > span:last-child { font-weight: 500; text-align: right; }
.dos-col { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .dos-col { grid-template-columns: 1.15fr 1fr; gap: 48px; } .dos-col.al-reves { grid-template-columns: 1fr 1.15fr; } }

/* fotos */
.galeria { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .galeria { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .galeria { grid-template-columns: repeat(4, 1fr); } }
.galeria button { padding: 0; border: 0; background: var(--dark); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; position: relative; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.galeria button:hover img { transform: scale(1.03); }
.galeria .leyenda { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11.5px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

.docs { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.docs a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); text-decoration: none; }
.docs a:first-child { border-top: 0; }
.docs a:hover { background: #FAFAF9; }
.docs .tipo { width: 40px; height: 48px; border: 1px solid var(--line-2); border-radius: 2px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font: 600 9.5px/1 var(--body); letter-spacing: .06em; color: var(--muted); flex-shrink: 0; overflow: hidden; }
.docs .tipo img { width: 100%; height: 100%; object-fit: cover; }
.docs .tipo.img { padding: 0; }
.docs b { font-weight: 500; display: block; }
.docs span { font-size: 12.5px; color: var(--muted); }

/* ---------- unidad ---------- */
.unidad-top { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 18px 0 8px; }
.unidad-top .cod { font: 300 54px/0.95 var(--display); letter-spacing: -.03em; margin: 6px 0 0; }
.unidad-top .tipo { font-size: 16px; color: var(--ink-2); margin-top: 8px; }
.precio-caja { background: var(--ink); color: #fff; border-radius: 4px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.precio-caja small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #A3A6AA; font-weight: 500; }
.precio-caja .monto { font: 400 36px/1 var(--display); letter-spacing: -.01em; }
.precio-caja .m2 { font-size: 13px; color: #C9CBCD; }
.precio-caja.apagada { background: var(--vend-bg); color: var(--ink-2); }
.precio-caja.apagada small, .precio-caja.apagada .m2 { color: var(--muted); }
@media (min-width: 860px) { .unidad-top { grid-template-columns: 1fr 340px; align-items: end; } .unidad-top .cod { font-size: 76px; } }

.plano { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px; position: relative; }
.plano button.img { padding: 0; border: 0; background: none; width: 100%; display: block; cursor: zoom-in; }
.plano img { width: 100%; height: auto; max-height: 560px; object-fit: contain; margin: 0 auto; }
.plano .zoom { position: absolute; right: 16px; top: 16px; }
.plano.pdf { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 16px; text-align: center; }
.sup-tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sup-tabla td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sup-tabla td:last-child { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.sup-tabla tr.total td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; padding-top: 12px; }
.destacados { display: flex; flex-wrap: wrap; gap: 8px; }
.destacados span { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 6px 12px; font-size: 13px; }
.nav-unidades { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.nav-unidades a { flex: 1; display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--line); background: #fff; border-radius: 4px; text-decoration: none; font-size: 13px; color: var(--muted); min-width: 0; }
.nav-unidades a b { color: var(--ink); font: 400 18px/1 var(--display); display: block; margin-top: 3px; }
.nav-unidades a.sig { justify-content: flex-end; text-align: right; }

.acciones-fijas { position: sticky; bottom: calc(58px + var(--safe-b)); z-index: 10; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 10px; margin-top: 18px; }
.acciones-fijas .btns { flex-wrap: nowrap; }
.acciones-fijas .btn { flex: 1; }
@media (min-width: 860px) { .acciones-fijas { position: static; background: none; padding: 0; margin-top: 0; } .acciones-fijas .btn { flex: none; } }

/* ---------- buscador ---------- */
.buscar-layout { display: grid; gap: 20px; grid-template-columns: 1fr; padding-top: 4px; }
.filtros { display: flex; flex-direction: column; gap: 20px; }
.filtros .bloque { display: flex; flex-direction: column; gap: 10px; }
.filtros .bloque > b { font-size: 12.5px; font-weight: 600; }
.rango { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 960px) { .buscar-layout { grid-template-columns: 300px 1fr; align-items: start; gap: 32px; } .filtros-card { position: sticky; top: calc(var(--top) + 16px); } }
.resultados-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.resultados-cab .h3 { font-size: 20px; }
.boton-filtros { display: flex; }
@media (min-width: 960px) { .boton-filtros { display: none; } }
.filtros-card.cerrado { display: none; }
@media (min-width: 960px) { .filtros-card.cerrado { display: block; } }

/* ---------- novedades ---------- */
.nov-dia { margin-top: 22px; }
.nov-dia > .eyebrow { display: block; margin-bottom: 8px; }
.nov { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-top: 0; text-decoration: none; }
.nov:first-of-type { border-top: 1px solid var(--line); border-radius: 4px 4px 0 0; }
.nov:last-child { border-radius: 0 0 4px 4px; }
.nov:only-of-type { border-radius: 4px; }
.nov .ico { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #F0F1F1; color: var(--ink-2); }
.nov .ico.baja { background: var(--ok-bg); color: var(--ok); }
.nov .ico.sube { background: var(--res-bg); color: var(--res); }
.nov b { font-weight: 500; }
.nov .det { font-size: 13px; color: var(--muted); margin-top: 2px; }
.nov .hora { font-size: 12px; color: var(--muted-2); white-space: nowrap; }

/* ---------- modales, avisos, visor ---------- */
.modal-fondo { position: fixed; inset: 0; z-index: 60; background: rgba(20,22,24,.55); display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s; }
.modal { background: #fff; width: 100%; max-height: 92vh; overflow: auto; border-radius: 10px 10px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); animation: sube .2s; }
.modal-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal-pie { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
@media (min-width: 700px) {
  .modal-fondo { align-items: center; padding: 24px; }
  .modal { border-radius: 6px; max-width: 560px; padding: 24px 26px; }
  .modal.ancho { max-width: 860px; }
  .modal.muy-ancho { max-width: 1100px; }
}
@keyframes aparece { from { opacity: 0; } }
@keyframes sube { from { transform: translateY(30px); opacity: 0; } }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(72px + var(--safe-b)); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 4px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: sube .2s; pointer-events: auto; }
.toast.error { background: var(--err); }
@media (min-width: 860px) { .toasts { bottom: 24px; } }

.visor { position: fixed; inset: 0; z-index: 90; background: #0D0E0F; color: #fff; display: flex; flex-direction: column; }
.visor-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; font-size: 13px; color: #C9CBCD; }
.visor-cab .btn { background: rgba(255,255,255,.08); border-color: transparent; color: #fff; }
.visor-cuerpo { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; position: relative; touch-action: pan-x pan-y pinch-zoom; }
.visor-cuerpo img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.visor-cuerpo.zoom { display: block; }
.visor-cuerpo.zoom img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; }
.visor-cuerpo.plano-fondo { background: #fff; }
.visor .flecha { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.visor .flecha.izq { left: 12px; } .visor .flecha.der { right: 12px; }
.visor-pie { padding: 10px 16px calc(14px + var(--safe-b)); font-size: 13px; color: #C9CBCD; text-align: center; min-height: 20px; }

.menu-usuario { position: absolute; right: var(--gutter); top: calc(var(--top) - 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.15); min-width: 230px; padding: 6px; z-index: 40; }
.menu-usuario .quien { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-usuario .quien small { display: block; color: var(--muted); font-size: 12px; }
.menu-usuario a, .menu-usuario button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; background: none; text-decoration: none; font-size: 14px; border-radius: 4px; text-align: left; }
.menu-usuario a:hover, .menu-usuario button:hover { background: #F2F2F1; }

/* ---------- ingreso ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--ink); }
.login-lado { display: none; }
.login-form { background: var(--bg); display: flex; flex-direction: column; justify-content: flex-start; padding: 40px 22px calc(40px + var(--safe-b)); }
.login-form .marca { background: var(--ink); margin: -40px -22px 32px; padding: calc(36px + env(safe-area-inset-top, 0px)) 22px 30px; }
.login-form .marca img { height: 34px; width: auto; }
.login-form form { width: 100%; max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.error-form { background: var(--err-bg); color: var(--err); padding: 10px 12px; border-radius: 3px; font-size: 14px; }
@media (min-width: 900px) {
  .login { grid-template-columns: 1.1fr 1fr; }
  .login-lado { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #fff; background: var(--ink) repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 1px, transparent 1px 26px); }
  .login-lado img { height: 44px; width: auto; }
  .login-lado .h1 { color: #fff; max-width: 520px; font-size: 52px; }
  .login-lado p { color: #A3A6AA; max-width: 440px; }
  .login-form { justify-content: center; }
  .login-form .marca { display: none; }
}

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-obras { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.admin-obra { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px; border-top: 1px solid var(--line); align-items: center; }
.admin-obra:first-child { border-top: 0; }
.admin-obra .foto { width: 64px; height: 64px; border-radius: 3px; }
.admin-obra .info b { font: 400 19px/1.15 var(--display); display: block; }
.admin-obra .info span { font-size: 13px; color: var(--muted); }
.admin-obra .btns { grid-column: 1 / -1; }
@media (min-width: 860px) { .admin-obra { grid-template-columns: 64px 1fr auto; } .admin-obra .btns { grid-column: auto; } }

.barra-guardar { position: sticky; bottom: calc(58px + var(--safe-b)); z-index: 20; margin-top: 16px; background: var(--ink); color: #fff; border-radius: 6px; padding: 10px 10px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 14px; }
.barra-guardar .btn { background: #fff; color: var(--ink); border-color: #fff; }
.barra-guardar .btn.ghost { background: transparent; color: #fff; border-color: transparent; }
@media (min-width: 860px) { .barra-guardar { bottom: 16px; } }

.herramientas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0; }
.herramientas .sep { flex: 1; }
.seleccion { background: #EFEFEE; border-radius: 4px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }

.grilla-edit-caja { overflow: auto; border: 1px solid var(--line); background: #fff; border-radius: 4px; max-height: calc(100vh - 230px); }
.grilla-edit { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.grilla-edit th { position: sticky; top: 0; z-index: 2; background: #FAFAF9; text-align: left; font: 600 10.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.grilla-edit td { padding: 4px; border-bottom: 1px solid var(--line); background: #fff; }
.grilla-edit td.fijo, .grilla-edit th.fijo { position: sticky; left: 0; z-index: 1; }
.grilla-edit th.fijo { z-index: 3; }
.grilla-edit td.fijo { box-shadow: 1px 0 0 var(--line); }
.grilla-edit input, .grilla-edit select { height: 34px; border: 1px solid transparent; border-radius: 2px; background: transparent; padding: 0 7px; width: 100%; font-size: 13.5px; }
.grilla-edit input:hover, .grilla-edit select:hover { border-color: var(--line-2); }
.grilla-edit input:focus, .grilla-edit select:focus { outline: none; border-color: var(--ink); background: #fff; }
.grilla-edit input.mal { border-color: var(--err); background: var(--err-bg); }
.grilla-edit input.n { text-align: right; font-variant-numeric: tabular-nums; }
.grilla-edit tr.sucia td { background: #FFFBEF; }
.grilla-edit tr.nueva td { background: #F1F8F4; }
.grilla-edit tr.borrar td { background: #FBEDEC; }
.grilla-edit tr.borrar input, .grilla-edit tr.borrar select { text-decoration: line-through; color: var(--muted); }
.grilla-edit tr.sel td { background: #EEF0F2; }
.grilla-edit .chk { width: 34px; min-width: 34px; max-width: 34px; padding: 0; text-align: center; }
.grilla-edit input::placeholder { color: var(--muted-2); }
.grilla-edit .chk input { width: 16px; height: 16px; accent-color: var(--ink); }
.grilla-edit select.estado-disponible { color: var(--ok); font-weight: 600; }
.grilla-edit select.estado-reservada { color: var(--res); font-weight: 600; }
.grilla-edit select.estado-vendida, .grilla-edit select.estado-no_venta { color: var(--vend); font-weight: 600; }
.ph-total { color: var(--muted-2); }

.medios-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.medio { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.medio .foto { aspect-ratio: 4 / 3; }
.medio .foto.plano-bg { background: #fff; }
.medio .foto.plano-bg img { object-fit: contain; }
.medio .portada { position: absolute; left: 8px; top: 8px; background: #fff; color: var(--ink); font: 600 10px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 7px; border-radius: 2px; }
.medio .cuerpo { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.medio .cuerpo .input, .medio .cuerpo .select { height: 34px; font-size: 13px; padding: 0 8px; }
.medio .cuerpo .select { padding-right: 26px; background-position: right 8px center; }
.medio .btns { gap: 4px; }
.subida { border: 1.5px dashed var(--line-2); border-radius: 4px; padding: 18px; text-align: center; background: #FBFBFA; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.subida.encima { border-color: var(--ink); background: #F2F2F1; }
.progreso { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; width: 100%; }
.progreso i { display: block; height: 100%; background: var(--ink); transition: width .2s; }
.cola { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 440px; text-align: left; font-size: 13px; }

.tabla-simple { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla-simple th { text-align: left; font: 600 10.5px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tabla-simple td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla-simple tr.inactivo td { color: var(--muted-2); }
.scroll-x { overflow-x: auto; }

.mapeo { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mapeo > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; font-size: 13.5px; }
.prev-import { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.prev-import table { font-size: 12.5px; }
.est-nueva { color: var(--ok); font-weight: 600; }
.est-actualiza { color: var(--res); font-weight: 600; }
.est-igual { color: var(--muted-2); }
.est-error { color: var(--err); font-weight: 600; }

.clave-temp { font: 500 26px/1 var(--display); letter-spacing: .06em; background: #F2F2F1; border-radius: 4px; padding: 16px; text-align: center; user-select: all; }

@media print {
  .topbar, .bottomnav, .tabs, .barra-filtros, .acciones-fijas, .btn, .toasts, .pie-version { display: none !important; }
  body { background: #fff; }
  .solo-cel { display: none !important; }
  .solo-pc, table.solo-pc { display: table !important; }
  .hero .foto { height: 160px; }
}
