/* ===============================
   COLORES INSTITUCIONALES COFOPRI
================================= */
:root {
    --cofopri-azul: #003A8F;
    --cofopri-rojo: #C62828;
    --cofopri-gris: #F4F6F9;
    --cofopri-amarillo: #FFDA00;
    --cofopri-azul-principal: #003A8F;
    --cofopri-azul-secundario: #0056B3;
    --cofopri-gris-texto: #495057;
    --cofopri-gris-borde: #DEE2E6;
    --cofopri-fondo-suave: #F4F6F9;
    --cofopri-verde-ok: #198754;
    --cofopri-rojo-alerta: #DC3545;
}

/* OCULTAR WARNING CKEDITOR */
.cke_notification,
.cke_notification_warning,
.cke_notifications_area {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Azul institucional COFOPRI */

/* .bg-cofopri-blue {
    background-color: #003A8F !important;
    color: #ffffff !important;
} */
/* .card-header.bg-cofopri-blue {
    background-color: #003A8F !important;
    color: #ffffff !important;
} */
/* Card header azul institucional COFOPRI */
/* .card-header.bg-cofopri-blue {
    --bs-card-cap-bg: #003A8F;
    --bs-card-cap-color: #ffffff;
    background-color: #003A8F;
    color: #ffffff;
} */
/* Card institucional COFOPRI */
/* Card institucional COFOPRI - Bootstrap 5 */
/* .card.cofopri-card {
    --bs-card-cap-bg: #003A8F !important;
    --bs-card-cap-color: #ffffff !important;
} */

/* .card.mb-4 > .card-header {
    --bs-card-cap-bg: #003A8F !important;
    --bs-card-cap-color: #ffffff !important;
    background-color: #003A8F !important;
    color: #ffffff !important;
} */

/* Cabecera institucional COFOPRI */
.cofopri-header {
    background-color: #003A8F !important;
    color: #ffffff !important;
}
.cofopri-header-danger {
    background-color: #C62828 !important;
    color: #ffffff !important;
}
.cofopri-header-warning {
    background-color: #FFDA00 !important;
    color: #000000 !important;
}

/* ===============================
   TITULOS SECCIÓN – ESTILO PROFESIONAL
================================= */
.titulo-seccion {
  background: var(--cofopri-azul-principal);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

/* Fondo general */
body {
    background-color: var(--cofopri-gris);
}

/* ===============================
   DATATABLES – ESTILO PROFESIONAL
================================= */
.dataTables_filter input {
    border-radius: 20px;
    padding: 6px 14px;
    border: 1px solid #ced4da;
}

.dataTables_filter input:focus {
    border-color: var(--cofopri-azul);
    box-shadow: 0 0 0 .15rem rgba(0,58,143,.25);
}

/* Botones export */
.dt-buttons .btn-success {
    background-color: var(--cofopri-azul);
    border-color: var(--cofopri-azul);
}

.dt-buttons .btn-danger {
    background-color: var(--cofopri-rojo);
    border-color: var(--cofopri-rojo);
}

.dt-buttons .btn {
    border-radius: 20px;
    padding: 4px 14px;
}

/* Responsive DataTables */
.table-responsive {
    overflow-x: auto;
}

/* ===============================
   BOTONES GENERALES
================================= */
.btn-primary {
    background-color: var(--cofopri-azul);
    border-color: var(--cofopri-azul);
}

.btn-primary:hover {
    background-color: #002f70;
}


/* ============================= */
/* INPUTS Y SELECT (UNIFORMIDAD VISUAL) */
/* ============================= */
.form-control,
.form-select {
  border-radius: 0.35rem;
  border-color: var(--cofopri-gris-borde);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--cofopri-azul-secundario);
  box-shadow: 0 0 0 0.15rem rgba(0, 58, 143, 0.25);
}

/* ============================= */
/* BOTONES ACCIONES CLARAS */
/* ============================= */
.btn-cofopri {
  background: var(--cofopri-azul-principal);
  border-color: var(--cofopri-azul-principal);
  color: #ffffff;
}

.btn-cofopri:hover {
  background: var(--cofopri-azul-secundario);
  border-color: var(--cofopri-azul-secundario);
}

/* ============================= */
/* BOTON SECUNDARIO */
/* ============================= */
.btn-cofopri-outline {
  border: 1px solid var(--cofopri-azul-principal);
  color: var(--cofopri-azul-principal);
  background: #ffffff;
}

.btn-cofopri-outline:hover {
  background: var(--cofopri-azul-principal);
  color: #ffffff;
}

/* ============================= */
/* BOTON ELIMINAR */
/* ============================= */
.btn-eliminar {
  background: var(--cofopri-rojo-alerta);
  border-color: var(--cofopri-rojo-alerta);
  color: #fff;
}

/* ============================= */
/* TABLA EN DESKTOP */
/* ============================= */
.table thead {
  background: var(--cofopri-azul-principal);
  color: #ffffff;
}

.table thead th {
  font-weight: 600;
  border-color: var(--cofopri-azul-principal);
}

/* ============================= */
/* MENSAJES Y ALERTAS */
/* ============================= */
.alert-info {
  background: #E7F1FF;
  color: var(--cofopri-azul-principal);
  border-color: #B6D4FE;
}

/* CONTENEDOR */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
    width: 320px;
}

/* ALERTA BASE */
.alert-toast {
    border-radius: 8px;
    padding: 12px 14px 8px;
    margin-bottom: 12px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    animation: slideIn .4s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

/* COLORES */
.alert-success { background-color: #198754; }
.alert-error   { background-color: #dc3545; }
.alert-warning { background-color: #ffc107; color:#212529; }
.alert-info    { background-color: #0d6efd; }

/* PROGRESS BAR */
.alert-progress {
    height: 4px;
    width: 100%;
    background-color: rgba(255,255,255,.7);
    position: absolute;
    bottom: 0;
    left: 0;
    animation: progressBar linear forwards;
}

/* ANIMACIONES */
@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes progressBar {
    from { width: 100%; }
    to   { width: 0%; }
}


/* ============================= */
/* TABLA RESPONSIVA VERTICAL */
/* ============================= */
@media (max-width: 768px) {

  .tabla-responsive-vertical thead {
    display: none;
  }

  .tabla-responsive-vertical,
  .tabla-responsive-vertical tbody,
  .tabla-responsive-vertical tr,
  .tabla-responsive-vertical td {
    display: block;
    width: 100%;
  }

  .tabla-responsive-vertical tr {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
  }

  .tabla-responsive-vertical td {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    border: none;
  }

  .tabla-responsive-vertical td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #003A8F; /* Azul institucional COFOPRI */
  }

  .tabla-responsive-vertical td:last-child {
    align-items: flex-end;
  }

  /* Cards verticales (Experiencia / Referencias en móvil) */
  .tabla-responsive-vertical tr {
    background: var(--cofopri-fondo-suave);
    border: 1px solid var(--cofopri-gris-borde);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }

  .tabla-responsive-vertical td::before {
    color: var(--cofopri-azul-principal);
  }

}
