/* ========================================= */
/* ==   MEJORAS DE ALINEACIÓN DASHBOARD   == */
/* ========================================= */
.dashboard-grid .card {
  display: flex;
  flex-direction: column; /* Organiza el contenido en una columna */
  justify-content: space-between; /* Empuja el contenido a los extremos */
}
/* Opcional: Si quieres que el texto crezca y empuje el botón, 
   puedes usar esta clase en el HTML como se muestra en el siguiente paso. */
.card-content {
  flex-grow: 1; /* Hace que esta sección crezca para ocupar el espacio disponible */
}
/* fin de la correccion */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #c7d2f4 0%, #c0d6f3 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* Necesario para que z-index funcione */
  z-index: 1002; /* Un número alto para ponerlo por encima de todo */
}
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}
.logo-icon {
  width: 50px;
  height: 50px;
  background: #1976d2;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
}
.logo-text h1 {
  color: #1976d2;
  font-size: 24px;
  margin-bottom: 2px;
}
.logo-text p {
  color: #666;
  font-size: 12px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}
.user-role {
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.logout-btn {
  background: #f44336;
  color: rgba(215, 213, 213, 0.958);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}
.logout-btn:hover {
  background: #d32f2f;
}
.container {
  flex: 1;
  padding: 2rem;

  max-width: 2000px;

  margin: 0 auto;
  width: 100%;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e1e3e6, #5ba8e7);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin-bottom: 1rem;
}
.card h3 {
  color: #1976d2;
  margin-bottom: 0.5rem;
  font-size: 20px;
}
.card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary {
  background: #1976d2;
  color: white;
}
.btn-primary:hover {
  background: #1565c0;
}
.btn-success {
  background: #4caf50;
  color: white;
}
.btn-success:hover {
  background: #45a049;
}
.btn-warning {
  background: #ff9800;
  color: white;
}
.btn-warning:hover {
  background: #f57c00;
}
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.stat-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #1976d2;
  display: block;
}
.stat-label {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.recent-activity {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  transition: background 0.3s;
}
.activity-item:hover {
  background: #f5f5f5;
}
.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}
.activity-icon.new {
  background: #4caf50;
}
.activity-icon.pending {
  background: #ff9800;
}
.activity-icon.approved {
  background: #2196f3;
}
.activity-icon.received {
  background: #9c27b0;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}
.modal-content {
  background: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1976d2;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
}
/* ========================================= */
/* == ESTILOS ADICIONALES PARA LOGIN.PHP == */
/* ========================================= */
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem;
}
.login-header {
  width: 100%;
  max-width: 500px;
  margin-bottom: 2rem;
  box-shadow: none; /* Opcional: quitar sombra en el header del login */
  background: transparent;
}
.login-container {
  width: 100%;
  display: flex;
  justify-content: center;
}
.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 450px;
  text-align: center;
}
.login-box h2 {
  color: #1976d2;
  font-size: 28px;
  margin-bottom: 0.5rem;
}
.login-box p {
  color: #666;
  margin-bottom: 2rem;
}
.login-form .form-group {
  text-align: left;
  margin-bottom: 1.25rem;
}
.login-form .form-group label {
  font-size: 14px;
}
.btn-login {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.error-message {
  background-color: #ffcdd2;
  color: #c62828;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #ef9a9a;
}
.login-footer {
  margin-top: 1.5rem;
  font-size: 14px;
}
.login-footer a {
  color: #1976d2;
  text-decoration: none;
  transition: color 0.3s;
}
.login-footer a:hover {
  color: #1565c0;
  text-decoration: underline;
}
/* ========================================= */
/* == ESTILOS PARA GESTIÓN DE USUARIOS    == */
/* ========================================= */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.page-header h1 {
  color: #4a8edc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.btn-secondary {
  background-color: #6c757d;
  color: white;
}
.btn-secondary:hover {
  background-color: #5a6268;
}
.btn-danger {
  background-color: #f44336;
  color: white;
}
.btn-danger:hover {
  background-color: #d32f2f;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.user-form .form-actions {
  text-align: right;
  margin-top: 1.5rem;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}
.user-table th,
.user-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.user-table th {
  background-color: #f8f9fa;
  color: #333;
  font-weight: 600;
}
.user-table tbody tr:hover {
  background-color: #f1f1f1;
}
.user-table .actions {
  display: flex;
  gap: 10px;
}
.status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}
.status-active {
  background-color: #4caf50; /* Verde */
}
.status-inactive {
  background-color: #f44336; /* Rojo */
}
/* ... (estilos existentes) ... */
/* Nuevos estilos para estados de aprobación */
.status-approved {
  background-color: #2196f3; /* Azul */
}
.status-rejected {
  background-color: #ff9800; /* Naranja */
}
/* ========================================= */
/* == ESTILOS PARA EL FOOTER              == */
/* ========================================= */
.site-footer {
  padding: 1rem 0;
  margin-top: 0;
  text-align: center;
  color: rgba(99, 95, 95, 0.7);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* ... (estilos existentes) ... */
/* Estilos para la página de áreas */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-item input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
}
.checkbox-item label {
  font-weight: normal;
  color: #333;
}
/* ... (estilos existentes) ... */
/* Nuevos estilos para estados de criticidad */
.status-critical {
  background-color: #9c27b0; /* Púrpura */
  color: white;
}
.status-normal {
  background-color: #78909c; /* Gris azulado */
  color: white;
}
.form-control-disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
}
/* Estilos para el nuevo logo en el header */
.logo-link {
  text-decoration: none; /* Quita el subrayado del enlace */
}
.logo-img {
  height: 50px; /* Ajusta la altura del logo */
  width: auto; /* El ancho se ajusta automáticamente */
}
/* ... (todos tus estilos existentes van aquí arriba) ... */
/* Estilo para el estado "Pendiente de Firma" */
.status-pending {
  background-color: #ff9800; /* Fondo Naranja (el mismo que 'Rechazado') */
  color: white; /* Texto Blanco */
}
.alert-danger {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
}
/* ========================================= */
/* ==   ESTILOS PARA ESTADOS DE OC        == */
/* ========================================= */
.status {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-align: center;
  display: inline-block;
  min-width: 80px; /* Ancho mínimo para consistencia */
}
/* ========================================= */
/* ==   ESTILOS PARA ESTADOS DE OC        == */
/* ========================================= */
.status {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-align: center;
  display: inline-block;
  min-width: 80px; /* Ancho mínimo para consistencia */
}
/* Nuevos colores para estados de OC */
.status-borrador {
  background-color: #9e9e9e; /* Gris */
}
.status-pendiente-firma {
  background-color: #ffc107; /* Ámbar */
  color: #212529; /* Texto oscuro para mejor contraste */
}
.status-rechazada {
  background-color: #e53935; /* Rojo Fuerte */
}
.status-firmada {
  background-color: #1e88e5; /* Azul brillante */
}
.status-cancelada {
  background-color: #607d8b; /* Gris azulado oscuro */
}
.status-enviada-a-proveedor {
  background-color: #8e24aa; /* Púrpura */
}
.status-recepcion-parcial {
  background-color: #00acc1; /* Cyan */
}
.status-completada {
  background-color: #43a047; /* Verde */
}
.status-cerrada {
  background-color: #37474f; /* Gris muy oscuro */
}
/* Colores genéricos (puedes mantenerlos o eliminarlos si ya no los usas) */
.status-active {
  background-color: #4caf50;
}
.status-inactive {
  background-color: #f44336;
}
.status-rejected {
  background-color: #f44336;
}
.status-approved {
  background-color: #2196f3;
}
.status-pending {
  background-color: #ff9800;
}
/* desde el archivo orden_compra_crear.php */
/* CORRECCIÓN 1: Unificar altura de inputs y textareas en la tabla */
#tabla-items td {
  vertical-align: middle;
}
#tabla-items .form-control {
  height: 40px; /* Altura base unificada */
  padding: 8px;
  box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
}
#tabla-items textarea.form-control {
  height: auto;
  min-height: 40px; /* Altura mínima igual a los inputs */
}
/* CORRECCIÓN 3: Mejorar estilos de los totales */
.totales-display {
  font-size: 1.1em;
  padding-top: 10px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.3em;
  border-top: 2px solid #333;
  margin-top: 5px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
/* Estilos generales que ya tenías */
.form-control {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
}
.item-valor,
.item-total {
  text-align: right;
}
/* desde el archivo orden_compra_editar.php */
/* CORRECCIÓN 1: Unificar altura de inputs y textareas en la tabla */
#tabla-items td {
  vertical-align: middle;
}
#tabla-items .form-control {
  height: 40px; /* Altura base unificada */
  padding: 8px;
  box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
}
#tabla-items textarea.form-control {
  height: auto;
  min-height: 40px; /* Altura mínima igual a los inputs */
}
/* CORRECCIÓN 3: Mejorar estilos de los totales */
.totales-display {
  font-size: 1.1em;
  padding-top: 10px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.3em;
  border-top: 2px solid #333;
  margin-top: 5px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
/* Estilos generales que ya tenías */
.form-control-disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
}
.item-valor,
.item-total {
  text-align: right;
}
/* desde el archivo orden_compra_ver.php */
.alert-success {
  padding: 15px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 0.25rem;
}
.alert-danger {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.details-grid p {
  margin: 0;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
}
.totales-display {
  font-size: 1.1em;
  padding-top: 10px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.3em;
  border-top: 2px solid #333;
  margin-top: 5px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
/* desde el archivo historial_oc_ver.php */
.recepcion-historial {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}
.recepcion-historial p {
  margin-top: 0;
}
.recepcion-historial ul {
  margin-top: 5px;
  padding-left: 20px;
}
.recepcion-historial small {
  color: #555;
  font-style: italic;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.details-grid p {
  margin: 0;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
}
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.total-summary {
  text-align: right;
}
.total-summary strong {
  display: block;
  font-size: 0.9em;
  color: #666;
}
.total-summary span {
  font-size: 1.5em;
  font-weight: bold;
  color: #1976d2;
}
.pagination {
  margin-top: 1.5rem;
  text-align: center;
}
.pagination a {
  color: #1976d2;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid #ddd;
  margin: 0 4px;
  border-radius: 4px;
  transition: background-color 0.3s;
}
.pagination a.active {
  background-color: #1976d2;
  color: white;
  border-color: #1976d2;
}
.pagination a:hover:not(.active) {
  background-color: #f2f2f2;
}
/* desde el archivo recepcion_ingreso.php */
.recepcion-historial {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}
.recepcion-historial p {
  margin-top: 0;
}
.recepcion-historial ul {
  margin-top: 5px;
  padding-left: 20px;
}
.recepcion-historial small {
  color: #555;
  font-style: italic;
}
.recepcion-items-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.recepcion-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
}
.recepcion-item .item-header {
  background-color: #f8f9fa;
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.1em;
}
.recepcion-item .item-body {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 3fr;
  gap: 1rem;
  padding: 15px;
  align-items: flex-end;
}
.recepcion-item .item-stat,
.recepcion-item .item-input,
.recepcion-item .item-obs {
  display: flex;
  flex-direction: column;
}
.recepcion-item .item-stat span,
.recepcion-item .item-input label,
.recepcion-item .item-obs label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
}
.recepcion-item .item-stat {
  font-size: 1.2em;
  font-weight: bold;
}
.input-group {
  display: flex;
  align-items: center;
}
.recepcion-item .item-body .form-control {
  height: 40px;
  box-sizing: border-box;
}
.input-group .form-control {
  flex-grow: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group .btn-autocompletar {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex-shrink: 0;
}
/* Estilo para la nueva tarjeta de detalles */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.details-grid p {
  margin: 0;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
}
/* desde el archivo resumen_oc.php */
a.card-link {
  text-decoration: none;
}
a.card-link .stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
a.card-link .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.btn.disabled {
  background-color: #6c757d; /* Color gris neutro */
  opacity: 0.65;
  cursor: not-allowed; /* Muestra un cursor de "no permitido" */
  pointer-events: none; /* Desactiva los clics en el enlace */
}
.totales-display {
  font-size: 1.1em;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
}
.total-line:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.2em;
}
/* --- INICIO DE CAMBIO: Estilos para la fila de detalle --- */
.sub-detail-row td {
  background-color: #f8f9fa;
  padding: 8px 15px !important;
  border-bottom: 1px solid #dee2e6;
}
.sub-detail-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
  color: #343a40;
}
.sub-detail-content span {
  font-size: 1.2em;
}
/* --- FIN DE CAMBIO --- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde historial_oc.php --- */
/* --------------------------------------------------- */
.totales-display {
  font-size: 1.1em;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
}
.total-line:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.2em;
}
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-pill {
  background-color: #e9ecef;
  border-radius: 15px;
  padding: 8px 15px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #343a40;
  transition: background-color 0.2s;
}
.file-pill:hover {
  background-color: #dee2e6;
  color: #000;
}
/* Estilos copiados de recepcion_ingreso.php */
.recepcion-historial {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}
.recepcion-historial p {
  margin-top: 0;
}
.recepcion-historial ul {
  margin-top: 5px;
  padding-left: 20px;
}
.recepcion-historial small {
  color: #555;
  font-style: italic;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.details-grid p {
  margin: 0;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde historial_oc.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde header.php --- */
/* --------------------------------------------------- */
.search-container {
  position: relative;
  width: 350px;
}
#global-search-input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 14px;
}
#global-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001; /* Debe estar por encima de otros elementos */
}
.search-result-item {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  display: block;
}
.search-result-item:hover {
  background-color: #f5f5f5;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item .result-title {
  font-weight: bold;
  color: #1976d2;
}
.search-result-item .result-snippet {
  font-size: 0.9em;
  color: #666;
  display: block;
  margin-top: 4px;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde header.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde areas.php --- */
/* --------------------------------------------------- */
.resumen-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.proveedor-resumen {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
}
.proveedor-resumen h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #343a40;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}
.proveedor-resumen ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.proveedor-resumen .sin-areas {
  color: #6c757d;
  font-size: 0.9em;
}
.resumen-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.proveedor-resumen {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
}
.proveedor-resumen h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #343a40;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}
.proveedor-resumen ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.proveedor-resumen .sin-areas {
  color: #6c757d;
  font-size: 0.9em;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde areas.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde clientes_editar.php --- */
/* --------------------------------------------------- */
.rut-status {
  font-size: 0.8em;
  font-weight: bold;
  margin-top: 5px;
  display: block;
  height: 1em;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde clientes_editar.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde gestion_accesos.php --- */
/* --------------------------------------------------- */
.access-table {
  white-space: nowrap;
  overflow-x: auto;
  display: block;
}
.access-table th,
.access-table td {
  min-width: 180px;
}
.access-table th:first-child,
.access-table td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 250px;
}
.alert-success {
  padding: 15px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 0.25rem;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde gestion_accesos.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde gestion_cobros.php --- */
/* --------------------------------------------------- */
.cliente-group {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ddd;
}
.cliente-group:last-child {
  border-bottom: none;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde gestion_cobros.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde gestion_facturas_proveedor.php --- */
/* --------------------------------------------------- */
.financial-summary {
  display: flex;
  justify-content: space-around;
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
}
.financial-summary div {
  text-align: center;
  font-size: 1.1em;
}
.financial-summary span {
  display: block;
  font-weight: bold;
  font-size: 1.3em;
  color: #1976d2;
}
/* --- INICIO DE MODIFICACIÓN: Estilos para alinear el botón --- */
.input-group {
  display: flex;
}
.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex-grow: 1;
}
.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde gestion_facturas_proveedor.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde historia_cambios.php --- */
/* --------------------------------------------------- */
.valor-anterior {
  color: #d32f2f; /* Rojo */
  text-decoration: line-through;
}
.valor-nuevo {
  color: #4caf50; /* Verde */
  font-weight: bold;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde historia_cambios.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde historial_oc_completa.php --- */
/* --------------------------------------------------- */
.totales-display {
  font-size: 1.1em;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
}
.total-line:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.2em;
}
.pago-historial {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}
.pago-historial h4 {
  margin-top: 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde historial_oc_completa.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde orden_compra_crear.php --- */
/* --------------------------------------------------- */
#tabla-items td {
  vertical-align: middle;
}
#tabla-items .form-control {
  height: 40px;
  box-sizing: border-box;
}
#tabla-items textarea.form-control {
  height: auto;
  min-height: 40px;
}
.totales-display {
  font-size: 1.1em;
  padding-top: 10px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.3em;
  border-top: 2px solid #333;
  margin-top: 5px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
.item-valor,
.item-total {
  text-align: right;
}
.cobrar-cliente-cbx {
  transform: scale(1.5);
  cursor: pointer;
}
.cobrar-cliente-cbx:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
/* --- ESTILOS PARA LOS ARCHIVOS ADJUNTOS --- */
#cotizaciones-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.file-pill {
  background-color: #e9ecef;
  border-radius: 15px;
  padding: 8px 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.remove-file {
  cursor: pointer;
  font-weight: bold;
  color: #6c757d;
  font-size: 18px;
}
.remove-file:hover {
  color: #343a40;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde orden_compra_crear.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde orden_compra_editar.php --- */
/* --------------------------------------------------- */
#tabla-items td {
  vertical-align: middle;
}
#tabla-items .form-control {
  height: 40px;
  box-sizing: border-box;
}
#tabla-items textarea.form-control {
  height: auto;
  min-height: 40px;
}
.totales-display {
  font-size: 1.1em;
  padding-top: 10px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.3em;
  border-top: 2px solid #333;
  margin-top: 5px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
.item-valor,
.item-total {
  text-align: right;
}
.cobrar-cliente-cbx {
  transform: scale(1.5);
  cursor: pointer;
}
/* Estilos para cotizaciones adjuntas */
#cotizaciones-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.file-pill {
  background-color: #e9ecef;
  border-radius: 15px;
  padding: 8px 12px;
  font-size: 14px;
  display: inline-flex; /* Cambiado a inline-flex */
  align-items: center;
  gap: 8px;
  position: relative; /* Para posicionar el botón de eliminar */
}
.file-pill a {
  text-decoration: none;
  color: #343a40;
  margin-right: 5px; /* Espacio para el botón X */
}
.file-pill a:hover {
  text-decoration: underline;
}
.file-pill.new-file {
  background-color: #d1ecf1; /* Azul claro para nuevos */
  color: #0c5460;
}
/* Botón genérico para eliminar (X) */
.remove-file-btn {
  cursor: pointer;
  font-weight: bold;
  color: #6c757d;
  font-size: 18px;
  line-height: 1; /* Para centrar mejor la X */
  padding: 0 4px;
}
.remove-file-btn:hover {
  color: #dc3545; /* Rojo al pasar el mouse */
}
/* Clases específicas para diferenciar (aunque el estilo sea el mismo) */
.remove-existing-file {
  composes: remove-file-btn; /* Hereda estilos si usas preprocesador, si no, copia los estilos */
  cursor: pointer;
  font-weight: bold;
  color: #6c757d;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.remove-new-file {
  composes: remove-file-btn;
  cursor: pointer;
  font-weight: bold;
  color: #6c757d;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.remove-existing-file:hover,
.remove-new-file:hover {
  color: #dc3545;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde orden_compra_editar.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde orden_compra_ver.php --- */
/* --------------------------------------------------- */
.totales-display {
  font-size: 1.1em;
}
.total-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
}
.total-line:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}
.total-line span:last-child {
  font-weight: bold;
}
.total-final {
  font-weight: bold;
  font-size: 1.2em;
}
/* --- INICIO DE CAMBIO: Estilos para la lista de adjuntos --- */
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-pill {
  background-color: #e9ecef;
  border-radius: 15px;
  padding: 8px 15px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #343a40;
  transition: background-color 0.2s;
}
.file-pill:hover {
  background-color: #dee2e6;
  color: #000;
}
/* --- FIN DE CAMBIO --- */
.subcontrato-info {
  font-size: 0.9em;
  background-color: #e3f2fd; /* Azul claro */
  border-left: 3px solid #1976d2; /* Acento azul */
  padding: 5px 8px;
  border-radius: 4px;
}
.subcontrato-info small {
  color: #555;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde orden_compra_ver.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde orden_compra.php --- */
/* --------------------------------------------------- */
td[title] {
  cursor: help; /* Cambia el cursor para indicar que hay info adicional */
}
.pagination span {
  /* Estilo para los puntos suspensivos */
  padding: 8px 16px;
  margin: 0 4px;
  color: #6c757d;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde orden_compra.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde programacion_pagos.php --- */
/* --------------------------------------------------- */
.payment-summary {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(248, 249, 250, 0.9);
  backdrop-filter: blur(5px);
  border-top: 2px solid #1976d2;
}
.summary-item {
  font-size: 1.2em;
}
.summary-item span {
  font-weight: bold;
  color: #1976d2;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde programacion_pagos.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde proveedores_editar.php --- */
/* --------------------------------------------------- */
.rut-status {
  font-size: 0.8em;
  font-weight: bold;
  margin-top: 5px;
  display: block;
  height: 1em;
}
/* Estilo básico para alinear el checkbox con la etiqueta */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-right: 5px;
}
.checkbox-item label {
  margin-bottom: 0;
  font-weight: normal;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde proveedores_editar.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde proveedores.php --- */
/* --------------------------------------------------- */
.rut-status {
  font-size: 0.8em;
  font-weight: bold;
  margin-top: 5px;
  display: block;
  height: 1em;
}
/* Estilo básico para alinear el checkbox con la etiqueta */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-item input[type="checkbox"] {
  width: auto; /* Ancho automático para el checkbox */
  margin-right: 5px; /* Pequeño espacio a la derecha */
}
.checkbox-item label {
  margin-bottom: 0; /* Evitar margen extra en la etiqueta */
  font-weight: normal; /* Texto normal, no negrita */
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde proveedores.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde recepcion_ingreso.php --- */
/* --------------------------------------------------- */
.subcontratacion-banner {
  display: flex;
  align-items: flex-start; /* Alinear al inicio por si hay múltiples líneas */
  gap: 10px;
  padding: 8px 15px;
  background-color: #fff3cd; /* Amarillo claro */
  color: #664d03;
  font-size: 0.9em;
  border-bottom: 1px solid #e0e0e0;
}
.subcontratacion-banner .banner-icon {
  font-size: 1.2em;
  margin-top: 2px; /* Pequeño ajuste vertical */
}
.subcontratacion-banner .banner-content {
  display: flex;
  flex-direction: column;
}
.subcontratacion-banner .banner-line {
  line-height: 1.5;
}
.subcontratacion-banner .analysis-detail {
  font-style: italic;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde recepcion_ingreso.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde recepcion.php --- */
/* --------------------------------------------------- */
.highlight-today {
  background-color: #ffc107; /* Color ámbar/amarillo */
  color: #212529; /* Texto oscuro para buen contraste */
  padding: 4px 10px;
  border-radius: 15px;
  font-weight: bold;
  white-space: nowrap; /* Evita que el texto se parta en dos líneas */
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde recepcion.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde resumen_oc.php --- */
/* --------------------------------------------------- */
.dashboard-grid .card-link {
  display: flex;
  text-decoration: none;
}
.dashboard-grid .card-link .stat-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* --------------------------------------------------- */
/* ----- fin se movieron desde resumen_oc.php --- */
/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ----- inicio se movieron desde dashboard.php --- */
/* --------------------------------------------------- */
/* estos nuevos pertenecen a la actividad reciente */
.activity-icon.new {
  background: #4caf50;
} /* Verde */
.activity-icon.pending {
  background: #ff9800;
} /* Naranja */
.activity-icon.approved {
  background: #2196f3;
} /* Azul */
.activity-icon.received {
  background: #9c27b0;
} /* Morado */
.activity-icon.inactive {
  background: #f44336;
} /* Rojo */
.activity-icon.sent {
  background: #00acc1;
} /* Cyan (ejemplo para envío) */
.activity-icon.login {
  background: #795548;
} /* Café (ejemplo para login) */
.activity-icon.view {
  background: #607d8b;
} /* Gris azulado (ejemplo para ver) */
.activity-icon.info {
  background: #78909c;
} /* Gris (por defecto) */

/* Estos estilos DEBEN ir en tu archivo styles.css */
.activity-icon.new {
  background: #4caf50;
} /* Verde */
.activity-icon.pending {
  background: #ff9800;
} /* Naranja */
.activity-icon.approved {
  background: #2196f3;
} /* Azul */
.activity-icon.received {
  background: #9c27b0;
} /* Morado */
.activity-icon.inactive {
  background: #f44336;
} /* Rojo */
.activity-icon.sent {
  background: #00acc1;
} /* Cyan (ejemplo para envío) */
.activity-icon.login {
  background: #795548;
} /* Café (ejemplo para login) */
.activity-icon.view {
  background: #607d8b;
} /* Gris azulado (ejemplo para ver) */
.activity-icon.info {
  background: #78909c;
} /* Gris (por defecto) */

/* Estilos para las columnas de actividad */
.activity-columns {
  display: flex;
  gap: 1.5rem; /* Espacio entre columnas */
}
.activity-column {
  flex: 1; /* Cada columna ocupa la mitad del espacio */
  display: flex;
  flex-direction: column;
  gap: 0; /* Sin espacio extra entre items dentro de una columna */
}
.activity-item {
  border-bottom: 1px solid #eee; /* Mantiene el separador */
  padding-top: 1rem; /* Asegura espacio vertical entre items */
  padding-bottom: 1rem;
}
.activity-column .activity-item:last-child {
  border-bottom: none; /* Quita el borde del último item de cada columna */
}

/* Ajuste responsivo opcional para pantallas pequeñas */
@media (max-width: 768px) {
  .activity-columns {
    flex-direction: column; /* Apila las columnas */
    gap: 0; /* Quita el gap entre "columnas" apiladas */
  }
  /* En móvil, todos los items necesitan borde inferior excepto el último general */
  .activity-item {
    border-bottom: 1px solid #eee;
  }
  .recent-activity .activity-item:last-child {
    border-bottom: none;
  }
}

/* --------------------------------------------------- */
/* ----- fin se movieron desde dashboard.php --- */
/* --------------------------------------------------- */

/* ========================================= */
/* ==   ESTILO PARA BOTÓN DE INFORMACIÓN  == */
/* ========================================= */
.btn-info {
  background: #03a9f4; /* Celeste */
  color: white;
}

.btn-info:hover {
  background: #0288d1; /* Celeste más oscuro al pasar el mouse */
}

/* --- Asegúrate de añadir esto junto a las otras definiciones de .btn --- */

/* ========================================= */
/* == ESTANDARIZAR ANCHO BOTONES EN CARDS == */
/* ========================================= */

.dashboard-grid .card .card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-grid .card .card-actions .btn {
  flex: 1;
  text-align: center;
  min-width: 100px; /* Opcional */
}

/* ========================================= */
/* == FIX: Choices.js Dropdown Z-index   == */
/* ========================================= */

/* Selecciona la tarjeta que contiene la tabla con id="tabla-items" */
.card:has(#tabla-items) {
  position: relative; /* Establece un contexto de apilamiento */
  z-index: 3; /* Asegura que sea mayor que z-index: 2 de la tarjeta de receptores */
}

/* Mantenemos esta regla por si acaso, aunque la principal es la de arriba */
#tabla-items .choices__list--dropdown {
  z-index: 10; /* Prioridad alta dentro de su propia tarjeta */
}

/* --- Reemplaza o añade esto en tu archivo styles.css --- */

/* ========================================= */
/* ==   TOOLTIP PERSONALIZADO PICTOGRAMA   == */
/* ========================================= */

.tooltip-container {
  position: relative; /* Contexto para el tooltip */
  display: inline-block;
  vertical-align: middle; /* Alinea los contenedores de imagen */
}

.tooltip-container .tooltip-text {
  visibility: hidden;
  width: 150px; /* Ancho del tooltip */
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px; /* Más padding para agrandarlo */
  font-size: 14px; /* Tamaño de fuente más grande */

  /* Posicionamiento del tooltip (encima de la imagen) */
  position: absolute;
  z-index: 10;
  bottom: 125%; /* Posicionarlo arriba de la imagen */
  left: 50%;
  margin-left: -75px; /* Centrar (mitad del ancho) */

  /* Efecto de fundido (fade) */
  opacity: 0;
  transition: opacity 0.3s;
}

/* Flecha del tooltip */
.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%; /* Abajo del tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Mostrar el tooltip al pasar el mouse sobre el contenedor */
.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* --- Añade esto al final de tu styles.css --- */

/* ========================================= */
/* ==   ESTILOS PARA SPINNER DE CARGA     == */
/* ========================================= */

.loading-container {
  display: flex;
  align-items: center;
  gap: 15px; /* Espacio entre el spinner y el texto */
  padding: 10px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 5px;
}

.loader-spinner {
  border: 4px solid #f3f3f3; /* Círculo gris claro */
  border-top: 4px solid #1976d2; /* Azul de tu tema */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.loading-container p {
  margin: 0;
  color: #333;
  font-weight: bold;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ================================================ */
/* ==   INICIO NUEVOS ESTILOS (inv_desecho.php)  == */
/* ================================================ */

/* Estilo para las sub-tarjetas dentro del formulario de desecho */
#campos-certificado .card {
  background-color: #fffaf0; /* Un fondo leggermente naranja/crema */
  border: 1px solid #ffeccc;
  padding: 1.5rem; /* Menos padding que la tarjeta principal */
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Sombra más sutil */
}

#campos-certificado .card h3 {
  color: #c67c00; /* Naranja oscuro para sub-títulos */
  border-bottom: 1px solid #ffeccc;
  padding-bottom: 0.5rem;
}

/* Estilos para la tabla de ítems no-inventariados */
#tabla-items-no-inventario th {
  background-color: #fff3e0; /* Naranja muy claro */
  color: #c67c00;
}

#tabla-items-no-inventario .form-control {
  padding: 8px; /* Inputs más pequeños en esta tabla */
  height: auto;
}

/* Estilos para la grilla de insumos */
.insumos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

/* Alineación de la etiqueta de insumos */
.insumos-grid .form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.insumos-grid .form-group input {
  padding: 8px;
  height: auto;
  text-align: right;
}

/* ================================================ */
/* ==   FIN NUEVOS ESTILOS (inv_desecho.php)     == */
/* ================================================ */

/* --- Añadir esto al final de styles.css --- */
.container-fluid {
  max-width: none;
}










.plan-input {
  font-weight: bold;
  text-align: right;
}
.status-balanceado {
  background-color: #d4edda !important;
  color: #155724 !important;
  border-color: #c3e6cb !important;
}
.status-deficit {
  background-color: #fff3cd !important;
  color: #856404 !important;
  border-color: #ffeeba !important;
}
.status-exceso {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-color: #f5c6cb !important;
}
.total-box {
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2em;
  margin-top: 15px;
  font-weight: bold;
  border: 2px solid transparent;
}
