/* ============================================================
   TASKFLOW — Refined Design System
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark palette */
  --bg-900: #0a0d14;
  --bg-800: #0f1421;
  --bg-700: #151d2e;
  --bg-600: #1c2540;
  --bg-card: #141929;
  --bg-hover: #1e2a42;

  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);

  --text-primary: #e8edf5;
  --text-secondary: #8896b3;
  --text-muted: #4d5c7a;

  --accent: #6c63ff;
  --accent-hover: #7c74ff;
  --accent-glow: rgba(108,99,255,0.25);

  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --purple: #a855f7;

  /* Column colors */
  --todo-bg: #0f1824;
  --todo-accent: #475569;
  --inprogress-bg: #0c1628;
  --inprogress-accent: #3b82f6;
  --review-bg: #161208;
  --review-accent: #f59e0b;
  --done-bg: #091c10;
  --done-accent: #22c55e;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
}

body.light-mode {
  --bg-900: #f0f2f8;
  --bg-800: #e8ecf5;
  --bg-700: #dde3f0;
  --bg-600: #cfd6ea;
  --bg-card: #ffffff;
  --bg-hover: #edf0f9;

  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(0,0,0,0.13);

  --text-primary: #1a1f35;
  --text-secondary: #4a5278;
  --text-muted: #8592b5;

  --todo-bg: #f5f6fa;
  --todo-accent: #94a3b8;
  --inprogress-bg: #eff6ff;
  --inprogress-accent: #3b82f6;
  --review-bg: #fffbeb;
  --review-accent: #d97706;
  --done-bg: #f0fdf4;
  --done-accent: #16a34a;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-900);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(108,99,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(59,130,246,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
/* ---------- NAVBAR ---------- */
#mainNav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
body.light-mode #mainNav {
  background: rgba(240,242,248,0.88);
}
.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 4px;
  gap: 12px;
}
.navbar-brand {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* ---------- MOBILE DRAWER ---------- */
.mobile-nav-drawer {
  display: none; /* toggled via JS */
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1),
              opacity 0.25s ease;
  opacity: 0;
  border-top: 1px solid var(--border);
  background: rgba(10,13,20,0.97);
  backdrop-filter: blur(20px);
}
body.light-mode .mobile-nav-drawer {
  background: rgba(240,242,248,0.97);
}
.mobile-nav-drawer.open {
  display: block;
  max-height: 420px;
  opacity: 1;
}
.mobile-nav-inner {
  padding: 12px 16px 16px;
}
.mobile-nav-members {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  min-height: 40px;
}
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.mobile-nav-item i {
  width: 18px;
  text-align: center;
  color: var(--accent, #6c63ff);
}
.mobile-nav-item:hover {
  background: var(--bg-700, rgba(255,255,255,0.07));
}
.mobile-nav-item.danger {
  color: #ef4444;
}
.mobile-nav-item.danger i {
  color: #ef4444;
}

/* Hamburger active state */
#navHamburger.active i::before {
  content: "\f00d"; /* fa-xmark */
}

/* Hide .btn-label text on very small screens (< 360px) to save space */
@media (max-width: 359px) {
  .btn-label { display: none; }
  .cmd-trigger span { display: none; }
  .cmd-trigger kbd  { display: none; }
}

.brand-icon {
  width: 32px; height: 32px;
  /* background: linear-gradient(135deg, var(--accent), #4338ca); */
  background: unset !important;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brand-text:hover{
  color: white;
}

/* Command Trigger */
.cmd-trigger {
  flex: 1;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.cmd-trigger:hover {
  border-color: var(--accent);
  color: var(--text-secondary);
  background: var(--bg-600);
}
.cmd-trigger kbd {
  margin-left: auto;
  background: var(--bg-600);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.nav-actions { gap: 6px !important; }

.icon-btn {
  width: 34px; height: 34px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }

.tf-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--bg-700);
  color: var(--text-primary);
  white-space: nowrap;
  height: 34px;
}
.nav-btn:hover { background: var(--bg-hover); border-color: var(--border-hover); }
.nav-btn.danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.nav-btn.danger:hover { background: rgba(239,68,68,0.25); }

/* ---------- BUTTONS ---------- */
.btn-primary-tf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #4338ca);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary-tf:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-primary-tf:active { transform: translateY(0); }
.btn-primary-tf.w-100 { justify-content: center; padding: 10px 16px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-hover); color: var(--text-primary); }

.btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-600);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-mini:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.btn-google:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* ---------- MAIN LAYOUT ---------- */
.main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}

/* ---------- BOARDS VIEW ---------- */
.boards-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all 0.22s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.board-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.board-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.board-card:hover::before { opacity: 1; }

.board-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.board-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.board-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- BOARD TOOLBAR ---------- */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 16px;
}

.board-toolbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.back-btn {
  width: 32px; height: 32px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.back-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.board-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-tasks-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-tasks-wrap i {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.search-tasks-input {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 12px 7px 32px;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 180px;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.search-tasks-input:focus {
  outline: none;
  border-color: var(--accent);
  width: 220px;
  background: var(--bg-600);
}
.search-tasks-input::placeholder { color: var(--text-muted); }

/* ---------- COLUMNS ---------- */
.columns-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
}

.column-wrap { min-width: 0; }

.column {
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 200px;
}

.column-todo { background: var(--todo-bg); border: 1px solid rgba(71,85,105,0.2); }
.column-inprogress { background: var(--inprogress-bg); border: 1px solid rgba(59,130,246,0.15); }
.column-review { background: var(--review-bg); border: 1px solid rgba(245,158,11,0.15); }
.column-done { background: var(--done-bg); border: 1px solid rgba(34,197,94,0.15); }

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.column-header-left { display: flex; align-items: center; gap: 8px; }

.column-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.column-todo .column-indicator { background: var(--todo-accent); }
.column-inprogress .column-indicator { background: var(--inprogress-accent); }
.column-review .column-indicator { background: var(--review-accent); }
.column-done .column-indicator { background: var(--done-accent); }

.column-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.column-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-600);
  color: var(--text-muted);
}

/* Quick Add in column */
.quick-add-wrap {
  margin-bottom: 10px;
}
.quick-add-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.quick-add-input::placeholder { color: var(--text-muted); }
.quick-add-input:focus {
  outline: none;
  border-color: var(--accent);
  border-style: solid;
  background: var(--bg-600);
}

/* ---------- TASK CARDS ---------- */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border-left: 3px solid transparent;
}
.task-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.task-card:active { transform: translateY(0); }

.task-card.priority-high { border-left-color: var(--red); }
.task-card.priority-medium { border-left-color: var(--amber); }
.task-card.priority-low { border-left-color: var(--blue); }
.task-card.priority-done { border-left-color: var(--green); }
.task-card.task-overdue { border-left-color: var(--red); background: rgba(239,68,68,0.05); }

.task-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
}

.task-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.task-badge.high { background: rgba(239,68,68,0.15); color: #f87171; }
.task-badge.medium { background: rgba(245,158,11,0.15); color: #fbbf24; }
.task-badge.low { background: rgba(59,130,246,0.15); color: #60a5fa; }
.task-badge.done { background: rgba(34,197,94,0.15); color: #4ade80; }
.task-badge.recurring { background: rgba(168,85,247,0.15); color: #c084fc; }

.task-due-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.task-due-text.overdue { color: var(--red); }
.task-due-text.due-today { color: var(--amber); }

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 6px;
}

.task-assignees { display: flex; gap: -6px; }

.task-progress-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}
.task-progress-mini-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-600);
  border-radius: 999px;
  overflow: hidden;
}
.task-progress-mini-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.task-progress-mini-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Drag ghost */
.sortable-ghost {
  opacity: 0.3;
  border: 2px dashed var(--accent) !important;
  background: var(--accent-glow) !important;
}
.sortable-chosen { opacity: 0.9; box-shadow: var(--shadow-lg); }

/* ---------- AVATARS ---------- */
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
  transition: transform 0.15s;
}
.avatar:first-child { margin-left: 0; }
.avatar:hover { transform: scale(1.15); z-index: 2; }
.avatar-nav { width: 32px; height: 32px; }

.avatar-more {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-600);
  border: 2px solid var(--bg-card);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  cursor: pointer;
}

/* ---------- FORMS ---------- */
.tf-modal {
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  color: var(--text-primary);
}
.modal-header .btn-close {
  filter: invert(0.7);
  opacity: 0.7;
}
.modal-header .btn-close:hover { opacity: 1; }

.tf-field { display: flex; flex-direction: column; gap: 4px; }
.tf-field label, .tf-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.required { color: var(--red); }

.tf-input {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.tf-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-600);
}
.tf-input::placeholder { color: var(--text-muted); }
.tf-input-lg { font-size: 1rem; padding: 10px 14px; font-weight: 600; }
.tf-input-sm { padding: 5px 10px; font-size: 0.8rem; width: auto; }
/* .tf-input option { background: var(--bg-800); color: var(--text-primary); } */

textarea.tf-input { resize: vertical; line-height: 1.5; }

.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.divider-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  margin: 12px 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ---------- TOGGLE SWITCH ---------- */
.recurring-toggle { display: flex; align-items: center; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-600);
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); background: #fff; }

.recurring-options {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  margin-top: 8px;
}

/* ---------- CHECKLIST ---------- */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-700);
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.checklist-item:hover { background: var(--bg-600); }

.checklist-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-item .checklist-text-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
}
.checklist-item .checklist-text-input:focus { outline: none; }
.checklist-item.done-item .checklist-text-input { text-decoration: line-through; color: var(--text-muted); }

.checklist-item .delete-item-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  transition: color 0.15s;
}
.checklist-item .delete-item-btn:hover { color: var(--red); }

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-bar-custom {
  flex: 1;
  height: 6px;
  background: var(--bg-600);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 30px;
}

/* ---------- CALENDAR ---------- */
#calendar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  color: var(--text-primary);
}

.calendar-filter { justify-content: flex-end; margin-bottom: 10px; }

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.month-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-nav .btn {
  background: var(--bg-700);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: var(--r-sm);
}
.calendar-nav .btn:hover { background: var(--bg-600); color: var(--text-primary); }

.calendar-weeknames {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
}

.calendar-day {
  min-height: 80px;
  background: var(--bg-700);
  border-radius: var(--r-sm);
  padding: 6px;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: background 0.15s;
}
.calendar-day:hover { background: var(--bg-hover); }
.calendar-day.empty { background: transparent; }
.calendar-day.today { background: var(--bg-600); outline: 1px solid var(--accent); }
.calendar-day.today .day-num { color: var(--accent); font-weight: 800; }
.calendar-day.weekend { opacity: 0.75; }
.calendar-day.holiday-ph { border: 1px solid rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); }
.calendar-day.holiday-us { border: 1px solid rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }

.day-num { font-weight: 600; color: var(--text-secondary); font-size: 0.75rem; margin-bottom: 4px; }

.cal-event {
  display: block;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cal-event:hover { opacity: 0.85; }
.cal-event.high { background: rgba(239,68,68,0.2); color: #f87171; }
.cal-event.medium { background: rgba(245,158,11,0.2); color: #fbbf24; }
.cal-event.low { background: rgba(59,130,246,0.2); color: #60a5fa; }
.cal-event.done { background: rgba(34,197,94,0.2); color: #4ade80; }

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  pointer-events: all;
  animation: toastIn 0.25s ease;
  max-width: 340px;
  backdrop-filter: blur(12px);
  border-left: 3px solid var(--accent);
}
.toast-item.success { border-left-color: var(--green); }
.toast-item.error { border-left-color: var(--red); }
.toast-item.warning { border-left-color: var(--amber); }
.toast-item.info { border-left-color: var(--blue); }

.toast-icon { font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.toast-item.success .toast-icon { color: var(--green); }
.toast-item.error .toast-icon { color: var(--red); }
.toast-item.warning .toast-icon { color: var(--amber); }
.toast-item.info .toast-icon { color: var(--blue); }

.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.82rem; }
.toast-msg { color: var(--text-secondary); font-size: 0.8rem; margin-top: 1px; }

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--text-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}
.toast-item.removing { animation: toastOut 0.2s ease forwards; }

/* ---------- COMMAND PALETTE ---------- */
.cmd-palette-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 8000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.cmd-palette {
  width: 100%;
  max-width: 560px;
  background: var(--bg-800);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05);
}

.cmd-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.cmd-search i { font-size: 16px; flex-shrink: 0; }
#cmdInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
}
#cmdInput:focus { outline: none; }
.cmd-search kbd {
  background: var(--bg-600);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.cmd-results { max-height: 360px; overflow-y: auto; }

.cmd-section-label {
  padding: 8px 18px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.cmd-item:hover, .cmd-item.active { background: var(--bg-hover); }
.cmd-item-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--bg-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.cmd-item-text { flex: 1; }
.cmd-item-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.cmd-item-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-600);
  color: var(--text-muted);
}

.cmd-footer {
  display: flex;
  gap: 16px;
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.cmd-footer kbd {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: var(--font-mono);
}

/* ---------- TASK NOTIFICATIONS ---------- */
#taskNotificationContainer {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 200px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 600;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#taskNotificationContainer::-webkit-scrollbar { display: none; }

.task-notif {
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 0.78rem;
  cursor: pointer;
  background: rgba(239,68,68,0.9);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.2s;
  border-left: 3px solid rgba(255,255,255,0.4);
}
.task-notif:hover { opacity: 0.85; }
.task-notif-review { background: rgba(245,158,11,0.9); }
.task-notif-today { background: rgba(234,179,8,0.9); color: #111; }

/* ---------- KPI MODAL ---------- */
.kpi-modal { max-height: 90vh; overflow-y: auto; }

.kpi-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-stat-card {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.kpi-stat-card:hover { border-color: var(--border-hover); }

.kpi-stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.kpi-stat-icon.green { background: rgba(34,197,94,0.15); color: var(--green); }
.kpi-stat-icon.red { background: rgba(239,68,68,0.15); color: var(--red); }
.kpi-stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.kpi-stat-icon.purple { background: rgba(168,85,247,0.15); color: var(--purple); }

.kpi-stat-num { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.kpi-stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.kpi-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.kpi-chart-card {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
}

.kpi-chart-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-wrap { position: relative; height: 200px; }
.chart-wrap-sm { height: 160px; }

.kpi-leaderboard-wrap {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
}

.kpi-leaderboard { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.kpi-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-600);
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.kpi-lb-row:hover { background: var(--bg-hover); }

.kpi-lb-rank {
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 24px;
}
.kpi-lb-rank.gold { color: #f59e0b; }
.kpi-lb-rank.silver { color: #94a3b8; }
.kpi-lb-rank.bronze { color: #cd7c2f; }

.kpi-lb-name { flex: 1; font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.kpi-lb-score {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--green);
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(34,197,94,0.1);
  border-radius: 6px;
}

/* ---------- AUTOMATION MODAL ---------- */
.text-accent { color: var(--accent); }

.automation-list { display: flex; flex-direction: column; gap: 10px; }

.automation-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.2s, background 0.2s;
}
.automation-item.active {
  border-color: var(--accent);
  background: rgba(108,99,255,0.06);
}

.automation-tag-header {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 2px 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 6px;
}
.automation-tag-header:first-child { margin-top: 0; }

.automation-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--bg-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.automation-info { flex: 1; }
.automation-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.automation-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }


/* ---------- STICKY NOTES ---------- */
.sticky-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px; height: 48px;
  background: #f59e0b;
  color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 700;
  box-shadow: 0 4px 14px rgba(245,158,11,0.4);
  transition: all 0.2s;
}
.sticky-fab:hover { transform: scale(1.08); }

.sticky-panel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 280px;
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  z-index: 699;
  box-shadow: var(--shadow-lg);
  max-height: 460px;
  overflow-y: auto;
}

.sticky-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.sticky-note {
  background: #fef3c7;
  color: #1c1917;
  border-radius: var(--r-md);
  padding: 10px;
  margin-bottom: 8px;
}
.sticky-note textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  font-size: 0.82rem;
  font-family: var(--font-body);
  min-height: 80px;
  outline: none;
  color: #1c1917;
}
.sticky-note-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 4px;
}
.sticky-actions { display: flex; gap: 5px; justify-content: flex-end; margin-top: 4px; }
.sticky-actions button {
  width: 28px; height: 28px;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sticky-save { background: #16a34a; color: #fff; }
.sticky-del { background: #dc2626; color: #fff; }
.sticky-rec { background: #1d4ed8; color: #fff; }
.sticky-rec.recording { background: #dc2626; }

/* ---------- LOADING / SKELETON ---------- */
.global-loader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,13,20,0.5);
  backdrop-filter: blur(4px);
  z-index: 7000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.global-loader.show { opacity: 1; pointer-events: auto; }
.global-loader .spinner {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  animation: spin 0.55s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: var(--bg-700);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: shimmer 1.4s infinite;
  transform: translateX(-100%);
}
@keyframes shimmer { to { transform: translateX(200%); } }

/* ---------- ANIMATIONS ---------- */
.fade-in-up {
  opacity: 1;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

#koModal{
  min-height: 70vh !important;
  max-height: 70vh !important;
}

button#cmdTrigger {
  width: 350px;
}
.tf-comment{
  flex-direction: column;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .columns-wrap { grid-template-columns: repeat(2, 1fr); }
  .kpi-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-charts-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  button#cmdTrigger {
    width: unset !important;
  }
}

@media (max-width: 900px) {
  .cmd-trigger { display: none; }
  .btn-label { display: none; }
  .board-toolbar { flex-wrap: wrap; }
  .calendar-day { min-height: 60px; font-size: 11px; }
  .cal-event { font-size: 10px; }
  .ob-card {max-height: 70vh !important;}
}

@media (max-width: 700px) {
  .main-content { padding: 12px; }
  .columns-wrap { grid-template-columns: 1fr; }
  .boards-grid { grid-template-columns: 1fr; }
  .board-toolbar-right { width: 100%; }
  .kpi-stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-3, .form-grid-2 { grid-template-columns: 1fr; }
  .board-toolbar { padding: 10px; }
  .calendar-weeknames div, .calendar-day { font-size: 10px; }
  .cal-event { font-size: 0; width: 8px; height: 8px; border-radius: 50%; padding: 0; display: inline-block; margin: 1px; }
  .search-tasks-input { width: 120px; }
  .search-tasks-input:focus { width: 150px; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0; gap: 8px; }
  .brand-text { display: none; }
  .board-title-text { font-size: 0.95rem; }
}

a.dropdown-item:hover {
  background-color: var(--accent-hover);
}

/* Light mode adjustments */
body.light-mode .tf-input { background: #fff; border-color: #d1d9e6; color: #1a1f35; }
body.light-mode .tf-input:focus { background: #f8faff; border-color: var(--accent); }
body.light-mode .column { border-color: rgba(0,0,0,0.07); }
body.light-mode .task-card { background: #fff; }
body.light-mode .calendar-day { background: #f5f6fa; }
body.light-mode .calendar-day.today { background: #eef0ff; }
body.light-mode .cmd-palette { background: #fff; }
body.light-mode #cmdInput { color: #1a1f35; }
body.light-mode .cmd-item:hover { background: #f0f2f8; }
body.light-mode .cmd-item.active { background: #e8edf8; }
body.light-mode .cmd-item-sub { color: #6b7599; }
body.light-mode .cmd-palette { border-color: rgba(0,0,0,0.1); box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
body.light-mode .checklist-item { background: #f5f6fa; border-color: rgba(0,0,0,0.07); }
body.light-mode .checklist-item input[type="text"] { color: #1a1f35; background: transparent; }
body.light-mode .skeleton { background: linear-gradient(90deg, #e8ecf5 25%, #dde3f0 50%, #e8ecf5 75%); }
body.light-mode .global-loader { background: rgba(240,242,248,0.85); }
body.light-mode a.dropdown-item:hover {
  background-color: unset !important;
}

body.light-mode .column.column-inprogress {
  background-color: #1f51ff1c !important;
}

body.light-mode .column.column-review {
  background-color: #ffcd904a !important;
}

body.light-mode .column.column-done {
  background-color: #abffad66 !important;
}

body.light-mode .column.column-todo {
  background-color: #d3d3d329 !important;
}

body.light-mode span.cal-event-title{
  color: black !important;
}


body.light-mode span.brand-text:hover {
  color: black !important;
}

/* Light mode — Modals */
body.light-mode .modal-content {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
  color: #1a1f35;
}
body.light-mode .modal-header {
  background: #f7f9ff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .modal-header .modal-title { color: #1a1f35; }
body.light-mode .modal-footer {
  background: #f7f9ff;
  border-top: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .btn-close { filter: none; opacity: 0.5; }
body.light-mode .btn-close:hover { opacity: 1; }

/* Light mode — Forms */
body.light-mode .tf-input {
  background: #fff;
  border-color: #d1d9e6;
  color: #1a1f35;
}
body.light-mode .tf-input:focus {
  background: #f8faff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
body.light-mode .tf-input::placeholder { color: #a0aec0; }
body.light-mode label { color: #4a5278; }
body.light-mode .tf-field > label { color: #374166; font-weight: 600; }

/* Light mode — Buttons */
body.light-mode .btn-ghost {
  background: #fff;
  border-color: #d1d9e6;
  color: #374166;
}
body.light-mode .btn-ghost:hover {
  background: #f0f2f8;
  border-color: #b8c2d9;
  color: #1a1f35;
}
body.light-mode .btn-mini {
  background: #f0f2f8;
  border-color: #d1d9e6;
  color: #4a5278;
}
body.light-mode .btn-mini:hover { background: var(--accent); color: #fff; }

/* Light mode — Task Cards */
body.light-mode .task-card {
  background: #fff;
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
body.light-mode .task-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.13);
}
body.light-mode .task-title { color: #1a1f35; }
body.light-mode .task-meta { color: #6b7599; }
body.light-mode .task-due { color: #6b7599; }
body.light-mode .task-due.overdue { color: #dc2626; }

/* Light mode — Columns */
body.light-mode .column {
  background: #eef1f8;
  border-color: rgba(0,0,0,0.07);
}
body.light-mode .column-header { color: #1a1f35; }
body.light-mode .column-count {
  background: rgba(0,0,0,0.08);
  color: #4a5278;
}
body.light-mode .quick-add-input {
  background: #fff;
  border-color: #d1d9e6;
  color: #1a1f35;
}
body.light-mode .quick-add-input::placeholder { color: #a0aec0; }

/* Light mode — Automations */
body.light-mode .automation-item {
  background: #f7f9ff;
  border: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .automation-item.active {
  background: #eef1ff;
  border-color: rgba(108,99,255,0.25);
}
body.light-mode .automation-name { color: #1a1f35; }
body.light-mode .automation-desc { color: #6b7599; }
body.light-mode .automation-icon { color: var(--accent); }
body.light-mode .automation-tag-header {
  color: #8592b5;
  border-bottom-color: rgba(0,0,0,0.08);
}

/* Light mode — KPI Dashboard */
body.light-mode .kpi-stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.light-mode .kpi-stat-value { color: #1a1f35; }
body.light-mode .kpi-stat-label { color: #6b7599; }
body.light-mode .kpi-chart-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .kpi-chart-title { color: #374166; }
body.light-mode .kpi-lb-row { background: #f7f9ff; border-color: rgba(0,0,0,0.06); }
body.light-mode .kpi-lb-row:hover { background: #eef1f8; }
body.light-mode .kpi-lb-name { color: #1a1f35; }
body.light-mode .kpi-lb-score { color: #6b7599; }

/* Light mode — Toasts */
body.light-mode .toast-msg {
  background: transparent;
  color: #1a1f35;
}
body.light-mode .toast-msg .toast-title { color: #1a1f35; }
body.light-mode .toast-msg .toast-body  { color: #4a5278; }
body.light-mode .toast-msg.toast-success { border-left-color: #16a34a; }
body.light-mode .toast-msg.toast-error   { border-left-color: #dc2626; }
body.light-mode .toast-msg.toast-warning { border-left-color: #d97706; }
body.light-mode .toast-msg.toast-info    { border-left-color: #3b82f6; }
body.light-mode .ob-body, body.light-mode .ob-body strong, body.light-mode .ob-title, 
body.light-mode .ko-stage strong, body.light-mode .ko-method strong, body.light-mode .ko-prow strong,
body.light-mode .ko-collab-item strong, body.light-mode .ko-power-card strong, body.light-mode .ko-art-done-text,
body.light-mode .ko-step-title,body.light-mode .ko-art-stitle,body.light-mode button#obPrevBtn {
  color: var(--accent) !important;
}


body.light-mode .ko-dot,body.light-mode .ob-dot-step {
  background: rgb(14 0 255 / 15%) !important;
} 

/* Light mode — Calendar */
body.light-mode .calendar-day {
  background: #f7f9ff;
  border-color: rgba(0,0,0,0.07);
}
body.light-mode .calendar-day.today { background: #eef0ff; border-color: rgba(108,99,255,0.3); }
body.light-mode .calendar-day-num { color: #374166; }
body.light-mode .calendar-header-cell { color: #6b7599; }
body.light-mode .calendar-month-title { color: #1a1f35; }
body.light-mode .cal-event { opacity: 0.92; }

/* Light mode — Sticky Notes */
body.light-mode .sticky-note {
  background: #fffde7;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
  color: #333;
}
body.light-mode .sticky-note textarea { color: #333; background: transparent; }

/* Light mode — Dropdown menus */
body.light-mode .dropdown-menu {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body.light-mode .dropdown-item { color: #374166; }
body.light-mode .dropdown-item:hover { background: #f0f2f8; color: #1a1f35; }
body.light-mode .dropdown-divider { border-color: rgba(0,0,0,0.08); }

/* Light mode — Board cards on boards view */
body.light-mode .board-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
body.light-mode .board-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.10); }
body.light-mode .board-card-title { color: #1a1f35; }
body.light-mode .board-card-meta { color: #6b7599; }

/* Light mode — Toolbar */
body.light-mode .board-toolbar { background: rgba(240,242,248,0.9); border-bottom-color: rgba(0,0,0,0.08); }
body.light-mode .search-tasks-input { background: #fff; border-color: #d1d9e6; color: #1a1f35; }
body.light-mode .view-toggle-btn { background: #f0f2f8; border-color: #d1d9e6; color: #4a5278; }
body.light-mode .view-toggle-btn.active { background: var(--accent); color: #fff; }

/* Light mode — Progress bars */
body.light-mode .progress-bar-custom { background: rgba(0,0,0,0.08); }
body.light-mode .progress-label { color: #6b7599; }

/* Light mode — Section/tab labels */
body.light-mode .section-label,
body.light-mode .form-section-title { color: #374166; }

/* Light mode — Icon buttons in nav */
body.light-mode .icon-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); color: #4a5278; }
body.light-mode .icon-btn:hover { background: rgba(0,0,0,0.10); color: #1a1f35; }
body.light-mode .nav-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); color: #4a5278; }
body.light-mode .nav-btn:hover { background: rgba(0,0,0,0.10); color: #1a1f35; }

/* Light mode — Priority badges */
body.light-mode .badge-high    { background: rgba(239,68,68,0.12);  color: #dc2626; }
body.light-mode .badge-medium  { background: rgba(245,158,11,0.12); color: #b45309; }
body.light-mode .badge-low     { background: rgba(148,163,184,0.15);color: #64748b; }

/* Light mode — Text utilities */
body.light-mode .text-secondary { color: #4a5278 !important; }
body.light-mode .text-muted     { color: #8592b5 !important; }


/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Override Bootstrap modal backdrop */
.modal-backdrop { --bs-backdrop-opacity: 0.6; }

/* Misc */
.member-list { display: flex; align-items: center; }
img.colorpick-eyedropper-input-trigger { display: none; }
.board-open #boardsView { display: none !important; }

.skeleton-day {
  height: 80px;
  background: var(--bg-700);
  border-radius: var(--r-sm);
}
.calendar-skeleton {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
}

/* ============================================================
   MULTI-BOARD VIEW
   ============================================================ */

/* ---- Board selector pill strip ---- */
.multi-board-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.mb-board-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: var(--bg-700);
  color: var(--text-secondary);
  transition: all 0.18s;
  white-space: nowrap;
}
.mb-board-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.mb-board-pill.active {
  background: color-mix(in srgb, var(--pill-color, #6c63ff) 14%, transparent);
  border-color: var(--pill-color, #6c63ff);
  color: var(--text-primary);
}
.mb-board-pill-ctrl {
  background: var(--bg-600);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 5px 12px;
  --pill-color: #6c63ff;
}
.mb-board-pill-ctrl:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mb-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-color, #6c63ff);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.mb-board-pill:not(.active) .mb-pill-dot {
  opacity: 0.4;
}

/* ---- Toolbar badges ---- */
.mb-toolbar-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.2px;
  opacity: 0.9;
}

/* ---- Board source tag on each card ---- */
.mb-board-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--source-color, #6c63ff);
  background: color-mix(in srgb, var(--source-color, #6c63ff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--source-color, #6c63ff) 25%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.mb-source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--source-color, #6c63ff);
  flex-shrink: 0;
}

/* Light mode overrides */
body.light-mode .mb-board-pill {
  background: #f0f2f8;
  color: #4a5278;
  border-color: transparent;
}
body.light-mode .mb-board-pill.active {
  background: color-mix(in srgb, var(--pill-color, #6c63ff) 10%, white);
  border-color: var(--pill-color, #6c63ff);
  color: #1a1f35;
}
body.light-mode .mb-board-pill-ctrl {
  background: #e8ecf5;
  color: #6b7599;
}
body.light-mode .multi-board-selector {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
body.light-mode .mb-board-source-tag {
  color: var(--source-color, #6c63ff);
}

/* ── Inbox Activity Feed ── */
.tf-inbox-act-feed { padding: 10px 4px 20px; display: flex; flex-direction: column; }
.tf-inbox-act-feed .tf-activity-filter { margin-bottom: 14px; }
.tf-inbox-act-feed .tf-activity-list { max-height: none !important; overflow: visible !important; padding-right: 0 !important; }

.tf-inbox-act-feed .tf-activity-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.15s;
  position: relative;
}
.tf-inbox-act-feed .tf-activity-item:hover {
  background: var(--bg-hover, #1e2a42);
  border-color: var(--border-hover, rgba(255,255,255,0.1));
}
.tf-inbox-act-feed .tf-activity-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 26px; bottom: -6px;
  width: 2px; height: 10px;
  background: var(--border, rgba(255,255,255,0.06));
  border-radius: 2px;
}
.tf-inbox-act-feed .tf-activity-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}
.tf-inbox-act-feed .tf-activity-body { padding-right: 72px; }

/* Clickable task name */
.tf-inbox-act-feed .tf-act-task {
  color: var(--accent, #6c63ff) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  border-radius: 4px;
  padding: 0 3px;
  transition: background 0.15s, color 0.15s, opacity 0.15s !important;
}
.tf-inbox-act-feed .tf-act-task:hover {
  background: rgba(108,99,255,0.12) !important;
  color: #a78bfa !important;
  text-decoration: none !important;
}

/* Hover "Open" button */
.tf-inbox-act-open-btn {
  display: none;
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  padding: 3px 9px;
  font-size: 0.68rem; font-weight: 700;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 6px;
  color: #a78bfa;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.15s;
  z-index: 1;
}
.tf-inbox-act-open-btn i { font-size: 9px; margin-right: 3px; }
.tf-inbox-act-open-btn:hover {
  background: rgba(108,99,255,0.2);
  border-color: rgba(108,99,255,0.4);
  color: #c4b5fd;
}
.tf-inbox-act-feed .tf-activity-item:hover .tf-inbox-act-open-btn { display: inline-flex; align-items: center; }

/* Light mode */
body.light-mode .tf-inbox-act-feed .tf-activity-item:hover { background: #eef1f8; border-color: rgba(0,0,0,0.07); }
body.light-mode .tf-inbox-act-feed .tf-activity-item::after { background: rgba(0,0,0,0.06); }
body.light-mode .tf-inbox-act-open-btn { background: rgba(108,99,255,0.08); color: #6c63ff; }

.tf-act-filter-btn:hover, .tf-act-filter-btn.active{
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.3);
  color: var(--accent, #6c63ff);
}

.tf-act-filter-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-700, #151d2e);
  color: var(--text-muted, #4d5c7a);
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.tf-activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  animation: tfCommentIn 0.2s ease;
}

.tf-activity-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tf-activity-icon.comment {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.tf-activity-icon.edited {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.tf-activity-icon.moved {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.tf-activity-icon.created {
  background: rgba(108, 99, 255, 0.15);
  color: #a78bfa;
}

.tf-activity-icon.role {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.tf-activity-icon.done {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.tf-activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.tf-activity-text {
  font-size: 0.82rem;
  color: var(--text-secondary, #8896b3);
  line-height: 1.45;
}

.tf-activity-time {
  font-size: 0.71rem;
  color: var(--text-muted, #4d5c7a);
  margin-top: 2px;
}

.navbar-brand:focus, .navbar-brand:hover{
  color: var(--text-primary) !important;
}

.nav-btn.nav-btn-signin {
  background: var(--accent, #6c63ff);
  color: #fff;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  box-shadow: 0 2px 10px rgba(108,99,255,0.35);
}
.nav-btn.nav-btn-signin:hover {
  background: #5a52e0;
  box-shadow: 0 4px 18px rgba(108,99,255,0.5);
  transform: translateY(-1px);
}
.nav-btn.nav-btn-signin:active {
  transform: translateY(0);
}
 
/* ---- Sign-up mode submit button tint ---- */
.btn-signup-mode {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 2px 10px rgba(16,185,129,0.35) !important;
}
 
/* ---- Password show/hide toggle ---- */
#togglePassword:hover { color: var(--text-primary); }
 
/* ---- Email hint line ---- */
#emailHint { transition: color 0.2s, opacity 0.2s; }

p.text-center.text-muted.mt-3.mb-0 {
  color: #898989 !important;
}

#tf-modal-tab-bar {
  display: flex;
  flex-wrap: nowrap;          /* Prevent wrapping so overflow triggers */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth momentum scroll on iOS */
  scrollbar-width: none;      /* Hide scrollbar on Firefox */
  -ms-overflow-style: none;   /* Hide scrollbar on IE/Edge */
  gap: 4px;                   /* Optional: space between tabs */
}

/* Hide scrollbar on WebKit (Chrome, Safari, mobile browsers) */
#tf-modal-tab-bar::-webkit-scrollbar {
  display: none;
}

.tf-modal-tab {
  flex-shrink: 0;             /* Prevent tabs from shrinking below their natural width */
  white-space: nowrap;        /* Prevent text wrapping inside each tab */
}