@charset "UTF-8";
/* Custom global styles for Hnawny To-Do & Notes */
:root {
  --font-sans: "Anuphan", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Thai", "Noto Sans", sans-serif;
}

html, body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* SweetAlert2 font override to match app */
.swal2-popup {
  font-family: var(--font-sans);
}

/* Sticky Notes Board */
.note-card {
  position: absolute;
  touch-action: none; /* enable PointerEvents drag */
  will-change: transform, left, top;
  transition: transform 120ms ease, box-shadow 180ms ease;
}
.note-card.dragging {
  transition: none;
}
.note-card .note-body {
  background: rgba(30, 41, 59, 0.95); /* slate-800-ish */
  border: 1px solid rgba(51, 65, 85, 0.9); /* slate-700-ish */
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 15px 25px rgba(0,0,0,0.35);
}

/* ======================= */
/*       Kanban Board      */
/* ======================= */

.kanban-board {
  display: grid;
  /* ให้แต่ละคอลัมน์มีขั้นต่ำ 260px แล้วค่อยๆ ขยาย ไม่เบียดกันเกินไป */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .kanban-board {
    gap: 2rem; /* จอใหญ่ให้โล่งขึ้นอีก */
  }
}

.kanban-col {
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left,
              rgba(15, 23, 42, 0.95),
              rgba(2, 6, 23, 0.9));
  min-height: 240px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.kanban-col.drag-over {
  border-color: rgba(99, 102, 241, 1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
  background: radial-gradient(circle at top left,
              rgba(79, 70, 229, 0.22),
              rgba(15, 23, 42, 0.96));
}

.kanban-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.kanban-title {
  font-weight: 700;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
}

.kanban-count {
  opacity: 0.7;
  font-size: 0.8rem;
}

.kanban-list {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  display: grid;
  gap: 0.9rem; /* ระยะห่างการ์ดแต่ละใบให้โล่งขึ้น */
}

.task-card {
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.9rem;
  background: rgba(30, 41, 59, 0.88);
  padding: 0.9rem 1rem;
  cursor: grab;
  transition:
    transform 140ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}
.task-card:active { cursor: grabbing; }
.task-card.dragging {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.45);
}

.task-title {
  font-weight: 600;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
}
.task-meta {
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  opacity: 0.9;
}
.task-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.task-badge { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge-type { background: #4338ca22; color: #c7d2fe; }
.badge-due-soon { background: #f59e0b; color: #1f2937; }
.badge-overdue { background: #ef4444; color: #111827; }
.status-todo { border-left: 4px solid #3b82f6; }
.status-in-progress { border-left: 4px solid #f59e0b; }
.status-done { border-left: 4px solid #10b981; }
.flash-move { animation: flashMove 600ms ease; }
@keyframes flashMove {
  0% { background: rgba(16, 185, 129, 0.15); }
  100% { background: rgba(30, 41, 59, 0.88); }
}

/* Audit timeline (assignment tab) */
.audit-timeline {
  margin-top: 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  padding-top: 0.75rem;
}
.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.audit-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: rgba(51, 65, 85, 0.8);
  flex-shrink: 0;
}
.audit-content {
  flex: 1;
  font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  opacity: 0.9;
}
.audit-time {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Prevent overly long text from causing overflow */
.task-title,
.task-meta {
  overflow-wrap: anywhere;
}
