/* SmartOffice — custom styles (Tailwind base) */

/* Kanban board horizontal scroll */
.kanban-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
.board-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: calc(100vh - 140px);
}

.kanban-column {
  flex-shrink: 0;
  width: 18rem;  /* 288px */
  min-width: 15rem;
  max-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
}

.board-column {
  flex-shrink: 0;
  width: 280px;
}

.task-list {
  min-height: 80px;
  overflow-y: auto;
  max-height: calc(100vh - 14rem);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Priority border left */
.task-card { border-left: 3px solid transparent; }
.task-card.priority-urgent { border-left-color: #EF4444; }
.task-card.priority-high   { border-left-color: #F97316; }
.task-card.priority-normal { border-left-color: #3B82F6; }
.task-card.priority-low    { border-left-color: #10B981; }

/* Priority top bar inside task card */
.priority-bar-urgent { background-color: #EF4444; }
.priority-bar-high   { background-color: #F97316; }
.priority-bar-normal { background-color: #3B82F6; }
.priority-bar-low    { background-color: #10B981; }

/* Task card hover */
.task-card {
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.task-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.task-card.sortable-ghost {
  opacity: 0.4;
  background: #e0e7ff;
}
.task-card.sortable-drag {
  cursor: grabbing;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Sidebar nav active */
.nav-link.active {
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-weight: 600;
}

/* Badge priority */
.badge-urgent { background:#FEE2E2; color:#B91C1C; }
.badge-high   { background:#FFEDD5; color:#C2410C; }
.badge-normal { background:#DBEAFE; color:#1E40AF; }
.badge-low    { background:#D1FAE5; color:#065F46; }

/* Chat */
.chat-message { max-width: 75%; }
.chat-message.own { margin-left: auto; }
.chat-bubble { border-radius: 1rem; padding: 0.5rem 0.75rem; line-height: 1.4; }
.chat-bubble.own { background: #DBEAFE; border-bottom-right-radius: 0.25rem; }
.chat-bubble.other { background: #F1F5F9; border-bottom-left-radius: 0.25rem; }

/* Typing indicator */
.typing-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing-bounce 1.2s infinite;
  margin: 0 1px;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Loading spinner */
.spinner {
  border: 2px solid #e2e8f0;
  border-top: 2px solid #3B82F6;
  border-radius: 50%;
  width: 16px; height: 16px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
}

/* Focus visible */
*:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }

/* Responsive sidebar collapse on mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: block; }
}

/* Admin panel accent */
.admin-header { background: #1E40AF; }

/* Attachment file item */
.attachment-item { transition: background 0.15s; }
.attachment-item:hover { background: #F8FAFC; }

/* Guest page */
.guest-container { max-width: 680px; margin: 2rem auto; }

/* Overdue task */
.task-card.overdue .due-date { color: #EF4444; font-weight: 600; }

/* Column drop target highlight */
.drop-target { background: #EFF6FF !important; border: 2px dashed #3B82F6 !important; }
