/* ============================================================
   TASKER — Global Stylesheet
   Brand: #6D49F2 (purple)  |  Supports data-theme="dark/light"
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  /* Brand (overridden by Tweaks) */
  --brand-50:  #F3F0FF;
  --brand-100: #E5DEFF;
  --brand-300: #A990FF;
  --brand-400: #8B6CFF;
  --brand-500: #6D49F2;
  --brand-600: #5B36DC;

  /* Neutral scale */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic */
  --bg:           #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary:  #F1F5F9;
  --surface:      #FFFFFF;
  --surface-hover:#F8FAFC;
  --border:       #E2E8F0;
  --border-subtle:#F1F5F9;
  --text:         #0F172A;
  --text-secondary:#475569;
  --text-muted:   #94A3B8;
  --text-inverse: #FFFFFF;

  --sidebar-w:    220px;
  --sidebar-w-collapsed: 56px;
  --header-h:     52px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    20px;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 2px 8px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.15);

  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Thai', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 150ms cubic-bezier(.4,0,.2,1);

  /* Semantic color aliases */
  --text-subtle:  #94A3B8;
  --surface-2:    #F1F5F9;
  --c-rose:       #F43F5E;
  --c-orange:     #F97316;
  --c-amber:      #F59E0B;
  --c-green:      #10B981;
  --brand-200:    #C4B5FD;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
  --bg:           #0F1117;
  --bg-secondary: #161B27;
  --bg-tertiary:  #1E2335;
  --surface:      #1A1F2E;
  --surface-hover:#212843;
  --border:       #2A3150;
  --border-subtle:#1E2642;
  --text:         #E2E8F0;
  --text-secondary:#94A3B8;
  --text-muted:   #64748B;
  --text-inverse: #0F172A;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
  --shadow:     0 2px 8px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.5);
  --text-subtle: #64748B;
  --surface-2:   #1E2335;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-font-smoothing: antialiased; }
body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}
#root { height: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns var(--transition);
}
.app[data-sidebar="collapsed"] {
  grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

/* ── SIDEBAR ── */
.sidebar {
  grid-row: 1 / -1;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition);
  z-index: 10;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-logo {
  width: 28px; height: 28px;
  background: var(--brand-500);
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 800;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sb-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.sb-name span { color: var(--text-muted); font-weight: 400; }
.sb-collapse {
  margin-left: auto;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sb-collapse:hover { background: var(--border); color: var(--text); }

.sb-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sb-section { margin-top: 12px; }
.sb-section:first-child { margin-top: 0; }
.sb-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 4px 8px;
  white-space: nowrap;
}
.sb-nav { display: flex; flex-direction: column; gap: 1px; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 100%;
  text-align: left;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.sb-item:hover { background: var(--surface-hover); color: var(--text); }
.sb-item.active { background: var(--brand-50); color: var(--brand-500); }
[data-theme="dark"] .sb-item.active { background: rgba(109,73,242,.15); color: var(--brand-300); }
.sb-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sb-item .badge {
  background: var(--brand-500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sb-item.active .badge { background: var(--brand-500); }

.sb-proj-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
  text-align: left;
}
.sb-user:hover { background: var(--surface-hover); }
.sb-user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-user-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Collapsed sidebar overrides */
.app[data-sidebar="collapsed"] .sb-section-title,
.app[data-sidebar="collapsed"] .label,
.app[data-sidebar="collapsed"] .sb-name,
.app[data-sidebar="collapsed"] .sb-user-name,
.app[data-sidebar="collapsed"] .sb-user-role,
.app[data-sidebar="collapsed"] .sb-section { display: none; }
.app[data-sidebar="collapsed"] .sb-item { justify-content: center; padding: 7px 0; }
.app[data-sidebar="collapsed"] .sb-item .badge {
  position: absolute; top: 4px; right: 4px;
  padding: 1px 4px; font-size: 9px;
}

/* ── TOPBAR ── */
.topbar {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  z-index: 9;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-views {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.view-btn:hover { color: var(--text); background: var(--surface-hover); }
.view-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.topbar-filters-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.topbar-filters-btn:hover { border-color: var(--brand-400); color: var(--text); }
.topbar-filters-btn.active { border-color: var(--brand-500); color: var(--brand-500); background: var(--brand-50); }
[data-theme="dark"] .topbar-filters-btn.active { background: rgba(109,73,242,.12); }

.topbar-spacer { flex: 1; }

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search-icon {
  position: absolute; left: 9px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.topbar-search input {
  width: 200px;
  padding: 6px 10px 6px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}
.topbar-search input:focus { border-color: var(--brand-400); width: 260px; background: var(--surface); }
.topbar-search input::placeholder { color: var(--text-muted); }

/* ── MAIN CONTENT ── */
.main-content {
  grid-column: 2;
  overflow: auto;
  background: var(--bg);
  position: relative;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--brand-400); }
.filter-clear {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-clear:hover { border-color: var(--brand-400); color: var(--brand-500); }
.filter-count { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ── GROUP BY ── */
.groupby-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.groupby-opt {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.groupby-opt:hover { color: var(--text); background: var(--bg-secondary); }
.groupby-opt.active { color: var(--brand-500); background: var(--brand-50); }
[data-theme="dark"] .groupby-opt.active { background: rgba(109,73,242,.12); }

/* ============================================================
   AVATARS
   ============================================================ */
.av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
}
.av-xs { width: 18px; height: 18px; font-size: 8px; }
.av-sm { width: 24px; height: 24px; font-size: 9px; }
.av-md { width: 30px; height: 30px; font-size: 11px; }
.av-lg { width: 38px; height: 38px; font-size: 14px; }
.av-xl { width: 48px; height: 48px; font-size: 17px; }
.av-2xl { width: 64px; height: 64px; font-size: 22px; }

.av-stack {
  display: inline-flex;
  flex-direction: row-reverse;
}
.av-stack .av {
  margin-left: -6px;
  border: 2px solid var(--surface);
  box-shadow: none;
}
.av-stack .av:last-child { margin-left: 0; }
.av-stack-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  margin-left: -6px;
  border: 2px solid var(--surface);
}

/* ============================================================
   BADGES & CHIPS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.badge-prio { border: 1px solid; }
.prio-Highest { background: rgba(239,68,68,.1); color: #DC2626; border-color: rgba(239,68,68,.25); }
.prio-High    { background: rgba(249,115,22,.1); color: #EA580C; border-color: rgba(249,115,22,.25); }
.prio-Medium  { background: rgba(245,158,11,.1); color: #D97706; border-color: rgba(245,158,11,.25); }
.prio-Low     { background: rgba(34,197,94,.1);  color: #16A34A; border-color: rgba(34,197,94,.25); }
.prio-Highest .dot { background: #DC2626; }
.prio-High .dot    { background: #EA580C; }
.prio-Medium .dot  { background: #D97706; }
.prio-Low .dot     { background: #16A34A; }

.card-proj {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
.status-pill:hover { opacity: .8; }
.detail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
.detail-status-pill:hover { opacity: .8; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-tertiary); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.1); color: #DC2626; border-color: rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.15); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
}
.icon-btn:hover { background: var(--bg-secondary); color: var(--text); }
.icon-btn.has-dot::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-500);
  border: 1.5px solid var(--surface);
}

/* ── TOGGLE ── */
.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.toggle-track {
  width: 34px; height: 18px;
  background: var(--gray-300);
  border-radius: 9px;
  position: relative;
  transition: background var(--transition);
}
.toggle.on .toggle-track { background: var(--brand-500); }
.toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--transition);
}
.toggle.on .toggle-knob { transform: translateX(16px); }

/* ── FORM CONTROLS ── */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-400);
  background: var(--surface);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   KANBAN BOARD
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  overflow-x: auto;
  min-height: calc(100vh - var(--header-h) - 52px);
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 280px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-h) - 80px);
}
.col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.col-name { font-size: 13px; font-weight: 600; flex: 1; }
.col-count {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.col-add {
  width: 24px; height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.col-add:hover { background: var(--border); color: var(--text); }
.col-body {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* ── TASK CARD ── */
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.task-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.task-card-id { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 4px; }
.task-card-name { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--text); margin-bottom: 9px; }
.task-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.task-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.task-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.task-card-people { display: flex; align-items: center; gap: 5px; }
.task-card-due { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.task-card-due.overdue { color: #DC2626; }
.task-card-due.today   { color: #D97706; }
.task-card-due.soon    { color: var(--brand-500); }
.task-progress { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.progress-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-500); border-radius: 2px; transition: width .3s; }
.progress-text { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.task-card-recurring {
  position: absolute; top: 10px; right: 10px;
  color: var(--text-muted);
  opacity: .5;
}

/* ── LIST VIEW ── */
.list-view { padding: 16px 20px; }
.list-group { margin-bottom: 20px; }
.list-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
}
.list-row:hover { background: var(--surface-hover); border-color: var(--border); }
.list-row-name { flex: 1; font-size: 13px; font-weight: 500; min-width: 0; }
.list-row-id { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; }
.list-row-cell { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.list-col-heads {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── CALENDAR VIEW ── */
.calendar-wrap { padding: 16px 20px; }
.calendar-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.calendar-nav-title { font-size: 16px; font-weight: 700; flex: 1; text-align: center; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-day-head {
  background: var(--bg-secondary);
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cal-day {
  background: var(--surface);
  min-height: 100px;
  padding: 8px;
  cursor: pointer;
}
.cal-day:hover { background: var(--surface-hover); }
.cal-day.other-month { background: var(--bg-secondary); opacity: .6; }
.cal-day.today { background: var(--brand-50); }
[data-theme="dark"] .cal-day.today { background: rgba(109,73,242,.08); }
.cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cal-day.today .cal-day-num {
  color: var(--brand-500);
}
.cal-event {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-more { font-size: 10px; color: var(--text-muted); padding: 2px 4px; cursor: pointer; }
.cal-more:hover { color: var(--brand-500); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.97) translateY(8px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── TASK DETAIL PANEL ── */
.task-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.task-detail-overlay.open { opacity: 1; pointer-events: all; }
.task-detail-panel {
  width: 560px;
  max-width: 95vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 200ms cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
}
.task-detail-overlay.open .task-detail-panel { transform: translateX(0); }
.td-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.td-id { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 4px; }
.td-title { font-size: 17px; font-weight: 700; line-height: 1.35; flex: 1; }
.td-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.td-section { margin-bottom: 20px; }
.td-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.td-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.td-row-label { width: 120px; flex-shrink: 0; color: var(--text-muted); font-weight: 500; }
.td-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── CHECKLIST ── */
.checklist { display: flex; flex-direction: column; gap: 4px; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  cursor: pointer;
}
.checklist-item input[type="checkbox"] { display: none; }
.check-box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  background: var(--surface);
}
.checklist-item.done .check-box {
  background: var(--brand-500);
  border-color: var(--brand-500);
}
.check-text { font-size: 13px; flex: 1; }
.checklist-item.done .check-text { text-decoration: line-through; color: var(--text-muted); }

/* ── COMMENTS ── */
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.comment-body {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 8px 11px;
}
.comment-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.comment-text { font-size: 13px; line-height: 1.5; }
.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
}
.comment-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  resize: none;
}
.comment-input:focus { border-color: var(--brand-400); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-wrap { padding: 16px 20px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-num { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-delta { font-size: 11px; margin-top: 6px; font-weight: 600; }
.stat-delta.up { color: #16A34A; }
.stat-delta.down { color: #DC2626; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.chart-card-full { grid-column: 1 / -1; }
.chart-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-label { font-size: 12px; color: var(--text-muted); width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.bar-val { font-size: 12px; color: var(--text-muted); width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── DONUT CHART ── */
.donut { transform: rotate(-90deg); }

/* ============================================================
   INBOX
   ============================================================ */
.inbox-wrap { padding: 16px 20px; max-width: 700px; }
.inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.inbox-item:hover { background: var(--surface-hover); border-color: var(--border); }
.inbox-item.unread { background: var(--surface); border-color: var(--border); }
.inbox-item.unread::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--brand-500);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.inbox-content { flex: 1; min-width: 0; }
.inbox-text { font-size: 13px; line-height: 1.45; color: var(--text); }
.inbox-text strong { font-weight: 600; }
.inbox-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   TEAM PAGE
   ============================================================ */
.team-wrap { padding: 16px 20px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
}
.team-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.team-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.team-card-name { font-size: 14px; font-weight: 700; }
.team-card-role { font-size: 12px; color: var(--text-muted); }
.team-card-access {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.team-card-access.Admin { background: rgba(109,73,242,.12); color: var(--brand-500); }
.team-card-access.Manager { background: rgba(16,185,129,.1); color: #059669; }
.team-stat { display: flex; gap: 16px; }
.team-stat-item { display: flex; flex-direction: column; }
.team-stat-num { font-size: 20px; font-weight: 800; }
.team-stat-label { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-wrap { padding: 16px 20px; max-width: 680px; }
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-section-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 13px; font-weight: 500; }
.settings-row-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   ARCHIVED PAGE
   ============================================================ */
.archived-wrap { padding: 16px 20px; }
.archived-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.archived-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.archived-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text);
}
.archived-table tr:hover td { background: var(--surface-hover); }
.archived-table tr:last-child td { border-bottom: none; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  overflow: hidden;
}

/* ── LEFT FORM COLUMN ── */
.login-form-col {
  flex: 0 0 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 44px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
@media (max-width: 768px) {
  .login-form-col { flex: 1; border-right: none; }
  .login-hero-col { display: none; }
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-brand-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.login-h1 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}
.login-sub {
  font-size: 13.5px;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.5;
}

/* form group / label / input */
.fg { display: flex; flex-direction: column; gap: 5px; }
.fl { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.fi {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}
.fi:focus { border-color: var(--brand-400); background: var(--surface); }
.fi::placeholder { color: var(--text-muted); }

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.login-row a { color: var(--brand-500); font-weight: 500; }
.login-row a:hover { text-decoration: underline; }

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

.login-team { display: flex; flex-direction: column; gap: 8px; }
.login-team-title { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .02em; }
.login-team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.login-team-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  overflow: hidden;
  white-space: nowrap;
}
.login-team-btn:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-600); }
[data-theme="dark"] .login-team-btn:hover { background: rgba(109,73,242,.08); color: var(--brand-300); }

/* ── RIGHT HERO COLUMN ── */
.login-hero-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: linear-gradient(135deg, var(--brand-50) 0%, #EDE9FE 100%);
  overflow: hidden;
}
[data-theme="dark"] .login-hero-col {
  background: linear-gradient(135deg, rgba(109,73,242,.14) 0%, rgba(80,50,180,.06) 100%);
}

.login-hero {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.login-hero h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.login-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.login-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.lp-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-300), var(--brand-500));
  opacity: .55;
}
.lp-bar.short {
  flex: none;
  width: 55%;
}

/* Legacy single-card login (keep for fallback) */
.login-card {
  width: 380px;
  max-width: 95vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 44px; height: 44px;
  background: var(--brand-500);
  border-radius: var(--radius);
  color: white;
  font-weight: 800;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.login-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-users { display: flex; flex-direction: column; gap: 8px; }
.login-user-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  width: 100%;
  transition: all var(--transition);
  font-family: inherit;
}
.login-user-btn:hover { border-color: var(--brand-400); background: var(--brand-50); }
[data-theme="dark"] .login-user-btn:hover { background: rgba(109,73,242,.08); }
.login-user-info { text-align: left; }
.login-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.login-user-role { font-size: 11px; color: var(--text-muted); }
.login-user-access {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ============================================================
   POPOVER / DROPDOWN
   ============================================================ */
.popover {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  min-width: 160px;
  padding: 4px;
}
.popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
}
.popover-item:hover { background: var(--surface-hover); color: var(--text); }
.popover-item.danger { color: #DC2626; }
.popover-item.danger:hover { background: rgba(220,38,38,.08); }
.popover-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── USER MENU ── */
.user-menu {
  position: absolute;
  bottom: 60px;
  left: 8px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  padding: 4px;
}
.user-menu-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-menu-name { font-size: 13px; font-weight: 700; }
.user-menu-email { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: white;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  white-space: nowrap;
  animation: toast-in .2s ease, toast-out .2s ease 1.8s forwards;
}
[data-theme="dark"] .toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
@keyframes toast-in { from { opacity:0; transform: translateX(-50%) translateY(8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { to { opacity:0; transform: translateX(-50%) translateY(8px); } }

/* ── SYNC STATUS BADGE ── */
.sync-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.sync-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-400);
}
.sync-dot.syncing { background: var(--brand-500); animation: pulse 1s infinite; }
.sync-dot.synced  { background: #16A34A; }
.sync-dot.error   { background: #DC2626; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── EMPTY STATES ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-muted);
  text-align: center;
}
.empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .5; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-desc { font-size: 13px; }

/* ── LOADING SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ── ADD TASK BUTTON ── */
.add-task-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  width: 100%;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition);
  border: 1px dashed transparent;
}
.add-task-inline:hover { background: var(--surface-hover); color: var(--brand-500); border-color: var(--brand-200); }

/* ── MISC UTILITIES ── */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 10px; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }

/* ============================================================
   KANBAN (actual class names used in kanban.jsx)
   ============================================================ */
.kanban {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  overflow-x: auto;
  min-height: calc(100vh - var(--header-h) - 52px);
  align-items: flex-start;
}
.kan-col {
  flex: 0 0 260px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-h) - 80px);
  transition: border-color var(--transition), background var(--transition);
}
.kan-col.drop-active {
  border-color: var(--brand-400);
  background: var(--brand-50);
}
[data-theme="dark"] .kan-col.drop-active { background: rgba(109,73,242,.08); }
.kan-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kan-col-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  color: var(--text);
}
.kan-col-count {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.kan-col-add {
  width: 24px; height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  border: none; background: none; cursor: pointer;
  flex-shrink: 0;
}
.kan-col-add:hover { background: var(--border); color: var(--text); }
.kan-col-body {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.kan-col-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 8px;
}

/* ── TASK CARD (used as .card in kanban.jsx) ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.card.dragging { opacity: .45; border-style: dashed; transform: none; }
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.card-id { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.card-name { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--text); }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%;
  background: var(--brand-500);
  border-radius: 2px;
  transition: width .3s;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.card-foot-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
}
.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   LIST VIEW (actual class names used in list-view.jsx)
   ============================================================ */
.list-group-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.list-group-count {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.list-group-line { flex: 1; height: 1px; background: var(--border-subtle); }
.list-table { display: flex; flex-direction: column; }
.list-row {
  display: grid;
  grid-template-columns: 24px 1fr 110px 88px 100px 80px 100px 30px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  border: 1px solid transparent;
}
.list-row:hover { background: var(--surface-hover); border-color: var(--border); }
.list-row.head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: default;
  padding: 5px 10px;
}
.list-row.head:hover { background: transparent; border-color: transparent; }
.list-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  color: transparent;
  flex-shrink: 0;
}
.list-check:hover { border-color: var(--brand-400); }
.list-check.done { background: var(--brand-500); border-color: var(--brand-500); color: white; }
.list-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.list-name-text {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.list-cell-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.list-cell-muted { font-size: 12px; color: var(--text-muted); }
.empty-state-icon {
  margin-bottom: 12px;
  opacity: .4;
  display: flex;
  justify-content: center;
}

/* ============================================================
   DASHBOARD (actual class names used in dashboard.jsx)
   ============================================================ */
.dash {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dash-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.dash-stat-num { font-size: 30px; font-weight: 800; line-height: 1; }
.dash-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.dash-stat-delta {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.dash-stat-delta.up { color: #16A34A; }
.dash-stat-delta.down { color: #DC2626; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.dash-card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.dash-card-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.donut-legend-row .name { flex: 1; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend-row .val { font-weight: 700; color: var(--text); min-width: 20px; text-align: right; }

.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.activity-text { flex: 1; font-size: 13px; line-height: 1.5; color: var(--text); }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; padding-top: 2px; }
