/* ══════════════════════════════════════════════════════════════════════
   INSULARIUS — Nuevo Frontend (prototipo .dc.html)
   Versión: 1.0.0 · Fecha: 2026-08-04
   Monocromo navy · Es-CR · Mobile-first
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. SHELL v2 (sidebar navy + topbar blanco) ── */
.ins-shell {
  display: flex;
  min-height: 100vh;
  background: #F8FAFC;
  color: #0F172A;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ins-sidebar {
  width: 244px;
  flex: none;
  background: #101F45;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width .16s ease;
}
.ins-sidebar[data-collapsed="1"] { width: 68px !important; }
.ins-sidebar[data-collapsed="1"] [data-ins-nav-label],
.ins-sidebar[data-collapsed="1"] [data-ins-badge],
.ins-sidebar[data-collapsed="1"] [data-ins-foot] { display: none !important; }
.ins-sidebar[data-collapsed="1"] [data-ins-logo-row] {
  flex-direction: column !important;
  padding: 13px 8px !important;
}
.ins-sidebar[data-collapsed="1"] [data-ins-toggle-btn] { margin-left: 0 !important; }
.ins-sidebar[data-collapsed="1"] .ins-snav { justify-content: center !important; padding-left: 0 !important; padding-right: 0 !important; }

.ins-sidebar [data-ins-logo-row] {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-weight: 800;
  font-size: 17px;
}
.ins-sidebar [data-ins-logo-mark] {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.ins-sidebar [data-ins-toggle-btn] {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-left: auto;
  transition: background .15s;
}
.ins-sidebar [data-ins-toggle-btn]:hover { background: rgba(255,255,255,.26); }
.ins-sidebar [data-ins-toggle-btn] svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.ins-snav {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: rgba(255,255,255,.82);
  padding: 8px 12px;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  margin: 1px 0;
}
.ins-snav:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.ins-snav.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.ins-snav .icon { width: 20px; height: 20px; flex: none; }
.ins-snav [data-ins-badge] {
  margin-left: auto;
  background: #16295C;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.ins-sidebar .ins-sep {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 8px 12px;
}
.ins-sidebar [data-ins-foot] { padding: 12px 16px; font-size: 12px; color: rgba(255,255,255,.5); }

.ins-nav-block {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: none;
}
.ins-nav-block::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ── 2. TOPBAR v2 (sticky blanco, search + notificaciones + saludo) ── */
.ins-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 30;
}
/* Los elementos a la derecha del topbar (campana, chip, saludo) llevan
   un separador sutil y un padding interno para no amontonarse. */
.ins-topbar .ins-bell-btn,
.ins-topbar .ins-chipimp {
  margin-left: 2px;
}
.ins-topbar .ins-greeting {
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid #E2E8F0;
}
.ins-topbar [data-ins-search] {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.ins-topbar [data-ins-search-box] {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.ins-topbar [data-ins-search-box]:focus-within {
  border-color: #1B3A8F;
  background: #fff;
}
.ins-topbar [data-ins-search-box] svg { width: 18px; height: 18px; flex: none; color: #94A3B8; }
.ins-topbar [data-ins-search-box] input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-size: 13.5px;
  color: #0F172A;
  min-width: 0;
}
.ins-topbar [data-ins-search-kbd] {
  font-size: 10px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  color: #94A3B8;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 5px;
  padding: 2px 5px;
  line-height: 1;
}
.ins-topbar [data-ins-spacer] { flex: 1; }

.ins-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s, border-color .15s;
}
.ins-bell-btn:hover { background: #EEF2FB; color: #1B3A8F; border-color: #C7D2FE; }
.ins-bell-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ins-bell-btn [data-ins-bell-count] {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #16295C;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}
.ins-greeting { font-size: 13px; color: #475569; white-space: nowrap; }

/* Chip de impersonación en el topbar (a la par de la campana). Indica que
   el user está impersonando (superadmin "viendo como", o cuenta "ver como").
   Click → vuelve a la sesión original. Mismo idioma/tono que el resto del topbar. */
.ins-chipimp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  border: 1px solid #C7D2FE;
  background: #EEF2FB;
  color: #1B3A8F;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.ins-chipimp:hover { background: #DDE5FB; border-color: #A8B5F0; }
.ins-chipimp svg { flex: none; color: #4F46E5; }
.ins-chipimp b { color: #16295C; font-weight: 700; margin-left: 2px; }

/* ── 3. CONTENEDOR PRINCIPAL (área scrollable) ── */
.ins-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ins-content {
  padding: clamp(14px, 1.6vw, 28px);
  padding-bottom: 88px;
  width: 100%;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── 4. PAGE HEAD (título + acciones) ── */
.ins-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.ins-page-head h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 2px;
  color: #0F172A;
}
.ins-page-head .ins-page-sub {
  font-size: 13px;
  color: #475569;
}
.ins-page-head [data-ins-actions] { display: flex; align-items: center; gap: 8px; }

/* ── 5. BOTONES (estándar monocromo) ── */
.ins-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ins-btn:hover { background: #F8FAFC; color: #0F172A; text-decoration: none; }
.ins-btn svg { width: 16px; height: 16px; flex: none; }
.ins-btn.primary { border: 0; background: #1B3A8F; color: #fff; }
.ins-btn.primary:hover { background: #152F73; color: #fff; }
.ins-btn .ins-btn-caret { color: #94A3B8; font-size: 11px; margin-left: 2px; }
.ins-btn.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.ins-btn.sm svg { width: 14px; height: 14px; }
.ins-btn.icon { width: 30px; padding: 0; justify-content: center; }
.ins-btn.icon.lg { width: 38px; height: 38px; }
.ins-btn .kbd {
  margin-left: auto;
  font-size: 10.5px;
  font-family: ui-monospace, monospace;
  color: #94A3B8;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  padding: 2px 5px;
  background: #fff;
}
.ins-btn.primary .kbd { color: #C7D2FE; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }

/* ── 6. DROPDOWN / POPOVER (patrón estándar) ── */
.ins-pop {
  position: absolute;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16);
  z-index: 60;
  animation: ins-pop-in .2s cubic-bezier(.16,1,.3,1);
}
@keyframes ins-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.ins-pop[role="dialog"], .ins-pop[role="menu"] { outline: none; }
.ins-menu { padding: 7px; min-width: 200px; }
.ins-menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  color: #0F172A;
  text-decoration: none;
}
.ins-menu-item:hover { background: #F8FAFC; color: #0F172A; text-decoration: none; }
.ins-menu-item .icon { width: 18px; height: 18px; color: #475569; flex: none; }
.ins-menu-item.primary { background: #EEF2FB; color: #1B3A8F; font-weight: 600; }
.ins-menu-item.primary:hover { background: #E0E7FF; color: #1B3A8F; }
.ins-menu-item.primary .icon { color: currentColor; }
.ins-menu-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94A3B8;
  padding: 8px 10px 5px;
}
.ins-menu-divider { height: 1px; background: #EEF0F5; margin: 6px 4px; }
.ins-pop-wide { padding: 14px; }

/* ── 7. KPI STRIP (4 cards con sparkline) ── */
.ins-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ins-kpi {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ins-kpi.dark {
  background: linear-gradient(160deg, #1B3A8F, #101F45);
  border: 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ins-kpi-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: -.01em;
}
.ins-kpi.dark .ins-kpi-eyebrow { color: rgba(255,255,255,.72); }
.ins-kpi-eyebrow .ins-kpi-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1B3A8F;
  flex: none;
}
.ins-kpi.dark .ins-kpi-eyebrow .ins-kpi-dot { background: #fff; opacity: .7; }
.ins-kpi-spark { width: 84px; height: 24px; opacity: .9; flex: none; }
.ins-kpi-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-top: 9px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.ins-kpi.dark .ins-kpi-value { color: #fff; }
.ins-kpi-value .ins-kpi-sub {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.ins-kpi.dark .ins-kpi-value .ins-kpi-sub { color: rgba(255,255,255,.7); }
.ins-kpi-detail { font-size: 11px; color: #94A3B8; height: 14px; margin-top: 1px; }
.ins-kpi.dark .ins-kpi-detail { color: rgba(255,255,255,.68); }
.ins-kpi-progress {
  height: 6px;
  border-radius: 999px;
  background: #EEF0F5;
  margin-top: 7px;
  overflow: hidden;
}
.ins-kpi.dark .ins-kpi-progress { background: rgba(255,255,255,.18); }
.ins-kpi-progress > span {
  display: block;
  height: 100%;
  background: #1B3A8F;
  border-radius: 999px;
  transition: width .3s;
}
.ins-kpi.dark .ins-kpi-progress > span { background: #fff; opacity: .92; }
.ins-kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 12px;
  color: #475569;
}
.ins-kpi.dark .ins-kpi-foot { color: rgba(255,255,255,.72); }
.ins-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EEF2FB;
  color: #1B3A8F;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
}
.ins-kpi.dark .ins-kpi-chip { background: rgba(255,255,255,.16); color: #fff; }

/* Split interno de un KPI (2 columnas separadas por línea) */
.ins-kpi-split {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  margin-top: 4px;
}
.ins-kpi-split > .ins-kpi-half { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ins-kpi-split > .ins-kpi-half:first-child { padding-right: 14px; }
.ins-kpi-split > .ins-kpi-half:last-child { padding-left: 14px; }
.ins-kpi-split > .ins-kpi-divider { width: 1px; background: #E5E7EB; flex: none; }
.ins-kpi-half .ins-kpi-eyebrow { font-size: 11.5px; }
.ins-kpi-half .ins-kpi-value { font-size: 22px; margin-top: 5px; }
.ins-kpi-half .ins-kpi-legend { display: flex; flex-direction: column; gap: 3px; margin-top: auto; padding-top: 6px; }
.ins-kpi-half .ins-kpi-legend-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #475569; }
.ins-kpi-half .ins-kpi-legend-row .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.ins-kpi-half .ins-kpi-legend-row .v { margin-left: auto; font-weight: 700; color: #0F172A; }
.ins-kpi-half .ins-kpi-occ {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: 5px;
}
.ins-kpi-half .ins-kpi-occ small { font-size: 12px; color: #94A3B8; font-weight: 500; }

/* ── 8. DOS COLUMNAS (Lo que te toca hoy + Directorio) ── */
.ins-row-2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  align-items: start;
}

/* Card "Lo que te toca hoy" (feed de pendientes) */
.ins-feed { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.ins-feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #EEF0F5;
  flex: none;
}
.ins-feed-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; flex: 1; color: #0F172A; }
.ins-feed-head .ins-feed-count { font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; }
.ins-feed-body { overflow-y: auto; max-height: 460px; flex: 1; min-height: 0; }
.ins-feed-empty { padding: 46px 24px; text-align: center; }
.ins-feed-empty .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: #EEF2FB; color: #1B3A8F;
  display: inline-flex; align-items: center; justify-content: center;
}
.ins-feed-empty .ico svg { width: 22px; height: 22px; }
.ins-feed-empty h3 { font-size: 14.5px; font-weight: 700; margin: 12px 0 3px; color: #0F172A; }
.ins-feed-empty p { font-size: 13px; color: #475569; margin: 0; }

.ins-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 6px;
}
.ins-section-label span:first-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #94A3B8;
}
.ins-section-label .n { font-size: 11px; color: #94A3B8; }

.ins-row {
  display: flex;
  gap: 12px;
  padding: 11px 18px 13px;
  align-items: center;
  border-bottom: 1px solid #F1F5F9;
}
.ins-row:last-child { border-bottom: 0; }
.ins-row .ins-ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: #EEF2FB;
  color: #16295C;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.ins-row .ins-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ins-row .ins-ico.money { background: #EEF2FB; color: #16295C; }
.ins-row .ins-ico.alt { background: #F1F5F9; color: #475569; }
.ins-row .ins-row-main { flex: 1; min-width: 0; }
.ins-row .ins-row-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ins-row .ins-row-line1 .n { font-size: 13.5px; font-weight: 600; color: #0F172A; }
.ins-row .ins-row-line1 .chip { font-size: 12px; color: #94A3B8; }
.ins-row .ins-row-line1 .amt { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; color: #0F172A; }
.ins-row .ins-row-meta { font-size: 11.5px; color: #94A3B8; margin-top: 2px; }
.ins-row .ins-row-actions { display: flex; gap: 5px; flex: none; align-self: center; }

/* Directorio (panel angosto) */
.ins-dir { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.ins-dir-head { padding: 14px 16px 10px; flex: none; }
.ins-dir-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; color: #0F172A; }
.ins-dir-head .ins-dir-sub { font-size: 12px; color: #475569; margin-top: 1px; }
.ins-dir-controls { padding: 0 16px 10px; flex: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ins-search-input {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  height: 34px;
  padding: 0 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
  min-width: 0;
}
.ins-search-input:focus-within { border-color: #1B3A8F; background: #fff; }
.ins-search-input svg { width: 15px; height: 15px; color: #94A3B8; flex: none; }
.ins-search-input input {
  flex: 1; border: 0; background: none; outline: none;
  font-size: 13px; min-width: 0;
}
.ins-dir-list { flex: 1; max-height: 392px; overflow-y: auto; border-top: 1px solid #EEF0F5; }
.ins-dir-empty { padding: 34px 20px; text-align: center; font-size: 13px; color: #475569; }

/* ── 9. TREND CHART (Cómo venís cobrando) ── */
.ins-trend { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px 18px 10px; }
.ins-trend-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ins-trend-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; color: #0F172A; }
.ins-trend-head .ins-trend-sub { font-size: 12px; color: #475569; }
.ins-trend-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #475569; flex-wrap: wrap; }
.ins-trend-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ins-trend-legend .swatch { width: 14px; height: 3px; border-radius: 2px; background: #1B3A8F; }
.ins-trend-legend .swatch.dashed { width: 14px; height: 0; border-top: 2px dashed #94A3B8; }
.ins-trend-svg { position: relative; margin-top: 4px; width: 100%; aspect-ratio: 600/160; }
.ins-trend-svg svg { display: block; overflow: visible; width: 100%; height: 100%; }
.ins-trend-tip {
  position: absolute;
  background: #0F172A;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  box-shadow: 0 4px 14px rgba(15,23,42,.2);
  z-index: 5;
}
.ins-trend-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: #0F172A;
}

/* ── 10. NOTIFICACIONES (popover bell) ── */
.ins-notif {
  position: absolute;
  top: 46px;
  right: 0;
  width: 420px;
  max-width: 92vw;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16);
  z-index: 60;
  animation: ins-pop-in .2s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.ins-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 10px;
}
.ins-notif-head b { font-size: 14.5px; }
.ins-notif-head .ins-link-btn { border: 0; background: none; color: #1B3A8F; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.ins-notif-tabs { padding: 0 16px 10px; }
.ins-notif-tabs select {
  width: 100%; height: 34px;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12.5px; font-weight: 600;
  color: #0F172A; outline: none; background: #fff;
}
.ins-notif-list { max-height: 330px; overflow-y: auto; border-top: 1px solid #EEF0F5; }
.ins-notif-item {
  display: flex;
  gap: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid #EEF0F5;
  align-items: flex-start;
}
.ins-notif-item:last-child { border-bottom: 0; }
.ins-notif-item .ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #EEF2FB; color: #16295C;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ins-notif-item .ico svg { width: 16px; height: 16px; }
.ins-notif-item .ttl { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.ins-notif-item .desc { font-size: 12.5px; color: #475569; margin-top: 2px; }
.ins-notif-item .when { font-size: 11.5px; color: #94A3B8; margin-top: 4px; }
.ins-notif-foot { padding: 11px 16px; background: #F8FAFC; border-top: 1px solid #EEF0F5; text-align: center; }
.ins-notif-foot a { font-size: 13px; font-weight: 600; }

/* ── 11. DATE RANGE PICKER (estándar único) ── */
.ins-drp { position: relative; display: inline-block; }
.ins-drp-btn {
  display: flex; align-items: center; gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.ins-drp-btn:hover { background: #F8FAFC; border-color: #C7D2FE; }
.ins-drp-btn svg.cal { width: 15px; height: 15px; color: #475569; }
.ins-drp-btn svg.caret { width: 13px; height: 13px; color: #94A3B8; }
.ins-drp-pop {
  position: absolute;
  top: 40px;
  left: 0;
  width: 300px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16);
  z-index: 60;
  overflow: hidden;
  animation: ins-pop-in .2s cubic-bezier(.16,1,.3,1);
}
.ins-drp-tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.ins-drp-tab {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.ins-drp-tab.on { background: #EEF2FB; color: #1B3A8F; border-color: #C7D2FE; }
.ins-drp-pane { padding: 12px; }
.ins-drp-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px;
}
.ins-drp-head .nav {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid #E2E8F0;
  background: #fff; color: #475569;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.ins-drp-head .nav:hover { background: #F8FAFC; }
.ins-drp-head .nav svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ins-drp-head .lbl { font-size: 13px; flex: 1; text-align: center; font-weight: 700; }

.ins-drp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ins-drp-grid.days { grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ins-drp-cell {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ins-drp-cell:hover { background: #F1F5F9; }
.ins-drp-cell.in-range, .ins-drp-cell.preview { background: #EEF2FB; color: #1B3A8F; }
.ins-drp-cell.edge { background: #1B3A8F; color: #fff; border-color: #1B3A8F; }
.ins-drp-cell.disabled { color: #CBD5E1; cursor: not-allowed; background: transparent; }
.ins-drp-cell.disabled:hover { background: transparent; }
.ins-drp-cell.muted { color: #94A3B8; }
.ins-drp-cell.preview-edge { background: #C7D4F0; color: #1B3A8F; border-color: #1B3A8F; }
.ins-drp-cell:focus-visible { outline: 2px solid #1B3A8F; outline-offset: 1px; }

.ins-drp-wd {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}
.ins-drp-wd span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #94A3B8;
}

.ins-drp-direct {
  padding: 10px 12px 0;
  border-top: 1px solid #EEF0F5;
  margin-top: 4px;
}
.ins-drp-direct .ttl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 6px;
}
.ins-drp-direct .row {
  display: flex; align-items: center; gap: 6px;
}
.ins-drp-direct input {
  flex: 1; height: 30px;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  padding: 0 6px;
  font-size: 11.5px;
  outline: none;
  min-width: 0;
}
.ins-drp-direct input:focus { border-color: #1B3A8F; }
.ins-drp-direct .sep { color: #94A3B8; font-size: 11px; }

.ins-drp-foot {
  display: flex; gap: 8px;
  border-top: 1px solid #EEF0F5;
  padding: 10px 12px 10px;
}
.ins-drp-foot .ins-btn { flex: 1; justify-content: center; }

/* ── 12. CHIP DE IMPERSONACIÓN (sustituye el viejo chipimp) ── */
.ins-impersonate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0F172A;
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
  border: 0;
}
.ins-impersonate:hover { background: #1E293B; }
.ins-impersonate .dot { width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; flex: none; }

/* ── 13. RESPONSIVE ── */
@media (max-width: 1100px) {
  .ins-kpi-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .ins-row-2 { grid-template-columns: 1fr !important; }
}
@media (max-width: 920px) {
  .ins-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .ins-sidebar.open { transform: translateX(0); }
  .ins-main { width: 100%; }
}
@media (max-width: 760px) {
  .ins-kpi-strip { grid-template-columns: 1fr !important; }
  .ins-kpi-split { flex-direction: column !important; }
  .ins-kpi-split > .ins-kpi-half:first-child { padding-right: 0 !important; padding-bottom: 10px; }
  .ins-kpi-split > .ins-kpi-half:last-child { padding-left: 0 !important; padding-top: 10px; }
  .ins-kpi-split > .ins-kpi-divider { width: 100% !important; height: 1px !important; }
  .ins-topbar { padding: 10px 14px; }
  .ins-greeting { display: none; }
  .ins-content { padding: 14px; }
  .ins-notif { right: -8px; width: 96vw; }
  .ins-trend-svg { aspect-ratio: 600/220; }
  .ins-feed-body, .ins-dir-list { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ins-pop, .ins-drp-pop, .ins-notif, .ins-bell-btn, .ins-snav, .ins-kpi-progress > span {
    animation: none !important;
    transition: none !important;
  }
}
/* ══════════════════════════════════════════════════════════════════════
   VISTAS NUEVAS — estilos compartidos
   ══════════════════════════════════════════════════════════════════════ */

/* Toolbar de página (search + filtros + acciones) */
.ins-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 4px;
}
.ins-toolbar .ins-search-input { max-width: 380px; flex: 1 1 280px; }

/* Toggle "switch" (estilo monocromo) */
.ins-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.ins-switch .ins-sw {
  display: inline-block;
  width: 32px;
  height: 19px;
  border-radius: 999px;
  position: relative;
  flex: none;
  background: #CBD5E1;
  transition: background .15s;
}
.ins-switch .ins-sw.on { background: #1B3A8F; }
.ins-switch .ins-sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: left .15s;
}
.ins-switch .ins-sw.on::after { left: 15px; }

/* Agrupación por propiedad (lista de unidades) */
.ins-prop-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
  overflow: hidden;
}
.ins-prop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid #EEF0F5;
  background: #FCFCFD;
}
.ins-prop-head .ins-prop-ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #EEF2FB; color: #1B3A8F;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ins-prop-head .ins-prop-ico svg { width: 16px; height: 16px; }
.ins-prop-head b { font-size: 14px; flex: 1; }
.ins-prop-head .ins-prop-resumen { font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; }

/* ── Propiedades: lista de filas (prototipo Propiedades.dc.html) ── */
.ins-prop-list {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
}
.ins-prop-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #EEF0F5;
  text-decoration: none;
  color: #0F172A;
  transition: background .12s;
}
.ins-prop-row:last-child { border-bottom: 0; }
.ins-prop-row:hover { background: #FBFCFE; color: #0F172A; text-decoration: none; }
.ins-prop-row .ins-prop-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #EEF2FB; color: #1B3A8F;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ins-prop-row .ins-prop-ico svg { width: 19px; height: 19px; }
.ins-prop-main { flex: 1; min-width: 0; }
.ins-prop-nom { font-size: 14.5px; font-weight: 700; }
.ins-prop-meta { font-size: 12.5px; color: #94A3B8; margin-top: 1px; }
.ins-prop-col { text-align: right; flex: none; }
.ins-prop-col-renta { width: 110px; }
.ins-prop-val { font-size: 13.5px; font-weight: 700; }
.ins-prop-val.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-prop-lbl { font-size: 11.5px; color: #94A3B8; }
.ins-prop-row .ins-prop-chev { width: 16px; height: 16px; color: #94A3B8; flex: none; }
@media (max-width: 640px) {
  .ins-prop-row { flex-wrap: wrap; gap: 8px 14px; }
  .ins-prop-main { flex: 1 1 100%; order: -1; }
  .ins-prop-col, .ins-prop-col-renta { text-align: left; width: auto; }
}

/* Fila de unidad (Alquileres) */
.ins-urow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #EEF0F5;
  cursor: pointer;
  transition: background .12s;
}
.ins-urow:last-child { border-bottom: 0; }
.ins-urow:hover { background: #FBFCFE; }
.ins-urow .ins-udot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ins-urow .ins-uunit { width: 110px; flex: none; font-size: 13.5px; font-weight: 700; }
.ins-urow .ins-umain { flex: 1; min-width: 0; }
.ins-urow .ins-umain .t { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-urow .ins-umain .s { font-size: 11.5px; color: #94A3B8; }
.ins-urow .ins-uvence { width: 130px; flex: none; font-size: 12.5px; color: #475569; }
.ins-urow .ins-urenta { text-align: right; flex: none; width: 110px; }
.ins-urow .ins-urenta .r { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: #0F172A; }
.ins-urow .ins-urenta .r.libre { color: #94A3B8; }
.ins-urow .ins-urenta .l { font-size: 10.5px; color: #94A3B8; }
.ins-urow .ins-uchip {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  flex: none; width: 96px; text-align: center;
}
.ins-urow .ins-uflech { color: #94A3B8; flex: none; }

/* Colores por estado de unidad */
.ins-state-dia .ins-udot, .ins-state-dia .ins-uchip { background: #1B3A8F; color: #fff; }
.ins-state-mora .ins-udot { background: #16295C; }
.ins-state-mora .ins-uchip { background: #C7D2FE; color: #16295C; }
.ins-state-plan .ins-udot { background: #1B3A8F; }
.ins-state-plan .ins-uchip { background: #DCE3FA; color: #1B3A8F; }
.ins-state-confirmar .ins-udot { background: #1B3A8F; }
.ins-state-confirmar .ins-uchip { background: #DCE3FA; color: #1B3A8F; }
.ins-state-hoy .ins-udot { background: #1B3A8F; }
.ins-state-hoy .ins-uchip { background: #DCE3FA; color: #1B3A8F; }
.ins-state-libre { background: #FBFBFC; }
.ins-state-libre .ins-udot { background: #CBD5E1; }
.ins-state-libre .ins-uchip { background: #F1F5F9; color: #475569; }

/* Modal genérico (overlay + dialog)
   El scrim respeta el sidebar y el topbar: vive en el área de contenido,
   no oscurece la navegación. Las variables --ins-modal-left / --ins-modal-top
   las actualiza V._scrimsAjustar() en JS al re-renderizar el shell, al
   cambiar el tamaño de la ventana, y al togglear el menú. */
.ins-modal-scrim {
  position: fixed;
  left: var(--ins-modal-left, 0px);
  top: var(--ins-modal-top, 0px);
  right: 0; bottom: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(2px);
  z-index: 70;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 20px;
  overflow-y: auto;
  transition: left .16s ease, top .16s ease;
}
/* Mismo concepto para drawers fullscreen (ej. unidad-nueva): viven dentro
   del área de contenido, no cubren la navegación. */
[data-un2-root], [data-pn2-content-root] {
  position: fixed;
  left: var(--ins-modal-left, 0px);
  top: var(--ins-modal-top, 0px);
  right: 0; bottom: 0;
  transition: left .16s ease, top .16s ease;
}
.ins-modal {
  width: 100%; max-width: 760px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16);
  overflow: hidden;
  animation: ins-pop-in .2s cubic-bezier(.16,1,.3,1);
}
.ins-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #EEF0F5;
  background: linear-gradient(160deg, #EEF2FB, #fff);
}
.ins-modal-head .ins-modal-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: #1B3A8F; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ins-modal-head .ins-modal-ico svg { width: 21px; height: 21px; }
.ins-modal-head .ins-modal-ttitle { flex: 1; min-width: 0; }
.ins-modal-head .ins-modal-ttitle b { font-size: 17px; letter-spacing: -.01em; }
.ins-modal-head .ins-modal-ttitle .ins-modal-sub { font-size: 12.5px; color: #475569; }
.ins-modal-head .ins-modal-close {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid #E2E8F0; background: #fff; color: #475569;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
}
.ins-modal-head .ins-modal-close:hover { background: #F8FAFC; }

/* Grid de 3 columnas en el modal (contrato/renta/agosto) */
.ins-modal-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #EEF0F5;
}
.ins-modal-3col > .ins-modal-3col-cell { padding: 14px 20px; border-right: 1px solid #EEF0F5; }
.ins-modal-3col > .ins-modal-3col-cell:last-child { border-right: 0; }
.ins-modal-3col .ins-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #94A3B8; }
.ins-modal-3col .ins-big { font-size: 18px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-modal-3col .ins-big small { font-size: 12px; font-weight: 500; color: #94A3B8; }
.ins-modal-3col .ins-meta { font-size: 13px; margin-top: 4px; color: #475569; }
.ins-modal-3col .ins-meta.dep { color: #94A3B8; font-size: 12px; }

/* Botonera del modal */
.ins-modal-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 13px 20px;
  border-bottom: 1px solid #EEF0F5;
}
.ins-modal-actions .ins-btn { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.ins-modal-actions .ins-btn.primary { background: #1B3A8F; color: #fff; border: 0; }
.ins-modal-actions .ins-btn.primary:hover { background: #152F73; }
.ins-modal-actions .ins-btn.ghost-danger { color: #16295C; border: 1px solid #C7D2FE; }
.ins-modal-actions .ins-btn.ghost-danger:hover { background: #C7D2FE; }
.ins-modal-actions .right { margin-left: auto; }

/* Comentarios */
.ins-comments { padding: 16px 20px; }
.ins-comments-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ins-comments-head .ins-prop-ico { width: 26px; height: 26px; border-radius: 8px; background: #EEF2FB; color: #1B3A8F; display: flex; align-items: center; justify-content: center; }
.ins-comments-head .ins-prop-ico svg { width: 14px; height: 14px; }
.ins-comments-head b { font-size: 13.5px; flex: 1; }
.ins-comments-head .ins-comments-tag {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: #F1F5F9; color: #475569;
  border: 1px dashed #CBD5E1;
}
.ins-comment {
  display: flex; gap: 9px; margin-bottom: 10px;
}
.ins-comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #EEF2FB; color: #1B3A8F;
  font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ins-comment-body {
  flex: 1; min-width: 0;
  background: #F8FAFC;
  border: 1px solid #EEF0F5;
  border-radius: 10px;
  padding: 8px 11px;
}
.ins-comment-head { display: flex; align-items: center; gap: 7px; }
.ins-comment-head b { font-size: 12px; }
.ins-comment-head .ins-comment-when { font-size: 10.5px; color: #94A3B8; }
.ins-comment-head .ins-comment-del {
  margin-left: auto;
  width: 22px; height: 22px; border-radius: 6px;
  border: 0; background: none; color: #94A3B8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ins-comment-head .ins-comment-del:hover { color: #16295C; background: #C7D2FE; }
.ins-comment-text { font-size: 12.5px; margin-top: 3px; }
.ins-comment-tag {
  display: inline-block; margin-top: 5px;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
  background: #EEF2FB; color: #1B3A8F;
}
.ins-comment-input {
  display: flex; gap: 7px; margin-top: 12px;
}
.ins-comment-input input {
  flex: 1; height: 34px;
  border: 1px solid #E2E8F0; border-radius: 9px;
  padding: 0 11px; font-size: 12.5px;
  outline: none; min-width: 0;
}
.ins-comment-input input:focus { border-color: #1B3A8F; }
.ins-comment-input button {
  width: 34px; height: 34px; border-radius: 9px;
  border: 0; background: #1B3A8F; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
}
.ins-comment-input button:hover { background: #152F73; }

/* Toast */
.ins-toast {
  position: fixed; top: 18px; right: 18px;
  z-index: 80;
  display: flex; align-items: center; gap: 9px;
  background: #0F172A; color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16);
  animation: ins-pop-in .2s cubic-bezier(.16,1,.3,1);
}

/* ── Form fields (modales de creación) ── */
.ins-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 18px 20px;
}
.ins-form-field { display: flex; flex-direction: column; gap: 6px; }
.ins-form-field label {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
  color: #94A3B8;
}
.ins-form-field input,
.ins-form-field select,
.ins-form-field textarea {
  height: 36px;
  border: 1px solid #E2E8F0; border-radius: 9px;
  padding: 0 12px;
  font-size: 13.5px; color: #0F172A;
  outline: none; background: #fff;
  font-family: inherit;
}
.ins-form-field textarea {
  height: auto; min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}
.ins-form-field input:focus,
.ins-form-field select:focus,
.ins-form-field textarea:focus { border-color: #1B3A8F; }
.ins-form-field .ins-form-help { font-size: 11.5px; color: #94A3B8; }

/* Zona de drop (drag&drop de archivos) */
.ins-dropzone {
  border: 1.5px dashed #C7D2FE;
  background: #EEF2FB;
  color: #1B3A8F;
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ins-dropzone:hover, .ins-dropzone.drag { background: #E0E7FF; border-color: #1B3A8F; }
.ins-dropzone .ico { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.ins-dropzone b { font-weight: 700; }

/* Empty state */
.ins-empty {
  background: #fff; border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
}
.ins-empty .ico {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: #EEF2FB; color: #1B3A8F;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ins-empty .ico svg { width: 26px; height: 26px; }
.ins-empty h2 { font-size: 18px; margin: 0 0 6px; color: #0F172A; }
.ins-empty p { font-size: 14px; color: #475569; max-width: 480px; margin: 0 auto 18px; }

/* Card simple (genérico para vistas de datos) */
.ins-card {
  background: #fff; border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
  overflow: hidden;
}
.ins-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #EEF0F5;
}
.ins-card-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; flex: 1; }
.ins-card-body { padding: 18px; }

/* Tabs (segmented control) */
.ins-seg {
  display: inline-flex;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.ins-seg button {
  height: 28px; padding: 0 12px;
  border: 0; background: none;
  font-size: 12.5px; font-weight: 600;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ins-seg button.on { background: #fff; color: #0F172A; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* ── Pagos: tabs con subrayado (prototipo Pagos.dc.html) ── */
.ins-tabs { display: flex; gap: 6px; border-bottom: 1px solid #E2E8F0; }
.ins-tabs button {
  height: 36px; padding: 0 14px;
  border: 0; background: none;
  font-size: 13.5px; font-weight: 600; color: #475569;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 7px;
}
.ins-tabs button:hover { color: #0F172A; }
.ins-tabs button.on { color: #1B3A8F; border-bottom-color: #1B3A8F; }
.ins-tabs .ins-tab-badge {
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  background: #DCE3FA; color: #1B3A8F;
}
.ins-tabs button.on .ins-tab-badge { background: #1B3A8F; color: #fff; }

/* Barra de cobro del mes (confirmado / por confirmar / falta) */
.ins-paybar {
  height: 8px; border-radius: 999px;
  background: #E2E8F0; overflow: hidden;
  display: flex;
}
.ins-paybar i { display: block; height: 100%; }
.ins-paybar i.conf { background: #1B3A8F; }
.ins-paybar i.pend { background: #6B84D6; }
.ins-paylegend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: #475569;
  margin-top: -8px;
}
.ins-paylegend span { display: inline-flex; align-items: center; gap: 5px; }
.ins-paylegend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* Fila de comprobante por confirmar */
.ins-payrow {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #EEF0F5;
}
.ins-payrow:last-child { border-bottom: 0; }
.ins-payrow .ins-payico {
  width: 38px; height: 38px; border-radius: 10px;
  background: #DCE3FA; color: #1B3A8F;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.ins-payrow .ins-payico svg { width: 18px; height: 18px; }
.ins-payrow .ins-paymain { flex: 1; min-width: 0; }
.ins-payrow .ins-payline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ins-payrow .ins-payname { font-size: 13.5px; font-weight: 700; }
.ins-payrow .ins-paymedio {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: #DCE3FA; color: #1B3A8F;
}
.ins-payrow .ins-paydesc { font-size: 12.5px; color: #475569; margin-top: 1px; }
.ins-payrow .ins-paymeta { font-size: 11.5px; color: #94A3B8; margin-top: 3px; }
.ins-payrow .ins-paymonto {
  font-size: 15px; font-weight: 800; flex: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ins-payrow .ins-payacc { display: flex; gap: 6px; flex: none; }
.ins-payrow .ins-payacc .ib {
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid #E2E8F0; background: #fff; color: #475569;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ins-payrow .ins-payacc .ib:hover { background: #F8FAFC; color: #0F172A; }
.ins-payrow .ins-payacc .ib.dang { border-color: #C7D2FE; color: #16295C; }
.ins-payrow .ins-payacc .ib.dang:hover { background: #C7D2FE; }
.ins-payrow .ins-payacc .ib svg { width: 16px; height: 16px; }
.ins-payrow .ins-payacc .ok {
  height: 32px; padding: 0 12px; border-radius: 9px;
  border: 0; background: #1B3A8F; color: #fff;
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ins-payrow .ins-payacc .ok:hover { background: #152F73; }
.ins-payrow .ins-payacc .ok svg { width: 15px; height: 15px; }

/* Cabecera de la tabla de cargos */
.ins-cargos-head {
  display: flex; gap: 12px;
  padding: 9px 18px;
  background: #FCFCFD;
  border-bottom: 1px solid #EEF0F5;
  font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: #94A3B8;
  white-space: nowrap;
}
.ins-cargos-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ins-cargo-row {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid #EEF0F5;
}
.ins-cargo-row:last-child { border-bottom: 0; }
.ins-cargo-row .nm { font-size: 13.5px; font-weight: 600; }
.ins-cargo-row .un { font-size: 11.5px; color: #94A3B8; }
.ins-col-venc { width: 110px; flex: none; font-size: 12.5px; color: #475569; }
.ins-col-monto {
  width: 110px; flex: none; text-align: right;
  font-size: 13.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ins-col-estado { width: 118px; flex: none; text-align: center; }
.ins-col-acc { width: 118px; flex: none; display: flex; justify-content: flex-end; }
.ins-cargo-chip {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.ins-btn-recordar {
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 0; background: #EEF2FB; color: #1B3A8F;
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.ins-btn-recordar:hover { background: #1B3A8F; color: #fff; }
.ins-btn-recordar svg { width: 13px; height: 13px; }

@media (max-width: 820px) {
  .ins-cargos-head [data-col-extra], .ins-cargo-row .ins-col-venc { display: none; }
  .ins-payrow { flex-wrap: wrap; }
  .ins-payrow .ins-payacc { margin-left: auto; }
}

/* Tabla compacta */
.ins-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ins-table thead th {
  text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #94A3B8;
  padding: 10px 14px;
  border-bottom: 1px solid #EEF0F5;
}
.ins-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #F1F5F9;
  font-variant-numeric: tabular-nums;
}
.ins-table tbody tr:hover { background: #FBFCFE; }
.ins-table tbody tr:last-child td { border-bottom: 0; }
.ins-table .right { text-align: right; }

/* Responsive */
@media (max-width: 920px) {
  .ins-modal-3col { grid-template-columns: 1fr; }
  .ins-modal-3col > .ins-modal-3col-cell { border-right: 0; border-bottom: 1px solid #EEF0F5; }
  .ins-modal-3col > .ins-modal-3col-cell:last-child { border-bottom: 0; }
  .ins-urow .ins-uvence, .ins-urow .ins-uunit, .ins-urow .ins-uchip { display: none; }
  .ins-urow .ins-uunit { display: block; width: auto; flex: none; }
}
