:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #f0f1ee;
  --ink: #1d1f1c;
  --ink-2: #4b5049;
  --ink-3: #7a7f77;
  --line: #e2e4df;
  --brand: #0B7A61;
  --brand-ink: #ffffff;
  --brand-soft: #dff3ec;
  --focus: #2f6fde;
  /* estados (siempre acompañados de ícono + texto) */
  --st-fact: #2f6fde;
  --st-fact-bg: #e4ecfc;
  --st-pag: #0a8a0a;
  --st-pag-bg: #e2f4e2;
  --st-conc: #0b6e74;
  --st-conc-bg: #d9f0f0;
  --st-mora: #c73434;
  --st-mora-bg: #fbe5e5;
  --st-pend: #a87200;
  --st-pend-bg: #fdf1d6;
  --st-na: #8a8f87;
  --st-na-bg: #eceeea;
  --st-favor: #2f6fde;
  --chart-accent: #2f6fde;
  --chart-muted: #b9bdb5;
  --chart-grid: #e8eae5;
  --chart-axis: #a3a79f;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --r: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141513; --surface: #1c1e1b; --surface-2: #242622; --ink: #eceee9; --ink-2: #b8bcb4; --ink-3: #8d9289;
    --line: #30332e; --brand: #3cc69a; --brand-ink: #062118; --brand-soft: #1f3129;
    --st-fact: #7aa7ff; --st-fact-bg: #1c2a45; --st-pag: #3fcf3f; --st-pag-bg: #183218; --st-conc: #4fd1d9; --st-conc-bg: #123236;
    --st-mora: #ff7b7b; --st-mora-bg: #3d1d1d; --st-pend: #fab219; --st-pend-bg: #3a2e12;
    --st-na: #8d9289; --st-na-bg: #262825; --st-favor: #7aa7ff; --chart-accent: #7aa7ff; --chart-muted: #5d625a; --chart-grid: #2c2f2a; --chart-axis: #6b7067; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141513; --surface: #1c1e1b; --surface-2: #242622; --ink: #eceee9; --ink-2: #b8bcb4; --ink-3: #8d9289;
  --line: #30332e; --brand: #3cc69a; --brand-ink: #062118; --brand-soft: #1f3129;
  --st-fact: #7aa7ff; --st-fact-bg: #1c2a45; --st-pag: #3fcf3f; --st-pag-bg: #183218; --st-conc: #4fd1d9; --st-conc-bg: #123236;
  --st-mora: #ff7b7b; --st-mora-bg: #3d1d1d; --st-pend: #fab219; --st-pend-bg: #3a2e12;
  --st-na: #8d9289; --st-na-bg: #262825; --st-favor: #7aa7ff; --chart-accent: #7aa7ff; --chart-muted: #5d625a; --chart-grid: #2c2f2a; --chart-axis: #6b7067; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* layout */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.logo .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 10.5px; letter-spacing: -.02em; }
.topbar .sp { flex: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; max-width: 1280px; margin: 0 auto; padding: 0 12px; }
.nav a { padding: 10px 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a.on { color: var(--ink); border-color: var(--brand); }
.nav .badge { margin-left: 6px; }
.navwrap { background: var(--surface); border-bottom: 1px solid var(--line); }
.navwrap .nav.grupos a { font-weight: 600; }
.navwrap .nav.sub { flex-wrap: wrap; }
.navwrap .nav.sub a { font-size: 14px; padding: 8px 12px; }
.navwrap .nav.grupos + .nav.sub { border-top: 1px solid var(--line); background: var(--surface-2); max-width: none; padding-left: max(12px, calc((100% - 1280px) / 2 + 12px)); padding-right: max(12px, calc((100% - 1280px) / 2 + 12px)); }
@media (max-width: 700px) {
  .nav, .navwrap .nav { flex-wrap: wrap; padding: 0 6px; }
  .navwrap .nav a { padding: 8px 9px; }
  .topbar .quien, .topbar .solo-escr { display: none; }
  .topbar .in { padding: 8px 12px; gap: 8px; }
}
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
main.narrow { max-width: 760px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* botones y formularios */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.danger { color: var(--st-mora); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
label.f { display: block; }
label.f > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 9px 11px; }
input[type=file] { padding: 7px; }
textarea { min-height: 70px; resize: vertical; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.err { color: var(--st-mora); font-size: 14px; }
.ok { color: var(--st-pag); font-size: 14px; }

/* estados */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip .ic { font-size: 11px; }
.s-FACTURADO { color: var(--st-fact); background: var(--st-fact-bg); }
.s-PAGADO, .s-CANCELADO, .s-AL-DÍA { color: var(--st-pag); background: var(--st-pag-bg); }
.s-CONCILIADO { color: var(--st-conc); background: var(--st-conc-bg); }
.s-EN-MORA { color: var(--st-mora); background: var(--st-mora-bg); }
.s-PENDIENTE, .s-POR-VENCER, .s-PENDIENTE-PAGO { color: var(--st-pend); background: var(--st-pend-bg); }
.s-A-FAVOR { color: var(--st-favor); background: var(--st-fact-bg); }
.s-POR-ENTREGAR, .s-NA, .s-SIN-TAGS { color: var(--st-na); background: var(--st-na-bg); }
.s-APROBADO { color: var(--st-pag); background: var(--st-pag-bg); }
.s-RECHAZADO { color: var(--st-mora); background: var(--st-mora-bg); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--st-mora); color: #fff; font-size: 12px; font-weight: 700; }

/* KPI */
.kpi { padding: 14px 16px; }
.kpi .l { font-size: 13px; color: var(--ink-2); }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .d { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; } }
.hero .big { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--ink-2); }
.kv .v { text-align: right; font-weight: 600; }
.kv .tot { border-top: 1px solid var(--line); padding-top: 6px; }

/* meses (residente) */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.month { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: var(--surface); position: relative; border-left-width: 4px; }
.month.m-FACTURADO { border-left-color: var(--st-fact); }
.month.m-PAGADO { border-left-color: var(--st-pag); }
.month.m-CONCILIADO { border-left-color: var(--st-conc); }
.month.m-EN-MORA { border-left-color: var(--st-mora); }
.month.m-PENDIENTE { border-left-color: var(--st-pend); }
.month .n { font-weight: 600; font-size: 14px; }
.month .a { font-size: 13px; color: var(--ink-2); margin: 4px 0 6px; }
.month .x { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.month.adel { border-style: dashed; border-left-style: solid; }

/* tablas */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: 70vh; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--ink-2); z-index: 1; white-space: nowrap; }
td.r, th.r { text-align: right; }
td b { white-space: nowrap; }
td.c, th.c { text-align: center; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr.click { cursor: pointer; }
.mcell { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink-2); align-items: center; }

/* barras apiladas por mes */
.stack-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); }
.stack-bar > div { height: 100%; min-width: 0; }
.stack-bar .b-FACTURADO { background: var(--st-fact); }
.stack-bar .b-PAGADO { background: var(--st-pag); }
.stack-bar .b-CONCILIADO { background: var(--st-conc); }
.stack-bar .b-EN-MORA { background: var(--st-mora); }
.stack-bar .b-PENDIENTE { background: var(--st-pend); }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 4px; }

/* panel lateral */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 100%); background: var(--bg); z-index: 41; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer .head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.drawer .body { padding: 16px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; padding: 18px; width: min(460px, 100%); max-height: 90vh; overflow: auto; }

/* comprobantes */
.voucher { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
@media (max-width: 640px) { .voucher { grid-template-columns: 1fr; } }
.voucher .prev { background: var(--surface-2); border-radius: 10px; overflow: hidden; display: grid; place-items: center; min-height: 160px; max-height: 300px; }
.voucher .prev img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; align-content: center; padding: 16px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent 70%); }
.login .card { width: min(400px, 100%); padding: 24px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; font-size: 14px; box-shadow: var(--shadow); }
.note { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.list-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

.row > label.f { min-width: 0; }
@media print {
  .topbar, .nav, .noprint, .btn, form { display: none !important; }
  body, main { background: #fff; color: #000; }
  .tbl-wrap { max-height: none !important; overflow: visible !important; border: 0; }
  th { position: static; }
  .card { box-shadow: none; }
}

/* marca */
.mark-img { border-radius: 8px; object-fit: contain; background: var(--surface-2); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { font-size: 12px; color: var(--ink-3); text-align: center; padding: 4px 0; font-weight: 600; }
.cal-d { min-height: 78px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface); overflow: hidden; }
.cal-d.vacio { border: 0; background: transparent; }
.cal-d.hoy { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-n { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cal-e { font-size: 11px; line-height: 1.25; padding: 1px 4px; border-radius: 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--st-fact-bg); color: var(--st-fact); }
.cal-e.t-VENCIMIENTO { background: var(--st-pend-bg); color: var(--st-pend); }
.cal-e.t-ASAMBLEA, .cal-e.t-REUNION { background: var(--brand-soft); color: var(--brand); }
.cal-e.t-ENCUESTA { background: var(--st-na-bg); color: var(--ink-2); }
@media (max-width: 600px) { .cal-d { min-height: 46px; } .cal-e { font-size: 0; height: 6px; padding: 0; } #agrid { grid-template-columns: 1fr !important; } }
@media (max-width: 900px) { #agrid { grid-template-columns: 1fr !important; } }
/* hilos de solicitudes */
.hilo { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; max-width: 88%; }
.msg.staff { align-self: flex-end; background: var(--brand-soft); }
.msg.interno { background: var(--st-pend-bg); border: 1px dashed var(--st-pend); }
details.sol { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.sol summary { cursor: pointer; }
/* garita */
.g-p { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); align-items: center; }
@media print { .nav, .topbar { display: none !important; } }

.tels { display: flex; flex-direction: column; gap: 2px; }
a.tel { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
a.tel:hover { text-decoration: underline; }

/* Asistente para residentes */
.ayuda-btn { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; }
.ayuda-panel { position: fixed; right: 16px; bottom: 16px; z-index: 41; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 32px rgba(0,0,0,.22); overflow: hidden; }
.ayuda-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.ayuda-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ayuda-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ayuda-msg.bot { background: var(--surface-2); align-self: flex-start; }
.ayuda-msg.yo { background: var(--brand); color: #fff; align-self: flex-end; }
.ayuda-util { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.ayuda-util button { background: none; border: 0; cursor: pointer; font-size: 15px; padding: 0 4px; }
.ayuda-sug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ayuda-sug .chip { cursor: pointer; border: 0; }
.ayuda-form { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.ayuda-form input { flex: 1; }
@media (max-width: 700px) { .ayuda-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 85vh; border-radius: 14px 14px 0 0; } .ayuda-btn span { display: none; } }
@media print { .ayuda-btn, .ayuda-panel { display: none !important; } }

/* Marca AppLicuota */
.isotipo { display: block; flex: none; border-radius: 22%; box-shadow: 0 1px 2px rgba(10, 92, 74, .25); }
.wordmark { font-weight: 750; letter-spacing: -.025em; font-size: 26px; line-height: 1.1; color: var(--ink); }
.wordmark .wm-acc { color: var(--brand); }
.wordmark.sm { font-size: 15px; }
.tb-sep { margin: 0 6px; color: var(--ink-3); font-weight: 400; }
.tb-urb { font-weight: 400; line-height: 1.15; }
.login-brand { display: flex; align-items: center; gap: 14px; margin: 0 auto 18px; }
.login-urb { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.login-pie { text-align: center; margin-top: 16px; }
@media (max-width: 700px) { .tb-wm { display: none; } }

/* Tabla de meses del estado de cuenta */
.meses-tbl td.deb { color: var(--st-mora); font-weight: 600; }
.meses-tbl tr.adel td { background: color-mix(in srgb, var(--st-favor) 7%, transparent); }
.meses-tbl tr[data-mes]:hover td { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.meses-tbl tfoot th { position: sticky; bottom: 0; background: var(--surface-2, var(--surface)); border-top: 2px solid var(--line); font-weight: 700; }
.meses-tbl td, .meses-tbl th { white-space: nowrap; }
.bancof select + input { margin-top: 6px; }
@media (max-width: 900px) { .inq-tbl .opt { display: none; } .meses-tbl .opt { display: none; } .meses-tbl td, .meses-tbl th { padding-left: 6px; padding-right: 6px; } }
.meses-tbl .mc { display: none; }
@media (max-width: 640px) { .meses-tbl .ml { display: none; } .meses-tbl .mc { display: inline; } }
@media (max-width: 640px) { .meses-tbl table { font-size: 12.5px; } .meses-tbl .chip { font-size: 11px; padding: 2px 6px; } .meses-tbl td, .meses-tbl th { padding-left: 4px; padding-right: 4px; } }
/* Censo: propiedad y ocupación */
.sit-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.sit-box .kv { grid-template-columns: max-content 1fr; column-gap: 14px; }
.sit-box .kv > :nth-child(even) { text-align: right; overflow-wrap: anywhere; }

/* Menú en celular: barra "Menú" con la sección actual y panel desplegable agrupado */
.navm { display: none; }
@media (max-width: 760px) {
  .navwrap .nav.grupos, .navwrap .nav.sub { display: none; }
  .navm { display: block; position: relative; }
  .navm-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--surface); border: 0; border-bottom: 1px solid var(--line);
    font: inherit; color: var(--ink); text-align: left; cursor: pointer; min-height: 48px; }
  .navm-ico { font-size: 18px; line-height: 1; }
  .navm-act { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .navm-car { color: var(--ink-3); transition: transform .15s; }
  .navm-btn[aria-expanded="true"] .navm-car { transform: rotate(180deg); }
  .navm-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.12); padding: 6px 12px 14px; max-height: calc(100vh - 120px); overflow-y: auto; }
  .navm-g { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .navm-g:last-child { border-bottom: 0; }
  .navm-gt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; margin: 2px 4px 6px; }
  .navm-ls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .navm-ls a { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
    color: var(--ink); background: var(--surface-2); font-size: 14px; min-height: 44px; }
  .navm-ls a.on { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); font-weight: 600; }
}

/* Encabezado compacto en pantallas pequeñas */
.topbar .btn { white-space: nowrap; }
.topbar .logo { min-width: 0; }
.topbar .logo > div { min-width: 0; }
.tb-urb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .topbar .logo { flex: 1; }
  .topbar .sp { display: none; }
  .topbar .btn.sm { padding: 6px 10px; }
}

/* Selector de urbanización (app.applicuota.com) */
.sel-urb { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 56px; }
.sel-urb:hover, .sel-urb:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.sel-urb > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sel-urb > span:last-child { color: var(--ink-3); font-size: 22px; }
.sel-urb[aria-disabled="true"] { opacity: .6; }
.sel-urb img, .sel-ini { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; flex: none; }
.sel-ini { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.aviso-prueba { background: var(--st-pend-bg); color: var(--ink); font-size: 14px; text-align: center; padding: 6px 12px; }

/* Tablas que en el celular se muestran como fichas (módulo de inquilinos) */
@media (max-width: 600px) {
  .tbl-stack { overflow: visible; border: 0; background: none; }
  .tbl-stack table, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack thead { display: none; }
  .tbl-stack tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface); }
  .tbl-stack td { border: 0 !important; padding: 3px 0 !important; max-width: none !important; white-space: normal !important; }
  .tbl-stack td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-2); font-size: 12px; }
  .tbl-stack td:last-child { padding-top: 6px !important; }
}
