/* =========================================================
   ALQUILEXPRO - Sistema de diseño
   Identidad: azul marino y verde del logo; el ámbar indica avisos y pendientes
   ========================================================= */

:root {
  --content-max: 1360px;
  --content-narrow: 980px;
  /* Marca (tomada del logo): azul marino #384989 + verde #87B24B */
  --brand:        #384989;
  --brand-dark:   #27336A;
  --brand-light:  #E9ECF7;
  --brand-2:      #87B24B;   /* verde del logo */
  --brand-2-dark: #4F7A1F;   /* verde oscuro: texto legible sobre fondo claro */
  --brand-2-light:#EEF5E4;
  --accent:       #87B24B;   /* el día 5 usa el verde de marca */
  --accent-dark:  #4F7A1F;
  --accent-light: #EEF5E4;

  --ink:          #141A33;
  --ink-soft:     #454D6B;
  --muted:        #7A8199;
  --line:         #E3E6EF;
  --line-soft:    #EEF0F6;

  --bg:           #F4F6FB;
  --surface:      #FFFFFF;
  --sidebar-bg:   #111836;
  --sidebar-line: #222B52;
  --sidebar-txt:  #A9B1D1;
  --sidebar-active: #384989;

  --green:  #4C8A26;
  --amber:  #E8A317;
  --red:    #D1433A;
  --blue:   #2F6FD1;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow:    0 1px 2px rgba(17,24,54,.05), 0 6px 20px rgba(17,24,54,.06);
  --shadow-lg: 0 12px 40px rgba(17,24,54,.14);
  --ring:      0 0 0 3px rgba(56,73,137,.22);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout principal ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 244px;
  background: var(--sidebar-bg);
  color: var(--sidebar-txt);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 40;
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--sidebar-line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.sidebar-brand .name { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.3px; }
.sidebar-brand .name b { color: var(--accent); font-weight: 700; }

.sidebar-nav { padding: 12px 12px; flex: 1; overflow-y: auto; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: #5C736B; padding: 14px 12px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-txt); font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px; transition: background .12s, color .12s;
}
.nav-item:hover { background: #142A23; color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item i { font-size: 18px; width: 20px; text-align: center; }

.sidebar-foot {
  padding: 14px 16px; border-top: 1px solid var(--sidebar-line);
  font-size: 11px; color: #5C736B;
}

/* ---------- Contenido ---------- */
.main { flex: 1; margin-left: 244px; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  max-width: var(--content-max); margin-inline: auto;
  padding: 0 28px; height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sidebarToggle { display: none; font-size: 20px; }
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.topbar-user .meta { text-align: right; line-height: 1.25; }
.topbar-user .meta .n { font-weight: 600; font-size: 13px; }
.topbar-user .meta .r { font-size: 11px; color: var(--muted); text-transform: capitalize; }

.content { padding: 26px 28px 40px; width: 100%; max-width: var(--content-max); margin-inline: auto; display: block; }
.content-narrow { max-width: var(--content-narrow); }

/* ---------- Tarjetas métricas ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; margin-bottom: 22px; }
.metric {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.metric .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-weight: 500; }
.metric .label i { font-size: 15px; }
.metric .value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.metric .sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.metric.accent { border-color: var(--accent); background: var(--accent-light); }
.metric.accent .value { color: var(--accent-dark); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.card-head {
  padding: 15px 20px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head h2 i { color: var(--brand); font-size: 18px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 6px 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: all .12s; text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn i { font-size: 17px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #17290A; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #F0CFCD; background: #FCF3F2; }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
}
.badge.green  { background: #E1F5EE; color: #0F6E56; }
.badge.amber  { background: #FBF1DC; color: #B8810F; }
.badge.red    { background: #FBE9E7; color: #C0392B; }
.badge.blue   { background: #E4F0FB; color: #1F6BB3; }
.badge.gray   { background: #EEF1F0; color: #5F6E68; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 13.5px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: border .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,110,86,.1);
}
.field textarea { resize: vertical; min-height: 78px; }
.field .hint { font-size: 11px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* ---------- Flash ---------- */
.flash {
  padding: 12px 18px; border-radius: var(--radius); margin-bottom: 18px;
  font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 9px;
  border: 1px solid transparent;
}
.flash i { font-size: 18px; }
.flash.success { background: #E1F5EE; color: #0F6E56; border-color: #B9E5D5; }
.flash.error   { background: #FBE9E7; color: #C0392B; border-color: #F2C9C5; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 14px; flex-wrap: wrap; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 180px; position: relative; }
.search-box input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font); }
.search-box i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 42px; color: var(--line); display: block; margin-bottom: 12px; }
.empty h3 { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar-bg); padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 390px; padding: 36px 34px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .logo { width: 54px; height: 54px; border-radius: 14px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; }
.login-brand h1 { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.login-brand h1 b { color: var(--accent); }
.login-brand p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.login-card .field { margin-bottom: 15px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }
.login-hint { margin-top: 18px; padding: 11px; background: var(--bg); border-radius: var(--radius-sm); font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- Countdown día 5 ---------- */
.countdown { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 27px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.ring-lbl { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cd-info { flex: 1; }
.cd-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.cd-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Progreso ---------- */
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 16px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .4s; }

.bar-mini { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; }
.bar-mini > div { height: 100%; border-radius: 3px; background: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* =========================================================
   MODALES FLOTANTES
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(12,31,26,.55);
  backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 100; padding: 48px 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 640px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  animation: modalIn .22s cubic-bezier(.16,1,.3,1);
  margin: auto 0;
}
.modal.modal-lg { max-width: 820px; }
.modal.modal-sm { max-width: 460px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 2;
}
.modal-header h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.modal-header h2 i { color: var(--brand); font-size: 20px; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 15px 22px; border-top: 1px solid var(--line-soft);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
body.modal-open { overflow: hidden; }

/* Configuración por tarjetas en rejilla */
.config-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.config-card-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}

/* Botón de menú móvil */
@media (max-width: 860px) {
  #sidebarToggle { display: inline-flex !important; }
}

/* =========================================================
   PORTALES (propietario / inquilino)
   ========================================================= */
.portal-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.portal-topbar { background: var(--sidebar-bg); position: sticky; top: 0; z-index: 30; }
.portal-topbar-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.portal-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.portal-brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.portal-brand .name { color: #fff; font-weight: 700; font-size: 17px; }
.portal-brand .name b { color: var(--accent); }
.portal-nav { display: flex; gap: 4px; flex: 1; }
.portal-nav a { color: var(--sidebar-txt); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; text-decoration: none; transition: background .12s, color .12s; }
.portal-nav a:hover { background: #142A23; color: #fff; }
.portal-nav a.active { background: var(--brand); color: #fff; }
.portal-user { display: flex; align-items: center; gap: 10px; }
.portal-user .meta { line-height: 1.2; }
.portal-user .meta .n { color: #fff; font-size: 13px; font-weight: 600; }
.portal-user .meta .r { color: var(--sidebar-txt); font-size: 11px; text-transform: capitalize; }
.portal-user .btn-ghost { color: var(--sidebar-txt); }
.portal-user .btn-ghost:hover { background: #142A23; }
.portal-main { max-width: 1080px; width: 100%; margin: 0 auto; padding: 28px 24px; flex: 1; }
.portal-foot { text-align: center; padding: 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.portal-hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); border-radius: var(--radius-lg); padding: 26px 28px; color: #fff; margin-bottom: 22px; }
.portal-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.portal-hero p { opacity: .9; font-size: 14px; }
.portal-hero .big { font-size: 34px; font-weight: 700; margin-top: 10px; letter-spacing: -1px; }
@media (max-width: 680px) {
  .portal-nav a span { display: none; }
  .portal-user .meta { display: none; }
  .portal-topbar-inner { gap: 12px; padding: 0 14px; }
}

/* =========================================================
   LANDING PÚBLICA DE INMUEBLES
   ========================================================= */
.pub-shell { min-height: 100vh; background: var(--bg); }
.pub-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.pub-header-inner { max-width: 1140px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.pub-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.pub-brand .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pub-brand .name { font-weight: 700; font-size: 19px; color: var(--ink); }
.pub-brand .name b { color: var(--accent-dark); }
.pub-hero { background: linear-gradient(135deg, var(--sidebar-bg), var(--brand-dark)); color: #fff; padding: 54px 24px; text-align: center; }
.pub-hero h1 { font-size: 34px; font-weight: 700; letter-spacing: -.8px; margin-bottom: 10px; }
.pub-hero p { font-size: 16px; opacity: .9; max-width: 560px; margin: 0 auto; }
.pub-main { max-width: 1140px; margin: 0 auto; padding: 32px 24px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.prop-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; display: block; }
.prop-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,40,33,.12); text-decoration: none; }
.prop-card-img { height: 190px; background: linear-gradient(135deg, var(--brand-light), #D4EDE4); display: flex; align-items: center; justify-content: center; position: relative; }
.prop-card-img i { font-size: 54px; color: var(--brand); opacity: .4; }
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.prop-card-price { position: absolute; bottom: 12px; left: 12px; background: var(--accent); color: #17290A; font-weight: 700; padding: 5px 12px; border-radius: 99px; font-size: 15px; }
.prop-card-type { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 600; padding: 4px 11px; border-radius: 99px; font-size: 11.5px; text-transform: capitalize; }
.prop-card-body { padding: 16px 18px; }
.prop-card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.prop-card-loc { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 12px; }
.prop-features { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: 12px; }
.prop-features span { display: flex; align-items: center; gap: 5px; }
.pub-foot { background: var(--sidebar-bg); color: var(--sidebar-txt); text-align: center; padding: 28px 24px; font-size: 13px; margin-top: 30px; }
.pub-foot a { color: var(--accent); }
.pub-back { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 18px; text-decoration: none; }
.detail-gallery { height: 340px; background: linear-gradient(135deg, var(--brand-light), #D4EDE4); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; overflow: hidden; }
.detail-gallery i { font-size: 90px; color: var(--brand); opacity: .35; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 14px; }
.spec-item { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; text-align: center; }
.spec-item i { font-size: 22px; color: var(--brand); }
.spec-item .v { font-size: 17px; font-weight: 700; margin-top: 4px; }
.spec-item .l { font-size: 11.5px; color: var(--muted); }

/* =========================================================
   v2.0 — Componentes nuevos
   ========================================================= */
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.strong { font-weight: 600; }
.badge.teal { background: var(--brand-light); color: var(--brand); }
.badge-btn { border: 0; cursor: pointer; font: inherit; }
.badge-btn:hover { filter: brightness(.95); }
td.acciones { white-space: nowrap; }
td.acciones form { display: inline; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--brand); font-weight: 600; text-decoration: none; }
.breadcrumb i { font-size: 13px; }

.table-toolbar { padding: 12px 12px 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table-toolbar .search-box { flex: 1; min-width: 220px; }

/* Formularios por secciones */
.form-section { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.form-section legend { font-size: 13px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); width: 100%; }
.form-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.field.check label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.field.check input { width: auto; }
.hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

/* Botones en proceso */
.btn.is-loading { opacity: .65; pointer-events: none; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.spin { display: inline-block; animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Miniaturas y galería de administración */
.thumb { width: 52px; height: 40px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.galeria-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.galeria-admin figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.galeria-admin figure.es-portada { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.galeria-admin img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.galeria-admin figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px; }
.galeria-admin figcaption form { display: inline; }
.subir-fotos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); }
.subir-fotos .hint { flex-basis: 100%; margin: 0; }
.foto-previa { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; margin-top: 8px; }
.foto-previa img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Lista de propiedades en modal */
.prop-list { display: flex; flex-direction: column; gap: 10px; }
.prop-item { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.prop-thumb { width: 92px; height: 68px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 22px; }
.prop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prop-info { flex: 1; min-width: 0; }
.prop-nombre { font-weight: 700; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12.5px; margin-top: 6px; }

/* Landing: contador de fotos y miniaturas del detalle */
.foto-count { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 20px; display: flex; gap: 4px; align-items: center; }
.detail-thumbs { display: flex; gap: 10px; margin: -10px 0 22px; overflow-x: auto; padding-bottom: 4px; }
.detail-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; flex-shrink: 0; background: none; }
.detail-thumbs button.activa { border-color: var(--brand); }
.detail-thumbs img { width: 96px; height: 70px; object-fit: cover; display: block; }

/* Ficha (inquilino / contrato) */
.ficha-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 13.5px; margin: 0; }
.datos dt { color: var(--muted); }
.datos dd { margin: 0; font-weight: 500; }
.ficha-prop { display: flex; gap: 14px; }
.ficha-prop .prop-thumb { width: 130px; height: 96px; }

/* Documentos */
.doc-papel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 42px 48px; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.75; color: #1f2937; box-shadow: var(--shadow); }
.doc-papel h1 { font-size: 20px; text-align: center; letter-spacing: .5px; margin: 0 0 20px; }
.doc-papel h2 { font-size: 15.5px; margin: 20px 0 6px; }
.doc-papel p { margin: 0 0 12px; text-align: justify; }
.doc-firmas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; margin-top: 44px; }
.doc-firma { text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; }
.doc-firma .trazo { height: 80px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #334155; margin-bottom: 6px; }
.doc-firma .trazo img { max-height: 78px; max-width: 100%; }
.doc-firma .pendiente { color: var(--muted); font-style: italic; }
.doc-hash { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--muted); word-break: break-all; }
.variables { display: flex; flex-wrap: wrap; gap: 6px; }
.variables code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 11.5px; cursor: pointer; }
.variables code:hover { border-color: var(--brand); color: var(--brand); }
textarea.editor-plantilla { font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.6; min-height: 460px; }
.doc-papel h3 { font-size: 14.5px; margin: 16px 0 4px; }
.doc-papel ul, .doc-papel ol { margin: 0 0 12px; padding-left: 28px; }
.doc-papel li { margin: 0 0 4px; text-align: justify; }
.doc-papel u { text-underline-offset: 2px; }

/* Editor de texto enriquecido */
.editor-rico { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.editor-rico.error { border-color: var(--red); }
.editor-rico-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.editor-rico-barra select { width: auto; min-width: 0; height: 32px; padding: 2px 8px; font-size: 13px; }
.editor-rico-barra .editor-variable { margin-left: auto; max-width: 240px; }
.editor-rico-barra .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editor-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font-size: 17px; }
.editor-btn:hover { background: var(--bg); border-color: var(--line); }
.editor-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.editor-btn.activo { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.editor-rico-area { min-height: 460px; max-height: 70vh; overflow: auto; border: 0; border-radius: 0; box-shadow: none; margin: 14px; outline: none; }
.editor-rico-area:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent); }
.editor-rico-area > :first-child { margin-top: 0; }
@media (max-width: 680px) {
  .editor-rico-area { margin: 8px; min-height: 340px; }
  .editor-rico-barra .editor-variable { margin-left: 0; max-width: 100%; flex: 1 1 100%; }
}

.editor-plantilla-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 980px) { .editor-plantilla-grid { grid-template-columns: minmax(0, 1fr); } }

/* Números de registro */
.codigo-reg { display: inline-block; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; line-height: 17px; vertical-align: middle; }
div.codigo-reg { margin-top: 2px; }
table.data th.col-no, table.data td.col-no { width: 1%; white-space: nowrap; }
h2 .codigo-reg, .page-head .codigo-reg { font-size: 12px; margin-left: 6px; }

/* Firma manuscrita */
.firma-pad { border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; touch-action: none; width: 100%; height: 200px; display: block; cursor: crosshair; }
.firma-pad.activo { border-color: var(--brand); }
.firma-acciones { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

@media print {
  .sidebar, .topbar, .no-print, .flash, .breadcrumb, .page-head { display: none !important; }
  .main { margin: 0 !important; }
  .content { max-width: none; padding: 0; }
  .doc-papel { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}
@media (max-width: 680px) {
  .doc-papel { padding: 22px 18px; font-size: 14px; }
  .ficha-prop { flex-direction: column; }
}

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc-cabecera { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.filtros { margin-bottom: 18px; }
.filtros .card-body { align-items: end; }
.portal-hero-sm { margin-bottom: 18px; } .portal-hero-sm h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }

/* =========================================================
   v2.1 — Sitio público y landing comercial
   ========================================================= */
.pub-header-inner { max-width: 1180px; gap: 16px; position: relative; }
.pub-nav { display: flex; align-items: center; gap: 4px; }
.pub-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 8px; display: flex; gap: 6px; align-items: center; }
.pub-nav a:not(.btn):hover { background: var(--bg); color: var(--ink); }
.pub-nav a.activo { color: var(--brand); background: var(--brand-light); }
.pub-acceder { margin-left: 8px; }
.pub-menu-btn { display: none; background: none; border: 0; font-size: 24px; color: var(--ink); cursor: pointer; }
.pub-foot { background: var(--sidebar-bg); color: rgba(255,255,255,.72); padding: 44px 24px 22px; font-size: 14px; }
.pub-foot-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.pub-foot-grid a, .pub-foot-grid span { display: flex; gap: 6px; align-items: center; color: inherit; text-decoration: none; margin-bottom: 8px; }
.pub-foot-grid a:hover { color: #fff; }
.pub-foot-marca { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.pub-foot-titulo { color: #fff; font-weight: 700; margin-bottom: 12px; }
.pub-foot-legal { max-width: 1180px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; opacity: .7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-interes { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.pub-form-titulo { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }

/* Hero: la promesa del día de pago */
.lp-hero { background: var(--sidebar-bg); color: #fff; padding: 64px 24px 72px; overflow: hidden; }
.lp-hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 56px; align-items: center; }
.lp-hero h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -1.8px; font-weight: 800; margin: 0 0 20px; max-width: 16ch; }
.lp-hero-texto > p { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 52ch; margin: 0 0 30px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-btn-claro { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.lp-btn-claro:hover { background: rgba(255,255,255,.16); color: #fff; }
.lp-cifras { display: flex; gap: 36px; margin: 40px 0 0; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.lp-cifras dt { font-size: 12.5px; color: rgba(255,255,255,.6); order: 2; }
.lp-cifras div { display: flex; flex-direction: column-reverse; gap: 2px; }
.lp-cifras dd { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -1px; }

.lp-calendario { margin: 0; background: #fff; color: var(--ink); border-radius: 20px; padding: 22px 22px 18px; box-shadow: 0 30px 60px rgba(0,0,0,.35); transform: rotate(1.5deg); position: relative; }
.lp-calendario figcaption { font-weight: 800; font-size: 17px; margin-bottom: 12px; text-transform: capitalize; }
.lp-cal-semana, .lp-cal-dias { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 4px; }
.lp-cal-semana span { font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.lp-cal-dias span { font-size: 13px; padding: 7px 0; border-radius: 8px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lp-cal-dias .dia-previo { color: var(--muted); opacity: .55; }
.lp-cal-dias .dia-pago { background: var(--accent); color: #17290A; font-weight: 800; box-shadow: 0 0 0 4px rgba(135,178,75,.3); }
.lp-recibo { margin: 16px -6px 0; background: var(--bg); border-radius: 14px; padding: 14px 16px; font-size: 13px; }
.lp-recibo-cab { color: var(--brand); font-weight: 700; margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.lp-recibo-linea, .lp-recibo-total { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.lp-recibo-linea.menos span:last-child { color: var(--red); }
.lp-recibo-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 9px; font-weight: 800; font-size: 15px; }
.lp-recibo-nota { font-size: 11px; color: var(--muted); margin-top: 6px; text-align: right; }

/* Secciones */
.lp-main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lp-seccion { padding: 72px 0 8px; }
.lp-seccion h2, .lp-contacto h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -1px; line-height: 1.15; font-weight: 800; margin: 0 0 12px; max-width: 24ch; }
.lp-intro { font-size: 17px; color: var(--muted); margin: 0 0 34px; max-width: 60ch; }
.lp-seccion-cab { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.lp-servicios { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--line); }
.lp-servicios article { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.lp-servicios i { font-size: 28px; color: var(--brand); }
.lp-servicios h3 { font-size: 18px; margin: 12px 0 6px; }
.lp-servicios p { color: var(--ink-soft); line-height: 1.6; margin: 0; max-width: 42ch; }
.lp-pasos { list-style: none; counter-reset: paso; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.lp-pasos li { counter-increment: paso; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: relative; }
.lp-pasos li::before { content: counter(paso); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }
.lp-pasos li:last-child::before { background: var(--accent); color: #17290A; }
.lp-pasos h3 { font-size: 17px; margin: 0 0 6px; }
.lp-pasos p { margin: 0; color: var(--ink-soft); line-height: 1.55; font-size: 14.5px; }
.lp-portales { text-align: left; }
.lp-portales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 26px 0 28px; }
.lp-portales-grid article { background: var(--brand-light); border-radius: 16px; padding: 26px; }
.lp-portales-grid h3 { display: flex; gap: 8px; align-items: center; color: var(--brand); margin: 0 0 8px; font-size: 18px; }
.lp-portales-grid p { margin: 0; line-height: 1.6; color: var(--ink-soft); }
.lp-faq { max-width: 820px; border-top: 1px solid var(--line); margin-top: 24px; }
.lp-faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.lp-faq summary { font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--brand); }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq p { margin: 10px 0 0; line-height: 1.65; color: var(--ink-soft); max-width: 68ch; }
.lp-contacto { margin: 80px 0 72px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 44px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; scroll-margin-top: 90px; }
.lp-contacto-texto p { color: var(--ink-soft); line-height: 1.6; font-size: 16px; }
.lp-contacto ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.lp-contacto li { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.lp-contacto li i { color: var(--brand); }

@media (max-width: 900px) {
  .lp-hero-inner, .lp-contacto { grid-template-columns: 1fr; }
  .lp-calendario { transform: none; max-width: 420px; }
  .lp-contacto { padding: 26px; }
  .pub-foot-grid { grid-template-columns: 1fr; }
  .pub-menu-btn { display: block; margin-left: auto; }
  .pub-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .pub-header-inner.abierto .pub-nav { display: flex; }
  .pub-acceder { margin: 6px 0 0; justify-content: center; }
  .lp-cifras { gap: 22px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .lp-cal-dias .dia-pago { animation: latido 2.4s ease-in-out 1s 2; }
  @keyframes latido { 50% { box-shadow: 0 0 0 9px rgba(232,163,23,.18); } }
}

/* v2.1.1 — Eslogan de marca */
.lp-hero h1.lp-eslogan { font-size: clamp(38px, 5.6vw, 68px); letter-spacing: -2.4px; line-height: 1.02; max-width: none; }
.pub-foot-eslogan { color: var(--accent); font-weight: 700; font-size: 15px; margin: 0 0 6px; }

/* v2.1.2 — Logo oficial */
.logo-marca { display: block; line-height: 0; }
.logo-marca img { display: block; width: 100%; height: auto; }
.login-logo { margin: 0 auto 14px; max-width: 300px; }
.login-brand p { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-top: 0; }
/* Menú lateral oscuro: placa blanca para conservar los colores del logo */
a.sidebar-brand { text-decoration: none; padding: 18px 16px 16px; }
.sidebar-logo-placa { display: block; width: 100%; background: #fff; border-radius: 12px; padding: 11px 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: transform .15s ease; }
a.sidebar-brand:hover .sidebar-logo-placa { transform: translateY(-1px); }
a.sidebar-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 14px; }

/* =========================================================
   v2.2 — Recibos y comprobantes (pantalla e impresión)
   ========================================================= */
.recibo { position: relative; background: #fff; max-width: 820px; margin: 0 auto; padding: 36px 40px 26px; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); color: #1f2937; font-size: 14px; overflow: hidden; }
.recibo-cab { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 18px; border-bottom: 3px solid #384989; }
.recibo-emisor { max-width: 55%; }
.recibo-logo { width: 230px; margin-bottom: 8px; }
.recibo-numero { text-align: right; }
.recibo-tipo { font-size: 13px; font-weight: 700; color: #384989; text-transform: none; }
.recibo-no { font-size: 24px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; margin: 2px 0; }
.recibo-datos { display: grid; grid-template-columns: 140px 1fr; gap: 12px 18px; margin: 22px 0; }
.recibo-datos dt { color: var(--muted); font-size: 12.5px; padding-top: 2px; }
.recibo-datos dd { margin: 0; }
.recibo-monto { font-size: 22px; font-variant-numeric: tabular-nums; }
.recibo-letras { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.recibo-tabla { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.recibo-tabla td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.recibo-tabla td:last-child { text-align: right; white-space: nowrap; }
.recibo-tabla tr.cab td { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.recibo-tabla tr.total td { font-weight: 800; font-size: 15px; border-bottom: 0; border-top: 2px solid #1f2937; background: #f5f7f6; }
.recibo-nota { font-size: 12px; color: var(--muted); margin: 6px 0; }
.recibo-nota.anulado { color: var(--red); font-weight: 600; }
.recibo-firmas { display: flex; gap: 40px; justify-content: space-around; margin: 46px 0 18px; text-align: center; font-size: 12.5px; }
.recibo-firmas div { flex: 1; max-width: 260px; }
.recibo-firmas .linea { display: block; border-top: 1px solid #334155; margin-bottom: 6px; }
.recibo-pie { border-top: 1px solid var(--line); padding-top: 10px; font-size: 11px; color: var(--muted); text-align: center; }
.recibo-sello { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 96px; font-weight: 800;
  color: rgba(220, 38, 38, .16); border: 8px solid rgba(220, 38, 38, .16); padding: 0 30px; border-radius: 18px; pointer-events: none; letter-spacing: 6px; }
.pagina-recibo { background: var(--bg); padding: 24px 16px; }
.recibo-barra { max-width: 820px; margin: 0 auto 14px; display: flex; gap: 8px; justify-content: flex-end; }
.paginacion { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 14px; }
@media (max-width: 640px) {
  .recibo { padding: 22px 18px; } .recibo-cab { flex-direction: column; } .recibo-numero { text-align: left; }
  .recibo-emisor { max-width: 100%; } .recibo-datos { grid-template-columns: 1fr; gap: 2px; } .recibo-datos dd { margin-bottom: 10px; }
}
@media print {
  @page { size: letter; margin: 14mm; }
  .pagina-recibo { background: #fff; padding: 0; }
  .recibo { box-shadow: none; border: 0; max-width: none; padding: 0; }
  .recibo-cab, .recibo-tabla tr.total td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =========================================================
   v2.4 — Ficha 360 del propietario
   ========================================================= */
.ficha-cabecera .card-body { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.ficha-identidad { display: flex; gap: 16px; align-items: flex-start; min-width: 0; flex: 1 1 480px; }
.ficha-identidad h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.4px; }
.ficha-identidad .small { line-height: 1.8; }
.ficha-avatar { width: 56px; height: 56px; border-radius: 16px; background: #384989; color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.ficha-acciones { justify-content: flex-end; }
.metric-accent { border-color: var(--accent); background: #FFF9EC; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 6px 0 18px; scrollbar-width: thin; }
.tabs button { border: 0; background: none; padding: 11px 14px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-n { background: var(--bg); border-radius: 20px; padding: 1px 8px; font-size: 11.5px; }
.tabs button[aria-selected="true"] .tab-n { background: var(--brand-light); color: var(--brand); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.tl-icono { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center;
  color: var(--brand); flex-shrink: 0; z-index: 1; }
.estado-cuenta { max-width: 980px; }
.ec-tabla td:nth-child(n+4) { text-align: right; white-space: nowrap; }
.ec-tabla td:nth-child(3) { text-align: left; }

/* =========================================================
   v2.5 — Planes de servicio
   ========================================================= */
.planes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.plan-card.destacado { border: 2px solid var(--accent); box-shadow: 0 6px 20px rgba(232,163,23,.15); }
.plan-card.inactivo { opacity: .6; }
.plan-card h3 { margin: 4px 0 0; font-size: 20px; }
.plan-etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-precio { font-size: 17px; font-weight: 800; color: var(--brand); }
.plan-beneficios { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; font-size: 13.5px; flex: 1; }
.plan-beneficios i, .lp-plan li i { color: var(--green); }
.plan-pie { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.lp-planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.lp-plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 26px 26px; display: flex; flex-direction: column; }
.lp-plan.destacado { border: 2px solid var(--accent); box-shadow: 0 16px 40px rgba(12,31,26,.12); transform: translateY(-6px); }
.lp-plan-cinta { position: absolute; top: -13px; left: 26px; background: var(--accent); color: #17290A; font-weight: 800; font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.lp-plan h3 { margin: 0 0 10px; font-size: 21px; }
.lp-plan-precio strong { font-size: 38px; letter-spacing: -1.5px; color: #384989; }
.lp-plan-precio span { color: var(--muted); font-size: 14px; }
.lp-plan-desc { color: var(--ink-soft); line-height: 1.55; margin: 10px 0 0; }
.lp-plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; }
.lp-plan li { display: flex; gap: 8px; line-height: 1.45; }
.lp-plan .btn { justify-content: center; }

/* v2.6.2 — Pestañas de sección (Contratos y documentos, Configuración) */
.tabs a { padding: 11px 14px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none;
  border-bottom: 3px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs-seccion { margin: -6px 0 20px; }

/* =========================================================================
   v2.7 — MODERNIZACIÓN DE INTERFAZ
   Capa final: refina componentes existentes sin cambiar su HTML.
   ========================================================================= */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: var(--brand-light); color: var(--brand-dark); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
a { color: var(--brand); }

/* ---------- Botones ---------- */
.btn { min-height: 40px; border-radius: 10px; font-weight: 600; transition: background .15s, box-shadow .15s, transform .08s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 32px; border-radius: 8px; }
.btn-primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 1px 2px rgba(17,24,54,.18); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1E2958; }
.btn-accent:hover { background: #769F3D; color: #fff; }
.btn-danger { color: var(--red); }
.btn-ghost:hover { background: var(--brand-light); }

/* ---------- Formularios ---------- */
.field input, .field select, .field textarea, .search-box input, .toolbar select {
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-height: 42px;
  transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 0; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus {
  border-color: var(--brand); box-shadow: var(--ring); outline: none; }
.field label { color: var(--ink-soft); }

/* ---------- Tarjetas, métricas, tablas, insignias ---------- */
.card { border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow); }
.card-head { border-bottom-color: var(--line-soft); }
.metric { border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.metric .label { color: var(--muted); font-weight: 600; }
.metric .value { letter-spacing: -.6px; }
.metric-accent { background: linear-gradient(180deg, #F8FBF3, #EEF5E4); border-color: #C5DCA4; }
table.data th { font-size: 12px; color: var(--muted); font-weight: 700; background: #FAFBFD; border-bottom: 1px solid var(--line); }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #F7F8FC; }
.badge { border-radius: 999px; font-weight: 700; }
.badge.teal { background: var(--brand-light); color: var(--brand); }
.flash { border-radius: 12px; }

/* ---------- Menú lateral ---------- */
.sidebar { background: linear-gradient(180deg, #131B3D 0%, var(--sidebar-bg) 60%); }
a.sidebar-brand { display: block; padding: 22px 20px 18px; border-bottom: 1px solid var(--sidebar-line); }
.sidebar-logo { width: 100%; max-width: 196px; }
.sidebar-logo img { width: 100%; height: auto; }
.nav-label { color: #6F79A6; letter-spacing: .3px; }
.nav-item { border-radius: 10px; position: relative; color: var(--sidebar-txt); }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(135,178,75,.18); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-2); }
.nav-item.active i { color: var(--brand-2); }
.sidebar-foot { color: #6F79A6; }

/* Grupos plegables del menú (v4.33): encabezado grande con icono, total de pendientes y flecha */
.nav-grupo { margin-top: 10px; border-top: 1px solid var(--sidebar-line); padding-top: 8px; }
.nav-grupo-head {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; user-select: none;
  padding: 10px 12px; border-radius: 10px; color: #E4E8F7;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  transition: background .12s, color .12s;
}
.nav-grupo-head::-webkit-details-marker { display: none; }
.nav-grupo-head::marker { content: ''; }
.nav-grupo-head > .ti:first-child {
  font-size: 17px; width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(135,178,75,.16); color: var(--brand-2);
}
.nav-grupo-head:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-grupo-head:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.nav-grupo-total { margin-left: auto; font-size: 10px; letter-spacing: 0; }
.nav-grupo-flecha { margin-left: auto; font-size: 16px; color: #8A93BD; transition: transform .18s; }
.nav-grupo-total + .nav-grupo-flecha { margin-left: 6px; }
.nav-grupo[open] > .nav-grupo-head .nav-grupo-flecha { transform: rotate(180deg); }
.nav-grupo[open] .nav-grupo-total { display: none; }
.nav-grupo[open] > .nav-grupo-head { color: #fff; }
.nav-grupo-items { padding: 4px 0 2px 8px; margin-left: 14px; border-left: 1px dashed var(--sidebar-line); }
.nav-grupo-items .nav-item.active::before { left: -21px; }
@media (prefers-reduced-motion: reduce) { .nav-grupo-flecha { transition: none; } }

/* ---------- Barra superior del panel ---------- */
.topbar { background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.topbar .avatar, .portal-user .avatar { background: var(--brand-light); color: var(--brand); font-weight: 800; }

/* ---------- Modales ---------- */
.modal-overlay { background: rgba(17,24,54,.52); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { border-radius: 20px; box-shadow: var(--shadow-lg); }

/* ---------- Panel en celular ---------- */
.sidebar-fondo { display: none; }
@media (max-width: 860px) {
  .sidebar { width: 280px; box-shadow: var(--shadow-lg); z-index: 60; }
  .sidebar-fondo { display: block; position: fixed; inset: 0; background: rgba(17,24,54,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-abierto .sidebar-fondo { opacity: 1; pointer-events: auto; }
  body.menu-abierto { overflow: hidden; }
  .content { padding: 18px 14px 32px; }
  .topbar-inner { padding: 0 14px; }
  .topbar-user .meta { display: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head .page-actions, .page-head > .btn { justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric .value { font-size: 20px; }
  .ficha-acciones { justify-content: flex-start; }
  /* Modales como hoja inferior */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.modal-lg, .modal.modal-sm { max-width: 100%; width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh;
    padding-bottom: var(--safe-bottom); animation: hojaSube .22s ease-out; }
  .modal-header::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
  .modal-header { position: relative; padding-top: 22px; }
}
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }
@keyframes hojaSube { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .field input, .field select, .field textarea, .search-box input { font-size: 16px; } /* evita el zoom automático del iPhone */
}

/* ---------- Login ---------- */
.login-wrap { background:
    radial-gradient(1200px 600px at 10% -10%, rgba(135,178,75,.22), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(56,73,137,.55), transparent 60%),
    var(--sidebar-bg); padding: 24px 16px calc(24px + var(--safe-bottom)); }
.login-card { border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); max-width: 410px; }
.login-card .btn-primary { width: 100%; justify-content: center; min-height: 46px; font-size: 15px; }

/* =========================================================================
   PORTALES (propietario / inquilino) — experiencia tipo app
   ========================================================================= */
.cuerpo-portal { background: var(--bg); }
.portal-topbar { background: var(--sidebar-bg); padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 1px 0 var(--sidebar-line); }
.portal-topbar-inner { max-width: 1120px; height: 66px; gap: 22px; }
.portal-brand .logo-marca { width: 168px; }
.portal-brand img { width: 100%; height: auto; }
.portal-nav { gap: 6px; }
.portal-nav a { border-radius: 999px; padding: 8px 16px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.portal-nav a:hover { background: rgba(255,255,255,.08); }
.portal-nav a.active { background: rgba(135,178,75,.22); color: #fff; }
.portal-nav a.active i { color: var(--brand-2); }
.portal-instalar { background: var(--brand-2); border-color: var(--brand-2); color: #1E2958; }
.portal-main { max-width: 1120px; padding: 28px 24px 40px; }
.portal-hero { background:
    radial-gradient(600px 240px at 100% 0%, rgba(135,178,75,.35), transparent 60%),
    linear-gradient(135deg, #1E2958, var(--brand)); border-radius: 22px; padding: 28px 30px; box-shadow: 0 16px 36px rgba(30,41,88,.25); }
.portal-hero h1 { font-size: 24px; letter-spacing: -.4px; }
.portal-hero .big { font-size: 38px; }
.portal-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.portal-foot-logo { width: 130px; opacity: .9; }
.portal-foot-logo img { width: 100%; height: auto; }
.portal-tabbar { display: none; }

@media (max-width: 760px) {
  .portal-topbar-inner { height: 58px; padding: 0 16px; }
  .portal-brand .logo-marca { width: 138px; }
  .portal-nav, .portal-user .meta { display: none; }
  .portal-instalar span { display: none; }
  .portal-main { padding: 18px 14px calc(96px + var(--safe-bottom)); }
  .portal-hero { border-radius: 18px; padding: 22px 20px; }
  .portal-hero .big { font-size: 30px; }
  .portal-foot { padding-bottom: calc(92px + var(--safe-bottom)); }
  /* Barra de navegación inferior */
  .portal-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-bottom)); box-shadow: 0 -6px 24px rgba(17,24,54,.08); }
  .portal-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px;
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; }
  .portal-tabbar a i { font-size: 23px; }
  .portal-tabbar a.active { color: var(--brand); }
  .portal-tabbar a.active i { background: var(--brand-light); border-radius: 999px; padding: 2px 16px; }
  .portal-main .table-wrap { margin: 0 -2px; }
}

/* =========================================================================
   SITIO PÚBLICO
   ========================================================================= */
.pub-header { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px);
  padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid rgba(227,230,239,.8); }
.pub-logo { width: 172px; display: block; }
.pub-logo img { width: 100%; height: auto; }
.pub-instalar { color: var(--brand-2-dark); border-color: var(--brand-2); }
.pub-foot-logo { width: 170px; display: block; margin-bottom: 12px; }
.pub-foot-logo img { width: 100%; height: auto; }
.pub-foot { background: linear-gradient(180deg, #131B3D, var(--sidebar-bg)); padding-bottom: calc(22px + var(--safe-bottom)); }
.lp-hero { background:
    radial-gradient(900px 420px at 85% 0%, rgba(135,178,75,.25), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(56,73,137,.45), transparent 60%),
    var(--sidebar-bg); }
.pub-hero { background: radial-gradient(800px 300px at 90% 0%, rgba(135,178,75,.28), transparent 60%), linear-gradient(135deg, #131B3D, var(--brand)); }
.prop-card { border-radius: 18px; border-color: var(--line-soft); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.prop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.prop-card-img { overflow: hidden; }
.prop-card-img img { transition: transform .5s ease; }
.prop-card:hover .prop-card-img img { transform: scale(1.05); }
.prop-card-price { background: var(--surface); color: var(--brand-dark); box-shadow: 0 4px 14px rgba(17,24,54,.18); }
.prop-card-type { background: rgba(17,24,54,.72); color: #fff; backdrop-filter: blur(4px); }
.lp-servicios i, .lp-portales-grid h3 { color: var(--brand); }
.lp-pasos li:first-child::before, .lp-pasos li::before { background: var(--brand); }
.lp-plan-precio strong { color: var(--brand); }
@media (max-width: 900px) {
  .pub-logo { width: 146px; }
  .pub-nav { top: calc(68px + env(safe-area-inset-top, 0px)); border-radius: 0 0 18px 18px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
table.data th { text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) {
  .portal-tabbar { display: flex; }
  .portal-tabbar a { flex: 1 1 0; min-width: 0; }
}

/* =========================================================
   v2.8 — Mapas
   ========================================================= */
.mapa { height: 380px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; z-index: 0; background: #E8ECF3; }
.mapa-alto { height: min(70vh, 620px); }
.mapa-herramientas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mapa-herramientas input { flex: 1 1 240px; }
.mapa-estado { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.mapa-leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }
.mapa-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.mapa-leyenda i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.mapa-popup { display: flex; flex-direction: column; gap: 3px; font-family: var(--font); }
.mapa-popup img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.mapa-popup span, .mapa-popup small { color: var(--muted); font-size: 12px; }
.mapa-popup .mapa-precio { color: var(--brand); font-size: 15px; }
.mapa-popup a { font-weight: 700; margin-top: 4px; }
.leaflet-container { font-family: var(--font); }
.vista-alternar { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.vista-alternar a { padding: 7px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }
.vista-alternar a[aria-current="page"] { background: var(--brand); color: #fff; }
@media (max-width: 640px) { .mapa { height: 300px; } }
.hint-error { color: var(--red) !important; font-weight: 600; }
.hint-error a { color: var(--red); text-decoration: underline; }
.hint-ok { color: var(--green) !important; font-weight: 600; }

/* =========================================================
   v2.9 — Cabecera pública azul (igual al pie de página)
   ========================================================= */
.pub-header { background: linear-gradient(180deg, #131B3D, var(--sidebar-bg)); border-bottom: 1px solid var(--sidebar-line);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 2px 14px rgba(17,24,54,.25); }
.pub-nav a:not(.btn) { color: rgba(255,255,255,.78); }
.pub-nav a:not(.btn):hover { background: rgba(255,255,255,.08); color: #fff; }
.pub-nav a.activo { color: var(--sidebar-bg); background: var(--brand-2); }
.pub-menu-btn { color: #fff; }
.pub-instalar { background: transparent; color: var(--brand-2); border-color: var(--brand-2); }
.pub-instalar:hover { background: rgba(135,178,75,.14); }
.pub-acceder { background: #fff; border-color: #fff; color: var(--sidebar-bg); }
.pub-acceder:hover { background: var(--brand-light); border-color: var(--brand-light); color: var(--sidebar-bg); }
@media (max-width: 900px) {
  .pub-nav { background: var(--sidebar-bg); border-top: 1px solid var(--sidebar-line); box-shadow: 0 18px 30px rgba(0,0,0,.3); }
  .pub-nav a:not(.btn) { color: rgba(255,255,255,.85); }
}
/* El atributo hidden siempre gana (evita que .btn { display } muestre botones ocultos, p. ej. "Instalar app") */
[hidden] { display: none !important; }
/* Menú público desplegable por encima del contenido de la página */
.pub-header { z-index: 50; }
@media (max-width: 900px) { .pub-nav { z-index: 60; } }
.pub-nav a.activo:not(.btn) { color: var(--sidebar-bg); background: var(--brand-2); }

/* =========================================================
   v3.1 — Calendario de corta estancia
   ========================================================= */
.cal-estancias { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.cal-estancias th, .cal-estancias td { border-bottom: 1px solid var(--line-soft); padding: 0; text-align: center; height: 38px; min-width: 30px; }
.cal-estancias thead th { font-weight: 700; color: var(--muted); padding: 6px 0; line-height: 1.1; }
.cal-estancias thead th span { display: block; font-size: 10px; font-weight: 600; }
.cal-estancias th.finde { background: #FAFBFD; }
.cal-estancias th.hoy { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand-2); }
.cal-unidad { position: sticky; left: 0; background: var(--surface); text-align: left !important; padding: 0 12px !important; min-width: 170px; z-index: 1; font-weight: 700; white-space: nowrap; }
.cal-unidad a { color: var(--ink); text-decoration: none; }
.cal-unidad i { color: var(--muted); font-size: 12px; }
.cal-estancias td.libre a { display: block; height: 100%; }
.cal-estancias td.libre:hover { background: var(--brand-light); }
.cal-estancias td.ocupado a { display: block; height: 100%; }
.cal-estancias td.inicio { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.c-directo { background: #384989 !important; } .c-airbnb { background: #FF5A5F !important; } .c-booking { background: #003B95 !important; }
.c-vrbo { background: #1C4695 !important; } .c-otro { background: #7A8199 !important; }
.c-ical { background: repeating-linear-gradient(45deg, #FFB600, #FFB600 5px, #FFD466 5px, #FFD466 10px) !important; }
.c-bloqueo { background: repeating-linear-gradient(45deg, #C9CEDB, #C9CEDB 5px, #E3E6EF 5px, #E3E6EF 10px) !important; }
.mapa-leyenda i.c-directo, .mapa-leyenda i.c-airbnb, .mapa-leyenda i.c-booking, .mapa-leyenda i.c-ical, .mapa-leyenda i.c-bloqueo { border-radius: 4px; }

/* v3.2 — Mensajes con significado: verde completado · ámbar aviso · azul información · rojo solo errores */
.flash.success { background: #EAF6E4; color: #2F6B16; border-color: #C8E6B8; }
.flash.aviso   { background: #FFF6DB; color: #7A5300; border-color: #FFE08A; }
.flash.info    { background: var(--brand-light); color: var(--brand-dark); border-color: #CDD4EC; }
.flash.error   { background: #FDECEA; color: #B3261E; border-color: #F5C2BD; }
.flash.aviso a:not(.btn), .flash.info a:not(.btn) { color: inherit; text-decoration: underline; }

/* =========================================================================
   v3.3 — MODO OSCURO
   Paleta verificada con WCAG 2.1 (texto ≥ 4.5:1). El tema se aplica en <html data-theme="dark">
   desde el <head> (sin destello). Los documentos (recibos, contratos) siguen siendo papel blanco.
   ========================================================================= */
:root { color-scheme: light; }
[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #0E1325;
  --surface:      #161C33;
  --surface-2:    #1D2442;
  --ink:          #E8EBF5;
  --ink-soft:     #BAC1DB;
  --muted:        #8C95B8;
  --line:         #2B3358;
  --line-soft:    #232A4A;
  --brand:        #9AAAF2;   /* enlaces y acentos legibles sobre oscuro */
  --brand-dark:   #C3CCF7;
  --brand-light:  rgba(154,170,242,.14);
  --brand-2-light: rgba(135,178,75,.16);
  --accent-light: rgba(135,178,75,.14);
  --sidebar-bg:   #0A0F1F;
  --sidebar-line: #1C2340;
  --sidebar-txt:  #AEB6D6;
  --green:  #7BCB5A;
  --red:    #FF7A70;
  --blue:   #7FB2FF;
  --amber:  #FFC94D;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --ring:      0 0 0 3px rgba(154,170,242,.35);
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] ::selection { background: rgba(154,170,242,.35); color: #fff; }

/* Botones */
[data-theme="dark"] .btn { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .btn:hover { background: #262E52; }
[data-theme="dark"] .btn-primary { background: #4A5DB5; border-color: #4A5DB5; color: #fff; box-shadow: none; }
[data-theme="dark"] .btn-primary:hover { background: #5669C4; border-color: #5669C4; }
[data-theme="dark"] .btn-accent, [data-theme="dark"] .portal-instalar { background: var(--brand-2); border-color: var(--brand-2); color: #1E2958; }
[data-theme="dark"] .btn-danger { color: var(--red); border-color: rgba(255,122,112,.35); }
[data-theme="dark"] .btn-ghost { background: transparent; border-color: transparent; }

/* Formularios */
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea,
[data-theme="dark"] .search-box input, [data-theme="dark"] .toolbar select, [data-theme="dark"] select, [data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="number"], [data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="date"], [data-theme="dark"] input[type="month"], [data-theme="dark"] input[type="search"], [data-theme="dark"] input[type="password"] {
  background: var(--surface-2); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] ::placeholder { color: #6E779C; }
[data-theme="dark"] input:disabled, [data-theme="dark"] select:disabled { opacity: .6; }

/* Tarjetas, tablas, métricas */
[data-theme="dark"] .card, [data-theme="dark"] .metric, [data-theme="dark"] .modal, [data-theme="dark"] .plan-card, [data-theme="dark"] .lp-plan,
[data-theme="dark"] .prop-card { background: var(--surface); border-color: var(--line-soft); }
[data-theme="dark"] .card-head { border-bottom-color: var(--line-soft); }
[data-theme="dark"] table.data th { background: var(--surface-2); color: var(--muted); border-bottom-color: var(--line); }
[data-theme="dark"] table.data td { border-bottom-color: var(--line-soft); }
[data-theme="dark"] table.data tbody tr:hover { background: rgba(154,170,242,.06); }
[data-theme="dark"] .metric-accent { background: linear-gradient(180deg, rgba(135,178,75,.12), rgba(135,178,75,.05)); border-color: rgba(135,178,75,.4); }
[data-theme="dark"] .empty { color: var(--muted); }

/* Insignias: fondo translúcido y texto claro del mismo tono */
[data-theme="dark"] .badge.green { background: rgba(123,203,90,.15); color: #9FDB84; }
[data-theme="dark"] .badge.amber { background: rgba(255,182,0,.15); color: #FFD173; }
[data-theme="dark"] .badge.red   { background: rgba(255,122,112,.15); color: #FF9E96; }
[data-theme="dark"] .badge.blue  { background: rgba(127,178,255,.15); color: #A6C8FF; }
[data-theme="dark"] .badge.gray  { background: rgba(140,149,184,.15); color: #B7BED8; }
[data-theme="dark"] .badge.teal  { background: var(--brand-light); color: var(--brand); }

/* Mensajes */
[data-theme="dark"] .flash.success { background: rgba(123,203,90,.12); color: #A8E08F; border-color: rgba(123,203,90,.3); }
[data-theme="dark"] .flash.aviso   { background: rgba(255,182,0,.12); color: #FFD173; border-color: rgba(255,182,0,.3); }
[data-theme="dark"] .flash.info    { background: rgba(154,170,242,.12); color: #C3CCF7; border-color: rgba(154,170,242,.3); }
[data-theme="dark"] .flash.error   { background: rgba(255,122,112,.12); color: #FFA9A2; border-color: rgba(255,122,112,.3); }

/* Estructura del panel */
[data-theme="dark"] .topbar { background: rgba(22,28,51,.85); border-bottom-color: var(--line-soft); }
[data-theme="dark"] .topbar .avatar, [data-theme="dark"] .portal-user .avatar { background: var(--brand-light); color: var(--brand); }
[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #0D1329 0%, var(--sidebar-bg) 60%); }
[data-theme="dark"] .tabs { border-bottom-color: var(--line); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.6); }
[data-theme="dark"] .sidebar-fondo { background: rgba(0,0,0,.55); }

/* Portales */
[data-theme="dark"] .portal-topbar { background: var(--sidebar-bg); }
[data-theme="dark"] .portal-foot { background: var(--surface); border-top-color: var(--line-soft); }
[data-theme="dark"] .portal-tabbar { background: rgba(22,28,51,.95); border-top-color: var(--line); }
[data-theme="dark"] .portal-tabbar a.active i { background: var(--brand-light); }

/* Sitio público */
[data-theme="dark"] .prop-card-price { background: var(--surface-2); color: var(--brand-dark); }
[data-theme="dark"] .lp-calendario { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .vista-alternar { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .vista-alternar a[aria-current="page"] { background: #4A5DB5; }

/* Calendario de corta estancia */
[data-theme="dark"] .cal-estancias th.finde { background: var(--surface-2); }
[data-theme="dark"] .cal-unidad { background: var(--surface); }
[data-theme="dark"] .cal-unidad a { color: var(--ink); }
[data-theme="dark"] .cal-estancias td.libre:hover { background: var(--brand-light); }

/* Mapas: se oscurecen solo los mosaicos; marcadores y zonas conservan sus colores */
[data-theme="dark"] .mapa { background: var(--surface-2); border-color: var(--line); }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
[data-theme="dark"] .leaflet-popup-content-wrapper, [data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(22,28,51,.8) !important; color: var(--muted); }
[data-theme="dark"] .leaflet-control-attribution a { color: var(--brand); }

/* Documentos: SIEMPRE papel blanco (se restablecen los colores claros dentro del documento) */
.recibo, .doc-papel, .firma-pad, .estado-cuenta {
  color-scheme: light;
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #F7F8FC; --ink: #141A33; --ink-soft: #454D6B; --muted: #7A8199;
  --line: #E3E6EF; --line-soft: #EEF0F6; --brand: #384989; --brand-dark: #27336A; --brand-light: #E9ECF7;
  --green: #4C8A26; --red: #D1433A; --blue: #2F6FD1;
}
[data-theme="dark"] .recibo, [data-theme="dark"] .doc-papel { box-shadow: 0 10px 40px rgba(0,0,0,.45); }

/* Selector de tema */
.menu-tema { position: relative; }
.menu-tema > summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface); font-size: 18px; }
.menu-tema > summary::-webkit-details-marker { display: none; }
.menu-tema > summary:hover { color: var(--ink); }
.menu-tema .icono-oscuro { display: none; }
[data-theme="dark"] .menu-tema .icono-claro { display: none; }
[data-theme="dark"] .menu-tema .icono-oscuro { display: inline; }
.menu-tema-lista { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 170px; z-index: 80; display: grid; gap: 2px; }
.menu-tema-lista button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.menu-tema-lista button:hover { background: var(--brand-light); }
.menu-tema-lista button[aria-checked="true"] { color: var(--brand); font-weight: 700; }
.menu-tema-lista button[aria-checked="true"]::after { content: '✓'; margin-left: auto; }
.menu-tema-oscuro-fondo > summary { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.menu-tema-flotante { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 90; }

/* Logo que cambia con el tema */
.logo-auto { display: inline-block; }
.logo-auto .logo-tema-oscuro { display: none; }
[data-theme="dark"] .logo-auto .logo-tema-claro { display: none; }
[data-theme="dark"] .logo-auto .logo-tema-oscuro { display: block; }
.logo-auto img { width: 100%; height: auto; }

/* Imprimir siempre en claro, aunque la pantalla esté en modo oscuro */
@media print {
  :root, [data-theme="dark"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-soft: #222; --muted: #555; --line: #ccc; --line-soft: #ddd; }
  body { background: #fff !important; color: #000 !important; }
  .menu-tema { display: none !important; }
}

/* Transición suave al cambiar de tema (respeta "reducir movimiento") */
@media (prefers-reduced-motion: no-preference) {
  body, .card, .metric, .topbar, .sidebar, .btn, .field input, .field select, table.data th { transition: background-color .25s ease, border-color .25s ease, color .15s ease; }
}

/* Modo oscuro: los FONDOS de marca usan un índigo sólido (con texto blanco ≥ 4.5:1);
   var(--brand) queda solo para textos y acentos, que en oscuro es un lavanda legible */
[data-theme="dark"] .lp-pasos li::before,
[data-theme="dark"] .lp-pasos li:first-child::before, [data-theme="dark"] .bar-mini > div { background: #4A5DB5; color: #fff; }
[data-theme="dark"] .portal-hero { background:
    radial-gradient(600px 240px at 100% 0%, rgba(135,178,75,.22), transparent 60%),
    linear-gradient(135deg, #141B3A, #2E3C82); }
[data-theme="dark"] .pub-hero { background: radial-gradient(800px 300px at 90% 0%, rgba(135,178,75,.22), transparent 60%), linear-gradient(135deg, #0D1329, #2E3C82); }
[data-theme="dark"] .pub-acceder { background: #fff; border-color: #fff; color: #111836; }
[data-theme="dark"] .pub-acceder:hover { background: #E9ECF7; color: #111836; }
[data-theme="dark"] .pub-instalar { background: transparent; color: var(--brand-2); border-color: var(--brand-2); }
[data-theme="dark"] .lp-btn-claro { background: #fff; color: #111836; }
[data-theme="dark"] .prop-card-img { background: linear-gradient(135deg, #1D2442, #2B3358); }
[data-theme="dark"] .prop-card-img i { color: var(--brand); opacity: .5; }
[data-theme="dark"] input[type="file"]::file-selector-button { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
[data-theme="dark"] input[type="file"] { color: var(--ink-soft); }

/* v3.4 — Firmas registradas */
.firma-registro { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .firma-registro { grid-template-columns: 1fr; } }
.firma-actual { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #E3E6EF; border-radius: 12px; padding: 12px 16px; margin: 12px 0; color: #141A33; }
.firma-actual img { max-height: 90px; max-width: 320px; }
.notario-firma { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.notario-firma summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.firma-origen { font-size: 11px; color: var(--muted); }

/* v3.5 — Resumen de la cuenta del inquilino en el detalle del cobro */
.cuenta-resumen { border-left: 4px solid var(--brand-2); }
.recibo-meses th { text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.recibo-meses th:first-child, .recibo-meses td:first-child { text-align: left; }
.recibo-meses td { text-align: right; }

/* v3.6 — Vista previa del reparto de gastos comunes */
.gc-previa { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }

/* v3.7 — Vista por mes: la deuda total resalta cuando supera el saldo del mes */
td.deuda-mayor a { color: var(--red); font-weight: 700; }
td.deuda-mayor .small { color: var(--red); }

/* v3.8 — Verificación de recibos y sello QR */
.verificacion { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; margin-bottom: 18px; border: 2px solid; }
.verificacion > i { font-size: 40px; line-height: 1; }
.verificacion strong { font-size: 18px; }
.verificacion p { margin: 4px 0 0; }
.verificacion-ok { background: #EAF6E4; color: #2F6B16; border-color: #8FCB72; }
.verificacion-mal { background: #FDECEA; color: #B3261E; border-color: #EE9A92; }
.verificacion-aviso { background: #FFF6DB; color: #7A5300; border-color: #FFD36B; }
[data-theme="dark"] .verificacion-ok { background: rgba(123,203,90,.12); color: #A8E08F; }
[data-theme="dark"] .verificacion-mal { background: rgba(255,122,112,.12); color: #FFA9A2; }
[data-theme="dark"] .verificacion-aviso { background: rgba(255,182,0,.12); color: #FFD173; }
.recibo-sello-qr { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding-top: 12px; border-top: 1px dashed #C9CEDB; font-size: 11px; color: #6B7390; }
.recibo-sello-qr svg { width: 92px; height: 92px; flex: none; }
.recibo-sello-qr code { font-size: 13px; font-weight: 700; color: #141A33; letter-spacing: .5px; }
.recibo-sello-caja { width: 150px; height: 82px; border: 1px dashed #A0A6BD; border-radius: 8px; display: grid; place-items: center; color: #A0A6BD; font-size: 11px; }
th[data-ordenar] { cursor: pointer; user-select: none; }
th[data-ordenar]::after { content: ' ↕'; opacity: .45; font-size: 10px; }
th[data-ordenar][aria-sort="ascending"]::after { content: ' ▲'; opacity: .8; }
th[data-ordenar][aria-sort="descending"]::after { content: ' ▼'; opacity: .8; }

/* ===== v4.0 Requisitos, habilitación y evaluación ===== */
.checklist-progreso { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.checklist-progreso .barra { flex: 1 1 200px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.checklist-progreso .barra span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist-grupo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); padding: 14px 0 6px; }
.checklist-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.checklist-info { display: flex; gap: 10px; flex: 1 1 320px; min-width: 0; }
.checklist-info > i { font-size: 20px; margin-top: 1px; color: var(--muted); }
.checklist-item.estado-aprobado .checklist-info > i { color: var(--green); }
.checklist-item.estado-rechazado .checklist-info > i { color: var(--red); }
.checklist-item.estado-recibido .checklist-info > i { color: var(--blue); }
.checklist-info strong { margin-right: 6px; }
.checklist-acciones { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.checklist-acciones input[type="text"] { width: 170px; height: 32px; padding: 4px 8px; font-size: 13px; }
.archivo-btn { cursor: pointer; }
.pasos { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 18px; counter-reset: paso; }
.pasos li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pasos-icono { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 18px; border: 2px solid var(--line); }
.pasos li.ok .pasos-icono { background: var(--green); border-color: var(--green); color: #fff; }
.pasos li.actual { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.pasos li.actual .pasos-icono { border-color: var(--brand); color: var(--brand); }
.pasos-titulo { font-weight: 700; font-size: 13px; }
.pasos-detalle { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.pasos-mini { display: flex; gap: 3px; }
.pasos-mini span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.pasos-mini span.ok { background: var(--green); }
.pasos-resumen { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 14px; }
.pasos-resumen a { display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.pasos-resumen a[aria-current] { border-color: var(--brand); color: var(--brand); }
.pasos-resumen a b { margin-left: auto; font-size: 18px; }
.pasos-resumen i { font-size: 18px; color: var(--brand); }
.indicadores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 18px; }
.indicadores li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.indicadores .punto { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--muted); }
.indicadores .ind-green .punto { background: var(--green); }
.indicadores .ind-amber .punto { background: var(--amber); }
.indicadores .ind-red .punto { background: var(--red); }
.indicadores .ind-blue .punto { background: var(--blue); }
.autorizacion-caja { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--amber); border-radius: var(--radius-sm); }
.autorizacion-caja summary { cursor: pointer; font-weight: 600; font-size: 13px; }
a.metric { text-decoration: none; color: inherit; }
@media (max-width: 900px) {
  .pasos, .pasos-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pasos li:last-child, .pasos-resumen li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .checklist-acciones input[type="text"] { width: 100%; flex: 1 1 100%; } }
.fila-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fila-form input[type="number"] { height: 34px; }
.check-linea { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.check-linea input { width: auto; }
.entrada-caja { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.entrada-resumen { margin: 8px 0 4px; line-height: 1.6; }
.carteras { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cartera { display: block; padding: 16px; margin: 0; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.cartera:hover { border-color: var(--brand); transform: translateY(-1px); }
.cartera-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cartera-dia { font-size: 20px; font-weight: 800; color: var(--brand); }
.cartera .datos { grid-template-columns: max-content 1fr; }
.cartera, .cartera * { text-decoration: none !important; }

/* =====================================================================
   v4.2 · Página de inicio renovada (prefijo lx-)
   ===================================================================== */
.lx-hero { position: relative; overflow: hidden; color: #fff; background: #0B1130; padding: 72px 24px 0; isolation: isolate; }
.lx-hero-fondo { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(1200px 600px at 80% -10%, #22306E 0%, transparent 60%),
    linear-gradient(180deg, #0B1130 0%, #111A44 100%); }
.lx-hero-fondo::after { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 500px at 50% 120%, rgba(11,17,48,0) 0%, #0B1130 75%); }
.lx-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: lx-flotar 18s ease-in-out infinite alternate; }
.lx-blob.a { width: 520px; height: 520px; background: #384989; top: -160px; left: -120px; }
.lx-blob.b { width: 420px; height: 420px; background: #87B24B; opacity: .22; top: 20%; right: -120px; animation-duration: 22s; }
.lx-blob.c { width: 360px; height: 360px; background: #2F6FD1; opacity: .35; bottom: -120px; left: 35%; animation-duration: 26s; }
@keyframes lx-flotar { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } }

.lx-hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 56px; align-items: center; }
.lx-pastilla { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #E4E8FA; backdrop-filter: blur(8px); }
.lx-pastilla i { color: #A6CC6E; }
.lx-hero h1 { font-size: clamp(38px, 5.8vw, 72px); line-height: 1.02; letter-spacing: -2.5px; font-weight: 800; margin: 22px 0 22px; max-width: 14ch; }
.lx-resalte { background: linear-gradient(100deg, #C9E89B 0%, #9BC75C 45%, #6FA33A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-hero-texto > p { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; color: rgba(228,232,250,.82); max-width: 54ch; margin: 0 0 30px; }
.lx-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lx-cta .btn-lg { padding: 15px 22px; font-size: 15.5px; border-radius: 12px; }
.lx-cta .btn-accent { box-shadow: 0 10px 30px rgba(135,178,75,.4); }
.lx-btn-vidrio { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.lx-btn-vidrio:hover { background: rgba(255,255,255,.16); color: #fff; }
.lx-confianza { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.lx-confianza li { display: flex; align-items: center; gap: 7px; font-size: 14px; color: rgba(228,232,250,.85); font-weight: 500; }
.lx-confianza i { color: #7FE0A8; font-size: 17px; }

.lx-hero-visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.lx-tarjeta { background: rgba(255,255,255,.96); color: #141A33; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.4) inset; }
.lx-liquidacion { width: min(100%, 400px); padding: 22px 22px 16px; transform: rotate(-2deg); }
.lx-liq-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.lx-liq-etiqueta { display: block; font-size: 12px; color: #6B7390; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.lx-liq-cab strong { font-size: 16px; }
.lx-moneda { display: inline-flex; background: #EEF1FA; border-radius: 10px; padding: 3px; }
.lx-moneda button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #454D6B; cursor: pointer; font-family: inherit; }
.lx-moneda button[aria-selected="true"] { background: #384989; color: #fff; box-shadow: 0 4px 12px rgba(56,73,137,.35); }
.lx-liq-filas > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #E3E6EF; font-size: 14.5px; }
.lx-liq-filas > div.menos b { color: #B3261E; }
.lx-liq-filas .lx-liq-total { border-bottom: 0; margin-top: 6px; padding: 14px 14px; border-radius: 12px; background: linear-gradient(100deg, #EAF6E3, #F4FBEF); font-size: 16px; }
.lx-liq-filas .lx-liq-total b { color: #2F6B16; font-size: 20px; }
.lx-liq-filas.cambio b { animation: lx-cambio .45s ease; }
@keyframes lx-cambio { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lx-liq-pie { font-size: 11.5px; color: #8A90A8; margin-top: 10px; display: flex; gap: 5px; align-items: center; }
.lx-flotante { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; animation: lx-vaiven 6s ease-in-out infinite; }
.lx-flotante strong { display: block; font-size: 14px; }
.lx-flotante span { font-size: 12px; color: #6B7390; }
.lx-aviso-pago { top: 10px; right: -10px; }
.lx-aviso-inq { bottom: 18px; left: -18px; animation-delay: -3s; }
.lx-icono-ok, .lx-icono-azul { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 19px; flex: none; }
.lx-icono-ok { background: linear-gradient(135deg, #4C8A26, #67B33A); }
.lx-icono-azul { background: linear-gradient(135deg, #384989, #2F6FD1); }
@keyframes lx-vaiven { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.lx-franja { max-width: 1200px; margin: 64px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid rgba(255,255,255,.12); }
.lx-franja > div { padding: 26px 20px 30px; border-right: 1px solid rgba(255,255,255,.08); }
.lx-franja > div:last-child { border-right: 0; }
.lx-franja strong { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -1px; color: #fff; }
.lx-franja span { font-size: 13.5px; color: rgba(228,232,250,.7); }

.lx-main { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.lx-seccion { padding: 96px 0 8px; }
.lx-sobretitulo { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.lx-sobretitulo.claro { color: #FFD36B; }
.lx-seccion h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -1.4px; line-height: 1.08; font-weight: 800; margin: 0 0 14px; max-width: 22ch; }
.lx-intro { font-size: 17.5px; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; margin: 0 0 34px; }

.lx-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lx-celda { position: relative; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.lx-celda::before { content: ''; position: absolute; inset: auto -40% -60% auto; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; }
.lx-celda:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.lx-celda:hover::before { opacity: 1; }
.lx-celda.grande { grid-row: span 2; background: linear-gradient(160deg, #1A2456, #0B1130); color: #fff; border-color: transparent; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; }
.lx-celda.grande p { color: rgba(228,232,250,.8); }
.lx-celda.grande .lx-celda-icono { background: #87B24B; color: #17290A; }
.lx-celda.ancho { grid-column: span 2; }
.lx-celda-icono { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-light); color: var(--brand); margin-bottom: 18px; }
.lx-celda h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.3px; }
.lx-celda p { margin: 0; color: var(--ink-soft); line-height: 1.6; font-size: 15px; }

.lx-dividido { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.lx-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lx-lista li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.lx-lista i { color: var(--green); font-size: 20px; }
.lx-monedas { display: grid; gap: 14px; }
.lx-moneda-tarjeta { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 20px 22px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s; }
.lx-moneda-tarjeta:hover { transform: translateX(6px); }
.lx-moneda-tarjeta span { grid-row: span 2; font-size: 30px; font-weight: 800; color: var(--brand); letter-spacing: -1px; }
.lx-moneda-tarjeta small { color: var(--muted); font-size: 13.5px; }
.lx-moneda-tarjeta.destacada { background: linear-gradient(120deg, #384989, #2F6FD1); color: #fff; border-color: transparent; transform: scale(1.03); }
.lx-moneda-tarjeta.destacada span { color: #FFD36B; }
.lx-moneda-tarjeta.destacada small { color: rgba(255,255,255,.8); }

.lx-pasos { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.lx-pasos::before { content: ''; position: absolute; top: 28px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--brand), #87B24B); opacity: .35; }
.lx-pasos li { position: relative; text-align: center; padding: 0 8px; }
.lx-paso-num { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: var(--surface); color: var(--brand); border: 2px solid var(--brand); box-shadow: 0 0 0 8px var(--bg); position: relative; }
.lx-pasos li:last-child .lx-paso-num { background: #87B24B; border-color: #87B24B; color: #17290A; }
.lx-pasos h3 { font-size: 17px; margin: 0 0 6px; }
.lx-pasos p { margin: 0; color: var(--ink-soft); line-height: 1.55; font-size: 14.5px; }
.lx-plan-garantia { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--green); margin: -4px 0 10px; }

.lx-prop { border-radius: 18px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.lx-prop:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.lx-prop-datos { display: flex; gap: 14px; margin-top: 8px; color: var(--ink-soft); font-size: 13.5px; }
.lx-prop-datos span { display: inline-flex; gap: 4px; align-items: center; }

.lx-portales { text-align: center; }
.lx-portales h2, .lx-portales .lx-intro { margin-left: auto; margin-right: auto; }
.lx-portales-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 30px 0 28px; text-align: left; }
.lx-portales-grid article { padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lx-portales-grid h3 { margin: 0 0 8px; font-size: 20px; }
.lx-portales-grid p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.lx-contacto { margin-top: 96px; border-radius: 28px; background: radial-gradient(800px 400px at 0% 0%, #22306E, transparent 60%), linear-gradient(140deg, #111A44, #0B1130); }

/* Animación de aparición (solo con JavaScript y sin "reducir movimiento") */
.lx-animar [data-revelar] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--retraso, 0ms); }
.lx-animar [data-revelar].visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lx-blob, .lx-flotante { animation: none; }
  .lx-celda, .lx-prop, .lx-moneda-tarjeta { transition: none; }
}

@media (max-width: 980px) {
  .lx-hero-inner, .lx-dividido { grid-template-columns: minmax(0, 1fr); }
  .lx-hero-visual { min-height: 380px; margin-top: 10px; }
  .lx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-celda.grande { grid-row: auto; grid-column: span 2; min-height: 0; }
  .lx-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .lx-pasos::before { display: none; }
}
@media (max-width: 640px) {
  .lx-hero { padding: 44px 16px 0; }
  .lx-hero h1 { letter-spacing: -1.5px; }
  .lx-cta .btn-lg { width: 100%; justify-content: center; }
  .lx-bento, .lx-portales-grid { grid-template-columns: minmax(0, 1fr); }
  .lx-celda.grande, .lx-celda.ancho { grid-column: auto; }
  .lx-pasos { grid-template-columns: minmax(0, 1fr); }
  .lx-aviso-pago { right: 0; top: -6px; }
  .lx-aviso-inq { left: 0; bottom: 0; }
  .lx-liquidacion { transform: none; }
  .lx-main { padding: 0 16px; }
  .lx-seccion { padding-top: 64px; }
  .lx-franja > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* Inicio de sesión: título y pie */
.login-titulo { font-weight: 800; font-size: 18px; color: var(--ink); margin: 6px 0 2px !important; }
.login-pie { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.login-pie a { color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-aviso { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.lx-celda.ancho { grid-column: 1 / -1; }
.lx-contacto, .lx-contacto h2 { color: #fff; }
.lx-contacto .lp-contacto-texto p, .lx-contacto .lp-contacto-texto li { color: rgba(228,232,250,.85); }
.lx-contacto .lp-contacto-texto li i { color: #7FE0A8; }
.lx-contacto .lp-form label { color: rgba(228,232,250,.85); }
@media (max-width: 980px) { .lx-celda.ancho { grid-column: 1 / -1; } }

/* Configuración: índice de la página y mensajería */
.config-indice { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.config-indice a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: 13px; font-weight: 600; text-decoration: none; }
.config-indice a:hover { border-color: var(--brand); color: var(--brand); }
[id] { scroll-margin-top: 84px; }
.correo-vista { width: 100%; height: 360px; border: 0; border-radius: 0 0 var(--radius) var(--radius); background: #F4F6FB; display: block; }
.lista-errores { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.card-head .check-linea { margin-left: auto; font-size: 13.5px; }

/* v4.3 — campos sueltos fuera de .field (tablas, formularios en línea, pruebas de envío) */
.fila-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.fila-form select, table.data td input[type="number"], table.data td input[type="text"] {
  height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s; }
.fila-form input:focus, .fila-form select:focus, table.data td input:focus {
  border-color: var(--brand); box-shadow: var(--ring); outline: none; }
.fila-form:has(> .btn:not(.btn-sm)) input:not([type="checkbox"]):not([type="hidden"]) { height: 42px; }

/* ---------- v4.4 Centro de ajustes: menú interno agrupado + contenido ---------- */
.ajustes { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 22px; align-items: start; }
.ajustes-nav { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; max-height: calc(100vh - 96px); overflow-y: auto; }
.ajustes-nav > summary { display: none; }
.ajustes-grupo { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.ajustes-grupo + .ajustes-grupo { border-top: 1px solid var(--line-soft); }
.ajustes-grupo > span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.ajustes-grupo a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; color: var(--ink-soft);
  text-decoration: none; font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
.ajustes-grupo a i { font-size: 17px; color: var(--muted); }
.ajustes-grupo a:hover { background: var(--surface-2); color: var(--ink); }
.ajustes-grupo a.activa { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.ajustes-grupo a.activa i { color: var(--brand); }
.ajustes-cuerpo > .card + .card, .ajustes-cuerpo > form.card + form.card, .ajustes-cuerpo > .card + form, .ajustes-cuerpo > form + .card,
.ajustes-cuerpo > .metrics + .card, .ajustes-cuerpo > .metrics + form, .ajustes-cuerpo > .ficha-grid { margin-top: 18px; }
.ajustes-cuerpo > .metrics { margin-bottom: 0; }
@media (max-width: 980px) {
  .ajustes { grid-template-columns: 1fr; gap: 14px; }
  .ajustes-nav { position: static; max-height: none; padding: 0; }
  .ajustes-nav > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px; }
  .ajustes-nav > summary::-webkit-details-marker { display: none; }
  .ajustes-nav > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
  .ajustes-nav[open] > summary { border-bottom: 1px solid var(--line-soft); }
  .ajustes-nav nav { padding: 6px 10px 10px; }
}

/* v4.4 Vista previa de WhatsApp */
.burbuja-wa { background: #DCF8C6; color: #111B21; border-radius: 10px 10px 10px 2px; padding: 10px 12px; font-size: 14px; line-height: 1.5;
  max-width: 420px; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: normal; word-break: break-word; color-scheme: light; }

/* v4.4 Campañas */
.paso-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; margin-right: 6px; }
.grupos-destino { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; transition: border-color .15s, background .15s; }
.chip-check:has(input:checked) { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.chip-check input { accent-color: var(--brand); }
tr.fila-inactiva td { opacity: .55; }

/* v4.4 Auditoría */
.tabla-cambios { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.tabla-cambios th { text-align: left; font-weight: 600; color: var(--muted); padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tabla-cambios td { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; word-break: break-word; }
.tabla-cambios td.antes { background: rgba(220, 38, 38, .06); }
.tabla-cambios td.despues { background: rgba(22, 163, 74, .07); }
.detalle-auditoria summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-top: 4px; }
.paginacion { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 14px; flex-wrap: wrap; }
.paginacion .muted { margin-right: auto; }
.historial { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.historial li { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; }
.historial-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.historial details summary { cursor: pointer; color: var(--brand); }
td.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ---------- v4.4 Centro de reportes: tarjetas compactas + panel ---------- */
.reportes-centro { display: grid; gap: 16px; margin-top: 18px; }
.reportes-grupo-titulo { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 2px; }
.reportes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.reporte-tarjeta { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 58px; }
.reporte-tarjeta > i { font-size: 20px; color: var(--color, var(--brand)); flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: color-mix(in srgb, var(--color, var(--brand)) 12%, transparent); }
.reporte-tarjeta b { display: block; font-size: 13.5px; line-height: 1.25; }
.reporte-tarjeta small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.reporte-tarjeta:hover, .reporte-tarjeta:focus-visible { text-decoration: none; border-color: var(--color, var(--brand)); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20, 26, 51, .07); }
.reporte-tarjeta.activa { border-color: var(--color, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color, var(--brand)) 18%, transparent); }
.reporte-panel { margin-top: 22px; scroll-margin-top: 80px; min-height: 120px; transition: opacity .15s; }
.reporte-panel.cargando { opacity: .45; pointer-events: none; }
.reporte-vacio { border: 2px dashed var(--line); border-radius: 14px; padding: 34px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.reporte-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.reporte-cab h2 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.reporte-cab .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.reporte-filtros { margin-bottom: 14px; }
.reporte-filtros .card-body { padding-top: 14px; padding-bottom: 14px; }
.reporte-filtros-acciones { display: flex; justify-content: flex-end; align-items: flex-end; }
.barra-pct { display: inline-block; width: 110px; height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.barra-pct span { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.barra-pct span.medio { background: #F0AA00; }
.barra-pct span.bajo { background: var(--red); }
.solo-impresion { display: none; }
@media print {
  .reportes-centro, .reportes-indicadores, .reporte-filtros, .reporte-cab .page-actions { display: none !important; }
  .solo-impresion { display: block; font-size: 11px; color: #555; margin-bottom: 10px; }
  .reporte-panel { margin: 0; }
}

/* ---------- v4.5 Inventario ---------- */
.inv-cab { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.inv-titulo { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.inv-datos { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; align-items: center; }
.inv-obs { margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13.5px; }
.inv-ambiente { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 18px 14px 6px; }
.inv-tabla td { vertical-align: top; }
.inv-mini { display: inline-block; margin: 4px 4px 0 0; }
.inv-mini img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.inv-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.inv-galeria a, .inv-galeria figure { margin: 0; display: block; text-decoration: none; color: var(--ink-soft); font-size: 12px; }
.inv-galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.inv-galeria figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 4px; }
.inv-firmas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; border-top: 1px solid var(--line-soft); }
.inv-firma { text-align: center; }
.inv-firma img { max-height: 80px; max-width: 100%; display: block; margin: 0 auto 4px; }
.inv-firma-vacia { height: 70px; border-bottom: 1px dashed var(--line); display: grid; place-items: end center; color: var(--muted); font-size: 12px; padding-bottom: 6px; margin-bottom: 6px; }
.inv-comparacion h3 { font-size: 15px; margin: 0 0 10px; }
.texto-rojo { color: var(--red); font-weight: 600; }
.inv-grupo { border: 0; margin: 0; padding: 4px 0 14px; border-bottom: 1px solid var(--line-soft); }
.inv-grupo legend { padding: 12px 14px 4px; width: 100%; }
.inv-ambiente-nombre { font-weight: 700; font-size: 14px; border: 1px dashed transparent; background: transparent; padding: 4px 6px; border-radius: 6px; color: var(--brand); min-width: 260px; }
.inv-ambiente-nombre:hover, .inv-ambiente-nombre:focus { border-color: var(--line); background: var(--surface); outline: none; }
.inv-grupo > .btn { margin: 8px 14px 0; }
.inv-editar input:not([type="checkbox"]):not([type="hidden"]), .inv-editar select { width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.inv-quitar { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); }
.inv-quitar:has(input:checked) { color: var(--red); }
.inv-editar tr:has(.inv-quitar input:checked) td { opacity: .45; text-decoration: line-through; }
@media print { .inventario-doc { box-shadow: none; border: 0; } }

/* ---------- v4.5 Expediente digital ---------- */
.exp-portada { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--line); }
.exp-portada.vacia { display: grid; place-items: center; background: var(--brand-light); color: var(--brand); font-size: 34px; }
.tabs-expediente { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.tabs-expediente button { white-space: nowrap; }
.datos-lista { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.datos-lista dt { color: var(--muted); }
.datos-lista dd { margin: 0; font-weight: 500; }
.exp-recientes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.exp-recientes li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.exp-recientes i { color: var(--brand); font-size: 18px; margin-top: 1px; }
.exp-inquilinos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.exp-inq-cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.exp-personal { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.exp-personal:first-child { padding-top: 0; }
.exp-archivos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.exp-archivos i { color: var(--brand); }
.exp-linea { list-style: none; margin: 0; padding: 0; position: relative; }
.exp-linea::before { content: ''; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--line-soft); }
.exp-linea li { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.exp-icono { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line);
  color: var(--brand); z-index: 1; }
.exp-nota .exp-icono { border-color: var(--accent); color: var(--accent-dark); }
.exp-campana .exp-icono { border-color: var(--green); color: var(--green); }
.exp-cuerpo { min-width: 0; flex: 1; padding-top: 6px; }
.exp-titulo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.exp-detalle { font-size: 13.5px; margin: 4px 0; color: var(--ink-soft); white-space: normal; word-break: break-word; }
.btn-enlace { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; font: inherit; text-decoration: underline; }
@media print {
  .tab-panel[hidden] { display: block !important; }
  .tab-panel { break-inside: auto; margin-bottom: 14px; }
}
.inv-tabla { table-layout: fixed; width: 100%; }
.inv-tabla th:nth-child(1) { width: 38%; }
.inv-tabla th:nth-child(2) { width: 70px; }
.inv-tabla th:nth-child(3) { width: 130px; }
.inv-tabla th:nth-child(5) { width: 120px; }
@media (max-width: 640px) { .inv-tabla { table-layout: auto; } }

/* =========================================================
   v4.6 — Sistema único de formularios
   Una sola forma para todo el panel: encabezados que resaltan, campos de la misma altura y borde,
   y cada fila alineada en tres franjas (etiqueta · campo · ayuda) aunque una etiqueta ocupe dos líneas.
   ========================================================= */
:root { --campo-alto: 42px; --campo-borde: #CDD4E3; --campo-radio: 10px; }
[data-theme="dark"] { --campo-borde: #36406B; }

/* Encabezados de tarjeta: más presencia */
.card-head { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-bottom: 1px solid var(--line); padding: 15px 22px; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.25px; gap: 10px; }
.card-head h2 > i:first-child, .card-head h2 > .config-card-icon { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center;
  background: var(--brand-light); color: var(--brand); font-size: 18px; flex: 0 0 auto; }
.card-head h2 > .config-card-icon i { color: inherit; }
/* Las tarjetas que son formularios llevan la franja verde de la marca */
form.card, .card:has(> .card-body.form-grid), .card:has(> .card-body > .form-grid) { border-top: 3px solid var(--accent); }

/* Rejilla de campos */
.form-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); column-gap: 18px; row-gap: 0; align-items: start; }
.form-grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); }
.form-grid > * { margin-bottom: 18px; }
.form-grid > .full, .form-grid > .form-actions { grid-column: 1 / -1; }

/* Cada campo: etiqueta (fila 1) · control (fila 2) · ayuda (fila 3), alineados con sus vecinos */
.form-grid > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; min-width: 0; }
.form-grid > .field > label:first-child { align-self: end; }
.form-grid > .field:not(:has(> label))::before { content: ''; }            /* sin etiqueta: reserva su franja */
.form-grid > .field:has(> :nth-child(4):not([type="hidden"])) { display: flex; flex-direction: column; gap: 6px; }
.form-grid > .field.check { grid-row: auto; display: flex; grid-column: 1 / -1; }
.form-grid > .field.full:has(> .hint:only-child) { grid-row: auto; display: block; margin-top: -6px; }
.form-grid > .field-boton > .btn, .form-grid > .field-boton { align-self: start; }
.field-boton { display: grid; }
.form-grid > .field.field-boton { grid-template-rows: subgrid; }
.form-grid > .field.field-boton > .btn:first-of-type { grid-row: 2; }
.field-boton { justify-items: start; }
.form-grid > .field.field-boton:has(> .btn ~ .btn) { display: flex; flex-direction: row; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding-top: calc(1.4em + 6px); }

/* Etiquetas y ayudas */
.field label { font-size: 13px; font-weight: 650; color: var(--ink); line-height: 1.35; }
.field label .req { color: var(--red); margin-left: 2px; }
.field .hint, .field small.hint { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.45; }

/* Controles: misma altura, borde, radio y foco en todo el sistema */
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]),
.field select, .field textarea {
  width: 100%; min-height: var(--campo-alto); padding: 0 12px; border: 1.5px solid var(--campo-borde); border-radius: var(--campo-radio);
  background-color: var(--surface); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
.field textarea { padding: 10px 12px; min-height: 92px; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%237A8199' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.field select[multiple] { background-image: none; padding: 6px 10px; }
.field input:hover:not(:focus):not(:disabled), .field select:hover:not(:focus):not(:disabled), .field textarea:hover:not(:focus):not(:disabled) { border-color: #AEB7CC; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }
.field input:disabled, .field select:disabled, .field textarea:disabled, .field input[readonly] { background-color: var(--surface-2); color: var(--ink-soft); }
.field input[type="file"] { font-size: 13px; padding: 8px 0; }
.field input[type="checkbox"], .field input[type="radio"], .check-linea input { width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 auto; }
.field.check label { font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* Barra de acciones: siempre al pie, alineada a la izquierda */
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.form-grid > .form-actions { margin-top: 0; }
.card-body > .form-actions:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

@media (max-width: 640px) {
  .form-grid, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid > .field.field-boton:has(> .btn ~ .btn) { padding-top: 0; }
}
.form-grid > .form-actions:last-child { margin-bottom: 0; }
.form-grid > .field.check { display: block; }
.form-grid > .field.check > label { display: inline-flex; align-items: center; gap: 9px; }
.form-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card:has(.form-grid) { border-top: 3px solid var(--accent); }
/* Casillas: la casilla va en línea con su texto (el texto puede llevar negritas o enlaces) */
.field.check label, .form-grid > .field.check > label { display: block; font-weight: 500; }
.field.check label > input[type="checkbox"], .field.check label > input[type="radio"],
.field.check label > span > input[type="checkbox"] { vertical-align: -3px; margin-right: 8px; }
/* Casillas y opciones: nunca toman la altura ni el borde de un campo de texto */
.field input[type="checkbox"], .field input[type="radio"], .check-linea input[type="checkbox"], .check-linea input[type="radio"] {
  min-height: 0; height: 17px; width: 17px; padding: 0; border: 0; box-shadow: none; background: none; }
/* Filtros (fila con botón): columnas más estrechas para que el botón quepa en la misma fila */
.form-grid:has(> .field-boton) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); column-gap: 14px; }
.card-body > .hint + .form-grid, .card-body > p + .form-grid { margin-top: 14px; }
/* La barra del editor enriquecido conserva sus controles compactos dentro de un campo */
.field .editor-rico-barra select { width: auto; min-height: 32px; height: 32px; padding: 0 30px 0 10px; font-size: 13px; border-width: 1px; background-position: right 9px center; }
.field .editor-rico-barra select.editor-variable { max-width: 260px; }
/* Un botón suelto dentro de un campo nunca se estira */
.form-grid > .field > .btn { justify-self: start; align-self: center; width: auto; }
/* Tema oscuro: mismos campos, con borde visible y flecha clara en las listas */
[data-theme="dark"] .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
[data-theme="dark"] .field select, [data-theme="dark"] .field textarea { border: 1.5px solid var(--campo-borde); background-color: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23A9B1D1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
[data-theme="dark"] .field input:focus, [data-theme="dark"] .field select:focus, [data-theme="dark"] .field textarea:focus { border-color: #7C8CE0; }

/* ===================== v4.7 · Servicios y beneficios ===================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; min-height: 26px; border-radius: 7px; gap: 4px; }
.label-like { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.sub-titulo { font-size: 15px; font-weight: 700; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
.sub-titulo i { color: var(--brand); }

/* Constructor de planes (acordeón por categoría) */
.constructor-plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 22px 0 14px; background: var(--bg); min-width: 0; }
.constructor-plan legend { font-weight: 800; font-size: 15px; padding: 0 8px; display: flex; align-items: center; gap: 6px; }
.constructor-plan legend i { color: var(--brand); }
.cp-barra { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin: 10px 0 12px; position: sticky; top: 62px; z-index: 3; background: var(--bg); padding: 8px 0; }
.cp-totales { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-herramientas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-herramientas input[type=search], .cp-herramientas select { min-height: 32px; padding: 5px 10px; font-size: 13px; width: auto; min-width: 170px; }
.cp-cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.cp-cat > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.cp-cat > summary::-webkit-details-marker { display: none; }
.cp-cat > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
.cp-icono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-light); color: var(--brand); font-size: 18px; }
.cp-nombre { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-num { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.cp-cuenta { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.cp-cuenta[data-estado="completo"] { background: var(--brand-2-light); color: var(--brand-2-dark); }
.cp-cuenta[data-estado="parcial"] { background: var(--brand-light); color: var(--brand); }
.cp-cuenta[data-estado="opcional"] { background: #E4F0FB; color: #1F6BB3; }
.cp-acciones { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.cp-lista { list-style: none; margin: 0; padding: 0 12px 10px; }
.cp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.cp-item[data-modalidad="no"] .cp-texto { color: var(--muted); }
.cp-texto { font-size: 13.5px; line-height: 1.4; }
.cp-texto .badge { margin-left: 4px; }
.segmento { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmento label { position: relative; cursor: pointer; }
.segmento input { position: absolute; opacity: 0; pointer-events: none; }
.segmento span { display: block; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--ink-soft); border-left: 1px solid var(--line); white-space: nowrap; }
.segmento label:first-child span { border-left: 0; }
.segmento input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.segmento .seg-incluido input:checked + span { background: var(--brand-2-dark); color: #fff; }
.segmento .seg-opcional input:checked + span { background: #1F6BB3; color: #fff; }
.segmento .seg-no input:checked + span { background: var(--line); color: var(--ink); }
.segmento .deshabilitado { cursor: not-allowed; }
.segmento .deshabilitado span { opacity: .4; text-decoration: line-through; }
.cp-dest { cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.cp-dest input { position: absolute; opacity: 0; pointer-events: none; }
.cp-dest:has(input:checked) { color: #C98A00; background: #FFF5D6; }
.cp-dest:has(input:disabled) { opacity: .3; cursor: not-allowed; }
.cp-dest:has(input:focus-visible) { outline: 2px solid var(--brand); }
.cp-extra { margin: 6px 0 4px; }
.cp-extra > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 6px 0; }
.cp-extra textarea { width: 100%; margin-top: 6px; }
@media (max-width: 720px) {
  .cp-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cp-item .segmento { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .cp-item .cp-dest { grid-column: 2; grid-row: 1; }
  .cp-herramientas input[type=search], .cp-herramientas select { min-width: 0; flex: 1; }
}

/* Catálogo (edición de beneficios) */
.ben-lista { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.ben-fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ben-mover { display: inline-flex; flex-direction: column; gap: 2px; }
.ben-mover .btn-xs { min-height: 20px; padding: 0 5px; }
.ben-flag { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; white-space: nowrap; }
.ben-flag input { min-height: 0; width: auto; }
.iconos-sugeridos { display: flex; flex-wrap: wrap; gap: 4px; }
.iconos-sugeridos .btn-xs { font-size: 16px; min-height: 32px; width: 34px; justify-content: center; }
@media (max-width: 720px) { .ben-fila { grid-template-columns: auto minmax(0, 1fr) auto; } .ben-flag { grid-column: 2; } }

/* Planes: tarjetas y comparativa */
.plan-enfoque { margin: -4px 0 4px; }
.plan-precio.sin-precio { color: var(--muted); font-style: italic; }
.plan-cuenta { display: flex; gap: 6px; margin: 6px 0; }
.lp-plan-enfoque { margin: -2px 0 0; font-size: 13px; font-weight: 700; color: var(--brand-2-dark); text-transform: uppercase; letter-spacing: .6px; }
.lp-plan li small { color: var(--muted); }
.lx-centro { text-align: center; margin-top: 26px; }
.comparativa-planes table { min-width: 560px; }
.comparativa-planes th[scope=row] { font-weight: 600; text-align: left; }
.comparativa-planes summary { cursor: pointer; display: flex; gap: 8px; align-items: center; }
.comparativa-planes summary i { color: var(--brand); font-size: 18px; }
.comparativa-planes .centro { text-align: center; vertical-align: top; }
.comp-detalle { list-style: none; margin: 8px 0 4px; padding: 0 0 0 26px; display: grid; gap: 4px; font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.comp-detalle li { display: flex; justify-content: space-between; gap: 10px; }
.comp-marcas { display: inline-flex; gap: 3px; flex-shrink: 0; }
.comp-marca { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--line-soft); color: var(--muted); }
.comp-marca.incluido { background: var(--brand-2-dark); color: #fff; }
.comp-marca.opcional { background: #1F6BB3; color: #fff; }
.cob { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cob-completo { color: var(--brand-2-dark); }
.cob-parcial { color: var(--brand); }
.cob-opcional { color: #1F6BB3; }
.cob-no { color: var(--muted); }
.comp-leyenda { margin: 10px 4px 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }

/* Página pública de servicios */
.srv-hero { color: #fff; background: radial-gradient(800px 380px at 85% 0%, rgba(135,178,75,.28), transparent 70%), linear-gradient(160deg, #1A2456, #0B1130); padding: 56px 24px 54px; }
.srv-hero-inner { max-width: 1200px; margin: 0 auto; }
.srv-hero h1 { font-size: clamp(32px, 4.8vw, 58px); line-height: 1.05; letter-spacing: -1.8px; font-weight: 800; margin: 16px 0 16px; max-width: 18ch; }
.srv-hero p { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: rgba(228,232,250,.85); max-width: 60ch; margin: 0 0 26px; }
.srv-migas { font-size: 13px; color: rgba(228,232,250,.75); display: flex; gap: 6px; align-items: center; }
.srv-migas a { color: #fff; }
.srv-indicadores { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.srv-indicadores li { display: inline-flex; gap: 7px; align-items: center; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.srv-indicadores strong { font-size: 17px; color: #C9E89B; }
.srv-indicadores i { color: #A6CC6E; }

.srv-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.srv-card { position: relative; display: flex; flex-direction: column; padding: 20px 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; scroll-margin-top: 90px; }
.srv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.srv-card.activa { border-color: var(--brand-2); box-shadow: 0 0 0 2px var(--brand-2), var(--shadow-lg); }
.srv-icono { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-light); color: var(--brand); flex-shrink: 0; }
.srv-card .srv-num { position: absolute; top: 16px; right: 16px; font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.srv-card h3 { font-size: 16.5px; line-height: 1.25; margin: 14px 0 8px; letter-spacing: -.2px; }
.srv-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); flex: 1; }
.srv-ver { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; border: 0; background: var(--brand-2-light); color: var(--brand-2-dark); font: inherit;
  font-size: 13.5px; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer; min-height: 40px; }
.srv-ver:hover { background: var(--brand-2); color: #fff; }
.srv-ver:focus-visible, .srv-cerrar:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.srv-ver i { transition: transform .2s ease; }
.srv-ver[aria-expanded="true"] { background: var(--brand-2-dark); color: #fff; }
.srv-ver[aria-expanded="true"] i { transform: rotate(180deg); }

.srv-detalles { display: grid; gap: 14px; margin-top: 18px; }
.js .srv-detalle:not(.activo) { display: none; }
.srv-detalle { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand-2); border-radius: 18px; padding: 24px 26px; box-shadow: var(--shadow-lg); scroll-margin-top: 90px; }
.js .srv-detalle.activo { margin: 16px 0; animation: srv-entrar .22s ease; grid-column: 1 / -1; }
.srv-detalle:focus { outline: none; }
.srv-detalle:focus-visible { outline: 3px solid var(--brand); }
.srv-detalle header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.srv-detalle header .srv-num { font-size: 13px; font-weight: 800; color: var(--muted); }
.srv-detalle h3 { font-size: clamp(20px, 2.2vw, 26px); margin: 2px 0 0; letter-spacing: -.5px; }
.srv-cerrar { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.no-js .srv-cerrar, html:not(.js) .srv-cerrar, html:not(.js) [data-srv-cerrar] { display: none; }
.srv-desc { font-size: 16px; line-height: 1.65; color: var(--ink-soft); margin: 14px 0 16px; max-width: 80ch; }
.srv-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.srv-lista li { display: flex; gap: 9px; line-height: 1.45; font-size: 15px; }
.srv-lista i { color: var(--brand-2-dark); font-size: 20px; flex-shrink: 0; margin-top: -1px; }
.srv-lista li.opcional i { color: #1F6BB3; }
.srv-opcional { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #1F6BB3; background: #E4F0FB; padding: 2px 7px; border-radius: 99px; margin-left: 4px; }
.srv-nota { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: 13.5px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.srv-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.srv-alcance { margin: 26px 0 0; padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--line); font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); display: flex; gap: 10px; }
.srv-alcance i { color: var(--brand); font-size: 20px; flex-shrink: 0; }
.srv-subtitulo { font-size: 20px; margin: 40px 0 12px; letter-spacing: -.3px; }
@keyframes srv-entrar { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Resumen de servicios en el inicio */
.lx-chips-servicios { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.lx-chips-servicios a { display: inline-flex; gap: 7px; align-items: center; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; transition: border-color .15s, background .15s; }
.lx-chips-servicios a:hover, .lx-chips-servicios a:focus-visible { border-color: var(--brand-2); background: var(--brand-2-light); }
.lx-chips-servicios i { color: var(--brand); font-size: 17px; }
.lx-nota-ref { color: #A6CC6E; text-decoration: none; font-size: .5em; vertical-align: super; margin-left: 2px; }
.lx-aclaracion { font-size: 13px !important; line-height: 1.5 !important; color: rgba(228,232,250,.7) !important; margin: 18px 0 0 !important; display: flex; gap: 6px; max-width: 60ch; }

/* Consentimiento y página legal */
.pub-consentimiento { display: flex !important; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 400 !important; line-height: 1.45; color: var(--ink-soft); }
.pub-consentimiento input { width: 18px !important; height: 18px; min-height: 0 !important; margin-top: 1px; flex-shrink: 0; accent-color: var(--brand-2-dark); }
.form-interes .pub-consentimiento { margin: 4px 0 10px; }
.lp-form-enviar { width: 100%; justify-content: center; margin-top: 14px; }
.pub-legal { max-width: 820px; }
.pub-legal h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -1px; margin: 0 0 8px; }
.pub-legal h2 { font-size: 19px; margin: 28px 0 8px; }
.pub-legal p, .pub-legal li { line-height: 1.7; color: var(--ink-soft); }
.pub-legal .lx-seccion { padding-top: 56px; padding-bottom: 60px; }

@media (max-width: 1279px) { .srv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .srv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .srv-lista { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .srv-grid { grid-template-columns: 1fr; }
  .srv-detalle { padding: 18px; }
  .srv-detalle header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .srv-acciones .btn { flex: 1; justify-content: center; }
  .srv-hero { padding: 40px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .srv-card, .srv-ver i, .js .srv-detalle.activo { transition: none; animation: none; }
  .srv-card:hover { transform: none; }
}

/* Modo oscuro */
[data-theme="dark"] .cp-dest:has(input:checked) { background: rgba(255,200,60,.15); color: #FFD36B; }
[data-theme="dark"] .cp-cuenta[data-estado="opcional"], [data-theme="dark"] .srv-opcional { background: rgba(127,178,255,.15); color: #A6C8FF; }
[data-theme="dark"] .srv-lista li.opcional i, [data-theme="dark"] .cob-opcional { color: #A6C8FF; }
[data-theme="dark"] .srv-ver { color: #C9E89B; background: rgba(135,178,75,.15); }
[data-theme="dark"] .srv-ver[aria-expanded="true"], [data-theme="dark"] .srv-ver:hover { background: #4F7A1F; color: #fff; }
[data-theme="dark"] .cp-cuenta[data-estado="completo"], [data-theme="dark"] .cob-completo, [data-theme="dark"] .lp-plan-enfoque, [data-theme="dark"] .srv-lista i { color: #A6CC6E; }
.lx-contacto .pub-consentimiento { color: rgba(228,232,250,.8); }
.lx-contacto .pub-consentimiento a, .pub-consentimiento a { color: inherit; text-decoration: underline; font-weight: 600; }
.lx-contacto .pub-consentimiento a { color: #C9E89B; }
.comparativa-planes tbody th[scope=row] { background: transparent; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; }
.lp-plan-enfoque { margin: -4px 0 10px; }

/* ===================== v4.8 · Roles, visitas de campo y técnicos ===================== */
.text-red { color: var(--red) !important; }
.en-linea { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.en-linea select { width: auto; min-height: 36px; }

/* Solo lectura: rol con «Ver» en el módulo */
[data-nivel="ver"] form[method="post" i] :is(button[type="submit"], button:not([type])),
[data-nivel="ver"] [data-post],
[data-nivel="ver"] [data-modal-open^="modalNuev"],
[data-nivel="ver"] .page-actions :is(a[href*="form.php"], a[href*="nuevo"], a[href*="nueva"], [data-modal-open^="modalNuev"]),
[data-nivel="ver"] .acciones a[href*="form.php"] { display: none !important; }
[data-nivel="ver"] .page-head::after { content: "Solo consulta"; font-size: 11.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; align-self: center; }

/* Matriz de permisos */
.matriz-barra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.matriz-permisos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 14px; }
.matriz-permisos fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px 6px; margin: 0; background: var(--surface); min-width: 0; }
.matriz-permisos legend { font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 0 6px; }
.matriz-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.matriz-fila:first-of-type { border-top: 0; }
.matriz-modulo { font-size: 13.5px; font-weight: 600; display: flex; gap: 7px; align-items: center; min-width: 0; }
.matriz-modulo i { color: var(--brand); font-size: 17px; }
.matriz-acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 4px 18px; }
.matriz-acciones small { display: block; margin-left: 24px; }
.alcance-usuario { border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0; }
.alcance-usuario legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.alcance-usuario select[multiple] { min-height: 120px; }

/* Visitas de campo y órdenes del técnico (móvil primero) */
.visita-cabecera .card-body { display: grid; gap: 14px; }
.visita-titulo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.visita-titulo h2 { font-size: 19px; margin: 0; }
.visita-icono { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-light); color: var(--brand); flex-shrink: 0; }
.visita-lugar .strong { font-size: 15.5px; }
.visita-botones, .visita-cierre, .visita-oficina { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.visita-botones .btn { min-height: 44px; }
.visita-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 16px; margin: 0; }
.visita-datos dt { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.visita-datos dd { margin: 2px 0 0; font-size: 14px; }
.visita-instrucciones { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; display: flex; gap: 8px; align-items: flex-start; }
.visita-instrucciones i { color: var(--brand); margin-top: 2px; }
.visita-boton-grande { width: 100%; justify-content: center; min-height: 54px; font-size: 16px; }
.visita-gestion .hint { margin-top: 10px; }
.visita-cierre .btn-lg { flex: 1 1 200px; justify-content: center; }
.visita-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.visita-galeria figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.visita-galeria img { width: 100%; height: 120px; object-fit: cover; display: block; }
.visita-galeria figcaption { font-size: 12px; padding: 6px 8px; display: grid; gap: 3px; }
.visita-pdf { height: 120px; display: grid; place-items: center; font-size: 40px; color: var(--red); background: var(--bg); }
.visitas-grupo { margin-bottom: 22px; }
.visitas-grupo h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.visitas-grupo.atrasadas h2 { color: var(--red); }
.visitas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.visita-tarjeta { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.visitas-grupo.atrasadas .visita-tarjeta { border-left: 4px solid var(--red); }
.visitas-grupo.en_curso .visita-tarjeta { border-left: 4px solid var(--blue); }
.visita-enlace { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; color: inherit; text-decoration: none; min-height: 72px; }
.visita-enlace:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.visita-texto { display: grid; gap: 2px; min-width: 0; }
.visita-texto strong { font-size: 15px; }
.visita-texto > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visita-estados { display: grid; gap: 4px; justify-items: end; }
.visita-mapa { display: grid; place-items: center; width: 56px; border-left: 1px solid var(--line); color: var(--brand); font-size: 22px; text-decoration: none; }
.bitacora { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bitacora li { padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; line-height: 1.5; }
.bitacora li > span { display: block; margin-bottom: 3px; }
@media (max-width: 640px) {
  .rol-campo .page-head, .rol-tecnico .page-head { margin-bottom: 10px; }
  .visita-titulo { grid-template-columns: auto minmax(0, 1fr); }
  .visita-titulo .badge { grid-column: 1 / -1; justify-self: start; }
  .visita-botones .btn { flex: 1 1 140px; justify-content: center; }
}
.mono { overflow-wrap: anywhere; }
.enlace-sin-permiso { color: inherit; }

/* v4.8.1 · Inicio: tarjeta del día de pago y del portal con contenido */
.lx-celda.grande { justify-content: space-between; gap: 22px; }
.lx-mini-liq { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 16px 18px; display: grid; gap: 8px; font-size: 14px; }
.lx-mini-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,.2); }
.lx-mini-cab span { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: rgba(228,232,250,.7); font-weight: 700; }
.lx-mini-cab strong { color: #C9E89B; font-size: 16px; }
.lx-mini-fila { display: flex; justify-content: space-between; gap: 10px; color: rgba(228,232,250,.85); }
.lx-mini-fila .menos { color: #FFB4A8; }
.lx-mini-total { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(135,178,75,.18); }
.lx-mini-total strong { font-size: 20px; color: #C9E89B; }
.lx-mini-liq small { color: rgba(228,232,250,.5); font-size: 11.5px; text-align: right; }
.lx-celda.ancho { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
.lx-mini-portal { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); position: relative; z-index: 1; }
.lx-mini-portal-barra { display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.lx-mini-portal-barra span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.lx-mini-portal-barra em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: 8px; }
.lx-mini-portal ul { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lx-mini-portal li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.lx-mini-portal li i { color: var(--brand); font-size: 20px; }
.lx-mini-portal li span { font-size: 12.5px; color: var(--muted); }
.lx-mini-portal li b { font-size: 14px; color: var(--ink); }
.lx-servicios-resumen .srv-grid { margin-top: 6px; }
@media (max-width: 760px) {
  .lx-celda.ancho { grid-template-columns: 1fr; }
  .lx-mini-portal ul { grid-template-columns: 1fr 1fr; }
}


/* v4.8.2 · Sitio sin repeticiones: calendario del día de pago, planes en su página, crédito Fynsoft */
.lx-calendario { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px 12px; }
.lx-cal-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.lx-cal-cab strong { font-size: 15px; color: #fff; }
.lx-cal-cab span { font-size: 11.5px; font-weight: 700; color: #C9E89B; display: inline-flex; gap: 5px; align-items: center; }
.lx-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lx-cal-grid b { font-size: 10.5px; color: rgba(228,232,250,.5); font-weight: 700; padding-bottom: 3px; }
.lx-cal-grid span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; color: rgba(228,232,250,.85); }
.lx-cal-grid span.pasado { color: rgba(228,232,250,.3); }
.lx-cal-grid span.hoy { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.lx-cal-grid span.pago { background: #87B24B; color: #10200A; font-weight: 800; box-shadow: 0 0 0 4px rgba(135,178,75,.25); }
.lx-cal-pie { margin: 10px 0 0 !important; font-size: 13px; color: rgba(228,232,250,.8) !important; }
.lx-cal-pie strong { color: #C9E89B; }
.lx-portales-grid .lx-mini-portal { margin-top: 18px; }
.lx-sobretitulo.claro { color: #C9E89B; }
.lp-plan-todo { margin: 0 0 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.lp-plan-todo summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 14px; }
.lp-plan-todo h4 { font-size: 13px; margin: 14px 0 6px; display: flex; gap: 6px; align-items: center; }
.lp-plan-todo h4 i { color: var(--brand); }
.lp-plan-todo ul { margin: 0 !important; gap: 4px !important; padding-left: 4px; font-size: 13.5px; color: var(--ink-soft); }
.lp-plan-todo li::before { content: "·"; margin-right: 6px; color: var(--brand-2-dark); font-weight: 800; }
.lp-plan-todo li.opcional { color: var(--muted); }
.lp-planes-detalle { align-items: start; }
.srv-hero-corto { padding-bottom: 40px; }
.lx-seccion-corta { padding-top: 48px; }
.lx-cta-banda { margin: 56px 0 72px; padding: 30px 32px; border-radius: 22px; background: linear-gradient(160deg, #1A2456, #0B1130); color: #fff;
  display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.lx-cta-banda h2 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.6px; }
.lx-cta-banda p { margin: 0; color: rgba(228,232,250,.8); }
.lx-cta-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.credito-fynsoft { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.login-credito { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.sidebar-foot .credito-fynsoft { color: #C9E89B; }
@media (max-width: 640px) { .lx-cta-banda { padding: 24px 20px; } .lx-cta-botones .btn { flex: 1 1 100%; justify-content: center; } }

/* v4.9 · Pestañas en botones: todas visibles, sin barra deslizante (se acomodan en varias filas) */
.tabs[role="tablist"] { flex-wrap: wrap; overflow: visible; gap: 6px; border-bottom: 0; padding-bottom: 4px; }
.tabs[role="tablist"] button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; font-size: 13.5px; background: var(--surface); }
.tabs[role="tablist"] button:hover { border-color: var(--brand); }
.tabs[role="tablist"] button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tabs[role="tablist"] button[aria-selected="true"] .tab-n { background: rgba(255,255,255,.22); color: #fff; }
[data-theme="dark"] .tabs[role="tablist"] button[aria-selected="true"] { color: #0E1325; }

/* Verificación */
.marca-verificado { color: var(--green); font-size: 1.05em; vertical-align: -2px; }
.ficha-cabecera { position: relative; }
.sello-verificado { position: absolute; top: 14px; right: 16px; display: inline-flex; gap: 5px; align-items: center; padding: 5px 11px; border-radius: 99px;
  background: #E6F4DC; color: #2E6B12; font-size: 12.5px; font-weight: 800; z-index: 1; }
.sello-verificado i { font-size: 17px; }
.ficha-cabecera .card-body { padding-top: 22px; }
.btn.btn-verificado { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.btn.btn-verificado:hover { background: #256628; }
.btn.btn-verificar { background: #F08C00; border-color: #F08C00; color: #fff; }
.btn.btn-verificar:hover { background: #D27A00; }
.estado-verificacion { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; padding: 3px 9px; border-radius: 99px; }
.estado-verificacion.ok { color: #2E6B12; background: #E6F4DC; }
.estado-verificacion.parcial { color: #8A4B00; background: #FFF0D9; }
.estado-verificacion.pendiente { color: #8A4B00; background: #FFF0D9; }
.embudo-n { display: inline-block; min-width: 30px; padding: 3px 8px; border-radius: 8px; font-weight: 800; text-align: center; }
.embudo-n.alquiladas { background: var(--brand-light); color: var(--brand); }
.embudo-n.libres { background: #FFF0D9; color: #8A4B00; }
.embudo-n.cero { background: var(--line-soft); color: var(--muted); }
.btn-evaluar { border-color: var(--brand); color: var(--brand); }
.btn-evaluar.en-proceso { border-color: #F08C00; color: #8A4B00; }
[data-theme="dark"] .sello-verificado, [data-theme="dark"] .estado-verificacion.ok { background: rgba(76,138,38,.2); color: #A6CC6E; }
[data-theme="dark"] .estado-verificacion.parcial, [data-theme="dark"] .estado-verificacion.pendiente, [data-theme="dark"] .embudo-n.libres { background: rgba(240,140,0,.18); color: #FFC26B; }

/* Evaluación: solicitante fijo y unidades a elegir */
.solicitante-fijo { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.solicitante-fijo > div { flex: 1; min-width: 0; }
.solicitante-fijo .ficha-avatar { width: 42px; height: 42px; font-size: 18px; flex-shrink: 0; }
.unidades-solicitadas { border: 0; padding: 0; margin: 0; min-width: 0; }
.unidades-solicitadas legend { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.unidades-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.unidad-opcion { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.unidad-opcion:has(input:checked) { border-color: var(--brand-2); box-shadow: 0 0 0 2px var(--brand-2-light); }
.unidad-opcion input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex-shrink: 0; }
.unidad-opcion span { display: grid; gap: 2px; font-size: 13.5px; }
.unidad-opcion small { color: var(--muted); }
.unidad-opcion b { color: var(--brand); }

/* Acceso desde la ficha: rol fijo */
.rol-fijo { display: flex; gap: 8px; align-items: center; min-height: 42px; padding: 0 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg); font-weight: 700; }
.campo-con-boton { display: flex; gap: 8px; }
.campo-con-boton input { flex: 1; min-width: 0; }

/* Contrato de administración: resumen del plan */
.plan-resumen { margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: var(--brand-2-light); color: var(--brand-2-dark); font-size: 13px; font-weight: 600; display: flex; gap: 8px; }
[data-theme="dark"] .plan-resumen { color: #C9E89B; }

/* Propiedad: régimen de condominio */
.check-linea { display: flex !important; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400 !important; }
.check-linea input { width: 18px; height: 18px; min-height: 0; flex-shrink: 0; }

/* ===== v4.9 · Tablero de gestión ===== */
.metrics-2 { margin-top: -8px; }
.metric-enlace { color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.metric-enlace:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.metric-enlace:focus-visible { outline: none; box-shadow: var(--ring); }
.metric-enlace .barra-pct { width: 100%; margin: 9px 0 0; }
.barra-pct span.ok { background: var(--green); }
.metric-alerta { border-color: rgba(209,67,58,.45); background: linear-gradient(0deg, rgba(209,67,58,.06), rgba(209,67,58,.06)), var(--surface); }
.metric-alerta .value { color: var(--red); }
.text-amber { color: #B07A00; font-weight: 600; }
[data-theme="dark"] .text-amber { color: #F0C060; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 22px; align-items: start; }
.dash-grid > .card { margin-bottom: 0; }
.dash-tarjeta .card-body.tight { max-height: 320px; overflow-y: auto; }

.dash-pendientes { list-style: none; padding: 6px 10px 10px; }
.dash-pendientes a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.dash-pendientes a:hover { background: var(--line-soft); }
.dash-pendientes a i { font-size: 18px; width: 20px; text-align: center; }
.dash-pendientes a span { flex: 1; }
.dash-pendientes a b { min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 99px; background: var(--line-soft); font-size: 12px; }
.dash-pendientes a.con { color: var(--ink); font-weight: 500; }
.dash-pendientes a.con i { color: var(--brand); }
.dash-pendientes a.con b { background: var(--brand); color: #fff; }

.dash-barras { display: flex; align-items: stretch; gap: 10px; height: 190px; padding-top: 4px; }
.dash-barra { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; cursor: default; }
.dash-barra-valor { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.dash-barra-pista { position: relative; width: 100%; max-width: 44px; min-height: 2px; background: var(--brand-light); border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.dash-barra-pista > span { display: block; width: 100%; background: var(--brand-2); border-radius: 4px 4px 0 0; }
.dash-barra:hover .dash-barra-pista { outline: 2px solid var(--brand); outline-offset: 2px; }
.dash-barra-mes { font-size: 11.5px; color: var(--muted); margin-top: 6px; border-top: 1px solid var(--line); width: 100%; text-align: center; padding-top: 5px; }
.dash-leyenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.muestra { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: middle; }
.muestra.cobrado { background: var(--brand-2); }
.muestra.facturado { background: var(--brand-light); border: 1px solid var(--line); margin-left: 8px; }
[data-theme="dark"] .dash-barra-pista, [data-theme="dark"] .muestra.facturado { background: #2A3560; }

@media (max-width: 720px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-barras { height: 160px; gap: 6px; }
}

/* ===== v4.9 · Barra de filtros con exportación (estados de cuenta) ===== */
.filtro-barra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.filtro-barra > .field { flex: 0 1 190px; min-width: 150px; margin: 0; }
.filtro-barra > .btn { height: 40px; }
.btn-grupo { display: inline-flex; align-items: stretch; }
.btn-grupo > .btn { border-radius: 0; height: 40px; }
.btn-grupo > .btn + .btn { margin-left: -1px; }
.btn-grupo > .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-grupo > .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-grupo > .btn:hover, .btn-grupo > .btn:focus-visible { position: relative; z-index: 1; }
.filtro-export { margin-left: auto; }
@media (max-width: 640px) {
  .filtro-barra > .field { flex: 1 1 140px; }
  .filtro-barra > .btn { flex: 1 1 100%; justify-content: center; }
  .filtro-export { margin-left: 0; width: 100%; }
  .filtro-export > .btn { flex: 1; justify-content: center; }
}

/* ===== v4.9 · Estado de cuenta del propietario ===== */
.ec-ref { font-family: var(--mono); font-size: 13px; font-weight: 700; color: #141A33; margin: 4px 0 2px; letter-spacing: .2px; }
.ec-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin: 18px 0 16px; }
.ec-datos dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: #7A8199; font-weight: 700; margin-bottom: 2px; }
.ec-datos dd { font-size: 13px; color: #141A33; }
.ec-resumen { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #E3E6EF; border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.ec-resumen > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: #F7F8FC; }
.ec-resumen > div + div { border-left: 1px solid #E3E6EF; }
.ec-resumen span { font-size: 11px; color: #7A8199; font-weight: 600; }
.ec-resumen strong { font-size: 17px; color: #141A33; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.ec-resumen small { font-size: 10.5px; color: #7A8199; }
.ec-resumen .ec-saldo { background: #384989; }
.ec-resumen .ec-saldo span, .ec-resumen .ec-saldo small { color: #C9D0EC; }
.ec-resumen .ec-saldo strong { color: #fff; font-size: 19px; }
.ec-resumen .ec-saldo.al-dia { background: #4F7A1F; }
.ec-pagado { color: #3F7A1A; }
.ec-tabla thead td { background: #F1F3F9; border-bottom: 0; text-transform: uppercase; letter-spacing: .4px; font-size: 10.5px; }
.ec-tabla thead td:first-child { border-radius: 8px 0 0 8px; } .ec-tabla thead td:last-child { border-radius: 0 8px 8px 0; }
.ec-tabla tbody tr:nth-child(even) td { background: #FAFBFD; }
.ec-tabla tr.ec-inicial td { color: #454D6B; }
.ec-tabla .ec-vacio { text-align: center !important; padding: 22px; }
.ec-tipo { display: inline-block; padding: 1px 7px; border-radius: 99px; font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.ec-tipo.liq { background: #E9ECF7; color: #27336A; }
.ec-tipo.pago { background: #EEF5E4; color: #3F6A16; }
.ec-comparacion { margin-top: 14px; }
.ec-comparacion tr.ec-difiere td { background: rgba(232,163,23,.12); }
@media (max-width: 720px) {
  .ec-resumen { grid-template-columns: 1fr 1fr; }
  .ec-resumen > div:nth-child(3) { border-left: 0; }
  .ec-resumen > div:nth-child(n+3) { border-top: 1px solid #E3E6EF; }
}
@media print {
  .ec-resumen > div, .ec-tabla thead td, .ec-tipo, .ec-tabla tbody tr:nth-child(even) td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ec-tabla tfoot td { white-space: nowrap; text-align: right; }
.ec-tabla tfoot td:first-child { text-align: left; white-space: normal; }
.unidades-opciones ~ .hint { display: block; margin: 6px 0 14px; }
.form-grid > .field:has(> :nth-child(4):not([type="hidden"])) > label:first-child { align-self: stretch; }   /* en columna flexible, la etiqueta no se va a la derecha */

/* ===== v4.10 · Aviso de pago recibido en el formulario de pago ===== */
.aviso-pago { display: flex; margin: 4px 0 16px; }
.aviso-pago-no { display: flex; gap: 6px; align-items: center; margin: 4px 0 14px; }
.select-compacto { display: block; margin-top: 6px; padding: 5px 8px; font-size: 12.5px; width: auto; max-width: 100%; }
/* Selectores dentro de tablas (p. ej. plantillas de los avisos): mismo aspecto que en los formularios */
table.data td select { width: 100%; min-width: 170px; min-height: 38px; padding: 0 34px 0 11px; border: 1.5px solid var(--campo-borde, var(--line));
  border-radius: var(--campo-radio, 10px); background-color: var(--surface); color: var(--ink); font: inherit; font-size: 13px;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%237A8199' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
table.data td select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
table.data td .check-linea { font-size: 13px; }
.text-green { color: var(--green) !important; }

/* ===== v4.11 · Liquidación del depósito ===== */
.sec-titulo { font-size: 13px; font-weight: 700; color: var(--brand); margin: 18px 0 8px; text-transform: none; }
.dl-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dl-cab .muted.small { margin-top: 4px; }
.dl-titulo { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.dl-resumen { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.dl-resumen > div { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.dl-resumen > div + div { border-left: 1px solid var(--line); }
.dl-resumen span { font-size: 12px; color: var(--muted); font-weight: 600; }
.dl-resumen strong { font-size: 21px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.dl-resumen small { font-size: 11.5px; color: var(--muted); }
.dl-resumen .dl-final.ok { background: var(--brand-2-light); }
.dl-resumen .dl-final.ok strong { color: var(--brand-2-dark); }
.dl-resumen .dl-final.debe { background: rgba(209,67,58,.08); }
.dl-resumen .dl-final.debe strong { color: var(--red); }
[data-theme="dark"] .dl-resumen .dl-final.ok strong { color: #C9E89B; }
.dl-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; margin-bottom: 18px; }
.dl-dos > .card { margin-bottom: 0; }
.dl-acciones p { margin-bottom: 12px; }
.dl-anular { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.dl-anular summary { cursor: pointer; color: var(--red); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
@media (max-width: 720px) {
  .dl-resumen { grid-template-columns: 1fr; }
  .dl-resumen > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
.dl-pendiente { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232,163,23,.14); }

/* ===== v4.12 · Mapa de gestión ===== */
.mapa-g-filtros .card-body { display: grid; gap: 12px; }
.mapa-g-estados { display: flex; flex-wrap: wrap; gap: 8px; }
.mapa-g-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; }
.mapa-g-chip input { width: auto; margin: 0; }
.mapa-g-chip i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mapa-g-chip b { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mapa-g-chip:has(input:not(:checked)) { opacity: .55; }
.mapa-g-otros, .mapa-g-visitas { align-items: center; }
.mapa-g-visitas { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.mapa-g-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.mapa-g-mapa { padding: 12px; margin-bottom: 0; }
.mapa.mapa-g { height: min(72vh, 720px); min-height: 420px; border-radius: var(--radius-sm); }
.mapa-g-panel > .card { margin-bottom: 16px; }
.mapa-g-lista { list-style: none; padding: 4px 16px 12px; max-height: 340px; overflow-y: auto; }
.mapa-g-lista li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mapa-g-lista li:last-child { border-bottom: 0; }
.mapa-g-lista li span { width: 100%; font-size: 11.5px; color: var(--muted); }
.mapa-g-punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mapa-g-mensajeros { list-style: none; padding: 10px 16px 4px; display: grid; gap: 6px; font-size: 13px; }
.mapa-g-mensajeros i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 4px; }
.mapa-g-mensajeros b { float: right; color: var(--muted); font-weight: 600; }
.mapa-g-visita { display: block; width: 14px; height: 14px; background: var(--c); border: 2px solid #fff; border-radius: 3px; transform: rotate(45deg);
  box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.mapa-g-visita.lejos { outline: 2px solid #D1433A; outline-offset: 1px; }
.mapa-g-cuadro { display: inline-block; width: 10px; height: 10px; background: #0F8B8D; border-radius: 2px; transform: rotate(45deg); }
.mapa-g-cuadro.lejos { outline: 2px solid #D1433A; outline-offset: 1px; }
.mapa-g-anillo { display: inline-block; width: 12px; height: 12px; border: 2px dashed #0F8B8D; border-radius: 50%; }
.mapa-g-estado { font-weight: 600; color: var(--c); }
.mapa-popup ul { list-style: none; margin: 6px 0; padding: 0; font-size: 12px; display: grid; gap: 2px; }
.mapa-popup a + a { margin-left: 8px; }
@keyframes mapa-g-pulso { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .25; } }
.mapa-g-pulso { animation: mapa-g-pulso 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .mapa-g-pulso { animation: none; } }
@media (max-width: 1080px) { .mapa-g-cuerpo { grid-template-columns: 1fr; } }
.mapa-leyenda i.mapa-g-cuadro { border-radius: 2px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); width: 11px; height: 11px; }
.mapa-leyenda i.mapa-g-anillo { background: transparent; border: 2px dashed #0F8B8D; box-shadow: none; }

/* ===== v4.12.1 · Dashboard reorganizado: filas sin huecos ===== */
.dash-fila { margin-bottom: 22px; align-items: stretch; }
.dash-fila > .card { height: 100%; }
.metrics-2 { margin-top: 0; }
.dash-grid-2, .dash-grid-3 { align-items: stretch; }
.dash-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid-2 > .card, .dash-grid-3 > .card { height: 100%; display: flex; flex-direction: column; }
.dash-grid-2 > .card > .card-body, .dash-grid-3 > .card > .card-body { flex: 1; }
.dash-grid-2 .dash-barras { height: 220px; }
@media (max-width: 1100px) { .dash-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; } }
/* Honorarios: con muchas unidades no estira la fila; se desplaza dentro (el total queda fijo abajo) */
.dash-honorarios { max-height: 440px; overflow-y: auto; }
.dash-honorarios thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.dash-honorarios tfoot td { position: sticky; bottom: 0; background: var(--bg); }

/* Mapa en pantalla completa */
.mapa-g-btn-completa { width: 36px; height: 36px; display: grid; place-items: center; background: #fff; color: #141A33; border: 2px solid rgba(0,0,0,.2);
  border-radius: 6px; cursor: pointer; font-size: 19px; background-clip: padding-box; }
.mapa-g-btn-completa:hover { background: #F4F6FB; }
.mapa-g-btn-completa:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.mapa-g-mapa:fullscreen, .mapa-g-mapa.mapa-g-completa { display: flex; flex-direction: column; padding: 12px; background: var(--surface); border-radius: 0; }
.mapa-g-mapa:-webkit-full-screen { display: flex; flex-direction: column; padding: 12px; background: var(--surface); }
.mapa-g-mapa:fullscreen .mapa-g, .mapa-g-mapa.mapa-g-completa .mapa-g { flex: 1; height: auto; max-height: none; min-height: 0; }
.mapa-g-mapa:-webkit-full-screen .mapa-g { flex: 1; height: auto; max-height: none; }
.mapa-g-mapa.mapa-g-completa { position: fixed; inset: 0; z-index: 1000; margin: 0; }
body.mapa-g-sin-scroll { overflow: hidden; }

/* ===== v4.13 · Sitio público: cada sección en su propia banda ===== */
body.pub-sitio { overflow-x: clip; }
.lx-main > .lx-seccion { position: relative; z-index: 0; padding: 92px 0 96px; scroll-margin-top: 80px; }
/* Fondo a todo lo ancho de la ventana, aunque el contenido siga centrado */
.lx-main > .lx-seccion::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1;
  background: var(--banda-fondo, var(--surface)); border-top: 1px solid var(--banda-borde, var(--line)); }
/* Divisor: pastilla con los colores de la marca sobre la línea entre secciones */
.lx-main > .lx-seccion::after { content: ''; position: absolute; top: -3px; left: 50%; width: 72px; height: 6px; margin-left: -36px; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-2) 0%, var(--brand) 100%); box-shadow: 0 0 0 4px var(--banda-anillo, var(--surface)); }
.lx-main > .lx-seccion:first-child::after { display: none; }
.lx-main > .lx-seccion:nth-of-type(even) { --banda-fondo: linear-gradient(180deg, #EAEFFA 0%, #F5F7FD 55%, #F8FAF4 100%); --banda-anillo: #EAEFFA; }
/* Banda oscura (portales): contraste fuerte a mitad de página */
.lx-main > .lx-seccion.lx-banda-oscura { --banda-fondo: radial-gradient(1200px 500px at 15% 0%, rgba(135,178,75,.18), transparent 60%), linear-gradient(160deg, #1B2558 0%, #0D1435 100%);
  --banda-borde: transparent; --banda-anillo: #1B2558; color: #fff; }
.lx-banda-oscura h2 { color: #fff; }
.lx-banda-oscura .lx-intro { color: #C9D0EC; }
.lx-banda-oscura .lx-sobretitulo { color: #A9D16F; }
.lx-banda-oscura .lx-portales-grid article { border-color: transparent; box-shadow: 0 18px 40px rgba(0,0,0,.25); color: var(--ink); }
/* El formulario de contacto queda separado del último bloque */
.lx-main > .lx-contacto { margin-top: 72px; }
[data-theme="dark"] .lx-main > .lx-seccion:nth-of-type(even) { --banda-fondo: linear-gradient(180deg, #172042 0%, #121A36 100%); --banda-anillo: #172042; }
[data-theme="dark"] .lx-main > .lx-seccion.lx-banda-oscura { --banda-fondo: linear-gradient(160deg, #0B1130 0%, #070B20 100%); --banda-anillo: #0B1130; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lx-main > .lx-seccion:nth-of-type(even) { --banda-fondo: linear-gradient(180deg, #172042 0%, #121A36 100%); --banda-anillo: #172042; }
}
@media (max-width: 760px) { .lx-main > .lx-seccion { padding: 64px 0 68px; } }
.lx-monedas-titulo { font-size: 12.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.form-salir { display: inline-flex; margin: 0; }

/* v4.13.2 · Barra superior: tema, manual de uso y cerrar sesión juntos, a la derecha */
.topbar-acciones { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.topbar-acciones .form-salir { margin: 0; display: flex; }
.btn-icono { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: 19px; cursor: pointer; padding: 0; text-decoration: none; }
.btn-icono:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.btn-icono:focus-visible { outline: none; box-shadow: var(--ring); }
@media (max-width: 640px) { .topbar-acciones { padding-left: 8px; gap: 4px; } .btn-icono, .topbar-acciones .menu-tema > summary { width: 34px; height: 34px; } }
@media print { .topbar-acciones { display: none !important; } }

/* v4.13.3 · Botones desactivados: que se note que no se pueden usar */
.btn:disabled, .btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: saturate(.6); }

/* v4.14 · Enlace «¿Olvidó su contraseña?» bajo el formulario de acceso */
.login-olvido { text-align: center; margin: 14px 0 0; font-size: 13px; }
.login-olvido a { color: var(--brand); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.login-olvido a:hover { text-decoration: underline; }
a.avatar { text-decoration: none; transition: box-shadow .15s; }
a.avatar:hover, a.avatar:focus-visible { box-shadow: 0 0 0 3px var(--brand-light), 0 0 0 4px var(--brand); text-decoration: none; }

/* v4.14 · Renovación y salida de contratos */
.campo-con-sufijo { display: flex; align-items: stretch; }
.campo-con-sufijo input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.campo-con-sufijo > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg); color: var(--muted); font-weight: 600; }
.check-grupo { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check-grupo label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.ciclo-banda { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }
.ciclo-banda > i { font-size: 22px; color: var(--brand); }
.ciclo-banda .txt { flex: 1; min-width: 220px; }
.ciclo-banda .txt strong { display: block; }
.ciclo-banda .acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.ciclo-banda.ambar { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
.ciclo-banda.ambar > i { color: var(--amber); }
.ciclo-banda.verde { border-color: var(--green); background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.ciclo-banda.verde > i { color: var(--green); }
.mapa-g-alerta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.mapa-g-alerta .campo-con-sufijo { width: 110px; }
.mapa-g-alerta input { padding: 6px 8px; }

/* v4.15 · Aprobación de liquidaciones */
.liq-aprobacion { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.liq-aprobacion .hint { margin-bottom: 10px; }
.liq-aprobada { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--green); }
.liq-aprobada .btn-enlace { color: var(--muted); font-size: 12px; }

/* v4.15 · Verificación pública de documentos (QR) */
.login-card:has(.verificacion-publica), .login-card:has(.verif-form) { max-width: 460px; }
.verificacion-publica { padding: 14px 16px; gap: 12px; }
.verificacion-publica > i { font-size: 32px; }
.verificacion-publica strong { font-size: 16px; }
.verificacion-publica p { font-size: 13px; }
.verif-datos { margin-bottom: 8px; }
.verif-datos td { padding: 8px 6px; }
.verif-datos td.strong { text-align: right; }
.verif-nota { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin: 0 0 18px; }
.verif-form { border-top: 1px solid var(--line); padding-top: 16px; }
.verif-form-titulo { font-weight: 700; margin: 0 0 12px; display: flex; gap: 6px; align-items: center; }
.verif-form .hint { display: block; text-align: center; margin-top: 10px; }

/* =========================================================
   v4.16 — Sitio público en páginas: Propietarios, Inquilinos, Nosotros, Contacto
   ========================================================= */
/* Menú: sin íconos en escritorio para que quepan todas las páginas; desplegable desde 1080 px */
@media (min-width: 1081px) {
  .pub-nav a:not(.btn) { padding: 8px 10px; }
  .pub-nav a:not(.btn) > i { display: none; }
}
@media (max-width: 1080px) {
  .pub-menu-btn { display: block; margin-left: auto; }
  .pub-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px;
    background: var(--sidebar-bg); border-top: 1px solid var(--sidebar-line); box-shadow: 0 18px 30px rgba(0,0,0,.3); z-index: 60; }
  .pub-header-inner.abierto .pub-nav { display: flex; }
  .pub-nav a:not(.btn) { color: rgba(255,255,255,.85); }
  .pub-acceder { margin: 6px 0 0; justify-content: center; }
}
.pub-foot-grid { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .pub-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pub-foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tarjetas «¿Qué buscas?» */
.lx-perfiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.lx-perfiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.lx-perfil { display: flex; flex-direction: column; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.lx-perfil:hover, .lx-perfil:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.lx-perfil h3 { margin: 0 0 8px; font-size: 21px; }
.lx-perfil p { margin: 0 0 18px; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.lx-perfil-ir { font-weight: 700; color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }

/* Cuatro tarjetas en fila (Lo que recibes, Valores) */
.lx-tarjetas-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.lx-tarjetas-4 .lx-celda h3 { margin: 0 0 8px; font-size: 18px; }
.lx-tarjetas-4 .lx-celda p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

/* Requisitos */
.lx-requisitos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.lx-req-grupo { padding: 24px 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lx-req-grupo h3 { margin: 0 0 14px; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.lx-req-grupo h3 i { color: var(--brand); }
.lx-req-grupo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lx-req-grupo li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.lx-req-grupo li:first-child { border-top: 0; }
.lx-req-grupo li strong { display: block; font-size: 15px; }
.lx-req-grupo li small { display: block; color: var(--ink-soft); margin-top: 2px; line-height: 1.45; }
.lx-req-grupo em { flex: none; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); }
.lx-req-grupo em.obligatorio { background: var(--brand-light); color: var(--brand); }

/* Portal de un solo tipo (Propietarios / Inquilinos) */
.lx-portal-uno .lx-lista { margin-bottom: 22px; }
.lx-portales-uno { grid-template-columns: minmax(0, 1fr); margin: 0; }
.lx-portales-uno article { box-shadow: var(--shadow-lg); }

/* Nosotros */
.lx-mision { display: grid; gap: 16px; }
.lx-mision article { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lx-mision h3 { margin: 0 0 8px; font-size: 19px; }
.lx-mision p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.lx-cifras-nos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lx-cifras-nos > div { padding: 26px; border-radius: 20px; background: linear-gradient(160deg, #1A2456, #0B1130); color: #fff; }
.lx-cifras-nos strong { display: block; font-size: 44px; line-height: 1; letter-spacing: -1px; color: #A7D46B; }
.lx-cifras-nos span { display: block; margin-top: 8px; color: rgba(228,232,250,.85); }

/* Contacto */
.lx-contacto-datos { display: grid; gap: 10px; margin-top: 26px; }
.lx-contacto-datos > a, .lx-contacto-datos > div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.lx-contacto-datos > a:hover { background: rgba(255,255,255,.13); }
.lx-contacto-datos i { font-size: 22px; color: #A7D46B; }
.lx-contacto-datos small { display: block; font-size: 12px; color: rgba(228,232,250,.7); }
.lx-contacto-datos span { font-weight: 600; overflow-wrap: anywhere; }
.pub-motivo { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pub-motivo legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pub-motivo label { cursor: pointer; }
.pub-motivo input { position: absolute; opacity: 0; pointer-events: none; }
.pub-motivo span { display: flex; gap: 8px; align-items: center; height: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 14px; line-height: 1.3; }
.pub-motivo span i { font-size: 20px; color: var(--brand); flex: none; }
.pub-motivo input:checked + span { border-color: var(--brand); background: var(--brand-light); }
.pub-motivo input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.lx-aclaracion-clara { color: var(--ink-soft); margin-top: 16px; }

@media (max-width: 980px) {
  .lx-tarjetas-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-perfiles-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .lx-perfiles, .lx-requisitos, .lx-cifras-nos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .lx-tarjetas-4, .pub-motivo { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 981px) { .lx-pasos { grid-template-columns: repeat(var(--pasos, 4), minmax(0, 1fr)); } }
.lx-tarjetas-4 + .lx-centro { margin-top: 26px; }
.lx-contacto .pub-motivo span { color: var(--ink); }
.lx-contacto .pub-motivo input:checked + span { color: var(--brand); }

/* =========================================================
   v4.17 — Renta de mercado
   ========================================================= */
.mercado-resultado .card-body { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.mercado-cifra { display: grid; gap: 6px; min-width: 0; flex: 1; }
.mercado-cifra > strong { font-size: clamp(30px, 4vw, 42px); line-height: 1.05; letter-spacing: -1px; color: var(--brand); }
.mercado-cifra .badge { margin-right: 6px; }
.mercado-ficha-fila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mercado-ficha-fila > div { display: grid; gap: 4px; align-content: start; }
.mercado-ficha-fila strong { font-size: 20px; }
.mercado-ficha-fila .badge { justify-self: start; }
.mercado-ficha.alerta { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.texto-verde { color: var(--green); font-weight: 600; }
.sector-nuevo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .mercado-ficha-fila, .sector-nuevo { grid-template-columns: minmax(0, 1fr); }
}
.tabla-mercado td:first-child { min-width: 150px; }
.tabla-mercado td, .tabla-mercado th { padding-left: 10px; padding-right: 10px; }
.tabla-mercado .acciones { width: 1%; white-space: nowrap; }

/* ===== v4.18: pie de página centrado, lema en una línea, componente de ubicación ===== */
.pub-foot-grid { grid-template-columns: minmax(150px, 1.1fr) repeat(4, minmax(0, 1fr)); align-items: start; text-align: center; }
.pub-foot-grid > div { display: flex; flex-direction: column; align-items: center; }
.pub-foot-grid a, .pub-foot-grid span { justify-content: center; }
.pub-foot-col-logo { justify-content: center; align-self: center; }
.pub-foot-col-logo a { margin: 0; }
.pub-foot-logo { width: 150px; margin: 0 auto; }
.pub-foot-lema { max-width: 1180px; margin: 30px auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; }
.pub-foot-lema .pub-foot-eslogan { font-size: 15px; letter-spacing: .2px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-foot-nota { margin: 6px 0 0; font-size: 12.5px; opacity: .75; }
.pub-foot-legal { margin-top: 18px; padding-top: 14px; text-align: center; }
@media (max-width: 1080px) { .pub-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pub-foot-col-logo { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .pub-foot-grid { grid-template-columns: minmax(0, 1fr); }
  .pub-foot-lema .pub-foot-eslogan { white-space: normal; }
}
.geo-campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.geo-campos label { display: block; }
.geo-campos select, .geo-campos input { width: 100%; }
@media (max-width: 720px) { .geo-campos { grid-template-columns: minmax(0, 1fr); } }
.geo-campos > div { display: flex; flex-direction: column; gap: 6px; }
.geo-otra { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 8px; cursor: pointer; }
.geo-otra input { width: auto; }
.label-grupo { font-size: 13px; font-weight: 650; color: var(--ink); }
.geo-otra-zona { margin-top: 8px; font-size: 13px; }
.geo-otra-zona summary { cursor: pointer; color: var(--muted); }
.geo-otra-zona[open] summary { margin-bottom: 8px; }
.zonas-ruta { margin: 0 0 14px; font-size: 14px; }
.card-head-acciones { display: flex; gap: 6px; margin-left: auto; }
.zonas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.zona-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.zona-item.activa { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.zona-item.distrito { margin-left: 14px; }
.zona-item label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; min-width: 0; }
.zona-item label input { margin-top: 3px; flex: none; }
.zona-item a { white-space: nowrap; text-decoration: none; }
.zonas-buscar { max-width: 360px; width: 100%; min-height: var(--campo-alto); padding: 0 12px; border: 1.5px solid var(--campo-borde); border-radius: var(--campo-radio); background: var(--surface); color: var(--ink); font: inherit; }
.zonas-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.form-grid > .field.geo-caja { display: flex; flex-direction: column; gap: 8px; grid-row: auto; }
.lx-contacto .lp-form .label-grupo, .lx-contacto .geo-otra-zona summary { color: rgba(228,232,250,.85); }

/* ===== v4.19: nombre de usuario ===== */
.ajuste-correo { margin-bottom: 18px; }
.ajuste-correo .card-body { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ajuste-correo-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; flex: 1 1 420px; }
.ajuste-correo-check input { margin-top: 4px; flex: none; }

/* ===== v4.20: aviso en el acceso de clientes ===== */
.login-nota-personal { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.login-nota-personal i { margin-top: 2px; }
.pub-zonas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: -8px 0 22px; }
.pub-zonas-titulo { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.pub-zona-chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px; text-decoration: none; }
.pub-zona-chip span { font-size: 11.5px; color: var(--muted); }
.pub-zona-chip:hover, .pub-zona-chip.activa { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pub-foot-redes { display: flex; justify-content: center; gap: 10px; margin: 26px auto 0; }
.pub-foot-redes a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 19px; text-decoration: none; }
.pub-foot-redes a:hover { background: var(--accent); border-color: var(--accent); color: #111836; }
.pub-foot-redes + .pub-foot-lema { margin-top: 20px; }

/* ===== v4.21: reportes de contactos y fichas técnicas ===== */
.rc-metricas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rc-metrica { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.rc-metrica:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.rc-metrica input { margin-top: 3px; flex: none; }
.rc-metrica span { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.rc-metrica small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rc-modal-opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rc-nivel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: 1 / -1; }
.rc-nivel label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rc-nivel label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.rc-nivel small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .rc-modal-opciones, .rc-nivel { grid-template-columns: minmax(0, 1fr); } }
.portal-reporte { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.mora-propietario { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0; min-width: 0; }
.mora-propietario legend { font-weight: 600; font-size: 13.5px; padding: 0 6px; }
/* Auditoría en lenguaje natural (v4.23) */
.relato-frase { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.relato-detalle { color: var(--muted); margin-top: 2px; line-height: 1.45; }
.relato-cambios { margin: 6px 0 0; padding-left: 18px; color: var(--text); line-height: 1.5; }
.relato-cambios li, .historial .relato-cambios li { margin: 1px 0; border: 0; padding: 0; list-style: disc; }
.historial .relato-frase { margin-top: 4px; }
/* Gastos de unidades (v4.24) */
.gu-pagador { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .gu-pagador { grid-template-columns: minmax(0, 1fr); } }
.fila-anulada td { opacity: .55; }
.modal input[type=file] { max-width: 100%; }
/* Finanzas de la administración (v4.25) */
.tabla-finanzas td:first-child { white-space: nowrap; }
.tabla-finanzas .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla-finanzas .fin-subtotal td { font-weight: 600; background: var(--surface-2, rgba(127,127,127,.06)); }
.tabla-finanzas .fin-resultado td { font-weight: 700; border-top: 2px solid var(--line); }
.tabla-finanzas .fin-acumulado td { color: var(--muted); font-size: 12.5px; }
.fin-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .fin-dos { grid-template-columns: minmax(0, 1fr); } }

/* v4.28: campos sueltos de formularios en línea (motivo del rechazo, comentarios) con el mismo aspecto que .field */
form > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]),
form > select {
  font-family: var(--font); font-size: 13px; color: var(--ink); padding: 7px 10px; min-height: 34px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
form > input:not([type="hidden"]):focus, form > select:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }
td > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
  font-family: var(--font); font-size: 13px; color: var(--ink); padding: 7px 10px; min-height: 34px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
td > input:not([type="hidden"]):focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }

/* v4.30: acciones en una línea dentro de tablas (nota + botones) */
.acciones-linea { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acciones-linea > input, .acciones-linea > select { flex: 1; min-width: 150px; font-size: 13px; padding: 6px 10px; }

/* ---------- Solicitudes web (v4.35): lista, tablero, ficha lateral ---------- */
.segmentado { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmentado .btn { border: 0; border-radius: 0; }
.segmentado .btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.sol-fila { cursor: pointer; }
.sol-fila:hover td { background: var(--line-soft); }
.sol-fila:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.sol-tarde td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.sol-alerta { color: var(--red); font-weight: 600; }
.sol-extracto { margin-top: 3px; max-width: 46ch; }
.sol-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand); font-size: 10.5px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; margin-right: 4px; }

.sol-tablero { display: grid; grid-template-columns: repeat(5, minmax(185px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.sol-columna { background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 320px; transition: border-color .12s, background .12s; }
.sol-columna.destino { border-color: var(--brand); background: var(--brand-light); }
.sol-columna > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.sol-cuenta { font-weight: 800; color: var(--muted); font-size: 13px; }
.sol-columna-cuerpo { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; }
.sol-tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: grab; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 5px; transition: transform .12s, box-shadow .12s; }
.sol-tarjeta:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.sol-tarjeta:focus-visible { outline: none; box-shadow: var(--ring); }
.sol-tarjeta.arrastrando { opacity: .5; cursor: grabbing; }
.sol-tarjeta.sol-tarde { border-left: 3px solid var(--red); }
.sol-tarjeta-cab { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.sol-tarjeta-pie { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.sol-vacia { color: var(--muted); font-size: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; padding: 18px 8px; margin: 0; }

.sol-ficha-fondo { position: fixed; inset: 0; background: rgba(17,24,54,.38); z-index: 80; opacity: 0; transition: opacity .2s; }
.sol-ficha-fondo.abierta { opacity: 1; }
.sol-ficha { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); z-index: 81; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; }
.sol-ficha.abierta { transform: none; }
.sol-ficha-cuerpo { overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.sol-ficha-cuerpo > * { flex-shrink: 0; }
.sol-ficha-cab { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sol-ficha-cab h2 { margin: 0 0 6px; font-size: 20px; }
.sol-ficha-cab h2:focus { outline: none; }
.sol-ficha-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sol-rapidas { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-inline { display: inline; }
.sol-datos { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.sol-datos dt { color: var(--muted); }
.sol-datos dd { margin: 0; word-break: break-word; }
.sol-mensaje { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; white-space: normal; word-break: break-word; max-height: 220px; overflow-y: auto; }
.sol-ficha-bloque { border-top: 1px solid var(--line); padding-top: 14px; }
.sol-ficha-bloque h3 { font-size: 14px; margin: 0 0 10px; }
.sol-ficha-bloque.flash { border-top: 0; padding-top: 12px; }
.sol-estados { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-estados .btn.activo { background: var(--brand); color: #fff; border-color: var(--brand); opacity: 1; }
.sol-dos { display: grid; gap: 14px; }
.sol-proxima .btn { align-self: stretch; }
.sol-proxima { display: grid; grid-template-columns: 150px 1fr auto auto; gap: 6px; }
.sol-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sol-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sol-chip span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.sol-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.sol-chip input:focus-visible + span { box-shadow: var(--ring); }
.sol-gestion-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.sol-gestion-pie .btn { margin-left: auto; }
.sol-linea { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sol-linea li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; position: relative; }
.sol-linea li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 30px; bottom: -12px; width: 2px; background: var(--line); }
.sol-linea-icono { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-light); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.sol-linea-estado .sol-linea-icono, .sol-linea-asignacion .sol-linea-icono, .sol-linea-proxima .sol-linea-icono, .sol-linea-sistema .sol-linea-icono { background: var(--line-soft); color: var(--muted); }
.sol-linea-whatsapp .sol-linea-icono { background: var(--brand-2-light); color: var(--brand-2-dark); }
.sol-linea-texto { font-size: 13.5px; margin-top: 2px; word-break: break-word; }
.sol-ficha-pie { border-top: 1px solid var(--line); padding-top: 12px; }
.sol-cargando { color: var(--muted); padding: 30px 0; text-align: center; }
.sol-cargando .ti { animation: girar 1s linear infinite; display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }
.sol-aviso { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 14px; max-width: calc(100vw - 32px); }
.sol-aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.sol-aviso[data-tipo="error"] { background: var(--red); }
@media (max-width: 640px) {
  .sol-proxima { grid-template-columns: 1fr auto auto; }
  .sol-proxima input[type=date] { grid-column: 1 / -1; }
  .sol-datos { grid-template-columns: 80px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sol-ficha, .sol-ficha-fondo, .sol-tarjeta, .sol-aviso { transition: none; } }
[data-theme="dark"] .sol-columna { background: rgba(255,255,255,.03); }
[data-theme="dark"] .sol-ficha-fondo { background: rgba(0,0,0,.55); }

/* «No soy un robot» (v4.35) */
.antibot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 10px; }
.antibot-caja { display: inline-flex !important; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); cursor: pointer; font-weight: 600 !important; color: var(--ink); min-width: 230px; }
.antibot-caja input { width: 20px !important; height: 20px; min-height: 0 !important; margin: 0; accent-color: var(--brand-2-dark); flex-shrink: 0; }
.antibot-estado { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.antibot.verificando .antibot-estado::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: girar .8s linear infinite; }
.antibot.verificado .antibot-caja { border-color: var(--brand-2-dark); }
.antibot.verificado .antibot-estado { color: var(--brand-2-dark); }
.antibot-nota { font-size: 11.5px; color: var(--muted); }
.lx-contacto .antibot-nota { color: rgba(228,232,250,.75); }
.antibot .antibot-caja, .lx-contacto .antibot .antibot-caja { color: var(--ink) !important; background: var(--surface); }
