:root {
  --brand-green:      #2da44e;
  --brand-green-dark: #1e7e34;
  --color-text:       #1a1a2e;
  --color-text-muted: #6c757d;
  --color-border:     #dee2e6;
  --color-bg:         #f5f6fa;
  --color-surface:    #ffffff;
  --color-row-hover:  #f8f9fa;
  --color-th-bg:      #ffffff;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:    10px;
  --shadow:    0 2px 16px rgba(0,0,0,.09);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  margin: 0;
  font-size: .9rem;
  line-height: 1.5;
}

.page-container {
  padding: clamp(.5rem, 2vw, 1.75rem) clamp(.5rem, 2vw, 1rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 110%;
  overflow: hidden;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .page-container {
    padding: .75rem .5rem;
  }
  .main-card {
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .07);
  }
}

@media (max-width: 480px) {
  .page-container {
    padding: .5rem;
    align-items: center;
    justify-content: center;
  }
  .main-card {
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
  }
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.35rem 2rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
      background-image: linear-gradient(rgb(252 252 254), rgb(247 248 250 / 82%)), url(../img/te-header.png);
  background-size: cover;
  background-position: top;
   background-repeat: no-repeat;
}

.header-divider {
  width: 1px;
  height: 56px;
  background: var(--color-border);
  flex-shrink: 0;
}

.logo-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 60px;
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  border: 1.5px dashed #bdc3cc;
  border-radius: 6px;
  color: #9aa3ae;
  font-size: .78rem;
  font-style: italic;
  background: #fafbfc;
  white-space: nowrap;
  letter-spacing: .01em;
}

.logo-left .header-logo {
  height: clamp(56px, 13vw, 130px);
  width: auto;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

@media (max-width: 1024px) {
  .logo-left .header-logo {
    height: clamp(50px, 11vw, 140px);
    max-height: 140px;
  }
}

@media (max-width: 768px) {
  .logo-left .header-logo {
    height: clamp(44px, 12vw, 100px);
    max-height: 100px;
  }
}

@media (max-width: 480px) {
  .logo-left .header-logo {
    height: clamp(38px, 14vw, 72px);
    max-height: 72px;
  }
}

.logo-right .header-logo {
  height: clamp(40px, 8vw, 88px);
  width: auto;
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  display: block;
}

@media (max-width: 1024px) {
  .logo-right .header-logo {
    height: clamp(36px, 7vw, 90px);
    max-height: 90px;
  }
}

@media (max-width: 768px) {
  .logo-right .header-logo {
    height: clamp(32px, 8vw, 70px);
    max-height: 70px;
  }
}

@media (max-width: 480px) {
  .logo-right .header-logo {
    height: clamp(28px, 9vw, 52px);
    max-height: 52px;
  }
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  margin: 0.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  box-shadow: 1px 5px 10px 1px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.search-wrapper {
  position: relative;
  flex: 1 1 280px;
}

.search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: .9rem;
  pointer-events: none;
  z-index: 2;
}

.search-input {
  padding-left: 2.35rem;
  padding-right: 2.2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  height: 40px;
  font-size: .875rem;
  color: var(--color-text);
  background: var(--color-surface);
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(45,164,78,.12);
}
.search-input::placeholder { color: #adb5bd; }
.search-input[type="search"]::-webkit-search-cancel-button,
.search-input[type="search"]::-webkit-search-decoration { display: none; }

.btn-clear-search {
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: .2rem .3rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  font-size: .75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.btn-clear-search:hover {
  color: var(--color-text);
  background: var(--color-border);
}

.toolbar-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--brand-green);
  background: transparent;
  border: none;
  font-size: .875rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .18s, color .18s;
  height: 40px;
  white-space: nowrap;
  position: relative;
}
.btn-action:hover {
  background: rgba(45,164,78,.09);
  color: var(--brand-green-dark);
}
.btn-action i { font-size: 1rem; }
.btn-action[aria-expanded="true"] {
  background: rgba(45,164,78,.12);
  color: var(--brand-green-dark);
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 .35rem;
  background: var(--brand-green);
  color: #fff;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 700;
  position: absolute;
  top: -6px;
  right: -8px;
}

#filterPanelCollapse {
  border-bottom: 1px solid var(--color-border);
}

#filterPanelCollapse.show {
  display: block !important;
}

#filterPanelCollapse:not(.show) {
  display: none !important;
}

#filterPanelCollapse.collapsing {
  transition-duration: 0.15s !important;
}

#filterPanelCollapse.show > .filter-panel {
  animation: filterIn .20s ease-out;
}

#filterPanelCollapse.collapsing > .filter-panel {
  animation: filterOut .18s ease-in forwards;
}

@keyframes filterIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes filterOut {
  from { opacity: 1; transform: translateY(0);    }
  to   { opacity: 0; transform: translateY(-8px); }
}

.filter-panel {
  padding: 1.5rem;
  background: #f8f9fa;
}

.filter-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-bottom: .5rem;
  line-height: 1.2;
}

.filter-select {
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-size: .875rem;
  background: var(--color-surface);
  color: var(--color-text);
  height: 40px;
  padding: .45rem .75rem;
  transition: border-color .2s, box-shadow .2s;
}
.filter-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(45,164,78,.12);
  outline: none;
}
.filter-select:disabled {
  background: #f0f0f0;
  color: var(--color-text-muted);
}

.filter-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.btn-filter-reset,
.btn-filter-apply {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}

.btn-filter-reset {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
}
.btn-filter-reset:hover {
  background: #f0f0f0;
  border-color: #adb5bd;
  color: var(--color-text);
}

.btn-filter-apply {
  background: var(--brand-green);
  color: #fff;
}
.btn-filter-apply:hover {
  background: var(--brand-green-dark);
  color: #fff;
}

.btn-filter-reset i,
.btn-filter-apply i {
  font-size: .95rem;
}

.table-section {
  overflow: hidden;
  border-radius: 10px;
  margin: 1rem;
  padding: 0;
  box-shadow: 1px 5px 10px 1px rgba(0, 0, 0, 0.2);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--brand-green) #f0f0f0;
}
.table-responsive::-webkit-scrollbar        { height: 10px; }
.table-responsive::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 0 0 10px 10px; }
.table-responsive::-webkit-scrollbar-thumb  { background: var(--brand-green); border-radius: 10px; }
.table-responsive::-webkit-scrollbar-thumb:hover { background: var(--brand-green-dark); }

.data-table {
  width: 100%;
  margin-bottom: 0;
  font-size: .855rem;
  color: var(--color-text);
  border-collapse: collapse;
}

.data-table thead tr {
  background: #1a2332;
}

.data-table thead th {
  background-color: #1a2332;
  border: none;
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  padding: .85rem 1rem;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.data-table thead th:hover { background-color: #253045; color: #fff; }
.data-table thead th.sort-asc .sort-icon,
.data-table thead th.sort-desc .sort-icon { color: var(--brand-green); opacity: 1; }

.sort-icon {
  font-size: .7rem;
  opacity: .45;
  margin-left: .2rem;
  vertical-align: middle;
}

.data-table tbody tr {
  border-bottom: 1px solid #f0f1f3;
  transition: background .12s;
}
.data-table tbody tr:last-child { border-bottom: none; }

.data-table-row {
  cursor: pointer;
  transition: background .14s ease;
}

.data-table-row:hover {
  background: #f4f7fe;
}

.data-table-row:active {
  background: #eaf0fb;
}

.data-table-row:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: -2px;
  background: rgba(45,164,78,.07);
}
.data-table-row:focus:not(:focus-visible) {
  outline: none;
}

.data-table tbody td {
  padding: .72rem 1rem;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
}
.empty-icon { font-size: 2.8rem; color: #ced4da; display: block; margin-bottom: .75rem; }
.empty-text { color: var(--color-text-muted); font-size: .9rem; margin: 0; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .5rem .5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.results-count {
  font-size: .83rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.pagination .page-link {
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: .8rem;
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .5rem;
  margin: 0 .1rem;
  border-radius: 5px !important;
  transition: background .15s, border-color .15s, color .15s;
}
.pagination .page-link:hover {
  background: rgba(45,164,78,.09);
  border-color: var(--brand-green);
  color: var(--brand-green);
}
.pagination .page-item.active .page-link {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
  font-weight: 700;
}
.pagination .page-item.disabled .page-link {
  opacity: .4;
  pointer-events: none;
}

.page-first, .page-last,
.page-prev,  .page-next {
  font-size: .78rem;
}

.view-exit {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}

.view-enter {
  animation: viewFadeIn .28s ease forwards;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-view {
  width: 100%;
  max-width: 1350px;
}

.detail-title-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.detail-title-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 7px;
  color: var(--color-text-muted);
  font-size: .845rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
  margin-top: .2rem;
}
.btn-back:hover {
  background: #f0f0f0;
  border-color: #adb5bd;
  color: var(--color-text);
}
.btn-back i { font-size: .9rem; }

.detail-candidate-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.detail-candidate-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
}

.detail-candidate-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: .15rem;
}

.detail-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .775rem;
  color: var(--color-text-muted);
}
.detail-meta-chip i { font-size: .8rem; }
.detail-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
}

.detail-title-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  flex-shrink: 0;
}

.detail-status-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
}

.detail-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  background: rgba(45,164,78,.1);
  color: var(--brand-green-dark);
  border: 1px solid rgba(45,164,78,.25);
}
.detail-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
}

.detail-tabs-wrapper {
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.detail-tabs-wrapper::-webkit-scrollbar { height: 2px; }
.detail-tabs-wrapper::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 2px; }

.detail-nav-tabs {
  border-bottom: none;
  flex-wrap: nowrap;
  gap: .1rem;
}

.detail-nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem 1.05rem;
  font-size: .825rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border: none;
  border-bottom: 2.5px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  background: transparent;
  transition: color .18s, border-color .18s, background .18s;
}
.detail-nav-tabs .nav-link i {
  font-size: .9rem;
}
.detail-nav-tabs .nav-link:hover {
  color: var(--brand-green);
  background: rgba(45,164,78,.05);
  border-bottom-color: rgba(45,164,78,.3);
}
.detail-nav-tabs .nav-link.active {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
  background: transparent;
}

.detail-tab-content {
  min-height: 320px;
}

.detail-pane-inner {
  padding: 1.75rem;
}

.detail-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--color-border);
}

.detail-pane-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .975rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.detail-pane-title i {
  color: var(--brand-green);
  font-size: 1.1rem;
}

.detail-empty-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  gap: .75rem;
}

.detail-empty-icon {
  font-size: 2.75rem;
  color: #ced4da;
}

.detail-empty-text {
  font-size: .88rem;
  color: var(--color-text-muted);
  margin: 0;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.detail-info-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.detail-info-field-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
}

.detail-info-field-value {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: .5rem .75rem;
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  min-height: 36px;
}

.totales-btn-download {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--brand-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .55rem 1.15rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.totales-btn-download:hover,
.totales-btn-download:focus { background: var(--brand-green-dark); color: #fff; }
.totales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.totales-kpi-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  background: #f8f9fb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: box-shadow .15s;
}
.totales-kpi-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }

.totales-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.totales-kpi-icon--green  { background: rgba(45,164,78,.15);  color: var(--brand-green); }
.totales-kpi-icon--blue   { background: rgba(13,110,253,.12); color: #0d6efd; }
.totales-kpi-icon--orange { background: rgba(253,126,20,.12); color: #fd7e14; }
.totales-kpi-icon--purple { background: rgba(111,66,193,.12); color: #6f42c1; }
.totales-kpi-icon--teal   { background: rgba(32,201,151,.12); color: #20c997; }

.totales-kpi-body {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.totales-kpi-label {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.totales-kpi-amount {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}
.totales-kpi-sub {
  font-size: .73rem;
  color: var(--color-text-muted);
}

.totales-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: .75rem;
  scrollbar-color: var(--brand-green) #f0f0f0;
  scrollbar-width: auto;
}
.totales-table-wrap::-webkit-scrollbar        { height: 10px; }
.totales-table-wrap::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 0 0 10px 10px; }
.totales-table-wrap::-webkit-scrollbar-thumb  { background: var(--brand-green); border-radius: 10px; }
.totales-table-wrap::-webkit-scrollbar-thumb:hover { background: var(--brand-green-dark); }
.totales-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .83rem;
}

.totales-table thead tr { background: #1a2332; }
.totales-table thead th {
  padding: .85rem 1rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  text-align: right;
  color: rgba(255,255,255,.9);
  border: none;
}
.totales-th-cat   { text-align: left !important; min-width: 120px; }
.totales-th-total { background: #11378d; color: #fff; }

.totales-table tbody tr {
  border-bottom: 1px solid #f0f1f3;
  transition: background .12s;
}
.totales-table tbody tr:last-child { border-bottom: none; }
.totales-table tbody tr:hover { background: #f4f7fe; }
.totales-table tbody td {
  padding: 0.7rem 0.8rem;
  text-align: right;
  color: var(--color-text);
  vertical-align: middle;
}
.totales-td-cat { text-align: left !important; }
.totales-cat-name {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 500;
}
.totales-td-dash  { color: #c0c4cc; font-weight: 400; }
.totales-td-total {
  color: var(--brand-green);
  font-weight: 700;
  background: rgba(45,164,78,.04);
}

.totales-cat-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .74rem;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--cat-c, #6c757d) 14%, transparent);
  color: var(--cat-c, #6c757d);
}

.totales-cat-icon--green  { --cat-c: #2da44e; }
.totales-cat-icon--blue   { --cat-c: #0d6efd; }
.totales-cat-icon--orange { --cat-c: #fd7e14; }
.totales-cat-icon--purple { --cat-c: #6f42c1; }
.totales-cat-icon--red    { --cat-c: #dc3545; }
.totales-cat-icon--violet { --cat-c: #6610f2; }
.totales-cat-icon--teal   { --cat-c: #20c997; }
.totales-cat-icon--pink   { --cat-c: #e83e8c; }

.trans-search-fields--3col { grid-template-columns: repeat(3, 1fr); }

.totales-tfoot-row { background: #1a2332; }
.totales-tfoot-row td {
  padding: .8rem 1rem;
  text-align: right;
  border: none;
  vertical-align: middle;
}
.totales-tfoot-label {
  text-align: left !important;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.85);
}
.totales-tfoot-amount {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  color: #fff;
}
.totales-tfoot-pct {
  display: block;
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  margin-top: .1rem;
}
.totales-tfoot-total { background: var(--brand-green); }
.totales-tfoot-total .totales-tfoot-pct { color: rgba(255,255,255,.75); }

.totales-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .1rem;
  font-size: .77rem;
  color: var(--color-text-muted);
}
.totales-footer-count,
.totales-footer-currency {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

@media (max-width: 1100px) {
  .totales-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .totales-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .totales-top-bar  { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .totales-kpi-grid { grid-template-columns: 1fr; }
}

.download-modal-dialog {
  max-width: 480px;
}

.download-modal-content {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.download-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.download-modal-title-group {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.download-modal-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(45,164,78,.1);
  border-radius: 10px;
  color: var(--brand-green);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.download-modal-title {
  font-size: .975rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.download-modal-subtitle {
  font-size: .775rem;
  color: var(--color-text-muted);
  margin: .15rem 0 0;
  line-height: 1.3;
}

.download-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 7px;
  color: var(--color-text-muted);
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.download-modal-close:hover {
  background: #f0f0f0;
  color: var(--color-text);
}

.download-modal-body {
  padding: 1.35rem 1.5rem;
  background: var(--color-surface);
}

.download-info-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .85rem;
  background: rgba(45,164,78,.06);
  border: 1px solid rgba(45,164,78,.18);
  border-radius: 8px;
  margin-bottom: 1.35rem;
}

.download-info-icon {
  color: var(--brand-green);
  font-size: .95rem;
  flex-shrink: 0;
}

.download-info-text {
  font-size: .82rem;
  color: #2d6a3f;
  line-height: 1.4;
}

.download-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.download-format-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: 1.5rem 1rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
  text-align: center;
}
.download-format-card:hover {
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.download-format-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

#btnDownloadPDF:hover {
  background: #fff5f5;
}
#btnDownloadPDF:hover .format-icon-pdf {
  background: rgba(220,53,69,.12);
  color: #dc3545;
}

#btnDownloadExcel:hover {
  background: #f0faf3;
}
#btnDownloadExcel:hover .format-icon-excel {
  background: rgba(25,135,84,.12);
  color: #198754;
}

.format-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 1.65rem;
  transition: background .2s, color .2s;
}

.format-icon-pdf {
  background: rgba(220,53,69,.08);
  color: #dc3545;
}

.format-icon-excel {
  background: rgba(25,135,84,.08);
  color: #198754;
}

.format-card-label {
  font-size: .93rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.format-card-desc {
  font-size: .73rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.download-modal-footer {
  padding: .9rem 1.5rem 1.1rem;
  border-top: 1px solid var(--color-border);
  background: #f8f9fa;
  justify-content: flex-start;
}

.btn-download-cancel {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .95rem;
  border: 1.5px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: .845rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-download-cancel:hover {
  background: #f0f0f0;
  border-color: #adb5bd;
  color: var(--color-text);
}

.modal-backdrop.show { opacity: .45; }

.info-section {
  margin-bottom: 1.5rem;
}

.info-section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--brand-green);
  margin: 0 0 .85rem;
}

.info-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 0 1.5rem;
}

.info-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.info-summary-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #f8f9fb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.info-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.info-card-icon--green  { background: rgba(45, 164, 78,  .12); color: var(--brand-green); }
.info-card-icon--blue   { background: rgba(13, 110, 253, .12); color: #0d6efd; }
.info-card-icon--purple { background: rgba(111, 66, 193, .12); color: #6f42c1; }

.info-card-body {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}

.info-card-label {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
}

.info-card-value {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.info-card-value--green  { color: var(--brand-green); }
.info-card-value--blue   { color: #0d6efd; }
.info-card-value--purple { color: #6f42c1; }
.info-card-value--deficit  { color: #dc3545; }
.info-card-value--excedente { color: #198754; }

.info-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(45, 164, 78, .1);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-dates-row {
  display: flex;
  align-items: center;
}

.info-date-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .25rem 1rem;
}

.info-date-text {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.info-dates-sep {
  width: 1px;
  height: 56px;
  background: var(--color-border);
  flex-shrink: 0;
}

.info-date-label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--color-text);
}

.info-date-value {
  font-size: .875rem;
  color: var(--color-text-muted);
}
.info-date-value--accent {
  color: var(--brand-green);
  font-weight: 500;
}

.info-signer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.info-signer-row:last-child { border-bottom: none; }

.info-signer-field {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.info-signer-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.info-signer-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text);
}

.info-signer-value {
  font-size: .875rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .info-summary-cards { grid-template-columns: 1fr; }
  .info-signer-row    { grid-template-columns: 1fr; gap: .75rem; }
  .info-dates-row     { flex-direction: column; align-items: flex-start; }
  .info-dates-sep     { width: 100%; height: 1px; }
  .info-date-field    { padding: .5rem 0; }
}

.trans-toolbar {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.trans-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.trans-search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: .88rem;
  pointer-events: none;
}
.trans-search-input {
  width: 100%;
  padding: .52rem .85rem .52rem 2.2rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: .83rem;
  color: var(--color-text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.trans-search-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(45,164,78,.1);
}
.trans-search-input::placeholder { color: var(--color-text-muted); }

.trans-toolbar-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.trans-toolbar-actions--end { justify-content: flex-end; }

.trans-toolbar--col {
  flex-direction: column;
  align-items: stretch;
}
.trans-search-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  flex: 1;
}
.trans-search-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.trans-field-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-left: .1rem;
}
.trans-field-input {
  height: 36px;
  padding: .3rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: .83rem;
  color: var(--color-text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.trans-field-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(45,164,78,.1);
}
.trans-field-input::placeholder { color: var(--color-text-muted); font-size: .78rem; }
.trans-field-input[type="number"]::-webkit-inner-spin-button,
.trans-field-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
@media (max-width: 768px) {
  .trans-search-fields { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .trans-search-fields { grid-template-columns: 1fr; }
}

.trans-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  font-size: .82rem;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.trans-btn-outline:hover,
.trans-btn-outline:focus {
  border-color: var(--brand-green);
  background: rgba(45,164,78,.04);
  color: var(--color-text);
}
.trans-dropdown-placeholder {
  font-size: .78rem;
  color: var(--color-text-muted);
}
.trans-rows-btn { font-size: .78rem; }

.trans-filter-menu {
  min-width: 230px;
  padding: .85rem 1rem;
}
.trans-filter-group-label {
  font-size: .67rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .45rem;
}
.trans-filter-menu .form-check { margin-bottom: .3rem; }
.trans-filter-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding-right: .25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-green) #f0f0f0;
}
.trans-filter-scroll::-webkit-scrollbar        { width: 5px; }
.trans-filter-scroll::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 10px; }
.trans-filter-scroll::-webkit-scrollbar-thumb  { background: var(--brand-green); border-radius: 10px; }
.trans-filter-scroll::-webkit-scrollbar-thumb:hover { background: var(--brand-green-dark); }
.trans-filter-menu .form-check-label { font-size: .82rem; cursor: pointer; }
.trans-filter-menu .form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}
.trans-filter-menu .form-check-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 .2rem rgba(45,164,78,.2);
}
.trans-filter-divider { margin: .6rem 0; border-color: var(--color-border); }
.trans-filter-footer {
  display: flex;
  gap: .4rem;
  justify-content: flex-end;
  margin-top: .65rem;
}
.trans-filter-clear {
  font-size: .78rem;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: .28rem .7rem;
  cursor: pointer;
  transition: background .12s;
}
.trans-filter-clear:hover { background: #f5f5f5; }
.trans-filter-apply {
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand-green);
  border: none;
  border-radius: 6px;
  padding: .28rem .7rem;
  cursor: pointer;
  transition: background .12s;
}
.trans-filter-apply:hover { background: var(--brand-green-dark); }
.trans-date-menu   { min-width: 260px; }
.trans-date-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .25rem;
}
.trans-date-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.trans-table thead th {
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.trans-table tbody td { white-space: nowrap; }
.trans-td-nombre {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trans-table thead th:not(.totales-th-total):hover { background: #253045; }
.trans-table .totales-th-total:hover               { background: #163070; }

.trans-th-sort  { white-space: nowrap; }
.trans-th-center { text-align: center !important; }
.trans-th-wide  { min-width: 180px; }

.trans-sort-icon {
  font-size: .62rem;
  opacity: .5;
  margin-left: .25rem;
  vertical-align: middle;
}
.trans-th-sort[data-sort="asc"]  .trans-sort-icon,
.trans-th-sort[data-sort="desc"] .trans-sort-icon { opacity: 1; }

.trans-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 500;
  white-space: nowrap;
}
.trans-badge--publica  { background: #e8f5ec; color: #1a7a3a; }
.trans-badge--privada  { background: #e8f0fe; color: #3d5a99; }
.trans-badge--propios  { background: #fff3e0; color: #e65100; }

.trans-badge--ach      { background: rgba(111,66,193,.1);  color: #6f42c1; }
.trans-badge--cheque   { background: rgba(13,110,253,.1);  color: #0d6efd; }
.trans-badge--efectivo { background: rgba(45,164,78,.1);   color: var(--brand-green); }
.trans-badge--especie  { background: rgba(32,201,151,.1);  color: #20c997; }

.trans-td-amount {
  color: var(--brand-green);
  font-weight: 700;
  text-align: right;
}

.trans-sustento {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .78rem;
  font-weight: 500;
}
.trans-sustento--si { color: var(--brand-green); }
.trans-sustento--no { color: #dc3545; }

.trans-empty-row td { padding: 0; border: none; }
.trans-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  gap: .6rem;
}
.trans-empty-state i  { font-size: 2rem; opacity: .4; }
.trans-empty-state p  { margin: 0; font-size: .85rem; }

.trans-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .1rem;
  font-size: .78rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: .5rem;
}
.trans-pagination-info { flex: 1; min-width: 140px; }

.trans-pagination-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.trans-page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .78rem;
  color: var(--color-text);
  transition: border-color .12s, color .12s;
}
.trans-page-btn:disabled  { opacity: .38; cursor: not-allowed; }
.trans-page-btn:not(:disabled):hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}
.trans-page-numbers { display: flex; gap: .3rem; }
.trans-page-num {
  height: 30px;
  min-width: 30px;
  padding: 0 .5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  font-size: .78rem;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .12s, background .12s, color .12s;
}
.trans-page-num.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
  font-weight: 600;
}
.trans-page-num:not(.active):hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.donantes-name {
  color: var(--brand-green);
  font-weight: 500;
}
.donantes-fecha  { text-align: center; white-space: nowrap; }
.donantes-cedula { text-align: center; white-space: nowrap; font-family: var(--font-mono, monospace); font-size: .85rem; }
.donantes-medio  { text-align: center; }

.trans-badge--inicial   { background: #f0f0f0; color: #6c757d; font-style: italic; }
.informe-fecha          { text-align: center; white-space: nowrap; }
.informe-recibo         { color: var(--color-text); text-align: center; white-space: nowrap; }
.informe-ingreso-amount { color: var(--brand-green) !important; font-weight: 700; text-align: right; }
.informe-gasto-amount   { color: #dc3545 !important;             font-weight: 700; text-align: right; }
.informe-saldo-amount   { font-weight: 700;                       text-align: right; }
.informe-dash           { color: #c0c4cc !important;              text-align: right; }

.trans-badge--act-activistas       { background: #e8f5ec;              color: #1a7a3a; }
.trans-badge--act-administracion   { background: #e3f2fd;              color: #1565c0; }
.trans-badge--act-alquiler         { background: #e0f2f1;              color: #00695c; }
.trans-badge--act-caravana         { background: #fff8e1;              color: #f57f17; }
.trans-badge--act-cargos-bancarios { background: rgba(13,110,253,.1);  color: #0d6efd; }
.trans-badge--act-combustible      { background: #fff3e0;              color: #e65100; }
.trans-badge--act-comida           { background: #fce4ec;              color: #ad1457; }
.trans-badge--act-consultoria      { background: rgba(111,66,193,.1);  color: #6f42c1; }
.trans-badge--act-hospedaje        { background: #ede7f6;              color: #4527a0; }
.trans-badge--act-movilizacion     { background: rgba(32,201,151,.1);  color: #20c997; }
.trans-badge--act-otras            { background: #f5f5f5;              color: #616161; }
.trans-badge--act-personalizacion  { background: #f3e5f5;              color: #7b1fa2; }
.trans-badge--act-propaganda       { background: #fbe9e7;              color: #bf360c; }

.trans-badge--ingreso { background: #e8f5ec; color: #1a7a3a; }
.trans-badge--gasto   { background: #fdecea; color: #c62828; }

@media (max-width: 768px) {
  .trans-toolbar         { flex-direction: column; align-items: stretch; }
  .trans-toolbar-actions { flex-wrap: wrap; }
  .trans-pagination-bar  { flex-direction: column; align-items: flex-start; }
}

.doc-preview-wrap {
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: #fafafa;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.doc-preview-wrap--active {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  height: 780px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

.doc-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #f8f9fa;
  text-align: center;
  padding: 2rem;
}

.doc-preview-icon {
  font-size: 2.2rem;
  color: #c0392b;
  opacity: .45;
}

.doc-preview-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
  margin: 0;
}

.doc-preview-desc {
  color: #6c757d;
  font-size: .76rem;
  max-width: 320px;
  line-height: 1.55;
  margin: 0;
}

.doc-sidebar {
  width: 250px;
  min-width: 250px;
  border-right: 1.5px solid var(--color-border);
  display: flex;
  flex-direction: column;
  background: #fff;
  height: 100%;
}

.doc-sidebar-header {
  padding: .85rem 1.1rem;
  border-bottom: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #fafbfc;
}

.doc-sidebar-header i {
  color: var(--brand-green);
  font-size: 1rem;
}

.doc-sidebar-title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--color-text);
  flex: 1;
}

.doc-sidebar-badge {
  background: #f0faf4;
  color: var(--brand-green);
  border: 1px solid #b7e4c7;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 20px;
  white-space: nowrap;
}

.doc-sidebar-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.doc-sidebar-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--color-border);
  transition: background .12s, border-color .12s;
  outline: none;
}

.doc-sidebar-item:last-child {
  border-bottom: none;
}

.doc-sidebar-item:hover {
  background: rgba(45, 164, 78, .05);
}

.doc-sidebar-item:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: -2px;
}

.doc-sidebar-item.active {
  border-left-color: var(--brand-green);
  background: rgba(45, 164, 78, .07);
}

.doc-sidebar-item.active .doc-sidebar-num {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
}

.doc-sidebar-item.active .doc-sidebar-icon {
  color: var(--brand-green);
}

.doc-sidebar-item.active .doc-sidebar-name {
  color: var(--brand-green-dark, #1a7f3c);
  font-weight: 600;
}

.doc-sidebar-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  flex-shrink: 0;
  background: #f4f6f8;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.doc-sidebar-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #c0392b;
}

.doc-sidebar-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-sidebar-name {
  font-size: .775rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.3;
}

.doc-sidebar-type {
  display: none;
}

.doc-preview-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.doc-preview-iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  display: block;
}

@media (max-width: 992px) {
  .filter-actions {
    flex-direction: column;
  }
  .btn-filter-reset,
  .btn-filter-apply {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .app-header { padding: 1rem 1rem; gap: 1rem; }
  .header-divider { height: 40px; }
  .logo-block { min-width: 140px; min-height: 44px; }
  .toolbar-row { padding: .75rem 1rem; }
  .table-footer { padding: .75rem 1rem; }
  .filter-header { padding: .75rem 1rem; }
  .filter-panel { padding: 1.25rem 1rem; }

  .filter-label {
    font-size: .68rem;
    margin-bottom: .4rem;
  }

  .filter-select {
    height: 38px;
    font-size: .82rem;
  }

  .filter-actions {
    gap: .5rem;
  }

  .btn-filter-reset,
  .btn-filter-apply {
    padding: .45rem .8rem;
    font-size: .8rem;
  }
}

@media (max-width: 480px) {
  .header-divider { display: none; }
  .logo-block { min-width: unset; }
  .logo-placeholder { font-size: .72rem; padding: .4rem .75rem; }
  .toolbar-actions .btn-action span { display: none; }
  .main-card { border-radius: 8px; }

  .detail-title-bar {
    flex-direction: column;
    gap: .85rem;
  }
  .detail-title-right {
    align-items: flex-start;
    width: 100%;
  }
  .detail-candidate-name {
    font-size: 1.05rem;
  }
  .detail-tabs-wrapper {
    padding: 0 1rem;
  }
  .detail-nav-tabs .nav-link {
    padding: .75rem .65rem;
    font-size: .76rem;
    gap: .25rem;
  }
  .detail-pane-inner {
    padding: 1.25rem 1rem;
  }
  .totales-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .filter-header {
    flex-direction: column;
    align-items: flex-start;
    padding: .6rem 1rem;
  }

  .btn-toggle-filter,
  .btn-toggle-filter-close {
    font-size: .8rem;
  }

  .filter-label {
    font-size: .65rem;
  }

  .filter-select {
    font-size: .78rem;
  }

  .filter-actions {
    flex-direction: column;
    gap: .5rem;
  }

  .btn-filter-reset,
  .btn-filter-apply {
    width: 100%;
    padding: .45rem .65rem;
    font-size: .77rem;
  }
}

.app-version-badge {
  display: block;
  text-align: center;
  padding: .40rem 1rem;
  font-size: .68rem;
  color: #97b4c4;
  background: transparent;
  user-select: none;
  letter-spacing: .02em;
}

/* Toast notifications */
#toastContainer { z-index: 9999; }
