/* ─── Layout ──────────────────────────────────────────────────────────────── */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #f1f5f9; }
#wrapper { min-height: 100vh; }

#sidebar {
  width: 250px; min-width: 250px; min-height: 100vh;
  background: #0f172a !important;
  transition: width .25s ease, min-width .25s ease;
}
#sidebar.collapsed { width: 0; min-width: 0; overflow: hidden; }

#sidebar .nav-link { border-radius: 8px; padding: .5rem .75rem; font-size: .875rem; transition: background .15s; }
#sidebar .nav-link:hover { background: rgba(255,255,255,.08); }
#sidebar .nav-link.active { background: #3b82f6; color: #fff !important; }

.topbar { height: 56px; position: sticky; top: 0; z-index: 100; }
.brand-icon { width: 36px; height: 36px; border-radius: 8px; background: #3b82f6; display:flex; align-items:center; justify-content:center; }
.brand-icon-lg { width: 56px; height: 56px; border-radius: 14px; background: #1d4ed8; display:flex; align-items:center; justify-content:center; }

/* ─── Cards & KPIs ─────────────────────────────────────────────────────────── */
.card { border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi-card .card-body { padding: 1.25rem; }
.kpi-icon { width: 48px; height: 48px; border-radius: 12px; display:flex; align-items:center; justify-content:center; }
.bg-primary-soft  { background: rgba(59,130,246,.12); }
.bg-warning-soft  { background: rgba(234,179,8,.12); }
.bg-danger-soft   { background: rgba(239,68,68,.12); }
.bg-success-soft  { background: rgba(34,197,94,.12); }

/* ─── Tables ────────────────────────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table th { font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.table td { vertical-align: middle; }
.table-hover tbody tr { cursor: default; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-xs { padding: .2rem .5rem; font-size: .78rem; border-radius: 6px; }
.btn-primary { background: #3b82f6; border-color: #3b82f6; }
.btn-primary:hover { background: #2563eb; border-color: #2563eb; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge { font-size: .72rem; font-weight: 600; border-radius: 6px; padding: .3em .6em; }

/* ─── Estado dots ───────────────────────────────────────────────────────────── */
.dot-estado { width: 10px; height: 10px; border-radius: 50%; display:inline-block; flex-shrink:0; }
.estado-abierto      { background: #3b82f6; }
.estado-en_progreso  { background: #f59e0b; }
.estado-pendiente    { background: #94a3b8; }
.estado-resuelto     { background: #22c55e; }
.estado-cerrado      { background: #1e293b; }

/* ─── Avatar ────────────────────────────────────────────────────────────────── */
.avatar-sm { width: 32px; height: 32px; min-width: 32px; font-size: .75rem; }

/* ─── Comentarios ───────────────────────────────────────────────────────────── */
.comentario-item { padding: .75rem; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; }
.toast-item { background: #1e293b; color: #f8fafc; border-radius: 10px; padding: .75rem 1.25rem;
  font-size: .875rem; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ─── Misc ───────────────────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.min-vh-100 { min-height: 100vh; }

/* ─── Pizarra Kanban Estilo Trello ─────────────────────────────────────────── */
.kanban-board-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 1.15rem;
  min-width: 1160px;
  align-items: stretch;
}
.kanban-column {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  box-shadow: 0 1px 3px rgba(0,0,0,.02);
  transition: background-color .2s ease, border-color .2s ease;
}
.kanban-column.dragover {
  background: #e2e8f0 !important;
  border: 2px dashed #3b82f6 !important;
}
.kanban-column-header {
  padding: .85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.kanban-column-body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex-grow: 1;
  min-height: 480px;
}
.kanban-empty-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: rgba(255,255,255,.5);
  pointer-events: none;
}
.kanban-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  position: relative;
  cursor: grab;
  user-select: none;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.dragging {
  opacity: 0.45;
  transform: scale(0.97) rotate(1.5deg);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.kanban-card.border-urgente {
  border-left: 4px solid #ef4444 !important;
}
.kanban-card.border-alta {
  border-left: 4px solid #f59e0b !important;
}
.kanban-card.border-media {
  border-left: 4px solid #3b82f6 !important;
}
.kanban-card.border-baja {
  border-left: 4px solid #10b981 !important;
}
.alert-unattended-pulse {
  animation: pulseRed 2s infinite;
}
@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

