/* ==========================================================================
   COMPONENTES CSS - FOOTER, LOGIN Y COMPONENTES ESPECÍFICOS
   ========================================================================== */

/* ==========================================================================
   LOGIN
   ========================================================================== */

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.login-container {
  background-color: var(--background-container);
  padding: 40px;
  border-radius: var(--border-radius-base);
  box-shadow: var(--box-shadow-base);
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.login-container h2 {
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 1.3);
  margin-bottom: 10px;
}

.login-container p {
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.9);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--border-radius-base);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.9);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

/* ==========================================================================
   FOOTER ADMIN
   ========================================================================== */

.admin-footer {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0f376d 100%);
  color: var(--color-white);
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4rem;
}

.footer-section {
  margin-bottom: 1.5rem;
}

.footer-title {
  font-family: var(--font-family-bold);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 1);
  color: var(--color-white);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-accent-warm);
  border-radius: 2px;
}

/* Sección de Logos de Empresas */
.company-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.2rem;
  align-items: center;
}

.company-logo {
  background: var(--color-white);
  border-radius: var(--border-radius-base);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 80px;
}

.company-logo:hover {
  background: var(--color-white);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.company-logo img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.company-logo:hover img {
  transform: scale(1.05);
}

/* Sección de Soporte */
.support-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.85);
}

.support-item i {
  color: var(--color-accent-warm);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 1);
  width: 20px;
  text-align: center;
}

/* Línea divisoria */
.footer-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  margin: 0 2rem;
}

/* Sección inferior del footer */
.footer-bottom {
  padding: 0.85rem 2rem;
  background: rgba(0, 0, 0, 0.1);
}

.footer-content-simple {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.4rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 0.25rem;
}

.footer-brand p {
  color: rgba(255,255,255,.82);
  max-width: 680px;
}

@media (max-width: 760px) {
  .footer-content-simple {
    grid-template-columns: 1fr;
  }
}

.footer-bottom-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright p {
  margin: 0;
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.8);
  color: rgba(255, 255, 255, 0.8);
}

.version-info {
  font-family: var(--font-family-bold);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.75);
  color: var(--color-primary-light);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   COMPONENTES ESPECÍFICOS DE AUTOGESTIÓN
   ========================================================================== */

/* Iconos grandes */
.autogestion-icon-large {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Contenedor de estadísticas mejorado */
.autogestion-stats-container {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
  gap: 1rem;
}

.autogestion-stat-item {
  flex: 1;
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border-color-base);
  border-radius: var(--border-radius-base);
  background-color: var(--color-gray-100);
  transition: all 0.2s ease;
}

.autogestion-stat-item:hover {
  background-color: var(--color-white);
  box-shadow: var(--box-shadow-base);
}

.autogestion-stat-value {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.25rem;
  display: block;
}

.autogestion-stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin: 0;
}

/* Formularios de autogestión */
.autogestion-form {
  background: var(--color-white);
  border-radius: var(--border-radius-base);
  padding: 2rem;
  box-shadow: var(--box-shadow-base);
}

.autogestion-form .form-label {
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.autogestion-form .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--border-radius-base);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.9);
}

.autogestion-form .form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

/* Tablas de autogestión */
.autogestion-table {
  width: 100%;
  border-collapse: collapse;
}

.autogestion-table th {
  background: var(--color-gray-100);
  padding: 1rem;
  text-align: left;
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  border-bottom: 2px solid var(--color-gray-200);
}

.autogestion-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
  color: var(--color-gray-700);
}

/* Modales de autogestión */
.autogestion-modal .modal-header {
  background: var(--color-primary);
  color: var(--color-white);
  border-bottom: none;
}

.autogestion-modal .modal-title {
  font-weight: var(--font-weight-bold);
}

.autogestion-modal .modal-body {
  padding: 1.5rem;
}

.autogestion-modal .modal-footer {
  border-top: 1px solid var(--color-gray-200);
  padding: 1rem 1.5rem;
}

/* Estilos para el contenido del modal de detalle */
.modal-body h6.fw-bold {
  color: var(--color-gray-900);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.modal-body p {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-gray-100);
  padding-bottom: 0.5rem;
}

.modal-body p:last-child {
  border-bottom: none;
}

.modal-body p strong {
  color: var(--color-gray-700);
  font-weight: 600;
}

.modal-body .badge {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.modal-body .border.rounded.p-2.bg-light {
  background-color: var(--color-gray-100) !important;
  border-color: var(--color-gray-300) !important;
}

/* Estilos para tablas en modales */
.modal-body .table.table-sm {
  margin-bottom: 0;
}

.modal-body .table.table-sm td {
  padding: 0.5rem 0.75rem;
  border: none;
  vertical-align: top;
}

.modal-body .table.table-sm td:first-child {
  font-weight: 600;
  color: var(--color-gray-700);
  width: 40%;
}

.modal-body .table.table-sm td:last-child {
  color: var(--color-gray-900);
}

.modal-body .alert.alert-light {
  background-color: var(--color-gray-100) !important;
  border-color: var(--color-gray-300) !important;
  color: var(--color-gray-800);
}

/* Separadores visuales entre secciones */
.modal-body .row:not(:last-child) {
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Estados vacíos */
.autogestion-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.autogestion-empty-state i {
  font-size: 4rem;
  color: var(--color-gray-500);
  margin-bottom: 1rem;
}

.autogestion-empty-state h5 {
  color: var(--color-gray-700);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.5rem;
}

.autogestion-empty-state p {
  color: var(--color-gray-600);
  font-size: 0.9rem;
}

/* ==========================================================================
   COMPONENTES DE INFORMACIÓN
   ========================================================================== */

.autogestion-info-card {
  border-left: 4px solid var(--color-primary);
  transition: box-shadow 0.3s ease;
}

.autogestion-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   ESTILOS PARA TABLAS DE JEFATURA
   ========================================================================== */

.jefatura-table {
  font-size: 0.9rem;
}

.jefatura-table th {
  font-weight: 600;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.jefatura-table td {
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
}

/* Columnas específicas */
.jefatura-colaborador-col {
  min-width: 150px;
  max-width: 200px;
}

.jefatura-puesto-col {
  min-width: 120px;
  max-width: 150px;
}

.jefatura-fecha-col {
  min-width: 100px;
  max-width: 120px;
  white-space: nowrap;
}

.jefatura-dias-col {
  min-width: 80px;
  max-width: 100px;
  text-align: center;
}

.jefatura-estado-col {
  min-width: 100px;
  max-width: 120px;
  text-align: center;
}

.jefatura-aprobador-col {
  min-width: 120px;
  max-width: 150px;
}

.jefatura-acciones-col {
  min-width: 120px;
  max-width: 150px;
  text-align: center;
}

/* Responsive para pantallas medianas */
@media (max-width: 1200px) {
  .jefatura-table {
    font-size: 0.85rem;
  }

  .jefatura-table td {
    padding: 0.5rem 0.25rem;
  }

  .jefatura-colaborador-col {
    min-width: 180px;
    max-width: 250px;
  }

  .jefatura-dias-col {
    min-width: 100px;
    max-width: 120px;
  }

  .jefatura-estado-col {
    min-width: 120px;
    max-width: 140px;
  }

  .jefatura-acciones-col {
    min-width: 140px;
    max-width: 160px;
  }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .jefatura-table {
    font-size: 0.8rem;
  }

  .jefatura-table th,
  .jefatura-table td {
    padding: 0.4rem 0.2rem;
  }

  .jefatura-colaborador-col {
    min-width: 140px;
    max-width: 200px;
  }

  .jefatura-dias-col {
    min-width: 80px;
    max-width: 100px;
  }

  .jefatura-estado-col {
    min-width: 100px;
    max-width: 120px;
  }

  .jefatura-acciones-col {
    min-width: 100px;
    max-width: 120px;
  }

  /* Botones verticales en móvil */
  .btn-group-vertical .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Responsive para pantallas muy pequeñas */
@media (max-width: 576px) {
  .jefatura-table {
    font-size: 0.75rem;
  }

  .jefatura-table th,
  .jefatura-table td {
    padding: 0.3rem 0.15rem;
  }

  .jefatura-colaborador-col {
    min-width: 100px;
    max-width: 140px;
  }

  .jefatura-dias-col {
    min-width: 60px;
    max-width: 80px;
  }

  .jefatura-estado-col {
    min-width: 80px;
    max-width: 100px;
  }

  .jefatura-acciones-col {
    min-width: 80px;
    max-width: 100px;
  }

  /* Ocultar texto en botones muy pequeños */
  .btn-group-vertical .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   COMPONENTES ESPECÍFICOS DE CAPACITACIONES
   ========================================================================== */

/* Formularios de capacitaciones (sin box-shadow) */
.capacitaciones-form {
  background: var(--color-white);
  border-radius: var(--border-radius-base);
  padding: 2rem;
  /* Sin box-shadow para las modales de capacitaciones */
}

.capacitaciones-form .form-label {
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.capacitaciones-form .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--border-radius-base);
  font-size: calc(var(--base-size) * var(--text-scale-ratio) * 0.9);
}

.capacitaciones-form .form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}
