/* ERP Inmobiliario — estilos del panel ("Diseño 2026", ver docs/GUIA_DISENO.md).
   Celular < 48rem · tablet 48–62rem · computadora ≥ 62rem. */

@font-face {
  font-family: "Figtree";
  src: url("/static/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --fondo: hsl(203 20% 97%);
  --papel: #fff;
  --tinta: hsl(205 30% 11%);
  --tenue: hsl(205 10% 40%);
  --linea: hsl(203 16% 88%);
  /* Menú en verde: distingue el ERP de otros sistemas con el mismo diseño */
  --lado: hsl(173 72% 12%);
  --lado-texto: hsl(170 15% 88%);
  --lado-activo: hsl(173 66% 24%);
  --lado-suave: hsl(173 56% 16%);
  --lado-borde: hsl(173 38% 23%);
  --amarillo: hsl(42 96% 56%);
  --primario: hsl(203 78% 30%);
  --primario-suave: hsl(203 70% 95%);
  --apagado: hsl(203 20% 94%);
  --oscura: hsl(173 50% 9%);
  --texto-sobre-claro: hsl(205 30% 11%);
  --ok: #1D7A4A;     --ok-bg: hsl(145 55% 93%);
  --aviso: #9A5A06;  --aviso-bg: hsl(42 100% 91%);
  --mal: #B42318;    --mal-bg: hsl(4 80% 95%);
  --info: #2F5C8A;   --info-bg: hsl(203 80% 94%);
  --radio: 10px;
  --sombra: 0 1px 2px hsl(205 30% 11% / .05), 0 4px 14px hsl(205 30% 11% / .05);
  --c1:#2a78d6; --c2:#eb6834; --c3:#1baf7a; --c4:#eda100;
  --c5:#e87ba4; --c6:#008300; --c7:#6250d6; --c8:#e34948;

  /* Alias de los nombres viejos (plantillas anteriores al rediseño) */
  --gris: var(--tenue); --borde: var(--linea); --azul: var(--primario); --rojo: var(--mal);
  --verde: var(--ok); --fondo-pagina: var(--fondo); --fondo-tarjeta: var(--papel); --texto: var(--tinta);
}
:root[data-theme="oscuro"] {
  color-scheme: dark;
  --fondo: hsl(205 25% 7%); --papel: hsl(205 22% 11%); --tinta: hsl(205 15% 92%);
  --tenue: hsl(205 8% 66%); --linea: hsl(205 15% 22%); --lado: hsl(173 55% 8%); --lado-suave: hsl(173 45% 12%); --lado-borde: hsl(173 30% 19%);
  --oscura: hsl(205 25% 18%); --apagado: hsl(205 18% 15%);
  --primario: hsl(203 75% 62%); --primario-suave: hsl(203 40% 17%);
  --ok: hsl(145 50% 58%); --ok-bg: hsl(145 35% 14%);
  --aviso: hsl(40 90% 62%); --aviso-bg: hsl(40 50% 14%);
  --mal: hsl(4 80% 68%); --mal-bg: hsl(4 45% 16%);
  --info: hsl(203 80% 70%); --info-bg: hsl(203 40% 16%);
  --sombra: 0 1px 2px #0006;
  --c1:#3987e5; --c2:#d95926; --c3:#199e70; --c4:#c98500; --c5:#d55181; --c6:#0ca30c; --c7:#9085e9; --c8:#e66767;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --fondo: hsl(205 25% 7%); --papel: hsl(205 22% 11%); --tinta: hsl(205 15% 92%);
    --tenue: hsl(205 8% 66%); --linea: hsl(205 15% 22%); --lado: hsl(173 55% 8%); --lado-suave: hsl(173 45% 12%); --lado-borde: hsl(173 30% 19%);
    --oscura: hsl(205 25% 18%); --apagado: hsl(205 18% 15%);
    --primario: hsl(203 75% 62%); --primario-suave: hsl(203 40% 17%);
    --ok: hsl(145 50% 58%); --ok-bg: hsl(145 35% 14%);
    --aviso: hsl(40 90% 62%); --aviso-bg: hsl(40 50% 14%);
    --mal: hsl(4 80% 68%); --mal-bg: hsl(4 45% 16%);
    --info: hsl(203 80% 70%); --info-bg: hsl(203 40% 16%);
    --sombra: 0 1px 2px #0006;
    --c1:#3987e5; --c2:#d95926; --c3:#199e70; --c4:#c98500; --c5:#d55181; --c6:#0ca30c; --c7:#9085e9; --c8:#e66767;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5;
}
a { color: var(--primario); }
h1 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 .25rem; line-height: 1.2; }
h2 { font-size: 1.08rem; font-weight: 700; margin: 0 0 .5rem; }
h3 { font-size: .98rem; font-weight: 700; margin: 0 0 .4rem; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; }
code { background: var(--apagado); padding: .1rem .35rem; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--linea); margin: 1rem 0; }
.tenue { color: var(--tenue); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.oculto { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--linea) transparent; }

/* formularios */
label { display: block; margin: .65rem 0 .25rem; font-size: .84rem; font-weight: 600; color: var(--tenue); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=tel], input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--linea); border-radius: 8px;
  font: inherit; font-size: .95rem; background: var(--papel); color: var(--tinta); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primario); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
input[type=file] { max-width: 100%; font: inherit; font-size: .88rem; color: var(--tenue); }
input[type=checkbox], input[type=radio] { accent-color: var(--primario); width: 1.05rem; height: 1.05rem; }
.obligatorio { color: var(--mal); }
fieldset { border: 1px solid var(--linea); border-radius: var(--radio); padding: .4rem 1rem 1rem; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0 .3rem; }

/* botones */
.boton, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--primario); color: #fff; border: 1px solid transparent; border-radius: 8px;
  padding: .5rem .95rem; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
  text-decoration: none; line-height: 1.25; text-align: center;
}
:root[data-theme="oscuro"] .boton, :root[data-theme="oscuro"] .btn { color: hsl(205 30% 8%); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .boton, :root[data-theme="auto"] .btn { color: hsl(205 30% 8%); } }
.boton:hover, .btn:hover { filter: brightness(1.08); }
.boton:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.boton-secundario, .btn-gris, :root .boton.boton-secundario, :root .btn.btn-gris {
  background: var(--papel); color: var(--tinta); border-color: var(--linea);
}
.boton-amarillo, :root .boton.boton-amarillo { background: var(--amarillo); color: var(--texto-sobre-claro); }
.boton-peligro, .btn-rojo, :root .boton.boton-peligro, :root .btn.btn-rojo { background: var(--mal-bg); color: var(--mal); border-color: transparent; }
.btn-chico, .boton-chico { padding: .3rem .65rem; font-size: .82rem; }
.btn-link { background: none; border: none; color: var(--primario); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; text-decoration: underline; }
.btn-whatsapp { background: #25D366; color: #fff !important; }

/* tablas */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--linea); font-size: .92rem; vertical-align: middle; }
th { color: var(--tenue); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--apagado); }
td.acciones { white-space: nowrap; text-align: right; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.lado {
  width: 16rem; flex: none; background: var(--lado); color: var(--lado-texto);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 1rem .6rem calc(.75rem + env(safe-area-inset-bottom));
}
.lado-marca { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1.05rem; padding: 0 .55rem .9rem; text-decoration: none; }
.lado-marca span { font-size: 1.3rem; }
.lado-acciones { display: flex; gap: .4rem; padding: 0 .3rem .6rem; }
.lado-acciones .boton { flex: 1; }
.lado-buscar {
  display: flex; align-items: center; gap: .4rem; width: 100%; border: 1px solid var(--lado-borde); background: var(--lado-suave);
  color: var(--lado-texto); border-radius: 8px; padding: .45rem .6rem; font: inherit; font-size: .85rem; cursor: pointer; margin: 0 .3rem .5rem; width: calc(100% - .6rem);
}
.lado-buscar kbd { margin-left: auto; font-size: .7rem; opacity: .7; font-family: inherit; }
.lado nav { flex: 1; }
.lado-grupo { margin-top: .8rem; }
.lado-grupo > span { display: block; padding: 0 .55rem .25rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; opacity: .55; }
.lado a.item {
  display: flex; align-items: center; gap: .65rem; color: var(--lado-texto); text-decoration: none;
  font-size: .9rem; font-weight: 600; padding: .5rem .6rem; border-radius: 8px; margin: 1px 0;
}
.lado a.item svg { width: 18px; height: 18px; flex: none; stroke: var(--icono, currentColor); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lado a.item:hover { background: var(--lado-suave); color: #fff; }
.lado a.item[aria-current="page"] { background: var(--lado-activo); color: #fff; }
.lado a.item .contador { margin-left: auto; background: var(--c8); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; padding: .05rem .45rem; }
.lado a.item .ic-color { width: 1.4rem; flex: none; text-align: center; font-size: 1.05rem; line-height: 1; }
.lado-usuario { margin: .8rem .2rem 0; position: relative; font-size: .82rem; }
.lado-usuario summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--lado-borde); background: var(--lado-suave); color: var(--lado-texto); }
.lado-usuario summary::-webkit-details-marker { display: none; }
.lado-usuario summary > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lado-usuario summary b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lado-usuario .avatar { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--amarillo); color: var(--texto-sobre-claro); font-weight: 800; flex: none; }
.lado-usuario[open] summary > span:last-child { transform: rotate(180deg); }
.lado-usuario-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + .4rem); background: var(--papel); border: 1px solid var(--linea); border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .25); padding: .35rem; display: grid; }
.lado-usuario-menu a { color: var(--tinta); text-decoration: none; padding: .55rem .6rem; border-radius: 8px; font-size: .88rem; font-weight: 600; }
.lado-usuario-menu a:hover { background: var(--apagado); }

.contenido { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 80rem; margin: 0 auto; padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 5rem; }

.barra-movil, .barra-inferior, .barra-tablet { display: none; }

/* tablet: barra angosta de íconos */
@media (min-width: 48rem) and (max-width: 61.99rem) {
  .lado { width: 5.6rem; padding-inline: .35rem; }
  .lado-marca { justify-content: center; padding-inline: 0; }
  .lado-marca b, .lado-grupo > span, .lado-acciones, .lado-buscar, .lado-usuario, .lado-app { display: none; }
  .lado-grupo { margin-top: .35rem; border-top: 1px solid var(--lado-borde); padding-top: .35rem; }
  .lado a.item { flex-direction: column; gap: .2rem; font-size: .66rem; text-align: center; padding: .5rem .2rem; line-height: 1.15; position: relative; }
  .lado a.item .ic-color { font-size: 1.25rem; }
  .lado a.item .contador { position: absolute; top: .2rem; right: .35rem; margin: 0; }
  .barra-tablet { display: flex; gap: .6rem; align-items: center; padding: .7rem clamp(1rem, 3vw, 2.2rem) 0; max-width: 80rem; width: 100%; margin: 0 auto; }
  .barra-tablet .buscar-falso { flex: 1; }
}

/* celular */
@media (max-width: 47.99rem) {
  body { font-size: 15px; }
  .lado {
    position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: auto; max-height: 82vh;
    border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .22s ease; padding-top: .5rem;
  }
  .lado::before { content: ""; display: block; width: 2.6rem; height: .3rem; border-radius: 9px; background: var(--lado-borde); margin: 0 auto .7rem; flex: none; }
  body.menu-abierto .lado { transform: translateY(0); }
  .lado { overscroll-behavior: contain; touch-action: pan-y; }
  .lado::before { width: 3rem; height: .35rem; margin-bottom: .9rem; cursor: grab; }
  body.menu-abierto { overflow: hidden; }
  .fondo-menu { display: none; }
  body.menu-abierto .fondo-menu { display: block; position: fixed; inset: 0; background: #0008; z-index: 85; }
  .lado-acciones, .lado-buscar { display: none; }
  .lado-marca { display: none; }
  .barra-movil {
    display: flex; align-items: center; gap: .4rem; position: sticky; top: 0; z-index: 50;
    background: var(--lado); color: #fff; padding: calc(.45rem + env(safe-area-inset-top)) .75rem .45rem;
    min-height: 3.2rem;
  }
  .barra-movil b { flex: 1; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .barra-movil button, .barra-movil a { background: var(--lado-suave); color: #fff; border: 0; border-radius: 8px; width: 2.4rem; height: 2.4rem; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
  .barra-inferior {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 60; left: .5rem; right: .5rem;
    bottom: calc(.5rem + env(safe-area-inset-bottom)); background: var(--papel); border: 1px solid var(--linea);
    border-radius: 16px; box-shadow: 0 8px 28px #0003; padding: .3rem;
  }
  .barra-inferior a, .barra-inferior button {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; background: none; border: 0; color: var(--tenue);
    font: inherit; font-size: .68rem; font-weight: 700; text-decoration: none; padding: .3rem 0; cursor: pointer; position: relative;
  }
  .barra-inferior .ic { font-size: 1.2rem; line-height: 1.2; }
  .barra-inferior [aria-current="page"] { color: var(--primario); }
  .barra-inferior .mas-crear .ic { background: var(--amarillo); color: var(--texto-sobre-claro); width: 2.7rem; height: 2.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-top: -1.3rem; box-shadow: 0 4px 12px #0003; }
  .barra-inferior .contador { position: absolute; top: 0; right: 22%; background: var(--c8); color: #fff; border-radius: 999px; font-size: .62rem; padding: 0 .35rem; }
  body:has(.barra-inferior) main { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
  main { padding-top: 1.1rem; }
}

/* ---------- componentes p- ---------- */
.p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.p-top > div:first-child { min-width: 0; flex: 1 1 18rem; }
.p-top p { margin: .15rem 0 0; color: var(--tenue); }
.p-acts { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.p-volver { display: inline-block; font-size: .85rem; font-weight: 700; text-decoration: none; margin-bottom: .4rem; color: var(--tenue); }

.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.p-kpi { background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; padding: .9rem 1rem; text-decoration: none; color: inherit; min-width: 0; box-shadow: var(--sombra); display: block; }
a.p-kpi:hover { border-color: var(--primario); }
.p-kpi span { display: block; font-size: .78rem; font-weight: 700; color: var(--tenue); }
.p-kpi b { display: block; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-kpi small { display: block; color: var(--tenue); font-size: .78rem; }
.p-kpi.mal b { color: var(--mal); } .p-kpi.ok b { color: var(--ok); } .p-kpi.aviso b { color: var(--aviso); }
@media (max-width: 47.99rem) { .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } .p-kpi { padding: .7rem .8rem; } }

.p-panel, .tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 1rem; box-shadow: var(--sombra); min-width: 0; }
.tarjeta { padding: 1.1rem 1.2rem; }
.tarjeta > h2:first-child { margin-top: 0; }
.p-ph { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.p-ph h2 { margin: 0; flex: 1; min-width: 0; }
.p-pb { padding: 1rem 1.1rem; }
.p-pb.sin-padding { padding: 0; }
.p-pb.sin-padding table th:first-child, .p-pb.sin-padding table td:first-child { padding-left: 1.1rem; }
.p-pb.sin-padding table th:last-child, .p-pb.sin-padding table td:last-child { padding-right: 1.1rem; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.p-grid > * { margin-bottom: 0; }

.p-pill, .badge, .pill-estado {
  display: inline-block; white-space: nowrap; border-radius: 999px; padding: .12rem .6rem;
  font-size: .74rem; font-weight: 800; background: var(--info-bg); color: var(--info); line-height: 1.5;
}
.p-pill.ok { background: var(--ok-bg); color: var(--ok); }
.p-pill.warn { background: var(--aviso-bg); color: var(--aviso); }
.p-pill.bad { background: var(--mal-bg); color: var(--mal); }
.p-pill.mu { background: var(--apagado); color: var(--tenue); }
.p-pill.info { background: var(--info-bg); color: var(--info); }

.p-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.p-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit; }
.p-chip small { color: var(--tenue); font-weight: 700; }
.p-chip.on, .p-chip[aria-current] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.p-chip.on small, .p-chip[aria-current] small { color: inherit; opacity: .75; }

.p-tabs, .tabs-interes { display: flex; gap: .2rem; border-bottom: 1px solid var(--linea); margin: .6rem 0 .9rem; overflow-x: auto; scrollbar-width: none; }
.p-tabs a, .p-tabs button, .tab-btn { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; padding: .5rem .7rem; font: inherit; font-size: .88rem; font-weight: 700; color: var(--tenue); white-space: nowrap; text-decoration: none; }
.p-tabs [aria-current], .p-tabs .activo, .tab-btn.activo { color: var(--primario); border-bottom-color: var(--primario); }

.p-alert, .banner-aviso, .error {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; border-radius: var(--radio);
  padding: .7rem .95rem; margin-bottom: 1rem; font-size: .9rem; background: var(--aviso-bg); color: var(--tinta); border: 0;
}
.p-alert > :first-child { flex: 1 1 14rem; }
.p-alert .boton { flex: none; }
.p-alert.bad, .error { background: var(--mal-bg); color: var(--mal); }
.p-alert.info { background: var(--info-bg); }
.p-alert.ok { background: var(--ok-bg); }

.p-bar { height: .55rem; border-radius: 99px; background: var(--apagado); overflow: hidden; position: relative; }
.p-bar > i { display: block; height: 100%; background: var(--c1); border-radius: 99px; }
.p-bar.apilada { display: flex; }
.p-bar.apilada > i { border-radius: 0; }

.p-vacio { text-align: center; padding: 2rem 1rem; color: var(--tenue); }
.p-vacio b { display: block; color: var(--tinta); font-size: 1rem; margin-bottom: .2rem; }
.p-vacio .boton { margin-top: .7rem; }

.p-dato label { margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.p-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .8rem 1.2rem; }

.p-oscura { background: var(--oscura); color: #fff; border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.p-oscura > div { flex: 1 1 14rem; }
.p-oscura small { opacity: .75; display: block; }

details.p-plegable { background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 1rem; }
details.p-plegable > summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 700; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.p-plegable > summary::-webkit-details-marker { display: none; }
details.p-plegable > summary::after { content: "▾"; margin-left: auto; color: var(--tenue); transition: transform .15s; }
details.p-plegable[open] > summary::after { transform: rotate(180deg); }
details.p-plegable > .p-pb { border-top: 1px solid var(--linea); }

/* filas de formulario (compat) */
.fila { display: flex; gap: 1rem; flex-wrap: wrap; }
.fila > div { flex: 1 1 12rem; min-width: 0; }
.checkbox-fila, .fila-check-simple { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
.checkbox-fila input { width: auto; }
.checkbox-fila label { margin: 0; color: var(--tinta); font-weight: 500; }
.fila-check { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--linea); font-size: .9rem; }
.fila-check:last-child { border-bottom: none; }
.fila-check .etiqueta { min-width: 180px; color: var(--tenue); flex-shrink: 0; }
.icono-ok { color: var(--ok); } .icono-mal { color: var(--mal); } .icono-aviso { color: var(--aviso); } .icono-info { color: var(--tenue); }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.form-2 .ancho, .form-3 .ancho { grid-column: 1 / -1; }
@media (max-width: 47.99rem) { .form-2, .form-3 { grid-template-columns: 1fr; } .fila-check { flex-wrap: wrap; } .fila-check .etiqueta { min-width: 100%; } }

/* ---------- ventanas flotantes ---------- */
dialog.p-modal {
  border: 0; padding: 0; border-radius: 16px; background: var(--papel); color: var(--tinta);
  width: min(34rem, calc(100vw - 2rem)); max-height: min(88vh, 52rem); box-shadow: 0 24px 60px #0005; overflow: hidden;
}
dialog.p-modal.p-modal-ancho { width: min(52rem, calc(100vw - 2rem)); }
dialog.p-modal[open] { display: flex; flex-direction: column; }
dialog.p-modal > form, dialog.p-modal > .p-modal-marco { display: flex; flex-direction: column; min-height: 0; flex: 1; }
dialog.p-modal::backdrop { background: hsl(205 30% 6% / .55); }
.p-modal-cab { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.2rem .7rem; border-bottom: 1px solid var(--linea); flex: none; }
.p-modal-cab h2 { margin: 0; flex: 1; font-size: 1.12rem; }
.p-modal-cab button { background: var(--apagado); color: var(--tinta); border: 0; border-radius: 8px; width: 2.1rem; height: 2.1rem; font-size: 1.2rem; cursor: pointer; }
.p-modal-cuerpo { padding: .4rem 1.2rem 1.1rem; overflow-y: auto; flex: 1; min-height: 0; }
.p-modal-pie { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--linea); flex: none; background: var(--papel); }
.p-modal-seccion { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); margin: 1rem 0 0; }
@media (max-width: 47.99rem) {
  dialog.p-modal, dialog.p-modal.p-modal-ancho {
    width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 82vh; border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .p-modal-pie .boton { flex: 1; }
}

/* buscador (Ctrl/⌘K) y menú crear */
.lista-saltos { list-style: none; margin: .6rem 0 0; padding: 0; }
.lista-saltos a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 8px; text-decoration: none; color: var(--tinta); font-weight: 600; }
.lista-saltos a:hover, .lista-saltos a.elegido { background: var(--primario-suave); }
.lista-saltos small { color: var(--tenue); margin-left: auto; font-weight: 600; }
.crear-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; margin-top: .6rem; }
.crear-opciones a { display: block; border: 1px solid var(--linea); border-radius: 12px; padding: .8rem .9rem; text-decoration: none; color: var(--tinta); font-weight: 700; }
.crear-opciones a:hover { border-color: var(--primario); background: var(--primario-suave); }
.crear-opciones small { display: block; color: var(--tenue); font-weight: 500; }

/* ---------- desplazamiento lateral ---------- */
.tabla-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hay-der { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
.hay-izq { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem); mask-image: linear-gradient(to right, transparent, #000 2.5rem); }
.hay-izq.hay-der { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); }
.desliza-pista { display: none; font-size: .75rem; color: var(--tenue); text-align: right; margin: .3rem .2rem 0; }

@media (max-width: 47.99rem) {
  .desliza-pista.visible { display: block; }
  /* tablas → tarjetas */
  table.tabla-tarjetas, table.tabla-tarjetas tbody, table.tabla-tarjetas tr, table.tabla-tarjetas td { display: block; width: 100%; }
  table.tabla-tarjetas tr:first-child:has(th), table.tabla-tarjetas thead { display: none; }
  table.tabla-tarjetas tr { border-bottom: 1px solid var(--linea); padding: .55rem 0; }
  table.tabla-tarjetas tr:last-child { border-bottom: 0; }
  table.tabla-tarjetas td { border: 0; padding: .15rem .9rem; display: flex; gap: .8rem; justify-content: space-between; align-items: baseline; text-align: right; }
  table.tabla-tarjetas td::before { content: attr(data-label); color: var(--tenue); font-size: .78rem; font-weight: 700; text-align: left; flex: none; }
  table.tabla-tarjetas td:first-child { font-weight: 800; font-size: 1rem; }
  table.tabla-tarjetas td > .valor { display: block; min-width: 0; overflow-wrap: anywhere; }
  table.tabla-tarjetas td > .valor small { display: block; }
  table.tabla-tarjetas td:first-child::before { content: none; }
  table.tabla-tarjetas td[colspan] { justify-content: center; }
  table.tabla-tarjetas td[colspan]::before { content: none; }
  table.tabla-tarjetas td.acciones { justify-content: flex-end; padding-top: .4rem; }
  table.tabla-tarjetas td.acciones::before { content: none; }
}

/* ---------- avisos y resaltado ---------- */
.p-toast { position: fixed; z-index: 120; left: 50%; top: 1rem; transform: translateX(-50%); background: var(--oscura); color: #fff; padding: .65rem 1rem; border-radius: 10px; font-weight: 700; box-shadow: 0 8px 24px #0004; max-width: calc(100vw - 2rem); }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px var(--amarillo); } }
.resaltado { animation: pulso 1.3s ease 3; border-radius: 10px; }

/* ---------- compat: panel lateral de fichas (Prospectos) ---------- */
.panel-overlay { display: none; position: fixed; inset: 0; background: hsl(205 30% 6% / .5); z-index: 80; }
.panel-overlay.abierto { display: block; }
.panel-lateral {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(34rem, 100vw); background: var(--papel); border-left: 1px solid var(--linea);
  padding: 1.4rem; overflow-y: auto; box-shadow: -8px 0 24px #0003; transform: translateX(100%); transition: transform .22s ease;
}
.panel-overlay.abierto .panel-lateral { transform: translateX(0); }
.modal-centro {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--papel); color: var(--tinta);
  border-radius: 16px; padding: 1.4rem; width: min(34rem, 92vw); max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 60px #0005;
}
@media (max-width: 47.99rem) { .panel-lateral { width: 100vw; padding: 1.1rem; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); } }

/* feedback */
.fb-boton { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 70; display: flex; align-items: center; gap: .4rem;
  background: var(--oscura); color: #fff; border: none; border-radius: 999px; padding: .6rem 1rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px #0004; }
@media (max-width: 47.99rem) { .fb-boton { display: none; } }
.fb-captura { width: 100%; max-height: 14rem; object-fit: contain; object-position: top; background: var(--apagado); border: 1px solid var(--linea); border-radius: 8px; display: block; }
.fb-tipos { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }
.fb-tipos label { display: flex; align-items: center; gap: .35rem; margin: 0; padding: .4rem .75rem; border: 1px solid var(--linea); border-radius: 999px; cursor: pointer; color: var(--tinta); font-size: .85rem; position: relative; }
.fb-tipos input { width: auto; margin: 0; }
.fb-tipos label:has(input:checked) { border-color: var(--primario); background: var(--primario-suave); color: var(--primario); }

/* página de acceso */
.acceso { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(60rem 30rem at 10% -10%, var(--primario-suave), transparent), var(--fondo); }
.acceso-caja { width: min(24rem, 100%); background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; padding: 1.8rem 1.6rem; box-shadow: 0 20px 50px hsl(205 30% 11% / .12); }
.acceso-caja h1 { font-size: 1.45rem; }
.acceso-caja .boton { width: 100%; margin-top: 1.1rem; padding: .7rem; }

@media print { .lado, .barra-movil, .barra-inferior, .barra-tablet, .fb-boton { display: none !important; } main { padding: 0; } }
@media (max-width: 47.99rem) { .p-ph > input, .p-ph > select { flex: 1 1 100% !important; } }

/* barra fija de la ficha en el celular (reemplaza la barra de navegación) */
.barra-ficha { display: none; }
@media (max-width: 47.99rem) {
  .barra-ficha {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; position: fixed; z-index: 61; left: .5rem; right: .5rem;
    bottom: calc(.5rem + env(safe-area-inset-bottom)); background: var(--papel); border: 1px solid var(--linea); border-radius: 16px;
    box-shadow: 0 8px 28px #0003; padding: .4rem;
  }
  .barra-ficha .boton { padding: .65rem .3rem; font-size: .85rem; }
  body:has(.barra-ficha) .barra-inferior { display: none; }
}
.panel-lateral .fila { gap: .4rem 1rem; }
.panel-lateral .fila > div { flex: 1 1 9rem; }
.panel-lateral label { margin: .3rem 0 .1rem; }

/* =====================================================================
   2.0 — plano del proyecto, tablero del CRM, ventas, portal del cliente
   Solo tokens: nada de colores fijos (claro, oscuro y automático).
   ===================================================================== */

/* ---------- estados comerciales del lote ---------- */
.e-disponible { --e: var(--c3); } .e-separado { --e: var(--c4); } .e-vendido { --e: var(--tenue); } .e-no_disponible { --e: var(--c8); }
.lote-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 800; padding: .15rem .6rem;
  border-radius: 999px; background: color-mix(in srgb, var(--e) 16%, transparent); color: color-mix(in srgb, var(--e) 80%, var(--tinta)); white-space: nowrap; }
.lote-pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--e); }

/* ---------- plano vectorial ---------- */
.plano-caja { position: relative; background: var(--apagado); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden;
  height: min(72vh, 44rem); touch-action: none; }
.plano-caja svg { width: 100%; height: 100%; display: block; cursor: grab; }
.plano-caja svg:active { cursor: grabbing; }
.plano-caja .mz { fill: var(--papel); }
.plano-caja .area { fill: color-mix(in srgb, var(--c3) 28%, var(--papel)); }
.plano-caja .area.educacion { fill: color-mix(in srgb, var(--c1) 22%, var(--papel)); }
.plano-caja .area.deporte { fill: color-mix(in srgb, var(--c4) 25%, var(--papel)); }
.plano-caja .area.otros { fill: color-mix(in srgb, var(--c7) 18%, var(--papel)); }
.plano-caja .lote { stroke: var(--papel); stroke-width: .35; cursor: pointer; }
.plano-caja .lote.e-disponible { fill: var(--c3); } .plano-caja .lote.e-separado { fill: var(--c4); }
.plano-caja .lote.e-vendido { fill: color-mix(in srgb, var(--tenue) 55%, var(--papel)); } .plano-caja .lote.e-no_disponible { fill: var(--c8); }
.plano-caja .lote.apagado { opacity: .18; }
.plano-caja .lote:hover, .plano-caja .lote:focus { stroke: var(--tinta); stroke-width: .9; outline: none; }
.plano-caja .lote.elegido { stroke: var(--primario); stroke-width: 1.4; }
.plano-zoom { position: absolute; right: .7rem; top: .7rem; display: grid; gap: .35rem; }
.plano-caja .via { fill: var(--apagado); }
.plano-caja .nums text { font: 700 2.6px Figtree, system-ui, sans-serif; fill: var(--papel); text-anchor: middle; pointer-events: none; display: none; }
.plano-caja.cerca .nums text { display: inline; }
.plano-caja .tx-mz { font: 800 7px Figtree, system-ui, sans-serif; fill: var(--primario); text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: var(--papel); stroke-width: 2px; }
.plano-caja .tx-area { font: 700 4px Figtree, system-ui, sans-serif; fill: var(--tinta); opacity: .7; text-anchor: middle; pointer-events: none;
  text-transform: uppercase; letter-spacing: .05em; }
.plano-caja .tx-calle { font: 600 3.3px Figtree, system-ui, sans-serif; fill: var(--tenue); text-anchor: middle; pointer-events: none;
  letter-spacing: .06em; text-transform: uppercase; }
.plano-norte { position: absolute; left: .7rem; top: .7rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--papel);
  border: 1px solid var(--linea); display: grid; place-items: center; box-shadow: var(--sombra); pointer-events: none; }
.plano-norte span { font-weight: 800; font-size: .85rem; color: var(--primario); position: relative; }
.plano-norte span::before { content: ""; position: absolute; left: 50%; top: -.55rem; transform: translateX(-50%);
  border: .25rem solid transparent; border-bottom: .35rem solid var(--primario); }
.plano-caja .plano-leyenda { position: absolute; left: .7rem; bottom: .7rem; margin: 0; background: color-mix(in srgb, var(--papel) 94%, transparent);
  border: 1px solid var(--linea); border-radius: 12px; padding: .45rem .8rem; max-width: calc(100% - 1.4rem); font-weight: 600; color: var(--tinta);
  font-size: .8rem; box-shadow: var(--sombra); pointer-events: none; }
.e-parque { --e: color-mix(in srgb, var(--c3) 28%, var(--papel)); }
@media (max-width: 47.99rem) { .plano-caja .plano-leyenda { font-size: .72rem; gap: .2rem .6rem; padding: .35rem .6rem; } }
.plano-zoom button { width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta);
  font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: var(--sombra); }
.plano-leyenda { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: var(--tenue); margin: .6rem 0; }
.plano-leyenda span { display: inline-flex; align-items: center; gap: .35rem; }
.plano-leyenda i { width: .8rem; height: .8rem; border-radius: 3px; background: var(--e); display: inline-block; }
.plano-mini { aspect-ratio: 3 / 2; max-width: 100%; background: var(--apagado); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; }
.plano-mini svg { width: 100%; height: 100%; display: block; }
.plano-mini .vecino { fill: var(--papel); stroke: var(--linea); stroke-width: .3; }
.plano-mini .suyo { fill: var(--primario); stroke: var(--papel); stroke-width: .5; }

/* ---------- tarjetas de lote ---------- */
.lotes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .7rem; }
.lote-card { display: grid; gap: .35rem; background: var(--papel); border: 1px solid var(--linea); border-left: 4px solid var(--e); border-radius: 12px;
  padding: .8rem .9rem; text-decoration: none; color: inherit; min-width: 0; }
.lote-card:hover { border-color: var(--primario); border-left-color: var(--e); }
.lote-card .cod { font-family: ui-monospace, Menlo, monospace; font-weight: 800; }
.lote-card .precio { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- tablero del CRM ---------- */
/* Computadora: las 5 etapas caben en pantalla, sin deslizar. Celular: una etapa a la vez, elegida con pestañas. */
.tablero { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; align-items: start; }
.columna { background: var(--apagado); border: 1px solid var(--linea); border-radius: 12px; padding: .55rem; min-width: 0;
  display: flex; flex-direction: column; gap: .45rem; max-height: 72vh; overflow-y: auto; }
.columna h3 { margin: 0; font-size: .82rem; display: flex; justify-content: space-between; align-items: center; gap: .3rem;
  padding: .15rem .25rem .35rem; position: sticky; top: -.55rem; background: var(--apagado); z-index: 1; }
.columna.soltar { outline: 2px dashed var(--primario); outline-offset: -4px; }
.lead { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; padding: .55rem .65rem; text-decoration: none;
  color: inherit; display: grid; gap: .15rem; cursor: grab; box-shadow: var(--sombra); min-width: 0; }
.lead:hover { border-color: var(--primario); }
.lead b { font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; }
.lead small { color: var(--tenue); font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
.lead .prox { font-size: .76rem; font-weight: 700; }
.lead .prox.vencida { color: var(--mal); } .lead .prox.hoy { color: var(--aviso); }
.lead .asesor { display: inline-block; justify-self: start; font-size: .7rem; font-weight: 700; color: var(--tenue);
  background: var(--apagado); border-radius: 999px; padding: .05rem .5rem; }
.tablero-pestanas { display: none; }
@media (max-width: 64rem) and (min-width: 48rem) { .tablero { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 47.99rem) {
  .tablero-pestanas { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .6rem; scrollbar-width: none; }
  .tablero-pestanas .p-chip { flex: none; }
  .tablero { grid-template-columns: minmax(0, 1fr); }
  .tablero .columna { display: none; max-height: none; background: transparent; border: 0; padding: 0; }
  .tablero .columna.activa { display: flex; }
  .tablero .columna h3 { display: none; }
}

/* ---------- ventas ---------- */
.plan { display: grid; gap: .4rem; }
.plan-parte { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .8rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--linea);
  border-radius: 10px; background: var(--papel); }
.plan-parte .n { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--apagado); }
.plan-parte.pagada .n { background: var(--ok-bg); color: var(--ok); } .plan-parte.vencida .n { background: var(--mal-bg); color: var(--mal); }
.plan-parte.parcial .n { background: var(--aviso-bg); color: var(--aviso); }
.titular { border: 1px solid var(--linea); border-radius: 12px; padding: .8rem .9rem; background: var(--papel); display: grid; gap: .4rem; }
.titular.conyuge { margin-left: 1.2rem; border-style: dashed; }
.titular .req { display: flex; flex-wrap: wrap; gap: .3rem; }
.fila-titular { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 6rem auto; gap: .5rem; align-items: end; }
@media (max-width: 47.99rem) { .fila-titular { grid-template-columns: 1fr 1fr; } .fila-titular > :first-child { grid-column: 1 / -1; } }
.pasos-venta { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; counter-reset: paso; }
.pasos-venta span { font-size: .82rem; font-weight: 700; color: var(--tenue); padding: .3rem .7rem; border-radius: 999px; background: var(--apagado); }
.pasos-venta span.on { background: var(--tinta); color: var(--papel); }
.qr-caja { display: grid; justify-items: center; gap: .4rem; }
.qr-caja img { width: 11rem; height: 11rem; image-rendering: pixelated; background: #fff; padding: .4rem; border-radius: 10px; }
.enlace-texto { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; word-break: break-all; background: var(--apagado); padding: .5rem .7rem; border-radius: 8px; }

/* ---------- páginas públicas (portal del cliente y página del proyecto) ---------- */
.pub { max-width: 68rem; margin: 0 auto; padding: 1.2rem max(16px, env(safe-area-inset-left, 0px)) 3rem; }
.pub-cab { display: flex; align-items: center; gap: .7rem; padding: .7rem max(16px, env(safe-area-inset-left, 0px)); background: var(--papel); border-bottom: 1px solid var(--linea);
  position: sticky; top: 0; z-index: 10; }
.pub-cab .marca { width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--primario); color: var(--papel); display: grid; place-items: center; font-weight: 800; }
.pub-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 52rem) { .pub-grid { grid-template-columns: minmax(0, 1fr); } }
.pub .monto-grande { font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cuenta-banco { border: 1px solid var(--linea); border-radius: 10px; padding: .7rem .9rem; display: grid; gap: .15rem; }
.cuenta-banco code { font-family: ui-monospace, Menlo, monospace; user-select: all; }

[hidden] { display: none !important; }
.fila-check > .etiqueta { flex: 1 1 auto; min-width: 0; }

/* Plano con ficha al costado (Lotes del ERP y página pública) */
.plano-con-ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1rem; align-items: start; }
.ficha-plano { position: sticky; top: 1rem; margin: 0; }
.ficha-plano .p-pb { display: grid; gap: .8rem; }
.ficha-titulo { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.datos-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: .5rem; }
.precios-mini { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.dato-mini { background: var(--apagado); border-radius: 10px; padding: .55rem .7rem; display: grid; gap: .1rem; min-width: 0; }
.precios-mini .dato-mini { background: var(--papel); border: 1px solid var(--linea); }
.dato-mini span { font-size: .72rem; font-weight: 700; color: var(--tenue); text-transform: uppercase; letter-spacing: .04em; }
.dato-mini b { font-size: 1.02rem; }
.precios-mini .dato-mini b { font-size: 1.25rem; color: var(--primario); }
.ficha-plano .p-alert { margin: 0; }
@media (max-width: 52rem) { .plano-con-ficha { grid-template-columns: minmax(0, 1fr); } .ficha-plano { position: static; } }
.ficha-vacia { text-align: center; padding: 1.6rem .6rem; display: grid; gap: .4rem; }
.ficha-vacia b { font-size: 1.05rem; } .ficha-vacia span { color: var(--tenue); line-height: 1.5; }

/* Enlace del comprador (/c/<token>) */
.portal-hola { margin-bottom: 1rem; }
.portal-hola h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.portal-hola p { margin: .2rem 0 0; }
.portal-col { display: grid; gap: 1rem; min-width: 0; }
.portal .p-ph { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.portal .p-ph h2 { display: flex; align-items: center; gap: .45rem; }
.portal .pi { font-size: 1rem; }
.portal-entre { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.portal-paso { margin-top: 1rem; border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .25rem; }
.portal-paso small { opacity: .8; font-weight: 700; }
.portal-paso > b { font-size: 1.15rem; }
.portal-paso p { margin: 0; line-height: 1.5; }
.portal-falta { margin: .8rem 0 0; color: var(--aviso); font-weight: 600; font-size: .9rem; }
.portal-lista { display: grid; gap: 0; }
.portal-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .3rem .8rem; padding: .75rem 0; border-top: 1px solid var(--linea); }
.portal-item:first-child { border-top: 0; padding-top: 0; }
.portal-item:not(:has(.portal-ico)) { grid-template-columns: minmax(0, 1fr) auto; }
.portal-ico { width: 2.3rem; height: 2.3rem; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; font-weight: 800; background: var(--apagado); }
.portal-ico.ok { background: var(--ok-bg); color: var(--ok); } .portal-ico.warn { background: var(--aviso-bg); color: var(--aviso); }
.portal-ico.bad { background: var(--mal-bg); color: var(--mal); } .portal-ico.info { background: var(--info-bg); color: var(--info); }
.portal-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.portal-txt b { font-size: 1rem; }
.portal-txt small { color: var(--tenue); font-size: .85rem; }
.portal-txt a { font-weight: 700; font-size: .9rem; color: var(--primario); }
.portal-monto { font-size: 1.05rem; white-space: nowrap; }
.portal-recibidos { margin-top: .6rem; font-size: .9rem; color: var(--tenue); }
.portal-recibidos summary { cursor: pointer; font-weight: 600; }
.portal-recibidos ul { margin: .4rem 0 0; padding-left: 1rem; list-style: none; }
.portal-nota { font-size: .85rem; margin: .7rem 0 0; }
.portal-cuenta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem; }
.portal-cuenta > div { display: grid; gap: .2rem; min-width: 0; }
.portal-cuenta code { font-size: 1.05rem; overflow-wrap: anywhere; }
.mini-plano { border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; background: var(--apagado); }
.mini-plano svg { display: block; width: 100%; aspect-ratio: 4 / 3; }
.mini-plano .via { fill: var(--apagado); }
.mini-plano .otro { fill: var(--papel); stroke: var(--linea); stroke-width: .3; }
.mini-plano .mio { fill: var(--primario); stroke: var(--papel); stroke-width: .5; }
.mini-plano .mio-tx { fill: var(--primario); font-weight: 800; text-anchor: middle; font-family: Figtree, system-ui, sans-serif; }
.mini-plano .calle { fill: var(--tenue); font-weight: 600; text-anchor: middle; letter-spacing: .05em; font-family: Figtree, system-ui, sans-serif; }
.portal-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.portal-pasos li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; padding: 0 0 .9rem; position: relative; }
.portal-pasos li:not(:last-child)::before { content: ""; position: absolute; left: .95rem; top: 2rem; bottom: .1rem; width: 2px; background: var(--linea); }
.portal-pasos li.hecho:not(:last-child)::before { background: var(--ok); }
.portal-pasos .dot { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--apagado); color: var(--tenue); }
.portal-pasos li.hecho .dot { background: var(--ok); color: var(--papel); }
.portal-pasos li.actual .dot { background: var(--primario); color: var(--papel); box-shadow: 0 0 0 4px var(--primario-suave); }
.portal-pasos li > span:last-child { display: flex; flex-direction: column; padding-top: .2rem; }
.portal-pasos small { color: var(--tenue); font-size: .85rem; }
.portal-pasos li:not(.hecho):not(.actual) b { color: var(--tenue); }
.portal-datos + .portal-datos { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--linea); }
.portal-datos > b { display: block; margin-bottom: .4rem; }
.portal-asesor { display: flex; align-items: center; gap: .8rem; }
.portal-asesor .avatar { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none;
  background: var(--primario); color: var(--papel); text-transform: uppercase; }
.portal-asesor > div { display: flex; flex-direction: column; min-width: 0; }
.portal-asesor .tel { font-size: 1.15rem; font-weight: 800; user-select: all; }
.portal-pie { text-align: center; font-size: .8rem; margin-top: 2rem; }
.mini-plano { position: relative; }
.mini-plano .mio { stroke: var(--tinta); stroke-width: .6; }
.mini-leyenda { position: absolute; left: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px; background: var(--papel); border: 1px solid var(--linea); }
.mini-leyenda i { width: .7rem; height: .7rem; border-radius: 3px; background: var(--primario); }
.portal-persona { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.portal-cobro { border: 2px solid var(--primario); }
.portal-medios { display: grid; gap: .5rem; margin-top: .9rem; }
.portal-medio { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .7rem .8rem;
  border: 1px solid var(--linea); border-radius: 12px; color: var(--tinta); text-decoration: none; background: var(--papel); }
a.portal-medio:hover { border-color: var(--primario); }
.portal-medio .tel { font-size: 1.1rem; font-weight: 800; user-select: all; }
.portal-ico.yape { background: var(--c7); color: var(--papel); }
.portal-ico.plin { background: var(--c1); color: var(--papel); }

/* Formularios de venta: opciones en tarjetas, resumen y titulares */
.opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .6rem; }
.opcion { display: flex; gap: .7rem; align-items: flex-start; margin: 0; padding: .8rem .9rem; border: 1px solid var(--linea); border-radius: 12px; cursor: pointer;
  background: var(--papel); color: var(--tinta); font-weight: 400; }
.opcion input { width: auto; margin: .2rem 0 0; accent-color: var(--primario); }
.opcion span { display: flex; flex-direction: column; gap: .15rem; }
.opcion small { color: var(--tenue); font-size: .83rem; line-height: 1.35; }
.opcion:has(input:checked) { border-color: var(--primario); background: var(--primario-suave); box-shadow: 0 0 0 1px var(--primario); }
.venta-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .6rem; margin-top: .9rem; }
.vr-dato { border: 1px solid var(--linea); border-radius: 10px; padding: .6rem .75rem; display: grid; gap: .3rem; align-content: start; background: var(--fondo); }
.vr-dato label { margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); }
.vr-dato b { font-size: 1.25rem; }
.vr-dato input, .vr-dato select { margin: 0; min-height: 2.3rem; }
.titular { border: 1px solid var(--linea); border-radius: 12px; padding: .8rem .9rem; margin-bottom: .7rem; background: var(--fondo); }
.titular.conyuge { margin-left: 1.2rem; border-style: dashed; }
.titular-cab { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.titular-n { font-size: .85rem; color: var(--primario); }
.titular-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) 6rem; gap: .2rem .7rem; }
.titular-grid label { margin-top: .3rem; }
.titular-grid .tg-civil { grid-column: 1; } .titular-grid .tg-ocup { grid-column: 2 / -1; }
.titular.conyuge .tg-ocup { grid-column: 2 / -1; }
@media (max-width: 40rem) { .titular-grid { grid-template-columns: minmax(0, 1fr) 5.5rem; } .titular-grid .tg-nombre { grid-column: 1 / -1; }
  .titular-grid .tg-civil, .titular-grid .tg-ocup { grid-column: 1 / -1; } .titular.conyuge { margin-left: .5rem; } }
.cobro-detalle { margin-top: .9rem; }

/* Ficha del interesado (CRM) */
.etapas-crm { list-style: none; display: flex; gap: 0; margin: 0 0 1rem; padding: 0; overflow-x: auto; scrollbar-width: none; }
.etapas-crm li { flex: 1 1 0; min-width: 7.5rem; position: relative; }
.etapas-crm li:not(:last-child)::after { content: ""; position: absolute; top: 1.15rem; left: calc(50% + 1.1rem); right: calc(-50% + 1.1rem); height: 2px; background: var(--linea); }
.etapas-crm li.hecha::after { background: var(--ok); }
.etapas-crm form { margin: 0; }
.etapas-crm button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; color: var(--tenue);
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .2rem; }
.etapas-crm .n { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--papel); border: 2px solid var(--linea); }
.etapas-crm li.hecha .n { background: var(--ok); border-color: var(--ok); color: var(--papel); }
.etapas-crm li.actual .n { background: var(--primario); border-color: var(--primario); color: var(--papel); box-shadow: 0 0 0 4px var(--primario-suave); }
.etapas-crm li.actual button { color: var(--tinta); }
.etapas-crm button:hover .n { border-color: var(--primario); }
.crm-ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 56rem) { .crm-ficha { grid-template-columns: minmax(0, 1fr); } }
.crm-col { display: grid; gap: 1rem; min-width: 0; }
.crm-origen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .5rem; margin-top: .9rem; padding: .7rem .8rem;
  background: var(--fondo); border: 1px solid var(--linea); border-radius: 10px; }
.crm-origen div { display: flex; flex-direction: column; min-width: 0; }
.crm-origen small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); }
.crm-origen b { font-size: .9rem; overflow-wrap: anywhere; }
.crm-lotes { margin-top: .8rem; }
.crm-opciones { display: grid; gap: .8rem; }
.crm-opcion { display: grid; gap: .35rem; margin: 0; }
.crm-opcion label { margin: 0; font-weight: 700; }
.crm-opcion > div { display: flex; gap: .5rem; flex-wrap: wrap; }
.crm-opcion select { flex: 1 1 12rem; width: auto; margin: 0; }
.crm-opcion.peligro { padding-top: .8rem; border-top: 1px solid var(--linea); }
.crm-opcion.peligro label { color: var(--mal); }
.crm-historial .p-ph .p-acts { margin: 0; }
.linea-tiempo { list-style: none; margin: 0; padding: 0; }
.linea-tiempo li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .7rem; padding-bottom: .9rem; position: relative; }
.linea-tiempo li:not(:last-child)::before { content: ""; position: absolute; left: 1.05rem; top: 2.3rem; bottom: .2rem; width: 2px; background: var(--linea); }
.linea-tiempo .lt-ico { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--apagado); font-size: .95rem; }
.linea-tiempo li.pendiente .lt-ico { background: var(--aviso-bg); }
.linea-tiempo li > div { padding-top: .25rem; min-width: 0; }
.linea-tiempo b { font-size: .93rem; }
.linea-tiempo p { margin: .15rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.linea-tiempo small { display: block; color: var(--tenue); font-size: .8rem; margin-top: .15rem; }
.crm-trato { margin: .2rem 0 0; }
.enlace-boton { background: none; border: 0; padding: 0; font: inherit; font-size: .9em; color: var(--primario); text-decoration: underline; cursor: pointer; }
.cobro-detalle small { display: block; margin-top: .25rem; }

/* Pie legal y páginas legales */
.pie-legal { border-top: 1px solid var(--linea); margin-top: 2rem; padding: 1.2rem 1rem 1.6rem; text-align: center; color: var(--tenue); font-size: .85rem; }
.pie-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin-bottom: .5rem; }
.pie-legal a { color: var(--tenue); }
.pie-legal a.libro { color: var(--tinta); font-weight: 700; }
.pie-legal p { margin: 0; }
.legal { max-width: 46rem; margin: 0 auto; }
.legal h1 { margin-bottom: .2rem; }
.legal .fecha { color: var(--tenue); margin: 0 0 1.2rem; font-size: .9rem; }
.legal h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2rem; }
.legal .p-panel { margin: 1rem 0; }
.legal-indice { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.libro-form fieldset { border: 1px solid var(--linea); border-radius: 12px; padding: .9rem 1rem 1rem; margin: 0 0 1rem; background: var(--papel); }
.libro-form legend { font-weight: 800; padding: 0 .4rem; }
.libro-prov { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .4rem 1rem; font-size: .9rem; }
.libro-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Agenda del CRM */
.agenda-grupo .p-ph { display: flex; align-items: center; gap: .6rem; }
.agenda-grupo.mal { border-color: color-mix(in srgb, var(--mal) 40%, var(--linea)); }
.agenda-fecha { margin: .8rem 0 .2rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); }
.agenda-fecha:first-child { margin-top: 0; }
.agenda-fila { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; align-items: center; gap: .4rem 1rem; padding: .7rem 0; border-top: 1px solid var(--linea); }
.agenda-fecha + .agenda-fila, .p-pb > .agenda-fila:first-child { border-top: 0; }
.agenda-tipo { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: var(--apagado); }
.agenda-tipo.visita { background: var(--ok-bg); } .agenda-tipo.whatsapp { background: var(--info-bg); }
.agenda-quien { display: flex; flex-direction: column; min-width: 0; }
.agenda-quien a { color: var(--tinta); text-decoration: none; }
.agenda-quien a:hover b { text-decoration: underline; }
.agenda-quien small { color: var(--tenue); font-size: .83rem; }
.agenda-nota { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-contacto, .agenda-cerrar { display: flex; gap: .4rem; align-items: center; margin: 0; }
.agenda-cerrar select { width: 9.5rem; margin: 0; min-height: 2.1rem; padding-top: .25rem; padding-bottom: .25rem; }
@media (max-width: 52rem) {
  .agenda-fila { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .agenda-contacto, .agenda-cerrar { grid-column: 2; flex-wrap: wrap; }
  .agenda-cerrar select { flex: 1 1 8rem; width: auto; }
}
.crm-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .8rem 1rem; margin: 0; }
.crm-dl > div { min-width: 0; }
.crm-dl dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); }
.crm-dl dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.crm-falta { display: flex; justify-content: space-between; gap: .6rem; width: 100%; margin-top: 1rem; padding: .6rem .8rem; border: 1px dashed var(--linea);
  border-radius: 10px; background: var(--fondo); color: var(--tenue); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.crm-falta span { color: var(--primario); font-weight: 700; white-space: nowrap; }
.crm-falta:hover { border-color: var(--primario); }
.crm-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--linea); }
.peligro-texto { color: var(--mal); }
.venta-caida { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; color: var(--tenue); font-size: .9rem; }
/* Bloqueado: venta iniciada sin la separación pagada (rayado sobre el color de separado) */
.plano-caja .lote.e-separado.bloq { fill: color-mix(in srgb, var(--c4) 45%, var(--papel)); stroke: var(--c4); stroke-width: .5; stroke-dasharray: 1.2 .8; }
.plano-leyenda .bloq i { background: repeating-linear-gradient(45deg, var(--c4) 0 2px, color-mix(in srgb, var(--c4) 35%, var(--papel)) 2px 4px) !important; }
.punto { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; background: var(--e, var(--tenue)); vertical-align: .05rem; }
.emitir-varios { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.emitir-varios .boton { margin: 0; }

/* Configuración central: grupos con tarjetas, pestañas por grupo y buscador */
.cfg-head { margin: 0 0 1rem; }
.cfg-tabs { margin: 0; }
.cfg-tabs a span { margin-right: .15rem; }
.cfg-tabs a[aria-current="page"] { color: var(--primario); border-bottom-color: var(--primario); }
.cfg-fila2 { display: flex; align-items: stretch; gap: .6rem; margin-top: .6rem; min-height: 3rem; }
.cfg-fila2 [hidden] { display: none !important; }
.cfg-subnav { flex: 1 1 auto; min-width: 0; display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin: 0; padding: .5rem .6rem;
  background: color-mix(in srgb, var(--g, var(--primario)) 7%, var(--papel)); border: 1px solid color-mix(in srgb, var(--g, var(--primario)) 22%, var(--linea)); border-radius: 14px; }
.cfg-subnav a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; white-space: nowrap; color: var(--tinta);
  text-decoration: none; font-size: .86rem; font-weight: 700; background: var(--papel); border: 1px solid var(--linea); }
.cfg-subnav a:hover { border-color: var(--g, var(--primario)); }
.cfg-subnav a[aria-current="page"] { background: var(--g, var(--primario)); border-color: var(--g, var(--primario)); color: var(--papel); }
.cfg-fila2-txt { flex: 1 1 auto; margin: 0; display: flex; align-items: center; padding: 0 .9rem; color: var(--tenue); font-size: .88rem; border: 1px dashed var(--linea); border-radius: 14px; }
.cfg-buscar { flex: 0 0 17rem; display: flex; align-items: center; gap: .5rem; margin: 0; padding: .2rem .5rem .2rem .8rem; background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; }
.cfg-buscar input { flex: 1; border: 0 !important; background: transparent !important; min-height: 2.4rem; margin: 0; box-shadow: none !important; }
.cfg-buscar input:focus { outline: none; }
.cfg-buscar:focus-within { border-color: var(--primario); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primario) 18%, transparent); }
.cfg-cab { margin-top: 0; } .cfg-cab h1 { margin-top: 0; }
.cfg-grupo { margin: 1.4rem 0 0; scroll-margin-top: 1rem; }
.cfg-grupo-cab { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.cfg-grupo-cab h2 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.cfg-grupo-cab p { margin: .1rem 0 0; color: var(--tenue); font-size: .85rem; }
.cfg-grupo-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1.3rem; flex: none;
  background: color-mix(in srgb, var(--g, var(--primario)) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g, var(--primario)) 35%, transparent); }
.cfg-g-empresa { --g: var(--c1); } .cfg-g-cobro { --g: var(--c3); } .cfg-g-lotes { --g: var(--c4); } .cfg-g-equipo { --g: var(--c7); }
.cfg-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: .65rem; }
.cfg-tarjeta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .8rem .9rem; background: var(--papel);
  border: 1px solid var(--linea); border-left: 4px solid var(--g, var(--primario)); border-radius: 12px; color: var(--tinta); text-decoration: none;
  transition: transform .12s, box-shadow .12s, border-color .12s; }
.cfg-tarjeta:hover { transform: translateY(-1px); box-shadow: var(--sombra); border-color: var(--g, var(--primario)); }
.cfg-tarjeta[hidden], .cfg-grupo[hidden] { display: none; }
.cfg-t-ico { font-size: 1.45rem; line-height: 1; }
.cfg-t-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.cfg-t-txt strong { font-size: .97rem; } .cfg-t-txt small { color: var(--tenue); font-size: .8rem; line-height: 1.35; }
.cfg-t-ir { font-size: 1.4rem; color: var(--g, var(--primario)); font-weight: 800; }
.cfg-form .p-panel { max-width: 52rem; }
.cfg-form .p-pb small.tenue { display: block; margin-top: .25rem; font-size: .8rem; }
.cfg-guardar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  max-width: 52rem; padding: .7rem 1rem; margin-top: .5rem; background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra); }
.cfg-guardar span { color: var(--tenue); font-size: .85rem; }
.cfg-cuenta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0 .7rem; padding: .5rem 0; border-top: 1px dashed var(--linea); }
.cfg-cuenta:first-of-type { border-top: 0; }
@media (max-width: 47.9rem) { .cfg-fila2 { flex-direction: column; min-height: 0; } .cfg-buscar { flex: none; } .cfg-fila2-txt { display: none; }
  .cfg-subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .cfg-guardar { bottom: 4.6rem; } }

/* Enlace del comprador: datos del lote compactos (dos columnas también en el celular) */
.portal-lote-cab h2 { white-space: nowrap; }
.lote-precio { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: .8rem 0 .2rem; padding: .7rem .9rem;
  border-radius: 12px; background: var(--primario-suave); }
.lote-precio span { font-size: .85rem; color: var(--tenue); font-weight: 600; }
.lote-precio b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.lote-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.lote-datos > div { padding: .6rem 0; border-bottom: 1px solid var(--linea); min-width: 0; }
.lote-datos > div:nth-child(odd):not(.ancho) { padding-right: .8rem; }
.lote-datos > .ancho { grid-column: 1 / -1; }
.lote-datos dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); }
.lote-datos dd { margin: .1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Panel de inicio */
.panel-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-cab h1 { margin: .1rem 0 0; }
.panel-mes { background: var(--oscura); color: #fff; border-radius: 18px; padding: 1rem 1.1rem 1.1rem; margin-bottom: 1rem; }
.pm-cab { margin-bottom: .7rem; }
.pm-grandes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .6rem; }
.pm-grandes > * { background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); border-radius: 12px; padding: .75rem .9rem; color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.pm-grandes span { font-size: .8rem; opacity: .8; }
.pm-grandes b { font-size: clamp(1.4rem, 4vw, 1.9rem); font-variant-numeric: tabular-nums; margin: .1rem 0; }
.pm-grandes small { font-size: .78rem; opacity: .75; }
.pm-grandes small.sube { color: #7fe2b5; opacity: 1; } .pm-grandes small.baja { color: #ffb4a8; opacity: 1; }
.pm-lotes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .6rem; }
.pm-lotes a { background: rgb(255 255 255 / .05); border-radius: 10px; padding: .5rem .7rem; color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.pm-lotes b { font-size: 1.2rem; } .pm-lotes span { font-size: .75rem; opacity: .8; display: flex; align-items: center; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }
.panel-lista { display: grid; gap: .45rem; }
.pa-fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .6rem .7rem; border-radius: 12px;
  background: var(--apagado); color: var(--tinta); text-decoration: none; }
.pa-fila.bad { background: var(--mal-bg); } .pa-fila.warn { background: var(--aviso-bg); } .pa-fila.ok { background: var(--ok-bg); }
.pa-fila:hover { box-shadow: inset 0 0 0 1px var(--linea); }
.pa-ico { font-size: 1.15rem; }
.pa-txt { display: flex; flex-direction: column; min-width: 0; }
.pa-txt b { font-size: .93rem; } .pa-txt small { color: var(--tenue); font-size: .8rem; }
.panel-agenda .ag-grupo { margin: 0 0 .3rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); }
.panel-agenda .ag-grupo.mal { color: var(--mal); }
.panel-agenda .ag-grupo:not(:first-child) { margin-top: 1rem; }
.panel-agenda .ag-fecha { margin: .5rem 0 .1rem; font-size: .75rem; color: var(--tenue); font-weight: 700; }
.ag-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--linea); }
.ag-quien { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--tinta); text-decoration: none; }
.ag-quien > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ag-quien b { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-quien small { font-size: .78rem; color: var(--tenue); }
.ag-tipo { width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; background: var(--apagado); flex: none; font-size: .9rem; }
.ag-btn { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; text-decoration: none; border: 1px solid var(--linea); background: var(--papel); }
.ag-btn.wa { background: #1f9d55; border-color: #1f9d55; }

/* Celular: ficha del interesado compacta */
@media (max-width: 47.99rem) {
  .etapas-crm { overflow: visible; margin-bottom: .8rem; }
  .etapas-crm li { min-width: 0; }
  .etapas-crm li:not(:last-child)::after { top: .9rem; left: calc(50% + .9rem); right: calc(-50% + .9rem); }
  .etapas-crm .n { width: 1.8rem; height: 1.8rem; font-size: .8rem; }
  .etapas-crm button { font-size: .68rem; line-height: 1.15; padding: 0 .1rem; }
  .crm-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .8rem; }
  .p-oscura form { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; width: 100%; }
  .p-oscura form select { grid-column: 1 / -1; width: 100% !important; }
  .p-oscura form input { width: 100% !important; margin: 0; }
  .ag-fila { gap: .3rem; }
}
/* Celular: datos en dos columnas, números del panel y tablas cortas que no se salen */
@media (max-width: 47.99rem) {
  .p-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .9rem; }
  .p-dato { min-width: 0; overflow-wrap: anywhere; }
  .pm-grandes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-grandes > :first-child { grid-column: 1 / -1; }
  .pm-lotes { gap: .35rem; } .pm-lotes a { padding: .45rem .5rem; } .pm-lotes span { font-size: .68rem; }
  table.sin-tarjetas { table-layout: fixed; width: 100%; }
  table.sin-tarjetas td { overflow-wrap: anywhere; }
  table.sin-tarjetas td.acciones { width: 8.5rem; white-space: normal; }
  table.sin-tarjetas td.acciones .boton { white-space: normal; }
}
/* Documento: tipo y número juntos */
.doc-grupo { display: flex; gap: 0; }
.doc-grupo select { width: auto; flex: 0 0 auto; max-width: 9.5rem; border-top-right-radius: 0; border-bottom-right-radius: 0; margin: 0; }
.doc-grupo input { flex: 1; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; margin: 0; }
/* Buscador: campo y botón en una sola línea, también en el celular */
.buscador-linea { display: flex; gap: .4rem; align-items: stretch; flex: 1 1 18rem; max-width: 26rem; min-width: 0; }
.buscador-linea input { flex: 1; min-width: 0; margin: 0; }
.buscador-linea .boton { flex: none; margin: 0; }
@media (max-width: 47.99rem) { .buscador-linea { max-width: none; flex-basis: 100%; } .solo-ancho { display: none; } }
@media (max-width: 40rem) {
  .titular-grid { grid-template-columns: minmax(0, 1fr) 5.5rem; grid-template-areas: "nombre nombre" "doc doc" "civil pct" "ocup ocup"; }
  .titular-grid .tg-nombre { grid-area: nombre; } .titular-grid .tg-dni { grid-area: doc; } .titular-grid .tg-pct { grid-area: pct; }
  .titular-grid .tg-civil { grid-area: civil; } .titular-grid .tg-ocup { grid-area: ocup; }
  .titular.conyuge .titular-grid { grid-template-areas: "nombre nombre" "doc doc" "civil civil" "ocup ocup"; }
}

/* Panel: elegir periodo y moverse a periodos anteriores */
.pm-cab { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.pm-periodos { display: inline-flex; background: rgb(255 255 255 / .08); border-radius: 999px; padding: .2rem; }
.pm-periodos a { color: #fff; opacity: .75; text-decoration: none; font-size: .82rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.pm-periodos a[aria-current] { background: var(--papel); color: var(--tinta); opacity: 1; }
.pm-nav { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; flex-wrap: wrap; }
.pm-nav > a:not(.pm-hoy), .pm-nav-vacio { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none;
  background: rgb(255 255 255 / .1); font-size: 1.2rem; line-height: 1; }
.pm-nav-vacio { background: transparent; }
.pm-nav > span:not(.pm-nav-vacio) { font-weight: 700; min-width: 0; }
.pm-hoy { color: #ffd66b; font-size: .82rem; font-weight: 700; margin-left: auto; }
.pm-hoy-txt { margin: .9rem 0 .3rem; font-size: .78rem; opacity: .7; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.pm-lotes { margin-top: 0; }
@media (max-width: 47.99rem) { .pm-grandes > :first-child { grid-column: auto; } .pm-grandes > :first-child:last-child, .pm-grandes > :nth-child(3):last-child { grid-column: 1 / -1; } .pm-grandes b { font-size: 1.3rem; } }
.cfg-externa .cfg-head { margin-bottom: 1.2rem; }

/* Roles: permisos agrupados como el menú */
.permisos-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .8rem; }
.permisos-grupo { border: 1px solid var(--linea); border-radius: 12px; padding: .6rem .9rem .8rem; margin: 0; background: var(--fondo); }
.permisos-grupo legend { font-weight: 800; padding: 0 .35rem; }
.permisos-grupo .checkbox-fila { align-items: flex-start; }

/* Cotizaciones y adjuntos */
.adjunto { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem .8rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--linea); }
.adjunto:first-child { border-top: 0; padding-top: 0; }
.adjunto-ico { width: 2.3rem; height: 2.3rem; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); }
.adjunto-txt { display: flex; flex-direction: column; min-width: 0; }
.adjunto-txt small { color: var(--tenue); font-size: .8rem; overflow-wrap: anywhere; }
.adjunto-acc { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.adjunto-acc form { margin: 0; }
@media (max-width: 47.99rem) { .adjunto { grid-template-columns: auto minmax(0, 1fr); } .adjunto-acc { grid-column: 2; justify-content: flex-start; } }
.cot-elegidos { display: flex; flex-wrap: wrap; gap: .4rem; }
.cot-lote { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .35rem .7rem; border: 1px solid var(--linea); border-radius: 999px; font-size: .88rem; cursor: pointer; }
.cot-lote:has(input:checked) { border-color: var(--primario); background: var(--primario-suave); }
.cot-lote input { width: auto; margin: 0; }

/* Recordatorios de pago */
.rec-fila { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .4rem .8rem; align-items: start; padding: .7rem 0; border-top: 1px solid var(--linea); }
.rec-fila:first-child { border-top: 0; padding-top: 0; }
.rec-ico { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: var(--apagado); }
.atraso .rec-ico { background: var(--mal-bg); } .hoy .rec-ico, .antes .rec-ico { background: var(--aviso-bg); } .avance .rec-ico { background: var(--ok-bg); }
.rec-txt { display: flex; flex-direction: column; min-width: 0; }
.rec-txt a { color: var(--tinta); text-decoration: none; } .rec-txt small { color: var(--tenue); font-size: .83rem; }
.rec-msj { margin-top: .25rem; font-size: .83rem; color: var(--tenue); } .rec-msj summary { cursor: pointer; }
.rec-msj p { margin: .3rem 0 0; padding: .5rem .7rem; background: var(--fondo); border-radius: 8px; color: var(--tinta); }
.rec-acc { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.rec-acc form { margin: 0; }
@media (max-width: 47.99rem) { .rec-fila { grid-template-columns: 2.4rem minmax(0, 1fr); } .rec-acc { grid-column: 2; justify-content: flex-start; } }

/* Historial de cambios */
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { padding: .6rem 0; border-top: 1px solid var(--linea); }
.audit li:first-child { border-top: 0; padding-top: 0; }
.audit-cab { display: flex; flex-direction: column; }
.audit-cab b { font-size: .92rem; } .audit-cab small { color: var(--tenue); font-size: .8rem; }
.audit-tabla { width: 100%; margin-top: .35rem; font-size: .83rem; border-collapse: collapse; table-layout: fixed; }
.audit-tabla th { text-align: left; font-weight: 600; color: var(--tenue); width: 26%; padding: .15rem .4rem .15rem 0; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: .83rem; background: none; border: 0; }
.audit-tabla .antes { width: 34%; }
.audit-tabla td { padding: .15rem .3rem; vertical-align: top; overflow-wrap: anywhere; border: 0; }
.audit-tabla td[aria-hidden] { width: 1.2rem; color: var(--tenue); }
.audit-tabla .antes { color: var(--mal); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--mal) 50%, transparent); }
.audit-tabla .despues { color: var(--ok); font-weight: 600; }
.audit-filtros .p-pb { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .5rem .8rem; align-items: end; }
.audit-filtros label { margin-top: 0; }
.audit-filtros-acc { display: flex; gap: .4rem; }
.audit-plegable { margin-top: 1rem; border-top: 1px solid var(--linea); padding-top: .7rem; }
.audit-plegable summary { cursor: pointer; font-weight: 700; color: var(--tenue); margin-bottom: .5rem; }
.filtro-grupo { margin-top: .7rem; }
.filtro-grupo > span, .filtro-grupo > summary { display: block; font-size: .8rem; font-weight: 700; color: var(--tenue); margin-bottom: .3rem; cursor: pointer; }
.precios-form .p-chips { margin: 0; }
.exp-periodos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); }
.exp-periodos .opcion { justify-content: center; padding: .55rem .6rem; }

/* ---------- Entregas de lotes ---------- */
.entrega-etapas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.entrega-etapa { display: grid; gap: 6px; }
.ee-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ee-barra { height: 10px; border-radius: 99px; background: var(--linea); overflow: hidden; }
.ee-barra span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.entrega-fotos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.entrega-fotos a { display: block; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); }
.entrega-fotos img { width: 100%; height: 100%; object-fit: cover; }
.entrega-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.entrega-dl dt { color: var(--tenue); }
.entrega-dl dd { margin: 0; overflow-wrap: anywhere; }

/* =====================================================================
   Revisión de orden y celular (2026-11-26)
   ===================================================================== */

/* Foco visible con teclado y un solo estilo de botón desactivado o cargando */
:where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; border-radius: 6px; }
.boton:disabled, .btn:disabled, .boton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; filter: none; pointer-events: none; }
.boton.cargando { opacity: .75; cursor: progress; }
.boton.cargando::before { content: ""; width: .85em; height: .85em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girar .7s linear infinite; flex: none; }
@keyframes girar { to { transform: rotate(360deg); } }
.boton:active:not(:disabled) { transform: translateY(1px); }

/* Cabeceras de recuadro a la misma altura, con o sin botón */
.p-ph { min-height: 3.5rem; }

/* Botón de feedback: redondo y discreto; la página deja espacio para que no tape nada */
.fb-boton { width: 2.9rem; height: 2.9rem; padding: 0; justify-content: center; font-size: 1.15rem; opacity: .9; }
.fb-boton .fb-txt { display: none; }
.fb-boton:hover, .fb-boton:focus-visible { width: auto; padding: 0 1rem; opacity: 1; }
.fb-boton:hover .fb-txt, .fb-boton:focus-visible .fb-txt { display: inline; font-size: .85rem; }
@media (min-width: 48rem) { main { padding-bottom: 4.5rem; } }

/* Ficha del CRM: contacto en un grupo, la acción principal aparte */
.acc-contacto { display: flex; gap: .5rem; flex-wrap: wrap; }
.acc-contacto .boton span[aria-hidden] { font-size: 1.05em; }

@media (max-width: 47.99rem) {
  /* Áreas para tocar de al menos 44 px */
  .boton, .btn { min-height: 44px; }
  .boton-chico, .btn-chico { min-height: 40px; position: relative; }
  .boton-chico::after, .btn-chico::after, .p-chip::after { content: ""; position: absolute; inset: -2px 0; }
  .p-chip { min-height: 40px; position: relative; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
  input[type=tel], input[type=search], input[type=url], input:not([type]), select { min-height: 44px; font-size: 16px; }
  textarea { font-size: 16px; }
  .barra-movil button, .barra-movil a { width: 2.75rem; height: 2.75rem; }
  .p-tabs a, .p-tabs button, .tab-btn { min-height: 44px; display: inline-flex; align-items: center; }
  summary { min-height: 44px; }
  .enlace-boton { min-height: 44px; display: inline-flex; align-items: center; }
  .lado a.item { min-height: 44px; }
  .agenda-cerrar select { min-height: 44px; }
  input[type=file] { min-height: 44px; padding: .55rem 0; }

  /* Filtros con muchas opciones: una fila que se desliza (el borde se difumina si hay más) */
  div.p-chips, .cfg-subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-block: 2px; }
  div.p-chips::-webkit-scrollbar, .cfg-subnav::-webkit-scrollbar { display: none; }
  div.p-chips > *, .cfg-subnav > * { flex: none; }

  /* Ficha del CRM: 4 accesos iguales en una fila y la acción principal a lo ancho */
  .crm-acts { width: 100%; display: grid; gap: .5rem; }
  .acc-contacto { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .4rem; }
  .acc-contacto .boton { flex-direction: column; gap: .1rem; padding: .45rem .2rem; font-size: .74rem; min-height: 56px; }
  .acc-contacto .boton span[aria-hidden] { font-size: 1.25rem; line-height: 1; }
  .acc-principal { width: 100%; }

  /* Cabeceras: las acciones ocupan todo el ancho y se reparten parejo */
  .p-top > .p-acts:not(.crm-acts) { width: 100%; }
  .p-top > .p-acts:not(.crm-acts) > .boton, .p-top > .p-acts:not(.crm-acts) > a.boton, .p-top > .p-acts:not(.crm-acts) > form, .p-top > .p-acts:not(.crm-acts) > button { flex: 1 1 auto; }
  .p-top > .p-acts > form > .boton { width: 100%; }
}

/* Agenda: la fecha queda fija arriba mientras se recorre su lista */
.agenda-fecha { position: sticky; top: 0; z-index: 2; background: var(--papel); padding: .45rem 0 .35rem; margin: .6rem 0 0; display: flex; align-items: center; gap: .4rem; }
.agenda-fecha span { background: var(--apagado); color: var(--tenue); border-radius: 999px; padding: 0 .45rem; font-size: .7rem; letter-spacing: 0; }
.agenda-mas { margin-top: .6rem; border-top: 1px solid var(--linea); }
.agenda-mas > summary { cursor: pointer; padding: .7rem 0; font-weight: 700; color: var(--primario); list-style: none; }
.agenda-mas > summary::-webkit-details-marker { display: none; }
.agenda-mas > summary::before { content: "▸ "; }
.agenda-mas[open] > summary::before { content: "▾ "; }
@media (max-width: 47.99rem) { .agenda-fecha { top: calc(3.65rem + env(safe-area-inset-top)); } }

/* App instalable y avisos (menú lateral) */
.lado-app { display: grid; gap: .4rem; margin: .8rem .2rem 0; }
.lado-app:not(:has(button:not([hidden]))) { display: none; }
.lado-app-btn { width: 100%; min-height: 44px; border: 1px dashed var(--lado-borde); background: transparent; color: var(--lado-texto);
  border-radius: 12px; padding: .55rem .7rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; text-align: center; }
.lado-app-btn:hover { background: var(--lado-suave); color: #fff; border-style: solid; }
.pasos-instalar { padding-left: 1.2rem; margin: .3rem 0 1rem; display: grid; gap: .35rem; }

/* Traspasos de la compra */
.traspaso { display: grid; gap: .35rem; padding: .6rem 0; border-top: 1px solid var(--linea); justify-items: start; }
.traspaso:first-child { border-top: 0; padding-top: 0; }
.tr-fila { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tr-fila > span:not(.tr-flecha) { display: flex; flex-direction: column; }
.tr-flecha { font-size: 1.3rem; color: var(--tenue); }
.tr-sub { font-size: .95rem; margin: 1rem 0 .3rem; }
.pago-cab { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.pago-cab > span:first-child { white-space: nowrap; }
@media (max-width: 47.99rem) { table.tabla-tarjetas .pago-cab { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; } }
