:root {
  --sidebar-width: 280px;
  --top-bar-height: 60px;
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #646565;
  --light-bg: #f8f9fa;
  --dark-bg: #2c3e50;
}

/* === Estilos Generales === */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-bg);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background-color: var(--dark-bg);
  color: white;
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem;
  margin: 0.25rem 0;
  padding: 0.75rem 1rem;
  transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--accent-color);
  color: white !important;
}

#modalDatosRocasa .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 1rem;
}

/* Top Bar */
.top-bar {
  height: var(--top-bar-height);
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Contenido Principal */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Cards */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Avatar */
.avatar-lg {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.avatar-lg i {
  font-size: 4rem;
  color: var(--primary-color);
}

/* Pestañas */
.nav-tabs {
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link {
  color: #6c757d;
  border: none;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* Proceso de Reclutamiento */
.recruitment-process {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.recruitment-process::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e9ecef;
  z-index: 1;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e9ecef;
  color: #6c757d;
}

.process-step.completed .step-icon {
  background-color: var(--primary-color);
  color: white;
}

.process-step.active .step-icon {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}

/* Responsive */
/* @media (max-width: 992px) {
  .sidebar {
      transform: translateX(-100%);
  }
  .main-content {
      margin-left: 0;
  }
} */

@media (max-width: 768px) {
  .recruitment-process {
      flex-direction: column;
      gap: 1.5rem;
  }
  .recruitment-process::before {
      display: none;
  }
}

/* === Ajustes para pantallas grandes === */

/* 1. Contenedor Principal */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  width: calc(100% - var(--sidebar-width)); /* Ocupa el espacio restante */
}

/* 2. Sidebar fijo y contenido flexible */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed; /* Fijo en pantalla */
  left: 0;
  top: 0;
  overflow-y: auto; /* Scroll si el contenido es largo */
}

/* 3. Contenedor del contenido (ajuste para pantallas grandes) */
.container-fluid.p-4 {
  max-width: 1600px; /* Límite máximo para no estirar demasiado */
  margin: 0 auto;
  padding: 2rem 3rem !important; /* Más espacio en pantallas grandes */
}

/* 4. Proceso de Reclutamiento (mejor distribución) */
.recruitment-process {
  justify-content: space-around; /* Espacio uniforme entre pasos */
}

/* 5. Cards de perfil y tabs (optimización de espacio) */
@media (min-width: 1600px) {
  .card {
      border-radius: 1rem;
  }
  .col-lg-4 {
      flex: 0 0 22%; /* Ajuste fino para el perfil */
  }
  .col-lg-8 {
      flex: 0 0 76%; /* Ajuste fino para los tabs */
  }
}

/* === Estilos para la vista de Candidatos === */

/* Filtros */
.card .input-group {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Tabla */
.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #6c757d;
}

.table td {
  vertical-align: middle;
  padding: 1rem;
}

/* Badges de estado */
.badge {
  padding: 0.5em 0.75em;
  font-weight: 500;
}

.badge.bg-warning {
  background-color: rgba(255, 193, 7, 0.1) !important;
  color: #ffc107 !important;
}

/* Paginación */
.pagination .page-item .page-link {
  border: none;
  color: #6c757d;
  margin: 0 0.25rem;
  border-radius: 0.5rem !important;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
}

.recruitment-process {
  counter-reset: step-counter;
  align-items: stretch !important; /* Asegura que las columnas se estiren */
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  background: #d3d3d3;
  z-index: 0;
}

.timeline-step:first-child::before {
  width: 50%;
  left: 50%;
}

.timeline-step:last-child::before {
  width: 50%;
}

.process-step {
  background-color: #fff;
  height: 100%; /* Ocupa todo el alto */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease-in-out;
  width: 100%;
}

.process-step.completed {
  border-color: #198754;
  background-color: #e9f7ef;
}

.process-step.active {
  border-color: #0d6efd;
  background-color: #e7f1ff;
}

.process-step.disabled {
  opacity: 0.6;
}

.step-icon i {
  font-size: 24px;
}

.process-step.pendiente {
  border-color: #ffc107;
  background-color: #fff3cd;
  color: #856404;
}

.process-step.not-required {
  border-color: #9d9d9d;
  background-color: #c6c0c0;
}

.process-step.rejected {
  border-color: #dc3545;
  background-color: #f8d7da;
  color: #842029;
}

.process-step.rejected .step-icon i {
  color: #dc3545;
}

/* Sidebar colapsado */
.sidebar.collapsed {
  width: 70px !important;
}

.sidebar.collapsed .nav-link {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar.collapsed .nav-link i {
  margin-right: 0;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed h4 {
  display: none;
}

.main-content.collapsed {
  margin-left: 70px !important;
  width: calc(100% - 70px);
}
/* Ocultar botón de hamburguesa si no será usado */
#sidebarToggle {
  display: none !important;
}

.card-proceso {
  border-radius: 1rem;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  cursor: pointer;
}
.card-proceso:hover {
  box-shadow: 0 6px 24px #00000022;
  border-color: #0d6efd !important; /* Bootstrap primary */
  transform: translateY(-4px) scale(1.03);
  z-index: 2;
}
.card-proceso .badge {
  font-size: 1rem;
}