/* ============================= */
/* BARRA CONTEXTUAL DE MÓDULO    */
/* ============================= */

.contenido {
    padding: 0;
  }
  
  .barra-modulo {
    width: 100%;
    height: 58px;
    box-sizing: border-box;
  
    display: flex;
    align-items: center;
    justify-content: space-between;
  
    padding: 0 36px;
  
    color: white;
    font-size: 14px;
    font-weight: 600;
  }
  
  .barra-bodega {
    background: rgba(46, 125, 50, 0.92);
  }
  
  .barra-izq {
    display: flex;
    align-items: center;
    gap: 18px;
  }
  
  .barra-izq a {
    color: white;
    text-decoration: none;
  }
  
  .barra-izq a:hover {
    text-decoration: underline;
  }
  
  .barra-izq span {
    color: rgba(255, 255, 255, 0.3);
  }
  
  .barra-der {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
  }

  .barra-modulo {
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }


  .barra-farmacia {
    background: rgba(21, 101, 192, 0.92);
  }

  .farmacia-panel {
    padding: 40px 36px 20px 36px; /* 👈 más espacio arriba */
  }
  
  .tabla-farmacia {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    overflow: hidden;
  }
  
  
  /* filas */
  .tabla-farmacia td {
    padding: 10px 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
  }
  
  /* hover */
  .tabla-farmacia tbody tr:hover {
    background: rgba(0,0,0,0.03);
  }

 
  .estado-pill {
    font-size: 13px;
    font-weight: 400;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  
  .estado-bajo {
    
    color: #8a5a00;
  }
  
 
  .estado-critico {
    color: #ef5350;
  }


  .mov-ingreso {
    background: rgba(76, 175, 80, 0.08);
  }
  
  .mov-salida {
    background: rgba(244, 67, 54, 0.08);
  }
  
  .mov-ajuste {
    background: rgba(255, 193, 7, 0.12);
  }

  /* Resalta la opción activa dentro de la barra de módulo */
  .barra-izq a {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
  }
  
  .barra-izq a.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
  }

  .barra-izq a {
    opacity: 0.7;
  }
  
  .barra-izq a.active {
    opacity: 1;
  }


  .tabla-farmacia {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .tabla-farmacia thead {
   background: #e5e7eb;
   }
  
  .tabla-farmacia th {
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .tabla-farmacia td {
    padding: 14px;
    font-size: 12px;
  }
  
  .tabla-farmacia tbody tr:hover {
    background: rgba(0,0,0,0.02);
  }

  .modal-farmacia {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
  }
  
  .modal-contenido {
    background: #fff;
    padding: 30px 30px 25px 30px;
    border-radius: 14px;
    width: 360px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }

  .modal-contenido h3 {
    margin-bottom: 20px;
  }
  
  .modal-botones {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .modal-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .modal-input input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
  }

  .modal-acciones {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .modal-contenido select,
.modal-contenido input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.modal-contenido select {
  height: 34px;
}

.modal-contenido input {
  height: 36px;
}

.modal-contenido {
    width: 380px;
  }

  .modal-acciones button {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
  }

  .modal-acciones button:first-child {
    background: #2e7d32;  /* verde */
    color: white;
  }
  
  .modal-acciones button:last-child {
    background: #e0e0e0;
    color: #333;
  }

  /* Botones del modal simple de farmacia_movimientos.html */
#modal button {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    margin-right: 8px;
  }
  
  #modal button:first-of-type {
    background: #2f6fb0; /* azul farmacia */
    color: white;
  }
  
  #modal button:last-of-type {
    background: #e0e0e0;
    color: #333;
  }

  .btn-nuevo {
    background: #f3f4f6; /* gris claro */
    color: #333;
    padding: 10px 18px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  .btn-nuevo:hover {
    background: #e5e7eb;
  }

  .mensaje-modal {
    min-height: 18px;
    margin: 6px 0 10px 0;
    font-size: 13px;
  }
  
  .mensaje-modal.error {
    color: #ef5350;
  }
  
  .mensaje-modal.ok {
    color: #2f6fb0;
  }

  #filtroFecha {
    width: 180px;
    height: 38px;
    padding: 8px 12px;
    margin-left: 36px;
    margin-bottom: 18px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #333;
  }

  .btn-nuevo {
    margin-left: 36px;
    margin-bottom: 14px;
  }

  .acciones-barra {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 36px 10px 36px;
  }

  .col-num {
    width: 70px;
    text-align: center;
  }
  
  .col-usuario {
    width: 100px;
    text-align: left;
  }


  /* Ajuste de columnas para tabla de movimientos de farmacia */
  .tabla-farmacia {
    width: 85%;
    margin: 0 auto;
  }

.tabla-farmacia .col-fecha {
  width: 230px;
}

.tabla-farmacia .col-tipo {
  width: 110px;
}

.tabla-farmacia .col-num {
  width: 80px;
  text-align: center;
}

.tabla-farmacia .col-usuario {
  width: 90px;
  text-align: center;
}

.estado {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

/* OK */
.estado-ok {
  background: #2ecc71;
}

/* BAJO */
.estado-bajo {
  background: #f1c40f;
}

/* CRÍTICO */
.estado-critico {
  background: #e74c3c;
}

/* Control ancho columna medicamento en movimientos farmacia */
.tabla-farmacia th:nth-child(2),
.tabla-farmacia td:nth-child(2) {
  width: 180px;
}

/* SOLO movimientos farmacia */
.tabla-farmacia.movimientos th:nth-child(1),
.tabla-farmacia.movimientos td:nth-child(1) {
  text-align: center;
}

/* Medicamentos farmacia: tabla principal */
.tabla-farmacia.medicamentos th,
.tabla-farmacia.medicamentos td {
  text-align: left;
}

.tabla-farmacia.medicamentos th:nth-child(3),
.tabla-farmacia.medicamentos td:nth-child(3) {
  text-align: center;
}

.tabla-farmacia.medicamentos th:nth-child(4),
.tabla-farmacia.medicamentos td:nth-child(4) {
  text-align: left;
}

/* Movimientos farmacia: fecha centrada */
.tabla-farmacia.movimientos th:nth-child(1),
.tabla-farmacia.movimientos td:nth-child(1) {
  text-align: center;
}

/* Columna Presentación más ancha (solo medicamentos) */
.tabla-farmacia.medicamentos th:nth-child(2),
.tabla-farmacia.medicamentos td:nth-child(2) {
  width: 220px;
}

/* Centrar columna ESTADO en farmacia */
.tabla-farmacia.medicamentos th:nth-child(4),
.tabla-farmacia.medicamentos td:nth-child(4) {
  text-align: center;
}

.reportes-opciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card-reporte {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-reporte:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.card-reporte h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.card-reporte p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

#resultadoStockCritico {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ENCABEZADO TABLA FARMACIA - OSCURO */
.tabla-farmacia thead {
  background: #2f3a45; /* gris oscuro elegante */
}

.tabla-farmacia thead th {
  color: #ffffff;
  font-weight: 600;
}

.tabla-farmacia thead th {
  padding: 16px 14px;
  letter-spacing: 0.5px;
}

/* SEPARACIÓN ENTRE MENÚ NEGRO Y BARRA AZUL */
.barra-modulo {
  margin-top: 12px;
}

/* SEPARACIÓN ENTRE BARRA AZUL Y TABLA */
.barra-modulo {
  margin-bottom: 16px;
}

/* ESPACIO ENTRE BARRA AZUL Y CONTENIDO (TABLA) */
.farmacia-panel {
  margin-top: 50px;
}

.farmacia-panel {
  margin-top: 50px;
}