
/* --- Estilo app corporativa Cobratis v2 --- */
.cbr-aside {
  width: 190px;
  min-width: 190px;

  position: sticky;
  top: 20px;
  float: left;
  margin-right: 30px;

  background: #fff;
  
  border-radius: 12px;
  padding: 16px;
  width: 190px;
  min-width: 190px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  font-family: 'Open Sans', Arial, sans-serif;
  list-style: none !important;
}
.cbr-menu {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cbr-menu li { list-style: none !important; }
.cbr-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2a37;
  background: #f9fbfc;
  
  font-weight: 600;
  transition: all 0.15s ease;
}
.cbr-menu a:hover {
  background: #f1fbf5;
  color: #0c5f3e;
  border-color: rgba(25,135,84,.25);
  transform: translateY(-1px);
}
.cbr-menu a.cbr-highlight {
  background: #198754;
  color: #fff;
  border-color: #198754;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(25,135,84,.25);
}
.cbr-menu a.cbr-highlight:hover {
  background: #157347;
  color: #fff;
}
.cbr-accordion {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  color: #0c5f3e;
  background: #f5fbf7;
  
  cursor: pointer;
  position: relative;
}
.cbr-accordion::after {
  content: "\25BC"; /* flecha ▼ */
  position: absolute;
  right: 12px;
  font-size: 12px;
  transition: transform 0.2s;
}
.cbr-accordion[aria-expanded="true"]::after {
  transform: rotate(180deg); /* flecha ▲ */
}
.cbr-panel[hidden] { display: none; }
.cbr-panel {
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid #eef2f4;
}
.cbr-panel input[readonly] {
  background: #f3f5f6;
  color: #6b7280;
  cursor: not-allowed;
}
.cbr-tarifa {
  margin-top: 16px;
  padding: 12px;
  
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 14px;
  color: #333;
  text-align: left;
}
.cbr-tarifa a {
  color: #198754;
  font-weight: 700;
  text-decoration: none;
}
.cbr-tarifa a:hover { text-decoration: underline; }

/* Asegura que el contenido principal no se superponga */



/* --- Layout corregido v5 --- */
.cbr-layout {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.cbr-aside {
  width: 190px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}
.cbr-content {
  flex: 1;
  min-width: 0;
}



/* === Fix overlap: make aside fit its parent and cancel legacy float === */
.cbr-aside {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  float: none !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
/* Ensure the flex container doesn't wrap unexpectedly */
.cbr-aside, .cbr-menu, .cbr-panel { box-sizing: border-box; }
@media (max-width: 1024px) {
  .cbr-aside { position: static; }
}


/* === Limpieza visual del panel lateral (v1.4.8d) === */
.cbr-aside {
  border: none !important;
  box-shadow: none !important;
}
.cbr-aside::after {
  display: none !important;
}
/* Elimina borde derecho del contenedor del menú */
div[style*="border-right"] {
  border-right: none !important;
  padding-right: 0 !important;
}
/* Ajuste de separación entre columnas */
.cbr-layout { gap: 40px; }


/* === Responsive hardening (v1.4.8f) === */
@media (max-width: 1200px) {
  /* Allow column wrapping/stacking for the specific flex container used by the portal */
  div[style*="display:flex"][style*="gap:20px"] {
    flex-wrap: wrap !important;
  }
}
@media (max-width: 992px) {
  /* Stack columns vertically */
  div[style*="display:flex"][style*="gap:20px"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }
  /* Left column (menu) expands full width */
  div[style*="width:200px"][style*="padding-right:10px"] {
    width: 100% !important;
    max-width: none !important;
    border-right: none !important;
    padding-right: 0 !important;
  }
  .cbr-aside { width: 100% !important; max-width: none !important; position: static !important; }
  /* Right column (content) full width */
  div[style*="flex:1;"] {
    width: 100% !important;
    flex: 0 0 auto !important;
  }
  /* Menu items full-width */
  .cbr-menu a { width: 100%; text-align: center; }
  /* Table scroll on small screens */
  .cbr-content table { display: block; max-width: 100%; overflow-x: auto; }
}


/* === Simplificar tabla en móvil (v1.4.8g) === */
@media (max-width: 768px) {
  .cbr-content table th:nth-child(2),
  .cbr-content table th:nth-child(4),
  .cbr-content table td:nth-child(2),
  .cbr-content table td:nth-child(4) {
    display: none !important;
  }
  .cbr-content table th,
  .cbr-content table td {
    font-size: 14px;
    padding: 6px 8px;
  }
}


/* === Limpieza móvil (v1.4.8h) === */
@media (max-width: 768px) {
  .cbr-content table th:nth-child(2),
  .cbr-content table th:nth-child(4),
  .cbr-content table td:nth-child(2),
  .cbr-content table td:nth-child(4) {
    display: none !important;
  }
  .cbr-content table th,
  .cbr-content table td {
    font-size: 15px;
    padding: 8px 10px;
  }
}


/* === Mobile clean version (v1.4.8k) === */
@media (max-width: 768px) {
  /* Hide ID Recobro (2) and Importe (4) */
  table th:nth-child(2),
  table th:nth-child(4),
  table td:nth-child(2),
  table td:nth-child(4) {
    display: none !important;
  }
  table th,
  table td {
    font-size: 14px;
    padding: 8px 10px;
  }
  table {
    width: 100%;
    display: block;
    overflow-x: auto;
  }
}
