/* =============================================================================
   templatePublic.css — OSINERGMIN / PVO / RHO
============================================================================= */

/* =============================================================================
   1) VARIABLES / TOKENS
============================================================================= */
:root {
  /* Colores institucionales */
  --osinergmin-primary: #1e5091;
  --osinergmin-primary-dark: #163a6b;

  --osinergmin-blue: #0b3c78;
  --osinergmin-blue-dark: #082e5c;
  --osinergmin-blue-bar: #144c8a;

  /* Neutros / Fondo */
  --osinergmin-bg: #e5e7eb; /* fondo plomo suave */
  --osinergmin-border: #dce3ed;
  --osinergmin-muted: #64748b;
  --osinergmin-light: #f8fafc;
  --osinergmin-white: #ffffff;

  /* Tema (compat) */
  --background: 210 20% 98%;
  --foreground: 215 50% 15%;
  --card: 0 0% 100%;
  --border: 214 25% 88%;
  --primary: 214 72% 33%;
  --destructive: 0 72% 51%;

  /* Radios */
  --radius: 0.75rem;
}

/* =============================================================================
   2) RESET / BASE
============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--osinergmin-bg);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
/*   display: flex; */
  flex-direction: column;
}

.min-h-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pvo-uppercase {
  text-transform: uppercase;
}

/* =============================================================================
   3) HEADER / FOOTER
============================================================================= */
.pvo-header {
  width: 100%;
/*   overflow-x: hidden; */
}

.pvo-header-top {
  background: linear-gradient(135deg, var(--osinergmin-blue), var(--osinergmin-blue-dark));
  padding: 0;
}

.pvo-header-bottom {
  background-color: var(--osinergmin-blue-bar);
  padding: 0;
}

.pvo-logo {
  height: 38px;
}

@media (min-width: 768px) {
  .pvo-logo {
    height: 46px;
  }
}

.pvo-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.footer-osinergmin {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 0;
  margin-top: auto;
}

.footer-osinergmin .text-muted {
  font-size: 0.875rem;
  color: #6b7280;
}

/* =============================================================================
   4) CARDS / CONTENEDORES
============================================================================= */
.card-consulta,
.card-busqueda {
  background: var(--osinergmin-white);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px -5px rgba(30, 80, 145, 0.08);
  border: 1px solid rgba(30, 80, 145, 0.1);
  padding: 1.5rem;
}

.card-header-consulta {
  border-bottom: 1px solid rgba(220, 227, 237, 0.95);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.icon-title {
  background-color: rgba(30, 80, 145, 0.1);
  padding: 0.375rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =============================================================================
   5) FORMULARIOS / INPUTS
============================================================================= */
.form-label {
  font-weight: 500;
  color: #1f2937;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.form-control,
.form-select {
  border: 1px solid var(--osinergmin-border);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--osinergmin-primary);
  box-shadow: 0 0 0 3px rgba(30, 80, 145, 0.15);
}

.input-wrapper {
  flex: 1 1 0%;
  max-width: 28rem;
}

.input-group-search {
  display: flex;
  gap: 0.5rem;
  position: relative;
}

.input-group-search + .invalid-feedback {
  display: block;
  margin-top: 0.25rem;
}

.text-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* Consulta (form-row-consulta) */
.form-row-consulta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .form-row-consulta {
    flex-direction: row;
    align-items: flex-start;
  }

  .form-row-consulta .form-label {
    width: 160px;
    text-align: right;
    flex-shrink: 0;
    padding-top: 0.375rem;
    margin-bottom: 0;
  }
}

/* Búsqueda (search-header) */
.search-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-fields {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 0.75rem;
}

.search-fields > div {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 768px) {
  .search-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-fields {
    flex-direction: column;
  }

  .search-fields > div {
    min-width: 100%;
  }
}

/* =============================================================================
   6) BOTONES
============================================================================= */
.btn {
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
}

/* Primario */
.btn-primary {
  background-color: var(--osinergmin-primary);
  border-color: var(--osinergmin-primary);
}

.btn-primary:hover {
  background-color: var(--osinergmin-primary-dark);
  border-color: var(--osinergmin-primary-dark);
}

/* Outline primario */
.btn-outline-primary {
  color: var(--osinergmin-primary);
  border-color: var(--osinergmin-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: var(--osinergmin-primary) !important;
  background-color: rgba(30, 80, 145, 0.05) !important;
  border-color: var(--osinergmin-primary) !important;
}

/* Botón Avanzada */
.btn-filtro-avanzado {
  background-color: transparent;
  color: var(--osinergmin-primary);
  border: 1px solid var(--osinergmin-primary);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.btn-filtro-avanzado i {
  flex-shrink: 0;
}

.btn-filtro-avanzado:hover {
  background-color: rgba(30, 80, 145, 0.05);
}

@media (max-width: 768px) {
  .btn-filtro-avanzado {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

/* Botón búsqueda (consulta) */
.btn-search {
  background-color: var(--osinergmin-primary);
  border-color: var(--osinergmin-primary);
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.btn-search:hover {
  background-color: var(--osinergmin-primary-dark);
  border-color: var(--osinergmin-primary-dark);
}

.btn-search-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* =============================================================================
   7) RESULTADOS / TABLAS RHO (HEADER CENTRADO, BODY SEGÚN CLASES)
============================================================================= */

/* Contenedor tipo card para tablas */
.rho-table-wrap {
  background: var(--osinergmin-white);
  border: 1px solid rgba(220, 227, 237, 0.95);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 18px -14px rgba(30, 80, 145, 0.18);
}

/* Tabla base */
.table.table-rho {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* Quita bordes de Bootstrap para una vista más limpia */
.table.table-rho > :not(caption) > * > * {
  border-bottom: 0 !important;
}

/* Header: SIEMPRE CENTRADO */
.table-rho thead th {
  background-color: var(--osinergmin-primary);
  color: #ffffff;
  font-size: 0.65em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  border-bottom: none;
  padding: 0.60rem 0.55rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

/* Body: por defecto IZQUIERDA. (Si quieres centrar, usa .text-center o .rho-ta-center) */
.table-rho tbody td {
  font-size: 0.65em;
  padding: 0.55rem 0.55rem;
  vertical-align: middle;
  text-align: left;
}

/* Separadores suaves entre filas */
.table-rho tbody tr + tr td {
  border-top: 1px solid rgba(220, 227, 237, 0.7);
}

/* Hover */
.table-rho tbody tr:hover {
  background-color: rgba(30, 80, 145, 0.035);
}

/* Helpers de alineación (opcionales) */
.rho-ta-center {
  text-align: center !important;
}

.rho-ta-left {
  text-align: left !important;
}

/* Link e ícono "Ver" (sin subrayado + tamaño requerido + mejor click target) */
.table-rho td a {
  text-decoration: none !important;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0.5rem;
}

.table-rho td a:hover {
  text-decoration: none !important;
  background: rgba(30, 80, 145, 0.06);
}

.table-rho td a .bi {
  font-size: 0.85em; /* requerido */
  line-height: 1;
}

/* Primera celda izquierda del header */
.table-rho thead th:first-child {
  border-top-left-radius: 0.75rem;
}

/* Última celda derecha del header */
.table-rho thead th:last-child {
  border-top-right-radius: 0.75rem;
}

/* =============================================================================
   8) RESULTADOS (CONSULTA) - "result-row" (ficha)
============================================================================= */
.result-row {
  width: 100%;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(220, 227, 237, 0.5);
}

.result-row:last-child {
  border-bottom: none;
}

/* =============================================================================
   9) DATATABLES (FILTRO + PAGINACIÓN)
============================================================================= */
.dataTables_wrapper {
  width: 100% !important;
  overflow-x: auto;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem; /* respira dentro del wrap */
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  margin: 0.50rem;
}

.dataTables_wrapper .dataTables_filter label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--osinergmin-border);
  border-radius: 0.6rem;
  padding: 0.40rem 0.70rem;
  font-size: 0.85rem;
  width: 200px;
}

/* Paginación centrada */
.dataTables_wrapper .dataTables_paginate {
  display: flex !important;
  justify-content: center !important;
  margin-top: 0.75rem !important;
  gap: 0.25rem !important;
  flex-wrap: wrap;
}

/* Botones */
.dataTables_wrapper .paginate_button {
/*   color: var(--osinergmin-primary) !important; */
/*   border: 1px solid var(--osinergmin-border) !important; */
  color: #1e5091 !important; 
  border-color: #dce3ed !important;
  background-color: #ffffff !important;
  font-size: 0.875rem !important;
  min-width: 32px !important;
  height: 32px !important;
  border-radius: 0.375rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.dataTables_wrapper .paginate_button.current {
  background-color: #e5e7eb !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  font-weight: 700 !important;
}

.dataTables_wrapper .paginate_button:hover {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

.dataTables_wrapper .paginate_button:first-child,
.dataTables_wrapper .paginate_button:last-child {
  border-radius: 0.375rem !important;
}

.page-item.active .page-link {
	background-color: #004B97 !important;
	border-color: #004B97 !important;
}

@media (max-width: 768px) {
  .dataTables_wrapper .paginate_button {
    min-width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem !important;
  }
}

.dt-info-small {
  font-size: 0.65rem;
  color: #adb5bd;
}

/* =============================================================================
   10) EMPTY STATE
============================================================================= */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--osinergmin-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  opacity: 0.3;
}

/* =============================================================================
   11) BADGES (ESTADOS)
============================================================================= */
.badge-vigente {
  background-color: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.badge-suspendido {
  background-color: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.badge-cancelado {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}

/* =============================================================================
   12) MODAL DETALLE RHO (MINIMALISTA + TIPOGRAFÍA PEDIDA)
============================================================================= */
.bg-osinergmin-blue {
  background-color: var(--osinergmin-blue) !important;
}

/* Title requerido */
#modalDetalleRho .modal-title {
  font-size: 0.85em;
  letter-spacing: 0.3px;
}

/* Body requerido */
.modal-body-rho {
  padding: 0.85rem 1.1rem; /* menos padding */
  font-size: 0.95em;      /* requerido */
  color: #334155;        /* gris azulado (menos negro) */
}

/* Ficha (rho-field) */
.rho-field {
/*   display: flex; */
/*   flex-direction: column; */
  padding: 0.25rem 0;
  border-bottom: 1px dashed rgba(220, 227, 237, 0.6);
}

.rho-field:last-child {
  border-bottom: none;
}

/* Evitar que TODO se vea "en bloque" */
#modalDetalleRho .row.g-2 {
  row-gap: 0.4rem !important;
}

.rho-label {
  font-size: 0.80em;
/*   color: var(--osinergmin-muted); */
  color: #64748b;        /* muted */
/*   text-transform: uppercase; */
/*   letter-spacing: 0.35px; */
  font-weight: 600;
}

.rho-value {
  font-size: 0.85em;
  font-weight: 600;
/*   color: #1f2937; */
  color: #0f172a;        /* slate, menos agresivo que negro puro */
  line-height: 1.35;
}

.rho-highlight {
  font-weight: 600;
  color: #0b3c78; /* institucional */
}


/* Acordeón: compacto */
.accordion-button {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 0.9rem;
}

.accordion-body {
  padding: 0.75rem;
}

/* =============================================================================
   ACORDEÓN DEL MODAL — MÁS SUAVE Y MINIMALISTA
============================================================================= */
#modalDetalleRho .accordion-item {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 237, 0.9);
}

/* Header acordeón: gris muy suave, no celeste fuerte */
#modalDetalleRho .accordion-button {
  background: #f1f5f9;           /* suave */
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  box-shadow: none;
}

#modalDetalleRho .accordion-button:not(.collapsed) {
  background: #eaf2ff;           /* apenas azul */
  color: #0b3c78;                /* institucional */
}

/* Body acordeón */
#modalDetalleRho .accordion-body {
  padding: 0.75rem;
  background: #ffffff;
}

/* Tablas dentro del modal (acordeón) */
#modalDetalleRho .rho-table-wrap {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 237, 0.95);
}

/* Header con radios en modal */
#modalDetalleRho .table-rho thead th:first-child {
  border-top-left-radius: 0.75rem;
}
#modalDetalleRho .table-rho thead th:last-child {
  border-top-right-radius: 0.75rem;
}

/* Body más descansado */
#modalDetalleRho .table-rho tbody td {
  color: #334155;
  font-weight: 500;
}

/* =============================================================================
   13) UTILIDADES
============================================================================= */
.text-primary {
  color: var(--osinergmin-primary) !important;
}

.radio-border {
  border-radius: calc(var(--radius) - 2px) !important;
}

.divider {
  border-top: 1px solid rgba(220, 227, 237, 0.95);
  margin: 1.5rem 0;
}

/* Helpers tamaños (usados en tus templates) */
.w-4 { width: 1rem; }
.w-12 { width: 3rem; }
.h-4 { height: 1rem; }
.h-9 { height: 2.25rem; }
.h-12 { height: 3rem; }

/* Compat (si lo usas) */
label.form {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #1f2937;
}

/* =============================================================================
14) RHO EXPORT VIEW — DISEÑO MINIMALISTA SOFISTICADO (OPTIMIZADO V2)
============================================================================= */

:root {
    /* Colores Institucionales */
    --rho-primary: #1e5091;
    --rho-primary-dark: #163a6b;
    --rho-primary-light: rgba(30, 80, 145, 0.04);
    --rho-primary-lighter: rgba(30, 80, 145, 0.06);
    --rho-border: #e2e8f0;
    --rho-text: #334155;
    --rho-text-muted: #64748b;
    --rho-bg: #f8fafc;
    
    /* Espaciado optimizado */
    --rho-spacing-xs: 0.375rem;
    --rho-spacing-sm: 0.5rem;
    --rho-spacing-md: 0.75rem;
    --rho-spacing-lg: 1rem;
    
    /* Tipografía */
    --rho-font-xs: 0.75rem;
    --rho-font-sm: 0.8125rem;
    --rho-font-base: 0.875rem;
    --rho-font-md: 0.9375rem;
    
    /* Radios */
    --rho-radius-sm: 0.375rem;
    --rho-radius-md: 0.5rem;
    --rho-radius-lg: 0.75rem;
    --rho-radius-xl: 1rem;
}

/* Vista Principal - Fondo sutil */
.rho-export-view {
    background: linear-gradient(180deg, #f1f5f9 0%, #e8ecf1 100%);
    min-height: 100vh;
    padding: 1.5rem 1rem 2rem;
}

/* Card Principal */
.rho-export-card {
    background: var(--osinergmin-white);
    border-radius: var(--rho-radius-xl);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--rho-border);
    overflow: hidden;
    max-width: 950px;
    margin: 0 auto;
}

/* Header del Card - FONDO BLANCO (sin saturación) */
.rho-export-card-header {
    background: var(--osinergmin-white);
    border-bottom: 1px solid var(--rho-border);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rho-export-header-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
}

/* Icono file-earmark RESALTADO */
.rho-export-header-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rho-primary-light) 0%, var(--rho-primary-lighter) 100%);
    border-radius: var(--rho-radius-md);
    flex-shrink: 0;
    border: 1px solid rgba(30, 80, 145, 0.1);
}

.rho-export-header-icon i {
    font-size: 1.5rem;
    color: var(--rho-primary);
    opacity: 1;
}

.rho-export-title-group {
    flex: 1;
    min-width: 0;
}

.rho-export-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--rho-text);
}

.rho-export-subtitle {
    font-size: var(--rho-font-sm);
    color: var(--rho-text-muted);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* Fecha con badge curvo (similar a Ver Registros Hábiles) */
.rho-export-date-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--rho-primary-light);
    padding: 0.5rem 0.875rem;
    border-radius: 2rem;
    font-size: var(--rho-font-sm);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--rho-primary-dark);
    border: 1px solid rgba(30, 80, 145, 0.15);
    transition: all 0.2s ease;
}

.rho-export-date-badge:hover {
    background: var(--rho-primary-lighter);
    border-color: rgba(30, 80, 145, 0.2);
}

.rho-export-date-badge i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Body del Card */
.rho-export-card-body {
    padding: 1.25rem 1.5rem;
}

/* Fila de búsqueda + instrucción (una sola línea) */
.rho-export-search-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Buscador */
.rho-export-search {
    flex: 1;
    position: relative;
}

.rho-export-search-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid var(--rho-border);
    border-radius: var(--rho-radius-md);
    font-size: var(--rho-font-base);
    transition: all 0.2s ease;
    background: var(--osinergmin-white);
    color: var(--rho-text);
}

.rho-export-search-input:focus {
    outline: none;
    border-color: var(--rho-primary);
    box-shadow: 0 0 0 3px rgba(30, 80, 145, 0.08);
}

.rho-export-search-input::placeholder {
    color: var(--rho-text-muted);
    opacity: 0.6;
}

.rho-export-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rho-text-muted);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0.6;
}

/* Instrucción como icono toggle */
.rho-export-instructions-toggle {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rho-primary-light);
    border-radius: var(--rho-radius-md);
    color: var(--rho-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.rho-export-instructions-toggle:hover {
    background: var(--rho-primary-lighter);
    border-color: rgba(30, 80, 145, 0.15);
    color: var(--rho-primary-dark);
}

.rho-export-instructions-toggle:focus {
    outline: 2px solid var(--rho-primary);
    outline-offset: 2px;
}

.rho-export-instructions-toggle i {
    font-size: 1.25rem;
}

/* Accordion - Optimizado */
.rho-export-accordion {
    border: none;
}

.rho-export-accordion .accordion-item {
    border: 1px solid var(--rho-border);
    border-radius: var(--rho-radius-md) !important;
    margin-bottom: 0.5rem;
    background: var(--osinergmin-white);
    transition: all 0.2s ease;
    overflow: hidden;
}

.rho-export-accordion .accordion-item:hover {
    border-color: rgba(30, 80, 145, 0.3);
    box-shadow: 0 2px 8px rgba(30, 80, 145, 0.06);
}

.rho-export-accordion .accordion-button {
    font-weight: 500;
    font-size: var(--rho-font-base);
    padding: 0.75rem 1rem;
    border-radius: var(--rho-radius-md) !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--osinergmin-white);
    color: var(--rho-text);
}

.rho-export-accordion .accordion-button:not(.collapsed) {
    background: var(--rho-primary-light);
    color: var(--rho-primary-dark);
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.rho-export-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: var(--rho-primary);
}

/* Icono del Grupo */
.rho-export-group-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rho-primary-light);
    border-radius: var(--rho-radius-sm);
    color: var(--rho-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.rho-export-group-title {
    flex: 1;
    min-width: 0;
}

.rho-export-group-title span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.rho-export-group-meta {
    font-size: var(--rho-font-xs);
    color: var(--rho-text-muted);
    margin-top: 0.0625rem;
    font-weight: 400;
}

.rho-export-accordion .accordion-button::after {
    margin-left: auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    background-image: none;
    content: '\F282';
    font-family: 'bootstrap-icons' !important;
    font-size: 0.875rem;
    color: var(--rho-text-muted);
    opacity: 0.6;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rho-export-accordion .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
    opacity: 1;
    color: var(--rho-primary);
}

.rho-export-accordion .accordion-body {
    padding: 0.5rem 1rem 0.75rem;
    background: rgba(248, 249, 250, 0.5);
    border-top: 1px solid var(--rho-border);
}

/* Lista de Actividades */
.rho-export-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.25rem;
}

.rho-export-activity-item {
    border-radius: var(--rho-radius-sm);
    transition: all 0.2s ease;
}

.rho-export-activity-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    color: var(--rho-text);
    text-decoration: none;
    font-size: var(--rho-font-sm);
    border-radius: var(--rho-radius-sm);
    transition: all 0.2s ease;
    width: 100%;
    position: relative;
    line-height: 1.3;
    font-weight: 400;
}

.rho-export-activity-link:hover {
    background: rgba(30, 80, 145, 0.06);
    color: var(--rho-primary-dark);
}

.rho-export-activity-link:focus-visible {
    outline: 2px solid var(--rho-primary);
    outline-offset: 2px;
    background: rgba(30, 80, 145, 0.08);
}

.rho-export-activity-link i {
    color: var(--rho-primary);
    font-size: 0.875rem;
    min-width: 1rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.rho-export-activity-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rho-export-activity-badge {
    font-size: 0.625rem;
    padding: 0.1875rem 0.5rem;
    background: linear-gradient(135deg, rgba(30, 80, 145, 0.08) 0%, rgba(30, 80, 145, 0.12) 100%);
    color: var(--rho-primary-dark);
    border-radius: 20px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid rgba(30, 80, 145, 0.15);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Estado Vacío */
.rho-export-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--rho-text-muted);
    background: var(--osinergmin-white);
    border-radius: var(--rho-radius-md);
    border: 1px dashed var(--rho-border);
}

.rho-export-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
    color: var(--rho-primary);
}

/* Loading */
.rho-export-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--rho-primary);
    background: var(--osinergmin-white);
    border-radius: var(--rho-radius-md);
    padding: 1.5rem;
}

.rho-export-loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
    margin-bottom: 1rem;
}

/* Modal de Carga */
.rho-export-modal .modal-content {
    border-radius: var(--rho-radius-xl);
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.rho-export-modal .modal-body {
    padding: 1.75rem 1.5rem;
}

.rho-export-modal .progress {
    height: 6px;
    border-radius: 3px;
    background: var(--rho-border);
}

.rho-export-modal .progress-bar {
    background: linear-gradient(90deg, var(--rho-primary) 0%, var(--rho-primary-dark) 100%);
}

/* Toast Notifications */
.rho-export-toast {
    min-width: 300px;
    max-width: 380px;
    border-radius: var(--rho-radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-size: var(--rho-font-sm);
    border: none;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .rho-export-view {
        padding: 1rem 0.75rem 1.5rem;
    }
    
    .rho-export-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .rho-export-header-content {
        width: 100%;
    }
    
    .rho-export-title {
        font-size: 1.125rem;
    }
    
    .rho-export-subtitle {
        font-size: var(--rho-font-sm);
    }
    
    .rho-export-date-badge {
        align-self: flex-end;
        font-size: var(--rho-font-xs);
        padding: 0.4375rem 0.75rem;
    }
    
    .rho-export-card-body {
        padding: 1rem 1.25rem;
    }
    
    .rho-export-search-row {
        flex-wrap: wrap;
    }
    
    .rho-export-search {
        flex: 1 1 100%;
    }
    
    .rho-export-search-input {
        font-size: 1rem;
        padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    }
    
    .rho-export-instructions-toggle {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .rho-export-accordion .accordion-button {
        padding: 0.6875rem 0.875rem;
        font-size: var(--rho-font-sm);
    }
    
    .rho-export-activity-link {
        padding: 0.5625rem 0.6875rem;
        font-size: var(--rho-font-sm);
    }
    
    .rho-export-group-meta {
        display: none;
    }
    
    .rho-export-activity-badge {
        display: none;
    }
}

/* Responsive - Móvil Pequeño */
@media (max-width: 480px) {
    .rho-export-view {
        padding: 0.75rem 0.5rem 1.25rem;
    }
    
    .rho-export-card {
        border-radius: var(--rho-radius-md);
    }
    
    .rho-export-card-header {
        padding: 0.875rem 1rem;
    }
    
    .rho-export-title {
        font-size: 1.0625rem;
    }
    
    .rho-export-header-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .rho-export-header-icon i {
        font-size: 1.25rem;
    }
    
    .rho-export-card-body {
        padding: 0.875rem 1rem;
    }
    
    .rho-export-search-row {
        gap: 0.5rem;
    }
    
    .rho-export-search {
        flex: 1 1 100%;
    }
    
    .rho-export-instructions-toggle {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .rho-export-accordion .accordion-item {
        margin-bottom: 0.4375rem;
    }
    
    .rho-export-accordion .accordion-button {
        padding: 0.625rem 0.75rem;
        gap: 0.625rem;
    }
    
    .rho-export-accordion .accordion-body {
        padding: 0.4375rem 0.75rem 0.625rem;
    }
    
    .rho-export-activity-list {
        gap: 0.1875rem;
    }
    
    .rho-export-activity-link {
        padding: 0.5625rem 0.625rem;
    }
    
    .rho-export-group-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Accesibilidad */
.rho-export-accordion .accordion-button:focus-visible,
.rho-export-activity-link:focus-visible,
.rho-export-search-input:focus-visible {
    outline: 2px solid var(--rho-primary);
    outline-offset: 2px;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .rho-export-accordion .accordion-item,
    .rho-export-activity-link,
    .rho-export-search-input,
    .rho-export-instructions-toggle {
        transition: none !important;
    }
    
    .rho-export-accordion .accordion-button::after {
        transition: none !important;
    }
}

/* Animación suave */
.rho-export-accordion .accordion-collapse {
    transition: height 0.25s ease;
}

/* Utilidad: texto truncado */
.rho-export-truncate {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* =============================================================================
15) ENLACES INSTITUCIONALES REUTILIZABLES (GLOBAL - SIN COLISIONES)
============================================================================= */

/* Link institucional genérico - Para usar en múltiples vistas públicas */
.btn-link-institucional {
    color: var(--osinergmin-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(30, 80, 145, 0.05);
    border: 1px solid transparent;
}

.btn-link-institucional:hover {
    color: var(--osinergmin-primary-dark);
    background: rgba(30, 80, 145, 0.1);
    text-decoration: none;
    border-color: rgba(30, 80, 145, 0.15);
    transform: translateX(2px);
}

.btn-link-institucional:active {
    background: rgba(30, 80, 145, 0.12);
    transform: translateX(0);
}

.btn-link-institucional i {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.btn-link-institucional:hover i {
    transform: translateX(2px);
}

/* Variante pequeña - Para headers compactos */
.btn-link-institucional-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
}

/* Variante sin fondo - Solo texto con icono */
.btn-link-institucional-plain {
    background: transparent;
    padding: 0.375rem 0.5rem;
}

.btn-link-institucional-plain:hover {
    background: rgba(30, 80, 145, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .btn-link-institucional {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.625rem;
    }
    
    .btn-link-institucional-sm {
        font-size: 0.75rem;
        padding: 0.3125rem 0.5rem;
    }
}