/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Design Tokens ─── */
:root {
  --white:          #ffffff;
  --off-white:      #f5f5f3;
  --surface:        #efefed;
  --surface-2:      #e8e8e5;
  --border:         #e0e0db;
  --border-btn:     #cecec8;
  --text-primary:   #0d0d0c;
  --text-secondary: #5c5c57;
  --text-muted:     #9c9c96;
  --green:          #16a34a;
  --green-light:    #22c55e;
  --green-dim:      #dcfce7;
  --amber:          #d97706;
  --amber-dim:      #fef3c7;
  --red:            #dc2626;
  --red-dim:        #fee2e2;
  --shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.07);
  --shadow-xl:      0 32px 80px rgba(0,0,0,0.16), 0 12px 32px rgba(0,0,0,0.1);
  --radius-card:    28px;
  --radius-btn:     999px;
  --radius-task:    18px;
  --font-display:   'Bricolage Grotesque', sans-serif;
  --font-body:      'DM Sans', sans-serif;
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:       cubic-bezier(0, 0, 0.2, 1);
}

/* ─── Base ─── */
html { height: 100%; scroll-behavior: smooth; }
html, body {
  min-height: 100%;
  background: var(--off-white);
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Subtle grain overlay ─── */
.app::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ─── Keyframes ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes navRise {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes taskSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}


/* ═══════════════════════════════════════════════════════════
   SHARED: APP SHELL
   ═══════════════════════════════════════════════════════════ */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ═══════════════════════════════════════════════════════════
   SHARED: TOP NAV
   ═══════════════════════════════════════════════════════════ */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(245,245,243,0.82);
  backdrop-filter: blur(28px) saturate(1.9);
  -webkit-backdrop-filter: blur(28px) saturate(1.9);
  border-bottom: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 500;
  opacity: 0;
  animation: fadeDown 0.35s var(--ease-smooth) 0.05s forwards;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.nav-brand-logo { height: 26px; width: auto; object-fit: contain; }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.4px;
}

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Stats chips in nav */
.dash-stats {
  display: flex; gap: 6px;
  opacity: 0;
  animation: fadeUp 0.3s var(--ease-smooth) 0.5s forwards;
}
.stat-chip {
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.stat-chip.done-chip { color: var(--green); background: var(--green-dim); border-color: rgba(22,163,74,0.2); }

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--white);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
  flex-shrink: 0;
  letter-spacing: 0;
}
.nav-avatar:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.14); }


/* ═══════════════════════════════════════════════════════════
   SHARED: FLOATING NAV
   ═══════════════════════════════════════════════════════════ */
.float-nav {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 600;
  opacity: 0;
  animation: navRise 0.4s var(--ease-spring) 0.25s forwards;
}
.float-nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(32px) saturate(2) brightness(1.06);
  -webkit-backdrop-filter: blur(32px) saturate(2) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.98);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    0 2px 8px rgba(0,0,0,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.03);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 20px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
  transition: background 0.2s var(--ease-smooth), transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover  { background: rgba(255,255,255,0.6); }
.nav-item:active { transform: scale(0.96); }
.nav-item.active {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,1);
}
.nav-item-icon {
  width: 20px; height: 20px;
  color: var(--text-muted);
  transition: color 0.18s;
  flex-shrink: 0;
}
.nav-item.active .nav-item-icon { color: var(--text-primary); }
.nav-item-label {
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.18s;
  white-space: nowrap;
}
.nav-item.active .nav-item-label { color: var(--text-primary); font-weight: 600; }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--green);
}


/* ═══════════════════════════════════════════════════════════
   SHARED: MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  padding: 44px 24px 120px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.1s forwards;
}
.page-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 6px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 13vw, 76px);
  font-weight: 800; line-height: 0.94;
  letter-spacing: -3.5px; color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Filter row
   ═══════════════════════════════════════════════════════════ */
.filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.15s forwards;
}
.filter-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s var(--ease-smooth);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}
.filter-btn:hover { border-color: var(--border-btn); background: var(--surface); }
.filter-btn.active {
  background: var(--text-primary); color: var(--white);
  border-color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}
.filter-btn.priority-filter.active { background: var(--text-primary); }
.filter-divider { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Search bar
   ═══════════════════════════════════════════════════════════ */
.search-wrap {
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.18s forwards;
  margin-bottom: 24px;
}
.search-bar { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute; left: 16px;
  color: var(--text-muted); pointer-events: none;
  transition: color 0.18s; flex-shrink: 0;
}
.search-input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 400;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12), var(--shadow-sm);
}
.search-bar:focus-within .search-icon { color: var(--green); }
.search-kbd { position: absolute; right: 14px; display: flex; align-items: center; gap: 3px; pointer-events: none; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; font-size: 11px; font-weight: 500;
  color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Loading skeleton
   ═══════════════════════════════════════════════════════════ */
.task-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-item {
  height: 58px;
  border-radius: var(--radius-task);
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Task list
   ═══════════════════════════════════════════════════════════ */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Task items */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-task);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s var(--ease-smooth), opacity 0.2s;
  animation: taskSlideIn 0.25s var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}
.task-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: transparent;
  transition: background 0.18s;
}
.task-item.priority-high::before   { background: var(--red); }
.task-item.priority-medium::before { background: var(--amber); }
.task-item.priority-low::before    { background: var(--green); }

.task-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-btn);
  transform: translateY(-1px);
}
.task-item.done {
  opacity: 0.52;
  transform: none;
}
.task-item.done .task-text { text-decoration: line-through; color: var(--text-muted); }
.task-item.deleting {
  opacity: 0; transform: translateX(24px) scale(0.97);
  transition: opacity 0.18s, transform 0.18s;
}

.task-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-btn);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease-spring);
  color: white;
}
.task-check:hover:not(.checked) { border-color: var(--green-light); transform: scale(1.1); }
.task-check.checked {
  background: var(--green); border-color: var(--green);
  animation: popIn 0.22s var(--ease-spring);
}

.task-text {
  flex: 1;
  font-size: 14.5px; font-weight: 400;
  color: var(--text-primary); line-height: 1.45;
  word-break: break-word;
}

.task-priority {
  font-size: 10.5px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.task-priority.low    { background: var(--green-dim); color: var(--green); }
.task-priority.medium { background: var(--amber-dim); color: var(--amber); }
.task-priority.high   { background: var(--red-dim);   color: var(--red); }

.task-delete {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--red); background: var(--red-dim); }

.task-edit {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.task-item:hover .task-edit { opacity: 1; }
.task-edit:hover { color: var(--green); background: var(--green-dim); }

/* Apply priority border via JS-set class */
.task-item[data-priority="high"]::before   { background: var(--red); }
.task-item[data-priority="medium"]::before { background: var(--amber); }
.task-item[data-priority="low"]::before    { background: var(--green); }

/* Shake animation for empty input */
.task-panel-input.shake { animation: shake 0.35s var(--ease-smooth); }


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Project groups
   ═══════════════════════════════════════════════════════════ */
.project-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  transition: box-shadow 0.18s;
}
.project-group:hover { box-shadow: var(--shadow-md); }

.project-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.project-group.open .project-group-header { border-bottom-color: var(--border); }
.project-group-header:hover { background: var(--surface-2); }

.project-group-left {
  display: flex; align-items: center; gap: 8px;
}
.project-chevron {
  color: var(--text-muted);
  display: flex; align-items: center;
  transition: transform 0.22s var(--ease-spring);
  flex-shrink: 0;
}
.project-group.open .project-chevron { transform: rotate(90deg); }
.project-folder-icon { color: var(--text-secondary); display: flex; flex-shrink: 0; }
.project-group-name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.2px;
}
.project-group-badge {
  font-size: 11px; font-weight: 600;
  background: var(--border);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 999px;
}
.project-group-right { display: flex; align-items: center; gap: 8px; }
.project-progress {
  width: 60px; height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.project-progress-bar {
  height: 100%; background: var(--green);
  border-radius: 999px;
  transition: width 0.4s var(--ease-out);
}
.project-pct {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted); min-width: 28px;
  text-align: right;
}
.project-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 5px;
  border-radius: 7px;
  display: flex; align-items: center;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.project-group-header:hover .project-delete-btn { opacity: 1; }
.project-delete-btn:hover { color: var(--red); background: var(--red-dim); }

.project-edit-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 5px;
  border-radius: 7px;
  display: flex; align-items: center;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.project-group-header:hover .project-edit-btn { opacity: 1; }
.project-edit-btn:hover { color: var(--green); background: var(--green-dim); }

.project-group-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
  display: none;
}
.project-group.open .project-group-body { display: flex; }

.project-empty-msg {
  font-size: 13px; color: var(--text-muted);
  padding: 6px 4px; font-style: italic;
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: Empty state
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  margin-top: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: fadeUp 0.35s var(--ease-smooth) 0.2s both;
}
.empty-illustration {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.empty-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  color: var(--text-primary); letter-spacing: -0.4px;
}
.empty-sub {
  font-size: 14px; color: var(--text-muted);
  text-align: center; max-width: 220px; line-height: 1.6;
}
.empty-sub strong { color: var(--text-secondary); }


/* ═══════════════════════════════════════════════════════════
   DASHBOARD: FAB
   ═══════════════════════════════════════════════════════════ */
.fab-add {
  position: fixed;
  bottom: 108px;
  right: 24px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, background 0.15s;
  z-index: 400;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.3s forwards;
}
.fab-add:hover { background: #1c1c1a; transform: scale(1.08) rotate(90deg); box-shadow: 0 10px 32px rgba(0,0,0,0.28); }
.fab-add:active { transform: scale(0.94); }


/* ═══════════════════════════════════════════════════════════
   CHOICE PANEL
   ═══════════════════════════════════════════════════════════ */
.choice-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,9,0.4);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 700;
  opacity: 0;
  transition: opacity 0.24s var(--ease-smooth);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.choice-backdrop.open { opacity: 1; }

.choice-panel {
  width: 100%; max-width: 520px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(40px) saturate(2);
  -webkit-backdrop-filter: blur(40px) saturate(2);
  border: 1px solid rgba(255,255,255,0.98);
  border-radius: 28px 28px 0 0;
  padding: 0 20px 20px;
  box-shadow: 0 -12px 48px rgba(0,0,0,0.14), 0 -2px 12px rgba(0,0,0,0.06);
  transform: translateY(100%);
  transition: transform 0.32s var(--ease-spring);
}
.choice-backdrop.open .choice-panel { transform: translateY(0); }

.choice-handle {
  width: 40px; height: 5px;
  background: rgba(0,0,0,0.1);
  border-radius: 99px;
  margin: 14px auto 20px;
}
.choice-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.4px; color: var(--text-primary);
  margin-bottom: 16px;
}
.choice-options { display: flex; flex-direction: column; gap: 10px; }

.choice-option {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px solid;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: transform 0.18s var(--ease-spring), box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.choice-option:active { transform: scale(0.98); }
.choice-option.primary {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}
.choice-option.primary:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.22); }
.choice-option.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.choice-option.secondary:hover { border-color: var(--border-btn); background: var(--surface-2); }

.choice-option-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.choice-option-icon.secondary-icon { background: var(--border); color: var(--text-secondary); }

.choice-option-text {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.choice-option-title { font-size: 15px; font-weight: 600; }
.choice-option-sub { font-size: 12.5px; opacity: 0.7; }
.choice-cancel {
  width: 100%; margin-top: 14px;
  padding: 12px;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  transition: color 0.15s;
}
.choice-cancel:hover { color: var(--text-secondary); }


/* ═══════════════════════════════════════════════════════════
   TASK CREATION PANEL
   ═══════════════════════════════════════════════════════════ */
.task-panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,9,0.44);
  backdrop-filter: blur(12px) saturate(1.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  z-index: 800;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity 0.26s var(--ease-smooth);
}
.task-panel-backdrop.open { opacity: 1; pointer-events: all; }

.task-panel {
  width: 100%;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(40px) saturate(2.2) brightness(1.03);
  -webkit-backdrop-filter: blur(40px) saturate(2.2) brightness(1.03);
  border: 1px solid rgba(255,255,255,0.98);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 48px rgba(0,0,0,0.14), 0 -2px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-spring);
  max-height: 90dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}
.task-panel-backdrop.open .task-panel { transform: translateY(0); }

.task-panel-handle {
  width: 40px; height: 5px;
  background: rgba(0,0,0,0.1);
  border-radius: 99px;
  margin: 14px auto 0;
  cursor: grab;
  flex-shrink: 0;
}
.task-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 6px;
}
.task-panel-title {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 800;
  letter-spacing: -0.5px; color: var(--text-primary);
}
.task-panel-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s, transform 0.2s var(--ease-spring), color 0.15s;
}
.task-panel-close:hover { background: var(--surface-2); color: var(--text-primary); transform: rotate(90deg); }

.task-panel-body { padding: 14px 22px 6px; }

.task-panel-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}

.task-panel-input {
  width: 100%; padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 16px; color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.task-panel-input::placeholder { color: var(--text-muted); }
.task-panel-input:focus {
  border-color: var(--green-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.task-panel-priority-row { display: flex; gap: 8px; }
.priority-pill {
  flex: 1; padding: 11px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.18s var(--ease-smooth);
}
.priority-pill:hover { border-color: var(--border-btn); transform: translateY(-1px); }
.priority-pill:active { transform: scale(0.96); }
.priority-pill.selected {
  border-color: var(--green-light);
  background: var(--green-dim); color: var(--green);
  box-shadow: 0 0 0 2.5px rgba(34,197,94,0.12);
}
.priority-pill.high.selected   { border-color: #f87171; background: var(--red-dim);   color: var(--red);   box-shadow: 0 0 0 2.5px rgba(220,38,38,0.1); }
.priority-pill.medium.selected { border-color: #fbbf24; background: var(--amber-dim); color: var(--amber); box-shadow: 0 0 0 2.5px rgba(217,119,6,0.1); }
.priority-pill.low.selected    { border-color: #4ade80; background: var(--green-dim); color: var(--green); box-shadow: 0 0 0 2.5px rgba(34,197,94,0.12); }

.task-panel-select {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 14.5px; color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239c9c96' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.task-panel-select:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }

.task-panel-footer { padding: 18px 22px 24px; }
.task-panel-submit {
  width: 100%; padding: 15px;
  background: var(--text-primary); color: var(--white);
  border: none; border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: 15.5px; font-weight: 600;
  cursor: pointer; letter-spacing: -0.1px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.15s, transform 0.2s var(--ease-spring), box-shadow 0.2s;
}
.task-panel-submit:hover  { background: #1c1c1a; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.24); }
.task-panel-submit:active { transform: scale(0.98); }
.task-panel-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }


/* ═══════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════ */
.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.18s forwards;
}
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--white) 100%);
}
.profile-avatar-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.profile-name {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.3px;
}
.profile-handle { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

.profile-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.profile-row-value { font-size: 14.5px; color: var(--text-primary); }

.profile-signout-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.26s forwards;
}
.profile-signout-btn {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 28px;
  background: none; border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  color: var(--red);
  transition: background 0.15s;
  text-align: left;
}
.profile-signout-btn:hover { background: var(--red-dim); }


/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════ */
.settings-search-wrap {
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.18s forwards;
  margin-bottom: 28px;
}
.settings-group {
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.35s var(--ease-smooth) 0.24s forwards;
}
.settings-group + .settings-group { animation-delay: 0.28s; }
.settings-group-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 4px; margin-bottom: 8px;
}
.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--off-white); }
.settings-row-left { display: flex; align-items: center; gap: 14px; }
.settings-row-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); flex-shrink: 0;
}
.settings-row-title { font-size: 14.5px; font-weight: 500; color: var(--text-primary); }
.settings-row-sub   { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.settings-row-right { color: var(--text-muted); flex-shrink: 0; }
.settings-row-value { font-size: 13px; color: var(--text-muted); }
.settings-no-results {
  display: none; text-align: center;
  padding: 48px 24px;
  color: var(--text-muted); font-size: 14px;
}
.settings-no-results.visible { display: block; }


/* ═══════════════════════════════════════════════════════════
   SETTINGS SHEET MODAL (shared)
   ═══════════════════════════════════════════════════════════ */
.smodal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,9,0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s var(--ease-smooth);
}
.smodal-backdrop.open { opacity: 1; pointer-events: all; }

.smodal {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(36px) saturate(2) brightness(1.04);
  -webkit-backdrop-filter: blur(36px) saturate(2) brightness(1.04);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 6px 18px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1);
  width: 100%; max-width: 480px;
  padding: 26px 26px 22px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s var(--ease-spring), opacity 0.22s;
  opacity: 0;
}
.smodal-backdrop.open .smodal { transform: translateY(0); opacity: 1; }

.smodal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 0 auto 20px;
}
.smodal-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.4px;
  margin-bottom: 18px;
}
.smodal-label {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 7px;
}
.smodal-input {
  width: 100%; padding: 12px 14px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body); font-size: 15px;
  color: var(--text-primary); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  margin-bottom: 16px;
}
.smodal-input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.smodal-input[disabled] { opacity: 0.5; cursor: not-allowed; background: var(--surface); }
.smodal-hint { font-size: 12px; color: var(--text-muted); margin-top: -10px; margin-bottom: 16px; line-height: 1.5; }
.smodal-row { display: flex; gap: 10px; margin-top: 4px; }
.smodal-btn {
  flex: 1; padding: 13px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.smodal-btn:active { transform: scale(0.97); }
.smodal-btn.primary { background: var(--text-primary); color: var(--white); }
.smodal-btn.primary:hover { background: #1c1c1a; }
.smodal-btn.secondary { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.smodal-btn.secondary:hover { background: var(--surface-2); }
.smodal-btn.danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,38,38,0.2); }
.smodal-btn.danger:hover { background: #fecaca; }

.smodal-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.smodal-toggle-row:last-child { border-bottom: none; }
.smodal-toggle-label { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.smodal-toggle-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* iOS toggle */
.toggle-switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-btn); border-radius: 999px;
  cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; left: 3px; top: 3px;
  transition: transform 0.22s var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Theme options */
.theme-options { display: flex; gap: 8px; margin-bottom: 20px; }
.theme-opt {
  flex: 1; padding: 12px 8px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--off-white);
  cursor: pointer; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: border-color 0.15s, background 0.15s;
}
.theme-opt.selected { border-color: var(--green); background: var(--green-dim); color: var(--green); }

/* Feedback */
.smodal-feedback { display: none; font-size: 13px; font-weight: 500; padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; }
.smodal-feedback.success { display: block; background: var(--green-dim); color: var(--green); border: 1px solid rgba(22,163,74,0.2); }
.smodal-feedback.error   { display: block; background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(220,38,38,0.2); }

@media (min-width: 768px) {
  .smodal-backdrop { align-items: center; padding: 24px; }
  .smodal { border-radius: 24px; }
}


/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE: MOBILE
   ═══════════════════════════════════════════════════════════ */
.mobile-wrap {
  display: flex; flex-direction: column;
  min-height: 100svh; min-height: 100vh;
  background: var(--off-white);
  position: relative;
}
.mobile-wrap::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.022'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}
.mobile-inner {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column;
  padding: 52px 28px 44px;
  max-width: 430px; width: 100%; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  opacity: 0; transform: translateY(-6px);
  animation: fadeUp 0.35s var(--ease-smooth) 0.05s forwards;
}
.brand-logo { height: 32px; width: auto; object-fit: contain; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }

.greeting-area {
  flex: 1; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; padding: 0 0 24px;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.35s var(--ease-smooth) 0.12s forwards;
}
.greeting-eyebrow {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--green); margin-bottom: 12px;
}
.greeting-heading {
  font-family: var(--font-display);
  font-size: clamp(38px, 10vw, 52px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -2px; color: var(--text-primary);
}
.greeting-sub { margin-top: 14px; font-size: 15px; color: var(--text-secondary); line-height: 1.58; max-width: 280px; }

.cta-area {
  display: flex; flex-direction: column; gap: 16px;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.35s var(--ease-smooth) 0.2s forwards;
}
.btn-justchat {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 16px 24px;
  background: var(--white);
  border: 1.5px solid var(--border-btn);
  border-radius: var(--radius-btn);
  cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s, border-color 0.15s;
  position: relative; overflow: hidden;
}
.btn-justchat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #b8b8b2; }
.btn-justchat:active { transform: scale(0.985); }
.btn-justchat-logo { height: 24px; width: auto; object-fit: contain; flex-shrink: 0; }
.btn-justchat-text { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }

.no-account { text-align: center; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.no-account a { color: var(--text-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.15s; }
.no-account a:hover { color: var(--green); }


/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE: DESKTOP (≥ 768px)
   ═══════════════════════════════════════════════════════════ */
.desktop-wrap { display: none; }

@media (min-width: 768px) {
  body { background: #e8e8e5; }
  .mobile-wrap { display: none; }
  .desktop-wrap {
    display: flex; min-height: 100vh;
    align-items: center; justify-content: center; padding: 40px 24px;
  }
  .desktop-card {
    display: grid; grid-template-columns: 1fr 1fr;
    width: 100%; max-width: 900px; min-height: 560px;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-xl);
    overflow: hidden; border: 1px solid var(--border);
    opacity: 0; animation: cardReveal 0.4s var(--ease-smooth) 0.05s forwards;
  }
  .panel-left {
    background: var(--text-primary);
    position: relative; display: flex; flex-direction: column;
    padding: 48px 44px; overflow: hidden;
  }
  .panel-left::before {
    content: ''; position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 20% 80%, rgba(22,163,74,0.3) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 10%, rgba(34,197,94,0.14) 0%, transparent 55%);
  }
  .panel-left::after {
    content: ''; position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
  }
  .panel-left-inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
  .desktop-brand { display: flex; align-items: center; gap: 10px; }
  .desktop-brand-logo { height: 30px; width: auto; object-fit: contain; filter: brightness(0) invert(1); flex-shrink: 0; }
  .desktop-brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
  .panel-left-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 8px; }
  .panel-left-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-light); margin-bottom: 14px; }
  .panel-left-headline { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; color: #fff; margin-bottom: 18px; }
  .panel-left-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; max-width: 260px; }
  .feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
  .pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.65); }
  .pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-light); flex-shrink: 0; }

  .panel-right {
    position: relative; display: flex; flex-direction: column;
    background: var(--white); overflow: hidden;
  }
  .panel-right::before {
    content: ''; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
  }
  .panel-right-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 44px; }
  .desktop-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
  .desktop-greeting { font-family: var(--font-display); font-size: clamp(28px, 3.5vw, 38px); font-weight: 800; letter-spacing: -1.2px; color: var(--text-primary); margin-bottom: 10px; }
  .desktop-sub { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 32px; max-width: 280px; }
  .desktop-btn-justchat {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 15px 24px;
    background: var(--white); border: 1.5px solid var(--border-btn);
    border-radius: var(--radius-btn); cursor: pointer; text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s var(--ease-spring), box-shadow 0.22s, border-color 0.15s;
    position: relative; overflow: hidden; margin-bottom: 18px;
  }
  .desktop-btn-justchat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #b8b8b2; }
  .desktop-btn-logo { height: 24px; width: auto; object-fit: contain; flex-shrink: 0; }
  .desktop-btn-text { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text-primary); }
  .desktop-no-account { font-size: 13px; color: var(--text-muted); text-align: center; }
  .desktop-no-account a { color: var(--text-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s; }
  .desktop-no-account a:hover { color: var(--green); }
  .desktop-divider { height: 1px; background: var(--border); margin: 24px 0; }
  .desktop-terms { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.6; }
  .desktop-terms a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; }
  .desktop-terms a:hover { color: var(--green); }
}


/* ═══════════════════════════════════════════════════════════
   LOGIN MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,9,0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.26s var(--ease-smooth);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(32px) saturate(2);
  -webkit-backdrop-filter: blur(32px) saturate(2);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 400px;
  padding: 36px 32px 32px;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.34s var(--ease-spring), opacity 0.26s;
  opacity: 0;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 17px; line-height: 1;
  transition: background 0.15s, transform 0.18s;
}
.modal-close:hover { background: var(--surface-2); transform: rotate(90deg); }
.modal-header { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.modal-logo   { height: 38px; width: auto; object-fit: contain; }
.modal-title  { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.4px; text-align: center; }
.modal-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-top: -6px; line-height: 1.5; }
.modal-field   { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.modal-label   { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.02em; }
.modal-input   { width: 100%; padding: 12px 14px; background: var(--off-white); border: 1.5px solid var(--border); border-radius: 12px; font-family: var(--font-body); font-size: 15px; color: var(--text-primary); outline: none; transition: border-color 0.18s, box-shadow 0.18s; }
.modal-input::placeholder { color: var(--text-muted); }
.modal-input:focus { border-color: var(--green-light); background: var(--white); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.modal-forgot { display: flex; justify-content: flex-end; margin-top: -6px; margin-bottom: 20px; }
.modal-forgot a { font-size: 12px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; }
.modal-forgot a:hover { color: var(--green); }
.modal-submit {
  width: 100%; padding: 14px;
  background: var(--text-primary); color: var(--white);
  border: none; border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.2s var(--ease-spring), box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  position: relative; overflow: hidden;
}
.modal-submit:hover { background: #1c1c1a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.modal-submit:active { transform: scale(0.98); }
.modal-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-muted); font-size: 12px; }
.modal-divider::before, .modal-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.modal-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; }
.modal-footer-text { font-size: 12px; color: var(--text-muted); }
.modal-footer-logo { height: 17px; width: auto; object-fit: contain; opacity: 0.5; }
.input-wrap { position: relative; }
.input-wrap .modal-input { padding-right: 42px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 2px;
  display: flex; align-items: center; transition: color 0.15s;
}
.toggle-pw:hover { color: var(--text-secondary); }

/* Ripple */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(34,197,94,0.16);
  transform: scale(0);
  animation: rippleAnim 0.5s linear forwards;
  pointer-events: none;
}

/* ─── Responsive fine-tuning ─── */
@media (max-width: 480px) {
  .main { padding: 36px 18px 110px; }
  .topnav { padding: 14px 18px; }
  .dash-stats { display: none; }
  .filter-row { gap: 5px; }
  .filter-btn { padding: 6px 11px; font-size: 12.5px; }
}


/* ═══════════════════════════════════════════════════════════
   CLEAR COMPLETED BUTTON
   ═══════════════════════════════════════════════════════════ */
.clear-done-btn {
  display: none;
  align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.clear-done-btn.visible { display: flex; }
.clear-done-btn:hover { color: var(--red); border-color: rgba(220,38,38,0.3); background: var(--red-dim); }


/* ═══════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════ */
html.dark {
  --white:          #1a1a1c;
  --off-white:      #101012;
  --surface:        #1d1d20;
  --surface-2:      #26262a;
  --border:         #2c2c30;
  --border-btn:     #3a3a3f;
  --text-primary:   #f2f2f0;
  --text-secondary: #b2b2ae;
  --text-muted:     #7a7a7d;
  --green-dim:      rgba(34,197,94,0.16);
  --amber-dim:      rgba(217,119,6,0.18);
  --red-dim:        rgba(220,38,38,0.18);
}

html.dark .app::after { opacity: 0.5; }

html.dark .topnav {
  background: rgba(16,16,18,0.78);
  border-bottom-color: rgba(255,255,255,0.06);
}

html.dark .float-nav-inner {
  background: rgba(28,28,31,0.78);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2), inset 0 1.5px 0 rgba(255,255,255,0.04);
}
html.dark .nav-item:hover { background: rgba(255,255,255,0.06); }
html.dark .nav-item.active {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

html.dark .choice-panel,
html.dark .task-panel {
  background: rgba(22,22,25,0.97);
  border-color: rgba(255,255,255,0.07);
}
html.dark .choice-handle,
html.dark .task-panel-handle { background: rgba(255,255,255,0.14); }
html.dark .choice-option-icon { background: rgba(255,255,255,0.08); }

html.dark .smodal {
  background: rgba(22,22,25,0.97);
  border-color: rgba(255,255,255,0.07);
}
html.dark .smodal-handle { background: rgba(255,255,255,0.14); }

html.dark .modal {
  background: rgba(22,22,25,0.97);
  border-color: rgba(255,255,255,0.07);
}

html.dark .fab-add:hover { background: #333336; box-shadow: 0 10px 32px rgba(0,0,0,0.5); }
html.dark .task-panel-submit:hover,
html.dark .modal-submit:hover,
html.dark .smodal-btn.primary:hover { background: #333336; }

html.dark .smodal-btn.danger { background: rgba(220,38,38,0.16); }
html.dark .smodal-btn.danger:hover { background: rgba(220,38,38,0.26); }

html.dark ::placeholder { color: var(--text-muted); opacity: 1; }

/* Theme toggle icon swap */
html.dark .theme-toggle-icon-light { display: none; }
html:not(.dark) .theme-toggle-icon-dark { display: none; }
/* ═══════════════════════════════════════════════════════════
   COMPLAINTS / SUPPORT
   ═══════════════════════════════════════════════════════════ */
.complaint-list { display: flex; flex-direction: column; gap: 10px; }

.complaint-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-task);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s var(--ease-smooth);
  animation: taskSlideIn 0.25s var(--ease-out) forwards;
}
.complaint-item:hover { box-shadow: var(--shadow-md); border-color: var(--border-btn); }

.complaint-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.complaint-subject { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.2px; line-height: 1.3; }
.complaint-date { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

.complaint-badges { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge.cat-complaint { background: var(--red-dim);   color: var(--red); }
.badge.cat-question  { background: var(--surface-2); color: var(--text-secondary); }
.badge.cat-inquiry    { background: var(--amber-dim); color: var(--amber); }
.badge.cat-other      { background: var(--surface-2); color: var(--text-secondary); }
.badge.status-open     { background: var(--amber-dim); color: var(--amber); }
.badge.status-answered { background: var(--green-dim); color: var(--green); }
.badge.status-closed   { background: var(--surface-2); color: var(--text-muted); }

.complaint-message { font-size: 14px; color: var(--text-primary); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.complaint-reply {
  margin-top: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px;
}
.complaint-reply-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 5px; }
.complaint-reply-text { font-size: 14px; color: var(--text-primary); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.complaint-reply-date { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.complaint-meta-user { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.complaint-meta-user strong { color: var(--text-secondary); font-weight: 600; }

.complaint-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.complaint-reply-btn {
  padding: 8px 16px; border-radius: 999px;
  border: none; background: var(--text-primary); color: var(--white);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, transform 0.2s var(--ease-spring);
}
.complaint-reply-btn:hover { background: #1c1c1a; transform: translateY(-1px); }

.task-panel-textarea {
  width: 100%; padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 15px; color: var(--text-primary);
  outline: none; resize: vertical; min-height: 110px; line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.task-panel-textarea::placeholder { color: var(--text-muted); }
.task-panel-textarea:focus {
  border-color: var(--green-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.category-pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.category-pill {
  flex: 1; min-width: 74px; padding: 10px 6px;
  border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--white); cursor: pointer; text-align: center;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.18s var(--ease-smooth);
}
.category-pill:hover { border-color: var(--border-btn); transform: translateY(-1px); }
.category-pill.selected { border-color: var(--green-light); background: var(--green-dim); color: var(--green); box-shadow: 0 0 0 2.5px rgba(34,197,94,0.12); }

/* Admin-only tab pill on the nav avatar area */
.admin-link-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.admin-link-pill:hover { background: var(--surface-2); color: var(--text-primary); }

html.dark .complaint-reply { background: rgba(255,255,255,0.04); }
/* ══════════════════════════════════════════
   Notifications bell
   ══════════════════════════════════════════ */
.notif-wrap { position: relative; display: flex; align-items: center; }
.notif-bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); color: var(--text-secondary);
  cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.15s;
}
.notif-bell:hover { background: var(--surface); color: var(--text-primary); transform: translateY(-1px); }
.notif-dot {
  display: none;
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--white);
}
.notif-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; max-height: 380px; overflow-y: auto;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-md);
  z-index: 60;
  opacity: 0; transform: translateY(-6px) scale(0.98);
  transition: opacity 0.15s var(--ease-smooth), transform 0.15s var(--ease-smooth);
}
.notif-dropdown.open { display: block; opacity: 1; transform: translateY(0) scale(1); }
.notif-dropdown-header {
  padding: 14px 16px 10px; font-family: var(--font-display); font-weight: 700;
  font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border);
}
.notif-dropdown-list { display: flex; flex-direction: column; }
.notif-item {
  display: block; padding: 12px 16px; text-decoration: none;
  border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--off-white); }
.notif-item.unread { background: var(--green-dim); }
.notif-item.unread:hover { background: var(--green-dim); filter: brightness(0.97); }
.notif-item-text { font-size: 13px; color: var(--text-primary); line-height: 1.4; margin-bottom: 3px; }
.notif-item.unread .notif-item-text { font-weight: 600; }
.notif-item-date { font-size: 11px; color: var(--text-muted); }
.notif-dropdown-empty { display: none; padding: 28px 16px; text-align: center; font-size: 13px; color: var(--text-muted); }

html.dark .notif-bell { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: var(--text-secondary); }
html.dark .notif-bell:hover { background: rgba(255,255,255,0.1); }
html.dark .notif-dot { border-color: #161619; }
html.dark .notif-dropdown { background: rgba(22,22,25,0.98); border-color: rgba(255,255,255,0.08); }
html.dark .notif-dropdown-header { border-color: rgba(255,255,255,0.08); }
html.dark .notif-item { border-color: rgba(255,255,255,0.06); }
html.dark .notif-item:hover { background: rgba(255,255,255,0.04); }
html.dark .notif-item.unread { background: rgba(34,197,94,0.12); }

/* ══════════════════════════════════════════
   Due dates
   ══════════════════════════════════════════ */
.due-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--surface); color: var(--text-secondary);
  white-space: nowrap;
}
.due-badge.upcoming { background: var(--surface); color: var(--text-secondary); }
.due-badge.today    { background: var(--amber-dim); color: var(--amber); }
.due-badge.overdue  { background: var(--red-dim); color: var(--red); }
.task-item.done .due-badge { opacity: 0.5; }
html.dark .due-badge { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
html.dark .due-badge.today   { background: rgba(217,119,6,0.18); color: #fbbf24; }
html.dark .due-badge.overdue { background: rgba(220,38,38,0.18); color: #f87171; }

.task-due-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.task-due-input {
  flex: 1; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--white);
  font-family: var(--font-body); font-size: 14px; color: var(--text-primary);
}
.task-due-input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.task-due-clear {
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text-muted); font-size: 12.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.task-due-clear:hover { color: var(--red); border-color: var(--red); }
html.dark .task-due-input, html.dark .task-due-clear { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ══════════════════════════════════════════
   Analytics widget
   ══════════════════════════════════════════ */
.analytics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin-bottom: 22px;
  opacity: 0; animation: fadeUp 0.35s var(--ease-smooth) 0.12s forwards;
}
.analytics-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm);
}
.analytics-value {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.1; margin-bottom: 4px;
}
.analytics-value .analytics-unit { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.analytics-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.analytics-card.streak .analytics-value { color: var(--amber); }
.analytics-card.rate .analytics-value { color: var(--green); }
.analytics-bar { margin-top: 10px; height: 6px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.analytics-bar-fill { height: 100%; background: var(--green-light); border-radius: 4px; transition: width 0.4s var(--ease-smooth); }
html.dark .analytics-card { background: rgba(22,22,25,0.97); border-color: rgba(255,255,255,0.07); }
html.dark .analytics-bar { background: rgba(255,255,255,0.08); }

/* ══════════════════════════════════════════
   View toggle + Kanban board
   ══════════════════════════════════════════ */
.view-toggle {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; margin-bottom: 14px;
}
.view-toggle-btn {
  padding: 7px 16px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); transition: all 0.18s var(--ease-smooth);
}
.view-toggle-btn.active { background: var(--text-primary); color: var(--white); }
html.dark .view-toggle { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
html.dark .view-toggle-btn.active { background: var(--white); color: #0d0d0c; }

.task-board {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 760px) {
  .task-board { grid-template-columns: 1fr; }
}
.board-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 12px; display: flex; flex-direction: column; min-height: 120px;
}
.board-col-header {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  color: var(--text-primary); padding: 4px 6px 12px;
}
.board-col-count {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); padding: 1px 8px;
}
.board-col-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 60px; border-radius: 12px; transition: background 0.15s; }
.board-col-body.drag-over { background: rgba(34,197,94,0.1); outline: 2px dashed var(--green-light); outline-offset: -2px; }
.board-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 13px; cursor: grab;
  box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s;
}
.board-card:active { cursor: grabbing; }
.board-card.dragging { opacity: 0.4; }
.board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.board-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; line-height: 1.35; }
.board-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-col-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 14px 4px; }
html.dark .board-col { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); }
html.dark .board-col-count { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
html.dark .board-card { background: rgba(22,22,25,0.97); border-color: rgba(255,255,255,0.08); }
/* ═══════════════════════════════════════════════════════════
   NEW FEATURES: recurrence, checklist, comments, members, calendar
   ═══════════════════════════════════════════════════════════ */

/* ── Recurrence pills (mirrors .priority-pill) ── */
.recur-pill {
  flex: 1; padding: 11px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.18s var(--ease-smooth);
}
.recur-pill:hover { border-color: var(--border-btn); transform: translateY(-1px); }
.recur-pill:active { transform: scale(0.96); }
.recur-pill.selected {
  border-color: var(--green-light);
  background: var(--green-dim); color: var(--green);
  box-shadow: 0 0 0 2.5px rgba(34,197,94,0.12);
}
html.dark .recur-pill { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: var(--text-secondary); }

/* ── Badges: checklist progress / recurrence / assignee ── */
.checklist-badge, .recur-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px;
}
.assignee-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-dim); color: var(--green);
  font-size: 10.5px; font-weight: 700;
  flex-shrink: 0;
}

/* ── Checklist (subtasks) ── */
.checklist-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.checklist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.checklist-item.done .checklist-text { text-decoration: line-through; color: var(--text-muted); }
.checklist-check {
  width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--border-btn); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--white); transition: all 0.15s;
}
.checklist-check.checked { background: var(--green-light); border-color: var(--green-light); }
.checklist-text { flex: 1; font-size: 13.5px; color: var(--text-primary); }
.checklist-remove {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 3px; display: flex; align-items: center; flex-shrink: 0;
}
.checklist-remove:hover { color: var(--red); }
.checklist-add-row { display: flex; gap: 8px; }
.checklist-add-btn {
  padding: 0 16px; border-radius: 12px; border: none;
  background: var(--text-primary); color: var(--white);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.checklist-add-btn:hover { opacity: 0.9; }
html.dark .checklist-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
html.dark .checklist-check { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }

/* ── Comments / activity log ── */
.comments-list {
  max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 10px; padding-right: 2px;
}
.comment-item {
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.comment-author { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.comment-body { font-size: 13px; color: var(--text-secondary); line-height: 1.4; word-break: break-word; }
.comment-date { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
.comments-empty, .comments-loading { font-size: 12.5px; color: var(--text-muted); padding: 10px 2px; text-align: center; }
.comments-add-row { display: flex; gap: 8px; }
html.dark .comment-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }

/* ── Project members ── */
.members-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.member-email { flex: 1; font-size: 13px; color: var(--text-primary); }
.member-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 3px; display: flex; align-items: center; }
.member-remove:hover { color: var(--red); }
html.dark .member-row { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }

/* ── Calendar view ── */
.calendar-view { margin-bottom: 20px; }
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-nav-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-primary); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.calendar-nav-btn:hover { border-color: var(--border-btn); transform: translateY(-1px); }
.calendar-month-label { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.calendar-weekdays span { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-cell {
  min-height: 84px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--white);
  padding: 6px; display: flex; flex-direction: column; gap: 3px;
}
.calendar-cell.empty { border: none; background: transparent; }
.calendar-cell.today { border-color: var(--green-light); box-shadow: 0 0 0 1.5px rgba(34,197,94,0.15) inset; }
.calendar-daynum { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.calendar-cell.today .calendar-daynum { color: var(--green); }
.calendar-chip {
  font-size: 10.5px; font-weight: 600; color: var(--text-primary);
  background: var(--surface); border-radius: 6px; padding: 2px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; border-left: 3px solid var(--text-muted);
}
.calendar-chip.done { text-decoration: line-through; color: var(--text-muted); opacity: 0.7; }
.calendar-chip.high { border-left-color: var(--red); }
.calendar-chip.medium { border-left-color: var(--amber); }
.calendar-chip.low { border-left-color: var(--green); }
.calendar-more { font-size: 10px; color: var(--text-muted); padding: 1px 4px; }
html.dark .calendar-cell { background: rgba(22,22,25,0.97); border-color: rgba(255,255,255,0.08); }
html.dark .calendar-nav-btn { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: var(--white); }
html.dark .calendar-chip { background: rgba(255,255,255,0.06); }

@media (max-width: 640px) {
  .calendar-cell { min-height: 60px; padding: 4px; }
  .calendar-chip { font-size: 9.5px; }
  .calendar-month-label { font-size: 15px; }
}
/* ==========================================================================
   TASKFLOW CHANGELOG & TIMELINE ARCHITECTURE
   ========================================================================== */
.log-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
  margin-top: 28px;
  max-width: 800px;
}

/* Unified vertical track timeline line accent */
.log-timeline::before {
  content: '';
  position: absolute;
  left: 6px; 
  top: 10px; 
  bottom: 10px;
  width: 2px;
  background: var(--border);
  transition: background 0.2s ease;
}

.log-item {
  position: relative;
  margin-bottom: 36px;
  animation: taskSlideIn 0.35s var(--ease-out) forwards;
}
.log-item:last-child { 
  margin-bottom: 0; 
}

/* Timeline Dot Indicator */
.log-marker {
  position: absolute;
  left: -24px; 
  top: 8px;
  width: 10px; 
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--white);
  z-index: 2;
  transition: background 0.2s, border-color 0.2s, transform 0.25s var(--ease-spring);
}
.log-item:hover .log-marker {
  background: var(--green-light);
  transform: scale(1.3);
  border-color: var(--white);
}

/* Unified Container Box */
.log-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-task, 12px);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.log-content:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-btn);
}

.log-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.log-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.4;
}
.log-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Custom Tag Layouts */
.log-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.badge-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-pill.v-tag { background: var(--green-dim); color: var(--green); }
.badge-pill.core-tag { background: var(--amber-dim); color: var(--amber); }
.badge-pill.update-tag { background: var(--surface); color: var(--text-secondary); }
.badge-pill.security-tag { background: var(--red-dim); color: var(--red); }
.badge-pill.critical-tag { background: var(--surface-2); color: var(--text-primary); }

.log-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Dark Mode Fine-Tuning Integration */
html.dark .log-timeline::before { 
  background: var(--border); 
}
html.dark .log-marker { 
  border-color: var(--text-primary); 
}
html.dark .log-content { 
  background: rgba(25, 25, 28, 0.95); 
  border-color: rgba(255, 255, 255, 0.08); 
}

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

/* ── Marketing topnav variant ── */
.nav-links {
  display: flex; align-items: center; gap: 28px;
  margin-right: 8px;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-login {
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 9px 16px;
}
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.2s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-pill:active { transform: scale(0.96); }
.btn-pill-primary {
  background: var(--text-primary); color: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}
.btn-pill-primary:hover { box-shadow: 0 6px 22px rgba(0,0,0,0.22); transform: translateY(-1px); }
.btn-pill-ghost {
  background: transparent; border-color: var(--border-btn); color: var(--text-primary);
}
.btn-pill-ghost:hover { background: var(--surface); border-color: var(--text-muted); }
.btn-pill-lg { padding: 14px 28px; font-size: 15px; }

/* ── Hero ── */
.hero {
  padding: 64px 24px 40px;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  opacity: 0;
  animation: fadeUp 0.4s var(--ease-smooth) 0.08s forwards;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-light);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800; line-height: 1.02;
  letter-spacing: -2.4px; color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--green); }
.hero-sub {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.6;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 32px;
}
.hero-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-microcopy { font-size: 12.5px; color: var(--text-muted); }

/* ── Hero visual: product mockup ── */
.hero-visual {
  position: relative;
  opacity: 0;
  animation: cardReveal 0.5s var(--ease-smooth) 0.2s forwards;
}
.mockup-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xl);
  padding: 22px;
  transform: rotate(1.2deg);
  position: relative;
  z-index: 2;
}
.mockup-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.mockup-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-btn); }
.mockup-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mockup-heading { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mockup-count { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--surface); border-radius: 999px; padding: 3px 9px; }
.mockup-task {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 8px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-task);
  box-shadow: var(--shadow-xs);
}
.mockup-check {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border-btn);
  display: flex; align-items: center; justify-content: center;
}
.mockup-check.on { background: var(--green-light); border-color: var(--green-light); color: var(--white); }
.mockup-task-text { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.mockup-task.done .mockup-task-text { text-decoration: line-through; color: var(--text-muted); }
.mockup-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 6px; }
.mockup-tag.high { background: var(--red-dim); color: var(--red); }
.mockup-tag.medium { background: var(--amber-dim); color: var(--amber); }
.mockup-tag.low { background: var(--green-dim); color: var(--green); }

.hero-float-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  z-index: 3;
}
.hero-float-streak { top: -18px; right: -14px; text-align: center; }
.hero-float-rate { bottom: -20px; left: -24px; }
.hero-float-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text-primary); }
.hero-float-label { font-size: 10.5px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.hero-float-rate .analytics-bar { width: 88px; margin-top: 6px; }

/* ── Section shells ── */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 24px;
}
.section-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 10px;
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800; letter-spacing: -1.4px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 15.5px; color: var(--text-secondary);
  text-align: center; max-width: 480px;
  margin: 0 auto 56px;
  line-height: 1.6;
}

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth), border-color 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border-btn); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-dim); color: var(--green);
  margin-bottom: 16px;
}
.feature-title { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 7px; letter-spacing: -0.2px; }
.feature-desc { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }

/* ── Views showcase ── */
.views-tabs {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 32px;
}
.views-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.views-panel-icon { font-size: 30px; margin-bottom: 10px; }
.views-panel-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.views-panel-desc { font-size: 14px; color: var(--text-secondary); max-width: 440px; margin: 0 auto; line-height: 1.6; }

/* ── CTA band ── */
.cta-band {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px;
}
.cta-band-inner {
  background: var(--text-primary);
  border-radius: var(--radius-card);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band-inner::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(34,197,94,0.35), transparent 70%);
  top: -140px; right: -80px;
  pointer-events: none;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800; letter-spacing: -1.2px;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
}
.cta-sub {
  font-size: 15px; color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  position: relative;
}
.cta-band-inner .btn-pill-primary {
  background: var(--white); color: var(--text-primary);
  position: relative;
}
.cta-band-inner .btn-pill-primary:hover { background: var(--off-white); }

/* ── Footer ── */
.landing-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 100px;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
  margin-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand-logo { height: 22px; width: auto; }
.footer-brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.footer-tagline { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; max-width: 220px; line-height: 1.5; }
.footer-cols { display: flex; gap: 56px; }
.footer-col-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--text-secondary); text-decoration: none; margin-bottom: 9px; transition: color 0.15s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { font-size: 12px; color: var(--text-muted); text-align: center; padding-top: 24px; border-top: 1px solid var(--border); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { max-width: 460px; }
  .hero-visual { max-width: 380px; margin: 20px auto 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
  .footer-cols { gap: 40px; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
  .hero-float-card { display: none; }
  .cta-band-inner { padding: 44px 24px; }
}

html.dark .mockup-card,
html.dark .hero-float-card,
html.dark .feature-card,
html.dark .views-panel { background: rgba(22,22,25,0.97); border-color: rgba(255,255,255,0.08); }
html.dark .mockup-task { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark .cta-band-inner .btn-pill-primary { background: var(--white); color: #0d0d0c; }