/* Estilos custom de EstudioHub */

/* Enlace de navegación activo */
.nav-link.active {
  background-color: rgb(31, 41, 55); /* gray-800 */
  color: white;
}

/* Transición suave de vistas */
#view-container > * {
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar fina en sidebar */
#sidebar nav::-webkit-scrollbar {
  width: 4px;
}
#sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}
#sidebar nav::-webkit-scrollbar-thumb {
  background: rgb(75, 85, 99);
  border-radius: 2px;
}

/* Estado vacío genérico */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: rgb(107, 114, 128);
}

/* Tarjetas */
.card {
  background: white;
  border: 1px solid rgb(229, 231, 235);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Badge de estado */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-borrador  { background: #f3f4f6; color: #374151; }
.badge-activo    { background: #dcfce7; color: #166534; }
.badge-pausado   { background: #fef9c3; color: #854d0e; }
.badge-finalizado{ background: #e0e7ff; color: #3730a3; }
.badge-pendiente { background: #f3f4f6; color: #374151; }
.badge-en_curso  { background: #dbeafe; color: #1e40af; }
.badge-revision  { background: #fef3c7; color: #92400e; }
.badge-completada { background: #dcfce7; color: #166534; }
.badge-completado { background: #dcfce7; color: #166534; }

/* Botones */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: rgb(76, 110, 245);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: rgb(66, 99, 235); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: rgb(243, 244, 246);
  color: rgb(55, 65, 81);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid rgb(229, 231, 235);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { background: rgb(229, 231, 235); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: rgb(254, 242, 242);
  color: rgb(185, 28, 28);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid rgb(254, 202, 202);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgb(254, 226, 226); }

/* Tabla */
.tabla-base {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.tabla-base th {
  text-align: left;
  padding: 0.625rem 1rem;
  background: rgb(249, 250, 251);
  color: rgb(107, 114, 128);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgb(229, 231, 235);
}
.tabla-base td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(243, 244, 246);
  color: rgb(55, 65, 81);
  vertical-align: middle;
}
.tabla-base tr:last-child td { border-bottom: none; }
.tabla-base tr:hover td { background: rgb(249, 250, 251); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 36rem;
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* Input estándar */
.input-base {
  width: 100%;
  border: 1px solid rgb(209, 213, 219);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(17, 24, 39);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}
.input-base:focus {
  outline: none;
  border-color: rgb(76, 110, 245);
  box-shadow: 0 0 0 3px rgba(76,110,245,0.15);
}

/* Barra de progreso */
.progress-bar {
  height: 6px;
  background: rgb(229, 231, 235);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: rgb(76, 110, 245);
  border-radius: 9999px;
  transition: width 0.3s;
}

/* ── Kanban ─────────────────────────────────── */
.kanban-wrapper {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: 60vh;
}
.kanban-col {
  flex: 0 0 260px;
  background: rgb(249, 250, 251);
  border: 2px dashed transparent;
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}
.kanban-col.drag-over {
  border-color: rgb(76, 110, 245);
  background: rgb(239, 246, 255);
}
.kanban-col-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(107, 114, 128);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100px;
}
.task-card {
  background: white;
  border: 1px solid rgb(229, 231, 235);
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: grab;
  transition: box-shadow 0.15s, opacity 0.15s;
  user-select: none;
}
.task-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.task-card.dragging { opacity: 0.4; cursor: grabbing; }
.task-card.urgente { border-left: 3px solid rgb(239, 68, 68); }
.task-card.alta    { border-left: 3px solid rgb(249, 115, 22); }
.task-card.media   { border-left: 3px solid rgb(234, 179, 8); }
.task-card.baja    { border-left: 3px solid rgb(156, 163, 175); }

/* Avatar ciruclar con inicial */
.avatar-sm {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgb(76, 110, 245);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Badge prioridad */
.badge-urgente { background: #fee2e2; color: #991b1b; }
.badge-alta    { background: #ffedd5; color: #9a3412; }
.badge-media   { background: #fef9c3; color: #854d0e; }
.badge-baja    { background: #f3f4f6; color: #6b7280; }

/* Calendario semanal */
.cal-day {
  flex: 1;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 0.5rem 0.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}
.cal-day:hover { border-color: rgb(76, 110, 245); }
.cal-day.activo { border-color: rgb(76, 110, 245); background: rgb(239, 246, 255); }
.cal-day.hoy    { background: rgb(76, 110, 245); color: white; border-color: rgb(76, 110, 245); }
.cal-day.hoy .cal-day-num { color: white; }
.cal-day.hoy .cal-day-horas { color: rgba(255,255,255,0.85); }
.cal-day-nombre { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; color: rgb(107,114,128); margin-bottom: 0.25rem; }
.cal-day.hoy .cal-day-nombre { color: rgba(255,255,255,0.8); }
.cal-day-num    { font-size: 1rem; font-weight: 700; color: rgb(17,24,39); }
.cal-day-horas  { font-size: 0.625rem; color: rgb(107,114,128); margin-top: 0.125rem; }

/* Badge via */
.badge-web       { background: #e0e7ff; color: #3730a3; }
.badge-whatsapp  { background: #dcfce7; color: #166534; }
