/* ============================================================
   RAMA NOTIFICATIONS — componentes específicos
   (los estilos base vienen de /administracion/style/style.css)
   ============================================================ */
/* ── Loading overlay ── */
#cargando {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 17, 21, .45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
}
.rn-loading-inner {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  color: var(--brand-ink);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: .75rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}
/* ── Search card ── */
.rn-search-card {
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.rn-search-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0 0 .25rem;
}
.rn-search-desc {
  font-size: 14px;
  color: var(--brand-muted);
  margin: 0 0 1.25rem;
}
.rn-search-row {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.rn-digit-wrap {
  flex: 1;
  position: relative;
}
.rn-digit-input {
  width: 100%;
  padding: .75rem 2.5rem .75rem 1rem;
  font-size: 15px;
  font-family: 'Open Sans', sans-serif;
  color: var(--brand-ink);
  background: var(--card);
  border: 2px solid var(--brand-border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rn-digit-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(12, 55, 123, .12);
}
.rn-digit-input::placeholder {
  color: var(--brand-muted);
}
.rn-clear-btn {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--brand-muted);
  cursor: pointer;
  transition: color .15s;
}
.rn-clear-btn:hover {
  color: var(--brand-ink);
}
.rn-search-btn {
  padding: .75rem 1.5rem;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 10px;
}
.rn-digit-counter {
  font-size: 12px;
  color: var(--brand-muted);
  margin: .5rem 0 0;
}
@media (max-width: 575px) {
  .rn-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .rn-search-btn {
    width: 100%;
    justify-content: center;
  }
}
/* ── Count badge en tabla header ── */
.rn-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  margin-left: .5rem;
  vertical-align: middle;
}
/* ── Results 2-column layout ── */
.rn-results-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 991.98px) {
  .rn-results-layout {
    grid-template-columns: 1fr;
  }
}
/* ── Table ── */
.rn-table {
  border-collapse: collapse;
  font-size: 13px;
}
.rn-table thead tr {
  background: var(--muted);
  border-bottom: 1px solid var(--brand-border);
}
.rn-table thead th {
  padding: .65rem 1rem;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border: none;
  white-space: nowrap;
}
.rn-table tbody tr {
  border-bottom: 1px solid var(--brand-border);
  transition: background .15s;
}
.rn-table tbody tr:hover {
  background: rgba(243, 244, 246, .5);
}
.rn-table tbody tr:last-child {
  border-bottom: none;
}
.rn-table tbody td {
  padding: .85rem 1rem;
  vertical-align: top;
  font-size: 12px;
  color: var(--brand-ink);
}
:root[data-theme="dark"] .rn-table tbody tr:hover {
  background: rgba(255, 255, 255, .04);
}
/* ── View toggle ── */
.rn-view-toggle {
  display: inline-flex;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.rn-view-btn {
  padding: .45rem .6rem;
  background: var(--card);
  border: none;
  color: var(--brand-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  font-size: 15px;
  line-height: 1;
}
.rn-view-btn+.rn-view-btn {
  border-left: 1px solid var(--brand-border);
}
.rn-view-btn:hover {
  background: var(--muted);
  color: var(--brand-ink);
}
.rn-view-btn.active {
  background: var(--brand-blue);
  color: #fff;
}
/* ── Notifications panel ── */
.rn-notif-panel {
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  overflow: hidden;
}
.rn-notif-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--brand-border);
}
.rn-notif-list {
  max-height: 72vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-border) transparent;
}
.rn-notif-list::-webkit-scrollbar {
  width: 4px;
}
.rn-notif-list::-webkit-scrollbar-track {
  background: transparent;
}
.rn-notif-list::-webkit-scrollbar-thumb {
  background: var(--brand-border);
  border-radius: 2px;
}
/* Estilos para cada ítem de notificación
   (el JS inyecta el HTML — estos selectors deben coincidir) */
.rn-notif-item {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--brand-border);
  transition: background .15s;
  cursor: pointer;
}
.rn-notif-item:last-child {
  border-bottom: none;
}
.rn-notif-item:hover {
  background: var(--muted);
}
.rn-notif-radicado {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-blue);
  margin: 0 0 2px;
  font-family: monospace;
}
.rn-notif-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-ink);
  margin: 0 0 2px;
  line-height: 1.35;
}
.rn-notif-date {
  font-size: 11px;
  color: var(--brand-muted);
  margin: 0;
}
/* ── Promo card (usuarios sin sesión) ── */
.rn-promo-card {
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  max-width: 480px;
  margin: 0 auto 2rem;
}
.rn-promo-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: .75rem;
}
.rn-promo-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0 0 .5rem;
}
.rn-promo-card p {
  font-size: 14px;
  color: var(--brand-muted);
  margin: 0 0 1.25rem;
}
/* ── Dark theme overrides ── */
:root[data-theme="dark"] .rn-notif-item:hover {
  background: var(--muted);
}
/* ── Legacy: clases usadas por otros componentes/JS ── */
.bg-paquete {
  background: linear-gradient(to right, #e3b759, #ffd57b);
  color: #0c377b !important;
}
.cabecera-tabla-rama {
  background-color: var(--brand-blue) !important;
  color: #fff !important;
}
.bd-callout {
  padding: 1.25rem;
  margin: 1.25rem 0;
  border: 1px solid var(--brand-border);
  border-left: .25rem solid var(--brand-blue);
  border-radius: .25rem;
}
/* ── DataTables footer ── */
/* ── DataTables footer — mismo patrón que concursales ── */
.rn-dt-footer {
  padding: .65rem 1rem;
  border-top: 1px solid var(--brand-border);
  font-size: 12px;
  color: var(--brand-muted);
}
.dataTables_wrapper .dataTables_paginate .page-link {
  color: var(--brand-blue);
  border-color: var(--brand-border);
  background: var(--card);
  transition: all .15s;
}
.dataTables_wrapper .dataTables_paginate .page-link:hover {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue);
}
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  font-weight: 600;
}
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  opacity: .4;
  background: var(--muted);
  border-color: var(--brand-border);
}
.dataTables_wrapper .dataTables_length {
  font-size: 12px;
  color: var(--brand-muted);
}
.dataTables_wrapper .dataTables_length select {
  padding: .25rem .5rem;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: var(--card);
  color: var(--brand-ink);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  margin: 0 .35rem;
}
/* ── Columna Despacho ── */
.rn-despacho-name {
  display: block;
  color: var(--brand-blue);
  font-weight: 500;
  line-height: 1.4;
}
.rn-despacho-loc {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--brand-muted);
  margin-top: 3px;
}
.rn-despacho-loc i {
  font-size: 11px;
  flex-shrink: 0;
}
/* ══ Detail panel (offcanvas derecho) ══════════════════════ */
.rn-detail-panel {
  width: 520px !important;
}
/* Botón cerrar — ghost gris, posición absoluta */
.rn-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--brand-muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .15s, color .15s;
}
.rn-panel-close:hover {
  background: var(--muted);
  color: var(--brand-ink);
}
/* Header blanco */
.rn-panel-header {
  background: var(--card);
  padding: 1rem 1.1rem .85rem;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
}
.rn-panel-head-main {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding-right: 2rem;
}
/* Avatar iniciales */
.rn-panel-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-blue-soft, #dbeafe);
  color: var(--brand-blue);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.rn-panel-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
/* Badges en fondo blanco */
.rn-panel-badges {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: 1px;
}
.rn-panel-badge-estado {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rn-panel-badge-estado.nuevo {
  background: #d1fae5;
  color: #065f46;
}
.rn-panel-badge-estado.activo {
  background: #dbeafe;
  color: #1e40af;
}
.rn-panel-badge-visibilidad {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--muted);
  color: var(--brand-muted);
  border: 1px solid var(--brand-border);
}
.rn-panel-badge-visibilidad.privado {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.rn-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0;
  line-height: 1.3;
}
.rn-panel-radicado {
  font-size: 12px;
  color: var(--brand-muted);
  margin: 0;
  letter-spacing: .02em;
  font-family: monospace;
}
/* Stats */
.rn-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
  background: var(--card);
}
.rn-panel-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .85rem .5rem;
  gap: 2px;
}
.rn-panel-stat+.rn-panel-stat {
  border-left: 1px solid var(--brand-border);
}
.rn-panel-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-ink);
  line-height: 1.2;
  text-align: center;
}
.rn-panel-stat-sm {
  font-size: .75rem;
  font-weight: 600;
}
.rn-panel-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: center;
}
/* Despacho */
.rn-panel-despacho-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
  background: var(--card);
}
.rn-panel-pin {
  color: var(--brand-muted);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}
.rn-panel-dname {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-ink);
  margin: 0 0 1px;
  line-height: 1.35;
}
.rn-panel-dcity {
  font-size: 12px;
  color: var(--brand-muted);
  margin: 0;
}
/* Dark mode */
:root[data-theme="dark"] .rn-panel-header {
  background: var(--card);
}
/* Tabs nav */
.rn-panel-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--brand-border);
  padding: 0;
  flex-shrink: 0;
  background: var(--card);
  overflow-x: auto;
  scrollbar-width: none;
}
.rn-panel-tabs-nav::-webkit-scrollbar {
  display: none;
}
.rn-panel-tab {
  flex: 1;
  padding: .6rem .5rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: color .15s, border-color .15s;
}
.rn-panel-tab:hover {
  color: var(--brand-ink);
}
.rn-panel-tab.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  font-weight: 600;
}
/* Body */
.rn-panel-body {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-border) transparent;
  background: var(--brand-bg);
}
.rn-panel-body::-webkit-scrollbar {
  width: 4px;
}
.rn-panel-body::-webkit-scrollbar-thumb {
  background: var(--brand-border);
  border-radius: 2px;
}
.rn-panel-pane {
  display: none;
  padding: 1.25rem;
}
.rn-panel-pane.active {
  display: block;
}
/* Footer */
.rn-panel-footer {
  display: flex;
  gap: .75rem;
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--brand-border);
  background: var(--card);
  flex-shrink: 0;
}
.rn-panel-footer .btn-outline-brand,
.rn-panel-footer .btn-brand {
  flex: 1;
  justify-content: center;
}
/* Dark mode */
:root[data-theme="dark"] .rn-panel-header {
  background: #0a2257;
}
/* ── Panel: badges wrapper ── */
.rn-panel-badges {
  display: flex;
  align-items: center;
  gap: .4rem;
}
/* ── Panel: badge visibilidad (Público / Privado) ── */
.rn-panel-badge-visibilidad {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .32);
}
.rn-panel-badge-visibilidad.privado {
  background: rgba(251, 191, 36, .22);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, .4);
}
/* ── Tab count badge ── */
.rn-tab-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 1;
}
.rn-tab-cnt:empty {
  display: none;
}
.rn-panel-tab.active .rn-tab-cnt {
  background: var(--brand-blue);
}
/* ── Actuaciones timeline ── */
#inf-act-cont {
  padding: 0;
}
.rn-act-timeline {
  padding: 1rem 1.25rem;
}
.rn-act-item {
  display: flex;
  gap: .85rem;
  padding-bottom: 1.25rem;
  position: relative;
}
.rn-act-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 0;
  width: 1px;
  background: var(--brand-border);
}
.rn-act-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}
.rn-act-item:not(.first) .rn-act-marker {
  background: var(--card);
  color: var(--brand-muted);
  border: 1px solid var(--brand-border);
}
.rn-act-body {
  flex: 1;
  min-width: 0;
  padding-top: .35rem;
}
.rn-act-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.rn-act-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
}
.rn-act-badge {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--brand-muted);
  font-weight: 500;
  border: 1px solid var(--brand-border);
}
.rn-act-desc {
  font-size: 13px;
  color: var(--brand-ink);
  margin: 0 0 .3rem;
  line-height: 1.5;
  word-break: break-word;
}
.rn-act-reg {
  font-size: 11px;
  color: var(--brand-muted);
  margin: 0;
}
.rn-act-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.rn-act-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e8f0fe;
  color: #1a56db;
  text-decoration: none;
  border: 1px solid #c7d9fb;
}
.rn-act-doc-link:hover {
  background: #1a56db;
  color: #fff;
}
/* ── Datos tab — card sections ── */
.rn-data-section {
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--card);
}
.rn-data-section:last-child {
  margin-bottom: 0;
}
.rn-data-section-hdr {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  background: var(--muted);
  border-bottom: 1px solid var(--brand-border);
}
.rn-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1rem;
  padding: .9rem 1rem;
}
.rn-data-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
/* Campo que ocupa columna completa (cuando solo hay 1 en la sección) */
.rn-data-field:only-child {
  grid-column: 1 / -1;
}
.rn-data-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.2;
}
.rn-data-value {
  font-size: 13px;
  color: var(--brand-ink);
  line-height: 1.45;
  word-break: break-word;
}
/* ── Sujetos tab ── */
#inf-suj-cont {
  padding: 0;
}
.rn-suj-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem 1rem;
}
.rn-suj-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--card);
}
.rn-suj-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-blue-soft, #dbeafe);
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.rn-suj-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rn-suj-role {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: .05em;
  line-height: 1.2;
}
.rn-suj-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-ink);
  line-height: 1.4;
  word-break: break-word;
}
/* ── Panel flotante de notificaciones ── */
.rn-notif-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 340px;
  max-height: 480px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: 1055;
  display: flex;
  flex-direction: column;
}
.rn-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}
.rn-notif-list {
  flex: 1;
  overflow-y: auto;
}
.rn-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.rn-notif-item:hover {
  background: var(--surface-hover, #f8fafc);
}
.rn-notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1A3C5E;
}
.rn-notif-body {
  flex: 1;
  min-width: 0;
}
.rn-notif-code {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  margin: 0 0 2px;
  font-family: monospace;
}
.rn-notif-text {
  font-size: 13px;
  color: var(--text, #1e293b);
  margin: 0 0 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rn-notif-time {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.rn-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  margin-top: 4px;
}
.rn-notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
}
.rn-notif-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  text-align: center;
  flex-shrink: 0;
}
.rn-notif-footer a {
  font-size: 13px;
  color: #1A3C5E;
  text-decoration: none;
  font-weight: 500;
}
.rn-notif-footer a:hover {
  text-decoration: underline;
}
/* ── Dark mode: panel flotante de notificaciones ── */
:root[data-theme="dark"] .rn-notif-panel {
  background: var(--card);
  border-color: var(--brand-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] .rn-notif-header {
  border-bottom-color: var(--brand-border);
}
:root[data-theme="dark"] .rn-notif-item {
  border-bottom-color: var(--brand-border);
}
:root[data-theme="dark"] .rn-notif-item:hover {
  background: var(--muted);
}
:root[data-theme="dark"] .rn-notif-icon {
  background: rgba(30, 64, 175, .18);
  color: #93c5fd;
}
:root[data-theme="dark"] .rn-notif-code {
  color: var(--brand-muted);
}
:root[data-theme="dark"] .rn-notif-text {
  color: var(--brand-ink);
}
:root[data-theme="dark"] .rn-notif-time {
  color: var(--brand-muted);
}
:root[data-theme="dark"] .rn-notif-dot {
  background: #60a5fa;
}
:root[data-theme="dark"] .rn-notif-empty {
  color: var(--brand-muted);
}
:root[data-theme="dark"] .rn-notif-footer {
  border-top-color: var(--brand-border);
}
:root[data-theme="dark"] .rn-notif-footer a {
  color: #93c5fd;
}
:root[data-theme="dark"] .rn-notif-footer a:hover {
  color: #bfdbfe;
}
:root[data-theme="dark"] .rn-notif-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
/* ── Modal: Vigilar proceso ── */
.rn-modal-content {
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .15);
  overflow: hidden;
}
.rn-modal-header {
  background: var(--card);
  border-bottom: 1px solid var(--brand-border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rn-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.rn-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.rn-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0;
}
.rn-modal-subtitle {
  font-size: 12px;
  color: var(--brand-muted);
  margin: 2px 0 0;
}
.rn-modal-body {
  padding: 1.25rem;
  background: var(--brand-bg);
}
.rn-modal-footer {
  background: var(--card);
  border-top: 1px solid var(--brand-border);
  padding: .875rem 1.25rem;
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}
:root[data-theme="dark"] .rn-modal-content {
  box-shadow: 0 20px 48px rgba(0, 0, 0, .5);
}
/* ── Grid cards view ── */
.rn-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  padding: .5rem 0 1.5rem;
}
.rn-card-item {
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  transition: box-shadow .15s, transform .15s;
}
.rn-card-item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
  transform: translateY(-1px);
}
.rn-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}
.rn-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-ink);
  line-height: 1.35;
}
.rn-card-location {
  font-size: 12px;
  color: var(--brand-muted);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.rn-card-field {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.rn-card-field-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rn-card-field-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-ink);
  font-family: 'Courier New', monospace;
}
.rn-card-sujeto {
  font-size: 12px;
  color: var(--brand-muted);
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  line-height: 1.4;
}
.rn-card-sujeto i {
  margin-top: 1px;
  flex-shrink: 0;
  font-size: 13px;
}
.rn-card-sujeto strong {
  color: var(--brand-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.rn-card-sujeto span {
  color: var(--brand-ink);
  font-weight: 500;
}
.rn-card-dates {
  font-size: 11px;
  color: var(--brand-muted);
  display: flex;
  gap: 1.25rem;
  border-top: 1px solid var(--brand-border);
  padding-top: .5rem;
}
.rn-card-footer {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.rn-card-btn-ver {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1rem;
  background: var(--brand-blue, #0c377b);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.rn-card-btn-ver:hover {
  background: #0a2d69;
}
.toolbar-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.toolbar-dates input[type="date"] {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  color: #374151;
}
.rn-btn-clear {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 8px;
  color: #9ca3af;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.rn-btn-clear:hover {
  color: #ef4444;
  border-color: #ef4444;
}
@media (max-width: 575px) {
  .rn-grid-container {
    grid-template-columns: 1fr;
  }
}
/* ── Filtros popover ── */
.toolbar-filter-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}
.toolbar-filter-wrap+.rn-view-toggle {
  margin-left: 0;
}
.toolbar-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-ink);
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.toolbar-filter-btn:hover {
  background: var(--muted);
  border-color: #94a3b8;
}
.toolbar-filter-btn[aria-expanded="true"] {
  background: var(--muted);
  border-color: var(--brand-blue);
}
.toolbar-filter-btn .chev {
  font-size: 12px;
  transition: transform .2s;
}
.toolbar-filter-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  line-height: 1;
}
@keyframes filterFadeRN {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.filters-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 420px;
  max-width: calc(100vw - 16px);
  padding: 10px 12px 12px;
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .1);
  animation: filterFadeRN .15s ease;
  color: var(--brand-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
}
.filters-panel>.filters-panel-head {
  grid-column: 1 / -1;
}
.filters-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 10px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--brand-border);
  margin-bottom: 6px;
  color: var(--brand-ink);
}
.filters-clear {
  border: none;
  background: transparent;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.filters-clear:hover {
  background: rgba(26, 86, 219, .08);
}
.filters-panel-foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  border-top: 1px solid var(--brand-border);
  margin-top: 8px;
}
.rn-btn-apply {
  min-width: 200px;
  height: 38px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s;
}
.rn-btn-apply:hover {
  opacity: .88;
}
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-muted);
  min-width: 0;
}
.filter-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-row select,
.filter-row .filter-date {
  height: 34px;
  width: 100%;
  font-size: 13px;
  padding: 0 10px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: var(--card);
  color: var(--brand-ink);
  font-family: inherit;
}
.filter-row select {
  padding-right: 28px;
  cursor: pointer;
}
.filter-row select:focus,
.filter-row .filter-date:focus {
  outline: none;
  border-color: var(--brand-blue);
}
@media (max-width: 520px) {
  .filters-panel {
    width: 280px;
    grid-template-columns: 1fr;
  }
}
/* ── Barra filtro actuaciones (popover) ── */

.rn-act-search-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: var(--card);
  color: var(--brand-muted);
  font-size: 12px;
}

.rn-act-search-inline input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--brand-ink);
  width: 100%;
}

.rn-act-search-inline:focus-within {
  border-color: var(--brand-blue);
}
.rn-act-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--brand-border);
  min-height: 42px;
}

.rn-act-result-cnt {
  font-size: 11px;
  padding: 2px 8px;
  font-weight: 600;
  color: var(--brand-blue);
}

.rn-act-filter-wrap {
  position: relative;
}

.rn-act-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-ink);
  background: var(--card);
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.rn-act-filter-btn:hover {
  background: var(--muted);
  border-color: #94a3b8;
}

.rn-act-filter-btn[aria-expanded="true"] {
  background: var(--muted);
  border-color: var(--brand-blue);
}

.rn-act-filter-btn .chev {
  font-size: 11px;
  transition: transform .2s;
}

.rn-act-filter-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

#actFiltroPanel {
  z-index: 1060;
}

.rn-check-row {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between;
  padding: 8px 0 !important;
}

.rn-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-blue);
  cursor: pointer;
  flex-shrink: 0;
}
/* Alertas ya leídas en la campana */
.rn-notif-item.leida { opacity: .62; }
.rn-notif-item.leida .rn-notif-text b { font-weight: 600; }

/* Radicado en varios despachos (instancias) */
.rn-despacho-mas { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #0b3d91; background: #e8f0fb; border-radius: 999px; padding: 2px 8px; }
.rn-card-instancias { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.rn-card-instancia { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 1px solid var(--border, #dfe6ef); background: transparent; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: inherit; cursor: pointer; }
.rn-card-instancia:hover { border-color: #0b3d91; background: rgba(11, 61, 145, .05); }
.rn-card-instancia span { font-weight: 600; line-height: 1.3; }
.rn-card-instancia small { color: #5f6f84; font-size: 11px; }
:root[data-theme="dark"] .rn-card-instancia small { color: #a9b6c7; }
.rn-panel-instancias { padding: 10px 24px 0; }
.rn-panel-instancias label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #5f6f84; margin-bottom: 4px; }
:root[data-theme="dark"] .rn-panel-instancias label { color: #a9b6c7; }
