/* --- ESTILOS GENERALES --- */
summary {
  background-color: #212529;
  color: #fff;
  cursor: pointer;
  padding: 0.9rem 1rem;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1.05rem;
  transition: background-color 0.2s ease;
  list-style: none;
  border-radius: 0.5rem 0.5rem 0 0;
}
summary:hover {
  background-color: #1c1f23;
}
summary:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
summary::after {
  content: '+';
  font-weight: 700;
  float: right;
}
details[open] > summary {
  border-radius: 0.5rem 0.5rem 0 0;
}
details[open] > summary::after {
  content: '-';
}
.panel {
  padding: 1rem;
  background-color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  border: 1px solid #dee2e6;
  border-top: none;
  margin-bottom: 1rem;
}
.criterion {
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
}
.details code {
  background-color: #e9ecef;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.9em;
}
.homologacion-table td input {
  width: 80px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  text-align: center;
}
.homologacion-table td.calculated {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #212529;
}
.result {
  background-color: #eaf2f8;
  border-left: 5px solid #3498db;
  font-weight: bold;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
}
.result span {
  color: #2e86c1;
}
.explanation-note {
    font-size: 0.9em;
    color: #555;
    font-style: italic;
    margin: 5px 0;
}
.bibliography-note {
    margin-top: 15px;
    padding: 10px;
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
    font-size: 0.85em;
    line-height: 1.4;
    color: #555;
    font-style: italic;
    border-radius: 4px;
}
.formula-explanation {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.5;
}
.formula-explanation p,
.formula-explanation ul {
    margin: 5px 0;
}
.formula-explanation ul {
    padding-left: 20px;
}
.formula-explanation strong {
    color: #2c3e50;
}
.info-box {
  background-color: #eef5fc;
  border-left: 5px solid #0d6efd;
  padding: 1rem;
  border-radius: 0.375rem;
  font-size: 0.95em;
  line-height: 1.6;
}

/* --- ESTILOS PARA MATRIZ CNBV --- */
.cnbv-cell {
    cursor: pointer;
    position: relative;
}
.cnbv-cell:hover {
    background-color: #f0f8ff !important;
}
.cnbv-cell.selected {
    background-color: #d1ecf1 !important;
    border: 2px solid #0d6efd;
    box-shadow: 0 0 4px rgba(13, 110, 253, 0.4);
}
.cnbv-cell.selected::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    color: #0d6efd;
    font-weight: bold;
}
.cnbv-cell.selected::after {
    content: "\f00c"; /* C¨Ždigo Unicode de Font Awesome para 'check' */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
}
/* --- ESTILOS PARA EL MODO OSCURO --- */
body.dark-mode {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #dee2e6;
    --bs-secondary-color: #adb5bd;
    --bs-tertiary-bg: #2b2b2b;
    --bs-border-color: #444;
    --bs-light-bg-subtle: #333;
    --bs-primary-bg-subtle: #03284a;
    --bs-primary-border-subtle: #084298;
    --bs-warning-border-subtle: #997404;
}
body.dark-mode .card,
body.dark-mode .table {
    background-color: #212121;
    color: #dee2e6;
}
body.dark-mode .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #2c2c2e;
}
body.dark-mode .homologacion-table td.calculated,
body.dark-mode .summary-table td.calculated,
body.dark-mode .summary-indivisos-table td.calculated {
    background-color: #343a40;
    color: #fff;
}
body.dark-mode .form-control {
    background-color: #2b2b2b;
    color: #fff;
    border-color: #444;
}
body.dark-mode .form-control:focus {
    background-color: #333;
    color: #fff;
    border-color: #0d6efd;
}
body.dark-mode .info-box {
    background-color: var(--bs-primary-bg-subtle);
    border-left-color: #3e8eff;
    color: #cdd5df;
}
/* Modo oscuro para matriz CNBV */
body.dark-mode .cnbv-cell:hover {
    background-color: #333 !important;
}
body.dark-mode .cnbv-cell.selected {
    background-color: #03284a !important;
    border-color: #3e8eff;
}
body.dark-mode .cnbv-cell.selected::after {
    color: #3e8eff;
}