/* ==========================================================================
   recursos/soluciones-ui.css — diseño de ResWeb (copia propia del diseño de la familia de sitios).
   Lenguaje de app moderna (barra superior con blur, "posts", botones pastilla,
   campos con etiqueta flotante, navegación lateral en escritorio y pestañas
   abajo en el celular). Claro/oscuro: sigue al sistema y se puede forzar con
   el botón de la barra (html[data-tema]).
   ========================================================================== */

:root {
  --brand: #1cbb9b;
  --brand-btn: #0e8f75;
  --brand-btn-hover: #0b7a63;
  --on-brand: #ffffff;
  --brand-soft: rgba(28, 187, 155, .14);
  --link: #0b7f68;
  --bg: #ffffff;
  --bg-2: #f7f9f9;
  --line: #eff3f4;
  --line-2: #cfd9de;
  --text: #0f1419;
  --muted: #536471;
  --bar: rgba(255, 255, 255, .86);
  --danger: #d4121f;
  --danger-soft: rgba(244, 33, 46, .1);
  --ok: #08794f;
  --ok-soft: rgba(0, 186, 124, .14);
  --warn: #8a5a00;
  --warn-soft: rgba(255, 173, 31, .2);
  --info: #1a6aa8;
  --info-soft: rgba(29, 155, 240, .12);
  --overlay: rgba(91, 112, 131, .4);
  --sombra: 0 8px 30px rgba(0, 0, 0, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="light"]) {
    --brand: #2dd1b0;
    --brand-btn: #2dd1b0;
    --brand-btn-hover: #5fe0c5;
    --on-brand: #03140f;
    --brand-soft: rgba(45, 209, 176, .16);
    --link: #4de0c3;
    --bg: #000000;
    --bg-2: #16181c;
    --line: #2f3336;
    --line-2: #3e4348;
    --text: #e7e9ea;
    --muted: #8b949b;
    --bar: rgba(0, 0, 0, .72);
    --danger: #ff6b75;
    --danger-soft: rgba(244, 33, 46, .18);
    --ok: #3ddc97;
    --ok-soft: rgba(0, 186, 124, .18);
    --warn: #ffcf66;
    --warn-soft: rgba(255, 173, 31, .18);
    --info: #6cc0f5;
    --info-soft: rgba(29, 155, 240, .18);
    --sombra: 0 8px 30px rgba(255, 255, 255, .08);
    color-scheme: dark;
  }
}

:root[data-tema="dark"] {
  --brand: #2dd1b0;
  --brand-btn: #2dd1b0;
  --brand-btn-hover: #5fe0c5;
  --on-brand: #03140f;
  --brand-soft: rgba(45, 209, 176, .16);
  --link: #4de0c3;
  --bg: #000000;
  --bg-2: #16181c;
  --line: #2f3336;
  --line-2: #3e4348;
  --text: #e7e9ea;
  --muted: #8b949b;
  --bar: rgba(0, 0, 0, .72);
  --danger: #ff6b75;
  --danger-soft: rgba(244, 33, 46, .18);
  --ok: #3ddc97;
  --ok-soft: rgba(0, 186, 124, .18);
  --warn: #ffcf66;
  --warn-soft: rgba(255, 173, 31, .18);
  --info: #6cc0f5;
  --info-soft: rgba(29, 155, 240, .18);
  --sombra: 0 8px 30px rgba(255, 255, 255, .08);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--link); }
button, input, select, textarea { font-family: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 18px; height: 18px; }

/* ---------- barra superior ---------- */
.appbar {
  position: sticky; top: 0; z-index: 35;
  display: flex; align-items: center; gap: 6px;
  height: 56px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.appbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bar); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand small { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 2px; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 9999px; }
.brand-texto { font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--text); white-space: nowrap; }
.brand-texto b { color: var(--brand); font-weight: 800; }
.espacio { flex: 1; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-2); }
.tema-sol { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="light"]) .tema-sol { display: block; }
  :root:not([data-tema="light"]) .tema-luna { display: none; }
}
:root[data-tema="dark"] .tema-sol { display: block; }
:root[data-tema="dark"] .tema-luna { display: none; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--av, var(--brand-btn)); color: #fff;
  font-weight: 800; font-size: 17px; text-transform: uppercase; user-select: none;
}
.avatar-lg { width: 72px; height: 72px; font-size: 30px; }
.avatar-md { width: 48px; height: 48px; font-size: 20px; }

/* ---------- menú desplegable ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: inline-grid; border-radius: 50%; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-lista {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px;
  padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra);
}
.menu-lista form { margin: 0; }
.menu-lista .menu-cab { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-lista .menu-cab strong { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border: 0; border-radius: 10px; background: none; color: var(--text);
  font: 600 15px var(--font); text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--bg-2); }
.menu-item.peligro { color: var(--danger); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 20px; border: 1px solid transparent; border-radius: 9999px;
  font: 700 15px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--brand-btn); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-btn-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-outline:hover { background: var(--bg-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-outline-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; color: var(--link); padding: 0 12px; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-lg { min-height: 50px; font-size: 16px; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.btn.cargando { pointer-events: none; opacity: .75; }
.btn.cargando::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: giro .7s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- campos con etiqueta flotante ---------- */
.field { position: relative; margin-bottom: 16px; }
.field input, .field select {
  width: 100%; height: 56px; padding: 22px 14px 6px; border: 1px solid var(--line-2); border-radius: 8px;
  background: transparent; color: var(--text); font-size: 16px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.field label {
  position: absolute; left: 15px; top: 17px; color: var(--muted); font-size: 16px; line-height: 1.2;
  pointer-events: none; transition: top .12s, font-size .12s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input:-webkit-autofill + label { top: 8px; font-size: 12px; }
.field input:focus + label { color: var(--link); }
.field .ver-clave { position: absolute; right: 6px; top: 8px; }
.field.con-ojo input { padding-right: 52px; }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 18px; }
.opcion { position: relative; display: block; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opcion span { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; font-weight: 700; text-align: center; line-height: 1.25; }
.opcion input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); color: var(--link); }
.opcion input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pago { margin: 0 0 16px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2); white-space: pre-line; overflow-wrap: anywhere; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 44px; }
.field.con-select::after { content: ""; position: absolute; right: 20px; top: 24px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.field select + label, .field.flotante label { top: 8px; font-size: 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 6px 0; margin: 0 0 12px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brand-btn); }
.field-ayuda { margin: -8px 0 14px; font-size: 13px; color: var(--muted); }
.honeypot { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- avisos ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.notice .ic { margin-top: 1px; }
.notice-cuerpo { flex: 1; min-width: 0; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-info { background: var(--info-soft); color: var(--info); }
.notice-aviso { background: var(--warn-soft); color: var(--warn); }
.notice .cerrar { margin: -6px -8px 0 0; width: 32px; height: 32px; color: inherit; }
.cred { margin-top: 10px; display: grid; gap: 8px; }
.cred-fila { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.cred-fila span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; min-width: 104px; }
.cred-fila code { flex: 1; min-width: 0; font: 600 15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; color: var(--text); }

/* ---------- pantallas de acceso (login, registro...) ---------- */
.auth { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 24px 16px 40px; }
.auth-card { width: 100%; max-width: 440px; }
.auth.auth-sola { min-height: 100vh; } /* pantalla de ingreso sola, sin barra superior */
.auth-card h1 { font-size: 31px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; font-size: 15px; }
.auth-card .ayuda-fila { display: flex; justify-content: flex-end; margin: -6px 0 18px; font-size: 14px; }
.auth-card .pie { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.separador { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font-size: 14px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hecho { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 12px 0 4px; }
.hecho-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.hecho-ico .ic { width: 30px; height: 30px; stroke-width: 2.6; }
.beneficios { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.beneficios li { display: flex; gap: 10px; align-items: center; }
.beneficios .ic { color: var(--brand); width: 18px; height: 18px; }

/* ---------- estructura tipo app: navegación + columna ---------- */
.layout { display: grid; grid-template-columns: 190px minmax(0, 640px); justify-content: center; max-width: 860px; margin: 0 auto; }
.layout.ancho { grid-template-columns: 190px minmax(0, 1fr); max-width: 1200px; }
.rail { position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.rail a, .rail button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 9999px;
  background: none; color: var(--text); font: 500 15px var(--font); text-decoration: none; cursor: pointer; text-align: left;
}
.rail a:hover, .rail button:hover { background: var(--bg-2); }
.rail .activo { font-weight: 800; }
.rail form { margin: 0; }
.rail .insignia, .tabbar .insignia {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 9999px; background: var(--brand-btn); color: var(--on-brand);
  font: 700 12px/20px var(--font); text-align: center;
}
.col { min-width: 0; min-height: calc(100vh - 56px); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.col-cab {
  position: sticky; top: 56px; z-index: 10; padding: 9px 14px; background: var(--bar);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 800; letter-spacing: -.01em;
}
.col-cuerpo { padding: 12px 14px; }
.col-cuerpo > .notice:first-child { margin-top: 0; }
.seccion-titulo { padding: 16px 16px 0; font-size: 17px; font-weight: 800; }
.tabbar { display: none; }

/* ---------- posts (productos) y filas de lista ---------- */
.post { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.post:hover { background: var(--bg-2); }
.post-cuerpo { flex: 1; min-width: 0; }
.post-cab { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.post-nombre { font-weight: 800; font-size: 16px; }
.post-meta { color: var(--muted); font-size: 14px; }
.post-texto { margin: 4px 0 10px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 9999px; background: var(--brand-soft); color: var(--link); font-size: 13px; font-weight: 700; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-error { background: var(--danger-soft); color: var(--danger); }
.chip-aviso { background: var(--warn-soft); color: var(--warn); }
.chip-gris { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
details.mas { margin: 0 0 12px; }
details.mas > summary { display: inline-block; padding: 12px 0; cursor: pointer; color: var(--link); font-weight: 700; font-size: 14px; list-style: none; }
details.mas > summary::-webkit-details-marker { display: none; }
details.mas[open] > summary { margin-bottom: 6px; }
details.mas p { color: var(--muted); line-height: 1.5; }
.acciones { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.archivo { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.fila { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fila:hover { background: var(--bg-2); }
.fila-texto { flex: 1; min-width: 0; }
.fila-texto strong, .fila-texto span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-texto span { color: var(--muted); font-size: 14px; }
.fila-apilada .fila-texto strong, .fila-apilada .fila-texto span { white-space: normal; overflow-wrap: anywhere; }
.fila-acciones { display: flex; align-items: center; gap: 8px; flex: none; }
.vacio { display: grid; justify-items: center; gap: 8px; padding: 44px 16px; text-align: center; color: var(--muted); }
.vacio .ic { width: 34px; height: 34px; }
.buscador { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.buscador .ic { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.buscador input { width: 100%; height: 40px; padding: 0 16px 0 40px; border: 0; border-radius: 9999px; background: var(--bg-2); color: var(--text); font-size: 16px; }
.buscador input:focus { outline: 2px solid var(--brand); }
.compositor { padding: 16px; border-bottom: 1px solid var(--line); }
.compositor .acciones { margin-top: 4px; }
.perfil { display: flex; align-items: center; gap: 16px; padding: 20px 16px; border-bottom: 1px solid var(--line); }
.perfil h2 { font-size: 20px; font-weight: 800; }

/* ---------- ventanas (diálogos) ---------- */
dialog.dlg { width: min(92vw, 420px); padding: 24px; border: 0; border-radius: 18px; background: var(--bg); color: var(--text); box-shadow: var(--sombra); }
dialog.dlg::backdrop { background: var(--overlay); }
dialog.dlg h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
dialog.dlg .dlg-texto { color: var(--muted); margin-bottom: 18px; }
dialog.dlg form { margin: 0; }
.dlg-acc { display: grid; gap: 10px; margin-top: 6px; }

/* ---------- móvil: pestañas abajo, sin navegación lateral ---------- */
@media (max-width: 899px) {
  .layout, .layout.ancho { display: block; max-width: none; }
  .rail { display: none; }
  .col { border: 0; min-height: 0; }
  body.con-pestanas { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding-bottom: env(safe-area-inset-bottom); background: var(--bar);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    position: relative; flex: 1; display: grid; place-items: center; align-content: center; gap: 3px; height: 58px; border: 0; background: none;
    color: var(--muted); font: 600 11px var(--font); text-decoration: none; cursor: pointer;
  }
  .tabbar .activo { color: var(--text); }
  .tabbar form { flex: 1; margin: 0; display: flex; }
  /* filas con botones (solicitudes): en el celular los botones van debajo del texto */
  .fila-apilada { flex-wrap: wrap; }
  .fila-apilada .fila-acciones { flex-basis: 100%; padding-left: 52px; }
  .tabbar .insignia { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 18px; font-size: 11px; line-height: 18px; padding: 0 5px; }
  .auth { padding-top: 12px; }
  .btn-sm { min-height: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .field-ayuda { margin-top: -6px; }
  details.menu[open]::before { content: ""; position: fixed; inset: 0; z-index: 50; background: var(--overlay); }
  .menu-lista {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; min-width: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 20px 20px 0 0;
  }
  .menu-item { padding: 14px; font-size: 16px; }
  .menu-lista .menu-cab { padding: 10px 14px 12px; }
  dialog.dlg { width: 100%; max-width: none; margin: auto 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; max-height: 92vh; }
  .auth-card h1 { font-size: 27px; }
  .brand small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: .01ms !important; }
}

/* ---------- pantallas anchas (tablas del ABM) ---------- */
body.tabla-ancha .layout.ancho { max-width: 1400px; }

/* ---------- ABM de alquileres (ResWeb) ---------- */
.abm-titulo { font-size: 16px; font-weight: 800; margin: 10px 0 6px; }
.abm-titulo:first-child { margin-top: 4px; }
.abm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); column-gap: 14px; }
.abm-form .abm-acciones { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.abm-metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.abm-metrica { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.abm-metrica h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.abm-metrica div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 15px; }
.abm-metrica div span { color: var(--muted); }
.abm-metrica .balance { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 7px; font-size: 17px; }
.abm-metrica .balance.neg b { color: var(--danger); }
.abm-metrica.ancha { grid-column: span 2; }
.abm-faltan { margin-top: 4px; font-size: 12px; }
.ayuda-movil { margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: var(--bg-2); color: var(--muted); font-size: 13px; line-height: 1.35; }
.abm-tabla.compacta td.verif { white-space: normal; max-width: 360px; }
.verif-aviso { color: var(--danger); font-size: 12.5px; padding: 1px 0; }
.verif-aviso .btn { padding: 0 8px; min-height: 22px; font-size: 11.5px; }
/* gráficos (motor/graficos.php) */
.graf-filtros { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 8px; }
.graf-combo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.graf-combo input { height: 34px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; }
.graf-combo select { height: 34px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; }
.graf-grilla { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.graf { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.graf figcaption { font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.graf-svg { width: 100%; height: auto; display: block; }
.graf-torta { max-width: 220px; margin: 0 auto; }
.graf-guia { stroke: var(--line); stroke-width: 1; }
.graf-diagonal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.graf-grilla.graf-ancha { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.graf-txt { fill: var(--muted); font-size: 11px; }
.graf-leyenda { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.graf-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
@media (max-width: 899px) { .graf-grilla { grid-template-columns: minmax(0, 1fr); } }
.abm-estados { width: 100%; border-collapse: collapse; font-size: 14px; }
.abm-estados td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.abm-estados td:first-child { color: var(--muted); }
.abm-estados .der { text-align: right; white-space: nowrap; }
.abm-estados tr.total td { border-bottom: 0; font-weight: 700; }
@media (max-width: 650px) { .abm-metrica.ancha { grid-column: auto; } }
.abm-tabla { overflow-x: auto; margin: 0 -4px 12px; }
.abm-tabla table { width: 100%; border-collapse: collapse; font-size: 14px; }
.abm-tabla th { padding: 9px 10px; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.abm-tabla td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.abm-tabla .der { text-align: right; white-space: nowrap; }
.abm-tabla .acc { white-space: nowrap; text-align: right; }
.abm-tabla tbody tr:hover td { background: var(--bg-2); }
form.en-linea { display: inline; }
.abm-borrar { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--danger); cursor: pointer; }
.abm-borrar:hover { background: var(--danger-soft); }
.abm-borrar .ic-sm { width: 14px; height: 14px; }
.abm-imprimir { float: right; margin: 0 0 6px 10px; }
.solo-impresion { display: none; }
.abm-mes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.abm-calendario { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.abm-calendario .dia { border: 1px solid var(--line); border-radius: 8px; min-height: 84px; padding: 5px; overflow-wrap: anywhere; font-size: 13px; }
.abm-calendario .dia.nombre { min-height: 0; text-align: center; font-weight: 800; font-size: 12px; background: var(--bg-2); }
.abm-calendario .dia.vacio-dia { border-color: transparent; }
.abm-calendario .evento { margin-top: 4px; padding: 4px 5px; border-radius: 5px; font-size: 11px; line-height: 1.3; }
.abm-calendario .evento.p0, .abm-prop.p0, .agenda-item.p0 { background: rgba(36, 91, 136, .16); }
.abm-calendario .evento.p1, .abm-prop.p1, .agenda-item.p1 { background: rgba(255, 150, 40, .24); }
.abm-calendario .evento.p2, .abm-prop.p2, .agenda-item.p2 { background: rgba(60, 170, 110, .22); }
.abm-calendario .evento.p3, .abm-prop.p3, .agenda-item.p3 { background: rgba(170, 90, 200, .20); }
.abm-calendario .evento.p4, .abm-prop.p4, .agenda-item.p4 { background: rgba(220, 70, 90, .18); }
.abm-calendario .evento.p5, .abm-prop.p5, .agenda-item.p5 { background: rgba(210, 180, 30, .26); }
.abm-calendario .evento.p-otra, .agenda-item.p-otra { background: var(--bg-2); border: 1px dashed var(--line-2); }
.abm-props, .abm-leyenda { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.abm-prop { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 14px; font-weight: 600; }
.abm-leyenda .abm-prop { padding: 4px 12px; }
.abm-prop .icon-btn { width: 24px; height: 24px; }
.abm-agregar { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.abm-agregar .field { flex: 1 1 220px; margin-bottom: 0; }
/* formularios compactos en grilla de 12 columnas (cX = ancho) */
.abm-grilla { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; }
.abm-grilla > div { grid-column: span 3; min-width: 0; }
.abm-grilla > .c1 { grid-column: span 1; } .abm-grilla > .c2 { grid-column: span 2; } .abm-grilla > .c3 { grid-column: span 3; }
.abm-grilla > .c4 { grid-column: span 4; } .abm-grilla > .c5 { grid-column: span 5; } .abm-grilla > .c7 { grid-column: span 7; } .abm-grilla > .c9 { grid-column: span 9; }
.abm-grilla > .abm-acciones { grid-column: 1 / -1; }
.abm-grilla > .c12 { grid-column: 1 / -1; }
.abm-grilla > .c6 { grid-column: span 6; }
.ocu-anio { align-self: center; font-weight: 800; padding-bottom: 10px; }
.abm-grilla .field textarea { width: 100%; min-height: 96px; padding: 20px 9px 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 14px; resize: vertical; }
.abm-grilla .field textarea + label { top: 4px; font-size: 11px; }

/* mensajes e intranet */
.msj-ventana { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: var(--overlay); }
.msj-caja { width: min(96vw, 560px); max-height: 86vh; overflow: auto; padding: 18px; border-radius: 16px; background: var(--bg); box-shadow: var(--sombra); }
.msj-caja h3 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.msj-item { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.msj-meta { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.msj-botones { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.msj-cadena { margin: 6px 0 14px; padding-left: 12px; border-left: 3px solid var(--line-2); }
.intra-archivo { width: 100%; padding: 10px 0; font-size: 14px; }
.msj-caja.ancha { width: min(96vw, 900px); }
.msj-caja h4 { font-size: 14px; font-weight: 800; margin: 12px 0 6px; }
.msj-caja > .btn { margin-top: 12px; }
.abm-subtitulo { font-size: 14px; font-weight: 800; margin: 12px 0 6px; color: var(--muted); }
.abm-tabla tr[data-detalle], .abm-calendario .evento[data-detalle], .agenda-item[data-detalle] { cursor: zoom-in; }
.msj-caja .abm-estados td:last-child { text-align: left; overflow-wrap: anywhere; }
.abm-props-tabla { max-width: 560px; }
.abm-valor { display: inline-flex; gap: 6px; align-items: center; }
.abm-valor input { width: 120px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); text-align: right; font-size: 14px; }
.abm-grilla .field { margin-bottom: 6px; }
.abm-grilla .field input, .abm-grilla .field select { height: 38px; padding: 14px 8px 1px; font-size: 14px; text-overflow: ellipsis; }
.abm-grilla .field select { padding-right: 24px; }
.abm-grilla .field.con-select::after { right: 10px; top: 15px; width: 6px; height: 6px; }
.abm-grilla .field label { left: 9px; top: 10px; font-size: 14px; max-width: calc(100% - 16px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.abm-grilla .field input:focus + label, .abm-grilla .field input:not(:placeholder-shown) + label,
.abm-grilla .field select + label, .abm-grilla .field.flotante label { top: 2px; font-size: 10.5px; }
.abm-filtros { padding: 6px 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); margin-bottom: 6px; }
.abm-suma { position: sticky; top: 56px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 7px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.abm-suma.activa { background: var(--brand-soft); font-weight: 700; }
.abm-tabla.compacta table { font-size: 13px; }
.abm-tabla.compacta th, .abm-tabla.compacta td { padding: 2px 6px; line-height: 1.35; }
.abm-tabla.compacta td { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* lo completo se ve al pasar el mouse (alquileres.js) */
.abm-tabla.compacta .fecha { white-space: nowrap; }
.abm-tabla .sel { width: 28px; padding-right: 0; }
.abm-tabla .sel input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand-btn); }
.abm-tabla tr[data-editar] { cursor: pointer; user-select: none; }
.abm-tip { position: fixed; z-index: 60; max-width: min(520px, 90vw); padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text); box-shadow: var(--sombra); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.abm-tip button { margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 9999px; background: var(--bg-2); color: var(--text); font-size: 12px; cursor: pointer; }
.abm-tabla th[data-ordenar] { cursor: pointer; user-select: none; white-space: nowrap; }
.abm-tabla th[data-ordenar]::after { content: " ↕"; opacity: .35; font-size: 11px; }
.abm-tabla th[aria-sort="ascending"]::after { content: " ▲"; opacity: .8; }
.abm-tabla th[aria-sort="descending"]::after { content: " ▼"; opacity: .8; }
.abm-tabla tr.total td { border-top: 2px solid var(--line-2); font-weight: 800; }
.abm-tabla td.neg { color: var(--danger); }
@media (max-width: 900px) {
  .abm-grilla > div, .abm-grilla > .c1, .abm-grilla > .c2, .abm-grilla > .c3 { grid-column: span 6; }
  .abm-grilla > .c4, .abm-grilla > .c5 { grid-column: span 12; }
  .abm-grilla > .c6, .abm-grilla > .c7, .abm-grilla > .c9 { display: none; }
}
/* ---------- ResWeb responsive (mobile-first en el ABM: body.con-menu) ---------- */
body.con-menu { --nav-fondo: #0c2d48; --nav-texto: #d6e6f5; --nav-activo: #1cbb9b; }
body.con-menu .rail { background: var(--nav-fondo); }
body.con-menu .rail a, body.con-menu .rail button { color: var(--nav-texto); }
body.con-menu .rail a:hover, body.con-menu .rail button:hover { background: rgba(255, 255, 255, .08); }
body.con-menu .rail .activo { background: var(--nav-activo); color: #fff; }
.btn-menu { display: none; }
.estado { display: inline-block; padding: 1px 8px; border-radius: 9999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.e-pend { background: #faeeda; color: #633806; }
.e-sena { background: #e1f5ee; color: #085041; }
.e-conf { background: #e6f1fb; color: #0c447c; }
.e-term { background: #f1efe8; color: #444441; }
.e-canc { background: #fcebeb; color: #791f1f; }
.e-anual { background: #eeedfe; color: #3c3489; }
.abm-calendario .evento.salida { opacity: .7; border-style: dashed; }
.abm-total-mes { margin: 6px 0; font-size: 15px; }
.abm-titulo-cambio { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.abm-cambios { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.txt-movil { display: none; }
.abm-plegable { margin-bottom: 6px; }
.abm-plegable > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; font-size: 14px; border: 1px solid var(--line-2); border-radius: 9999px; cursor: pointer; font-weight: 700; list-style: none; }
.abm-plegable > summary::-webkit-details-marker { display: none; }
.abm-plegable[open] > summary { margin-bottom: 6px; }
.cal-vistas { margin-bottom: 8px; }
.cal-vistas [aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); }
.abm-agenda { display: none; gap: 8px; margin-bottom: 12px; }
.agenda-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.agenda-item > div { color: var(--text); }
.agenda-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal-ver-agenda .abm-agenda { display: grid; }
.cal-ver-agenda .abm-calendario { display: none; }
@media (max-width: 899px) {
  body.con-menu { padding-bottom: 0; }
  body.con-menu .tabbar { display: none; }
  body.con-menu .btn-menu { display: inline-grid; place-items: center; }
  body.con-menu .rail { display: flex; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 40; width: 260px; height: auto; overflow-y: auto; transform: translateX(-100%); transition: transform .2s; }
  body.con-menu.menu-abierto .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  body.con-menu .rail a, body.con-menu .rail button { min-height: 48px; }
}
@media (max-width: 650px) {
  body.con-menu .col-cuerpo { padding: 10px; }
  .abm-grilla > div, .abm-grilla > [class^="c"] { grid-column: 1 / -1 !important; }
  .abm-grilla > .c6, .abm-grilla > .c7, .abm-grilla > .c9 { display: none; }
  .abm-grilla .field input, .abm-grilla .field select, .abm-grilla .field textarea { font-size: 16px; height: 50px; }
  .abm-grilla .field textarea { height: auto; }
  .abm-acciones .btn, .abm-imprimir .btn, .cal-vistas .btn, .abm-mes .btn { min-height: 44px; }
  .abm-plegable > summary { min-height: 44px; padding: 0 16px; }
  .txt-movil { display: inline; }
  .txt-ancho { display: none; }
  .abm-filtros { padding: 8px 8px 2px; }
  .abm-grilla .field { margin-bottom: 8px; }
  .abm-grilla .field label { top: 15px; }
  .abm-grilla .field input:focus + label, .abm-grilla .field input:not(:placeholder-shown) + label, .abm-grilla .field select + label, .abm-grilla .field.flotante label { top: 4px; font-size: 11px; }
  .abm-grilla .field input, .abm-grilla .field select { padding: 18px 10px 2px; }
  .abm-tabla.compacta td { line-height: 1.4; }
  .abm-tabla .sel input { width: 22px; height: 22px; }
  .abm-borrar { width: 44px; height: 44px; }
  .abm-imprimir { float: none; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .abm-agenda { display: grid; }
  .abm-calendario { display: none; }
  .cal-ver-mes .abm-agenda { display: none; }
  .cal-ver-mes .abm-calendario { display: grid; }
  /* listados como tarjetas: cada fila es una tarjeta y cada dato lleva su título (data-label, lo pone alquileres.js) */
  .abm-tabla.compacta { overflow: visible; border: 0; }
  .abm-tabla.compacta table, .abm-tabla.compacta tbody, .abm-tabla.compacta tr, .abm-tabla.compacta td { display: block; width: 100%; }
  .abm-tabla.compacta thead { display: none; }
  .abm-tabla.compacta tr { position: relative; margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
  .abm-tabla.compacta td { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border: 0; text-align: right; max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .abm-tabla.compacta td::before { content: attr(data-label); color: var(--muted); font-weight: 600; text-align: left; }
  .abm-tabla.compacta td.sel { position: absolute; top: 8px; left: 10px; width: auto; }
  .abm-tabla.compacta td.sel::before, .abm-tabla.compacta td.acc::before { content: none; }
  .abm-tabla.compacta td.sel + td { padding-left: 30px; }
  .abm-tabla.compacta td.acc { justify-content: flex-end; }
  .abm-tabla.compacta td:empty { display: none; }
  .abm-tabla.compacta tr.total { background: var(--bg-2); }
}

/* sin desbordes en pantallas chicas y medianas */
.abm-metricas > * { min-width: 0; }
.abm-metrica div { flex-wrap: wrap; overflow-wrap: anywhere; }
.abm-calendario .estado { white-space: normal; font-size: 10px; padding: 0 5px; }
@media (min-width: 651px) and (max-width: 899px) {
  .abm-tabla.compacta td { max-width: none; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 650px) {
  .abm-borrar .ic-sm { width: 19px; height: 19px; }
}

/* impresión: solo el contenido (sin menús, formularios ni botones) */
@media print {
  .appbar, .rail, .tabbar, .col-cab, .abm-form, .graf-filtros, .abm-plegable, .cal-vistas, .abm-agenda, .abm-imprimir, .msj-ventana, .notice, .abm-agregar, .abm-props form .icon-btn, .abm-mes .btn, .abm-tabla .sel, .abm-tabla .acc, dialog { display: none !important; }
  .layout, .layout.ancho { display: block; max-width: none; }
  .col { border: 0; min-height: 0; }
  .col-cuerpo { padding: 0; }
  body { background: #fff; color: #000; font-size: 11px; }
  .solo-impresion { display: block; margin-bottom: 6px; }
  .abm-suma { position: static; }
  .abm-tabla { overflow: visible; }
  .abm-tabla table { font-size: 10.5px; }
  .abm-tabla tr { break-inside: avoid; }
  .abm-calendario .dia { min-height: 70px; break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 650px) { .abm-calendario .dia { min-height: 80px; padding: 3px; } .abm-calendario .evento { font-size: 9.5px; padding: 3px; } }
