/* Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Prevent unwanted zoom on mobile */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: pan-x pan-y; }
button, input, select, textarea, .task-card, .status-pill, .filter-tab {
  touch-action: manipulation;
}
/* iOS Safari auto-zooms when a focused input's font-size < 16px */
@media (max-width: 640px) {
  input[type="text"], input[type="search"], input[type="date"], textarea {
    font-size: 16px;
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Task card priority left border colours */
.priority-critical { border-left-color: #ef4444; }
.priority-high     { border-left-color: #f97316; }
.priority-medium   { border-left-color: #6366f1; }
.priority-low      { border-left-color: #94a3b8; }

/* Subtle card hover lift */
.task-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.task-card:hover {
  box-shadow: 0 4px 16px 0 rgba(99,102,241,0.10);
  transform: translateY(-1px);
}

/* Bottom-sheet modal on mobile */
@media (max-width: 640px) {
  .modal-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    border-radius: 1rem 1rem 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }
}

/* Fade-in for cards */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.18s ease both; }

/* Toggle pill (status cycle button) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.1s;
}
.status-pill:active { opacity: 0.7; }

.status-todo       { background:#fef9c3; color:#854d0e; }
.status-inprogress { background:#dbeafe; color:#1e40af; }
.status-done       { background:#dcfce7; color:#166534; }
.status-waiting    { background:#f3e8ff; color:#6b21a8; }
.status-someday    { background:#f1f5f9; color:#475569; }

/* Priority badges */
.badge-critical { background:#fee2e2; color:#991b1b; }
.badge-high     { background:#ffedd5; color:#9a3412; }
.badge-medium   { background:#e0e7ff; color:#3730a3; }
.badge-low      { background:#f1f5f9; color:#475569; }

/* FAB */
.fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #6366f1;
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: background 0.15s, transform 0.15s;
  z-index: 40;
}
.fab:hover  { background: #4f46e5; transform: translateY(-1px); }
.fab:active { transform: scale(0.93); }

/* On desktop the quick-add bar occupies the bottom edge — lift the FAB above it */
@media (min-width: 640px) {
  .fab { bottom: 5.5rem; right: 1.5rem; }
}

/* Filter tabs scrollable row */
.filter-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  background: #fff;
  color: #64748b;
  border-color: #e2e8f0;
}
.filter-tab:hover    { border-color: #6366f1; color: #6366f1; }
.filter-tab.active   { background: #6366f1; color: #fff; border-color: #6366f1; }

/* Overdue indicator */
.overdue { color: #dc2626; }
