/* =============================================
   App Layout
   ============================================= */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* =============================================
   Collapsible Sidebar
   ============================================= */

.app-sidebar {
  width: 256px;
  min-width: 256px;
  height: 100vh;
  background: var(--surface-nav);
  border-right: 1px solid var(--border-sub);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.app-sidebar.collapsed {
  width: 66px;
  min-width: 66px;
}

/* --- Sidebar Header --- */

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 14px 14px;
  border-bottom: 1px solid var(--border-sub);
  min-height: 68px;
  flex-shrink: 0;
  gap: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 128, 145, 0.3);
  flex-shrink: 0;
}

.sidebar-username {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  max-width: 140px;
  transition: opacity 0.18s, max-width 0.28s;
}

.app-sidebar.collapsed .sidebar-username {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, transform 0.28s;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.sidebar-collapse-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.app-sidebar.collapsed .sidebar-collapse-btn {
  transform: rotate(180deg);
}

/* --- Sidebar Body --- */

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-track { background: transparent; }
.sidebar-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* --- Sidebar Sections --- */

.sidebar-section {
  padding: 4px 0 8px;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border-sub);
}

.sidebar-title {
  padding: 10px 18px 2px;
  overflow: hidden;
}

.sidebar-title span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  white-space: nowrap;
  display: block;
  opacity: 1;
  transition: opacity 0.18s;
}

.app-sidebar.collapsed .sidebar-title span {
  opacity: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0 8px;
  margin: 0;
}

/* --- Nav Items --- */

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  border-radius: 10px;
  margin-bottom: 1px;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.nav-item > span {
  opacity: 1;
  transition: opacity 0.18s;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Collapsed: center icons, hide labels */
.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 9px;
}

.app-sidebar.collapsed .nav-item > span {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

/* --- Theme Toggle Item --- */

.sidebar-theme-item { cursor: pointer; }

.icon-theme-moon,
.icon-theme-sun {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
}

/* Light theme default: show moon → click for dark */
.icon-theme-moon { display: block; }
.icon-theme-sun  { display: none; }
.theme-text-moon { display: block; }
.theme-text-sun  { display: none; }

/* Dark theme: show sun → click for light */
[data-theme="dark"] .icon-theme-moon { display: none; }
[data-theme="dark"] .icon-theme-sun  { display: block; }
[data-theme="dark"] .theme-text-moon { display: none; }
[data-theme="dark"] .theme-text-sun  { display: block; }

/* Hide theme text in collapsed state */
.app-sidebar.collapsed .theme-text-moon,
.app-sidebar.collapsed .theme-text-sun {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

/* --- Cloud Sync status item --- */

.nav-item-status {
  cursor: default;
}

.nav-item-status:hover {
  background: transparent;
  color: var(--text);
}

.sync-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16,185,129,0.14);
  color: #10B981;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-sidebar.collapsed .sync-badge { display: none; }

/* --- Sidebar Footer --- */

.sidebar-footer {
  padding: 10px 8px 14px;
  border-top: 1px solid var(--border-sub);
  flex-shrink: 0;
}

.sidebar-signout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  font-family: inherit;
}

.sidebar-signout-btn:hover {
  background: rgba(222, 81, 81, 0.1);
  color: var(--color-red);
}

.sidebar-signout-btn svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
}

.sidebar-signout-btn > span {
  opacity: 1;
  transition: opacity 0.18s;
}

.app-sidebar.collapsed .sidebar-signout-btn {
  justify-content: center;
  padding: 9px;
}

.app-sidebar.collapsed .sidebar-signout-btn > span {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

.sidebar-delete-account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  font-family: inherit;
  margin-top: 4px;
  opacity: 0.7;
}

.sidebar-delete-account-btn:hover {
  background: rgba(239,68,68,0.1);
  color: #EF4444;
  opacity: 1;
}

.sidebar-delete-account-btn svg {
  width: 15px;
  height: 15px;
  min-width: 15px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.sidebar-delete-account-btn > span {
  opacity: 1;
  transition: opacity 0.18s;
}

.app-sidebar.collapsed .sidebar-delete-account-btn {
  justify-content: center;
  padding: 7px;
}

.app-sidebar.collapsed .sidebar-delete-account-btn > span {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

/* =============================================
   Main Content
   ============================================= */

.app-content {
  flex: 1;
  margin-left: 256px;
  height: 100vh;
  overflow-y: auto;
  padding: 36px 44px;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg);
}

.app-content.sidebar-collapsed {
  margin-left: 66px;
}

/* Content Sections */

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.28s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section Header */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 24px;
}

.section-header > div:first-child { flex: 1; }

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

/* =============================================
   Buttons
   ============================================= */

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-sub);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-secondary:hover { background: var(--border); }

[data-theme="dark"] .btn-secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255,255,255,0.13);
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
  border-radius: 6px;
}

.btn-icon:hover { background: var(--border); color: var(--text); }

[data-theme="dark"] .btn-icon:hover {
  background: rgba(255,255,255,0.12);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* =============================================
   Free Tier Badge
   ============================================= */

.free-tier-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: var(--color-primary-light);
  border: 1px solid rgba(0, 128, 145, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 160px;
}

.ftb-label {
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.ftb-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
}

.ftb-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease, background 0.4s ease;
}

.ftb-count {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

/* =============================================
   Tasks
   ============================================= */

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

.task-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-left: 4px solid var(--border-sub);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: row;
}

.task-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.task-card.status-todo    { border-left-color: var(--color-primary); }
.task-card.status-done    { border-left-color: #10B981; }
.task-card.status-cancelled { border-left-color: #94A3B8; }
.task-card.status-overdue { border-left-color: #EF4444; }

.task-card.completed { opacity: 0.7; }
.task-card.completed .task-title { text-decoration: line-through; }
.task-card.cancelled { opacity: 0.55; }
.task-card.cancelled .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-body {
  flex: 1;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.task-status-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.task-status-chip.chip-done      { background: rgba(16,185,129,0.12); color: #10B981; }
.task-status-chip.chip-cancelled { background: rgba(148,163,184,0.12); color: #94A3B8; }
.task-status-chip.chip-overdue   { background: rgba(239,68,68,0.12); color: #EF4444; }

.btn-tick {
  color: #10B981;
}
.btn-cross {
  color: #94A3B8;
}
.btn-tick:hover  { background: rgba(16,185,129,0.12) !important; color: #10B981 !important; }
.btn-cross:hover { background: rgba(148,163,184,0.12) !important; color: #94A3B8 !important; }

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-title {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card.completed .task-title { color: var(--text-muted); }

.task-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

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

.badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-priority {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-category {
  background: rgba(107,128,107,0.15);
  color: var(--text);
}

.task-due {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tasks-list .empty-state,
.tasks-grid .empty-state {
  grid-column: 1 / -1;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
  min-height: calc(100vh - 280px);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 18px;
  opacity: 0.35;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .empty-state { min-height: calc(100vh - 200px); }
}

/* ── Quick Filter Chips ──────────────────────────────────────────────────── */

.task-filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.filter-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 16px 8px;
  border: 2px solid var(--border-sub);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
  min-height: 82px;
}

.filter-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.filter-chip-count {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}

.filter-chip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  transition: color 0.2s;
}

/* Hover tints */
.filter-chip.filter-todo:hover    { border-color: rgba(0,128,145,0.45); }
.filter-chip.filter-done:hover    { border-color: rgba(16,185,129,0.45); }
.filter-chip.filter-cancel:hover  { border-color: rgba(148,163,184,0.45); }
.filter-chip.filter-overdue:hover { border-color: rgba(239,68,68,0.45); }

/* Active states */
.filter-chip.active.filter-todo {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.filter-chip.active.filter-todo .filter-chip-count,
.filter-chip.active.filter-todo .filter-chip-label { color: var(--color-primary); }

.filter-chip.active.filter-done {
  border-color: #10B981;
  background: rgba(16,185,129,0.1);
}
.filter-chip.active.filter-done .filter-chip-count,
.filter-chip.active.filter-done .filter-chip-label { color: #10B981; }

.filter-chip.active.filter-cancel {
  border-color: #94A3B8;
  background: rgba(148,163,184,0.1);
}
.filter-chip.active.filter-cancel .filter-chip-count,
.filter-chip.active.filter-cancel .filter-chip-label { color: #94A3B8; }

.filter-chip.active.filter-overdue {
  border-color: #EF4444;
  background: rgba(239,68,68,0.1);
}
.filter-chip.active.filter-overdue .filter-chip-count,
.filter-chip.active.filter-overdue .filter-chip-label { color: #EF4444; }

/* ── Shimmer skeleton ────────────────────────────────────────────────────── */

@keyframes shimmer-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.shimmer-line {
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--border-sub) 25%,
    var(--border) 50%,
    var(--border-sub) 75%
  );
  background-size: 200% 100%;
  animation: shimmer-sweep 1.4s ease-in-out infinite;
}

.task-card-shimmer {
  display: flex;
  flex-direction: row;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 12px;
  overflow: hidden;
  min-height: 90px;
}

.task-card-shimmer .shimmer-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card-shimmer .shimmer-title  { height: 14px; width: 62%; }
.task-card-shimmer .shimmer-desc-1 { height: 11px; width: 82%; }
.task-card-shimmer .shimmer-desc-2 { height: 11px; width: 48%; }
.task-card-shimmer .shimmer-due    { height: 10px; width: 32%; }

.task-card-shimmer .shimmer-strip {
  width: 34px;
  flex-shrink: 0;
  background: var(--border-sub);
}

.note-card-shimmer {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-card-shimmer .shimmer-note-1 { height: 12px; width: 88%; }
.note-card-shimmer .shimmer-note-2 { height: 12px; width: 68%; }
.note-card-shimmer .shimmer-note-3 { height: 12px; width: 44%; }

.note-card-shimmer .shimmer-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.note-card-shimmer .shimmer-date    { height: 9px; width: 22%; }
.note-card-shimmer .shimmer-actions { height: 9px; width: 12%; }

.task-card-shimmer:nth-child(2) .shimmer-line,
.note-card-shimmer:nth-child(2) .shimmer-line { animation-delay: 0.18s; }
.task-card-shimmer:nth-child(3) .shimmer-line,
.note-card-shimmer:nth-child(3) .shimmer-line { animation-delay: 0.36s; }
.note-card-shimmer:nth-child(4) .shimmer-line  { animation-delay: 0.54s; }

/* ── Pending sync badge ──────────────────────────────────────────────────── */

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pending-sync-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.92);
  color: white;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239,68,68,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pending-sync-badge:hover {
  transform: scale(1.18);
  box-shadow: 0 3px 10px rgba(239,68,68,0.55);
}

.pending-sync-badge svg {
  width: 12px;
  height: 12px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
  pointer-events: none;
}

.pending-sync-badge.retrying svg { animation: spin 0.9s linear infinite; }
.pending-sync-badge:disabled { opacity: 0.6; cursor: default; }

.nav-item-status { position: relative; }

.nav-item-status.has-pending::after {
  content: '';
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  border: 1.5px solid var(--surface-nav);
}

/* ── View toggle ─────────────────────────────────────────────────────────── */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.view-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 8px;
  overflow: hidden;
}

.view-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.18s, color 0.18s;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.view-btn:hover { background: var(--border); color: var(--text); }

.view-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ── Task card extras ────────────────────────────────────────────────────── */

.badge-meeting {
  background: rgba(147, 112, 219, 0.15);
  color: #9370DB;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

.task-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meeting-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: #9370DB;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.18s;
}

.task-meeting-link:hover { opacity: 0.75; }

.task-meeting-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */

.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-toggle-row .form-label { margin-bottom: 0; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-sub);
  border-radius: 24px;
  transition: background 0.25s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.toggle-switch input:checked + .toggle-slider { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* =============================================
   Calendar — Schedule / Timeline
   ============================================= */

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.schedule-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}

.schedule-month-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.schedule-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 6px;
}

.schedule-nav-btn {
  width: 34px;
  height: 34px;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  font-family: inherit;
}

.schedule-nav-btn:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Week strip */

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  user-select: none;
}

.day-cell:hover { background: var(--color-primary-light); }

.day-name {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.day-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.day-today .day-num {
  color: var(--color-primary);
}

.day-selected {
  background: #00BFA5;
}

.day-selected .day-name,
.day-selected .day-num {
  color: #fff;
}

.day-selected:hover { background: #009e88; }

/* Timeline */

.timeline-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 320px);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.timeline-scroll::-webkit-scrollbar { width: 4px; }
.timeline-scroll::-webkit-scrollbar-track { background: transparent; }
.timeline-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.timeline-inner {
  display: flex;
  flex-direction: column;
}

.timeline-hour {
  display: flex;
  border-top: 1px solid var(--border-sub);
  min-height: 64px;
}

.timeline-hour:first-child { border-top: none; }

.time-label {
  width: 60px;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 14px 8px 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.hour-content {
  flex: 1;
  padding: 6px 8px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 52px;
}

/* Calendar task card — identical row layout to .task-card */

.cal-task-card {
  display: flex;
  flex-direction: row;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.cal-task-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cal-task-card.completed { opacity: 0.6; }
.cal-task-card.completed .task-title { text-decoration: line-through; }

/* =============================================
   Notes
   ============================================= */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  grid-auto-rows: max-content;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-list .empty-state,
.notes-grid .empty-state { grid-column: 1 / -1; }

.note-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.note-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.note-content {
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.note-actions { display: flex; gap: 6px; }

/* =============================================
   Stats — Activity view
   ============================================= */

.stats-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

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

.activity-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 14px;
  padding: 20px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.activity-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.activity-accent {
  height: 3px;
  width: 36px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.accent-teal  { background: #00BFA5; }
.accent-amber { background: var(--color-primary); }
.accent-white { background: var(--text); opacity: 0.5; }
.accent-pink  { background: #E91E8C; }

.activity-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.activity-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Contribution graph card */

.contribution-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 14px;
  padding: 20px;
}

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

.contribution-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.contrib-year-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.contrib-year-btn {
  width: 26px;
  height: 26px;
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
  font-family: inherit;
}

.contrib-year-btn:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.contrib-graph-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.contrib-graph-wrap::-webkit-scrollbar { height: 4px; }
.contrib-graph-wrap::-webkit-scrollbar-track { background: transparent; }
.contrib-graph-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.contrib-month-labels {
  display: grid;
  gap: 3px;
  margin-left: 22px;
  margin-bottom: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.contrib-rows {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.contrib-day-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.65rem;
  color: var(--text-muted);
  padding-top: 0;
  flex-shrink: 0;
}

.contrib-day-labels span {
  height: 14px;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 2px;
}

.contrib-grid {
  display: grid;
  grid-template-rows: repeat(7, 14px);
  grid-auto-flow: column;
  gap: 3px;
}

.contrib-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--border-sub);
  transition: opacity 0.15s;
}

.contrib-cell:hover { opacity: 0.75; }

.contrib-cell.task { background: #00BFA5; }
.contrib-cell.note { background: var(--color-primary); }
.contrib-cell.both { background: linear-gradient(135deg, #00BFA5 50%, var(--color-primary) 50%); }

.contrib-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-task { background: #00BFA5; }
.legend-note { background: var(--color-primary); }
.legend-both { background: linear-gradient(135deg, #00BFA5 50%, var(--color-primary) 50%); }

/* =============================================
   Modals
   ============================================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--frame-shadow);
}

.modal-content-lg { max-width: 600px; }

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

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.btn-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.btn-close:hover { background: var(--border); color: var(--text); }

/* Form Styles */

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.875rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-sub);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* =============================================
   Info Modals (About / Privacy / Terms)
   ============================================= */

.info-modal-body {
  text-align: center;
  padding: 4px 0;
}

.info-scrollable {
  text-align: left;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

.info-scrollable::-webkit-scrollbar { width: 4px; }
.info-scrollable::-webkit-scrollbar-track { background: transparent; }
.info-scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.info-logo { margin-bottom: 14px; }

.info-logo img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.info-modal-body h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.info-scrollable h4 {
  font-size: 0.95rem;
  margin-top: 18px;
  margin-bottom: 6px;
}

.info-version {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.info-modal-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.info-divider {
  height: 1px;
  background: var(--border-sub);
  margin: 16px 0;
}

.info-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.info-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-style: italic;
}

/* =============================================
   Mobile Top Bar
   ============================================= */

.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--surface-nav);
  border-bottom: 1px solid var(--border-sub);
  z-index: 90;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  backdrop-filter: blur(16px);
}

.mobile-menu-btn {
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover { background: var(--color-primary-light); }

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.mobile-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

/* Sidebar overlay (mobile) */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* =============================================
   View Task Screen
   ============================================= */

.vtm-overlay {
  align-items: center;
  justify-content: center;
  padding: 0;
}

.vtm-screen {
  background: var(--bg);
  width: calc(100% - 32px);
  max-width: 660px;
  max-height: 92vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}

.vtm-appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-sub);
  flex-shrink: 0;
}

.vtm-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s;
}

.vtm-close-btn:hover { background: var(--border); }

.vtm-close-btn svg {
  width: 18px;
  height: 18px;
}

.vtm-appbar-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.vtm-appbar-actions {
  display: flex;
  gap: 4px;
}

.vtm-delete-icon { color: #DE5151; }
.vtm-delete-icon:hover { background: rgba(222,81,81,0.1) !important; }

.vtm-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.vtm-body::-webkit-scrollbar { width: 4px; }
.vtm-body::-webkit-scrollbar-track { background: transparent; }
.vtm-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.vtm-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 18px;
  word-break: break-word;
}

.vtm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.vtm-status-chip {
  font-size: 0.73rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #111;
}

.vtm-due-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.vtm-due-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.vtm-divider {
  border: none;
  border-top: 1px solid var(--border-sub);
  margin: 0 0 24px;
}

.vtm-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.vtm-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 24px;
}

.vtm-meeting-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(147,112,219,0.12);
  color: #9370DB;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.vtm-meeting-link:hover { background: rgba(147,112,219,0.22); }

.vtm-meeting-link svg { width: 16px; height: 16px; flex-shrink: 0; }

@media (max-width: 600px) {
  .vtm-screen {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .vtm-body { padding: 20px 18px 28px; }
  .vtm-title { font-size: 1.3rem; }
}

/* =============================================
   View Note Screen
   ============================================= */

.vnm-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.vnm-date-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.vnm-content {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =============================================
   Status Dialog
   ============================================= */

.status-dialog-content {
  max-width: 320px !important;
}

.status-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 8px;
}

.status-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--border-sub);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}

.status-option-btn:hover { background: var(--bg); }

.status-option-btn.active { border-color: var(--color-primary); }

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-opt-due .status-dot   { background: #94A3B8; }
.status-opt-done .status-dot  { background: #4ADE80; }
.status-opt-overdue .status-dot { background: #F87171; }

/* =============================================
   Danger button
   ============================================= */

.btn-danger {
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  background: rgba(222,81,81,0.12);
  color: #DE5151;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover { background: rgba(222,81,81,0.22); }

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 960px) {
  .mobile-topbar { display: flex; }

  .app-sidebar {
    transform: translateX(-100%);
    z-index: 110;
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
    /* Always show fully expanded on mobile */
    width: 256px;
    min-width: 256px;
  }

  .app-sidebar.mobile-open .sidebar-username { opacity: 1; max-width: 140px; }
  .app-sidebar.mobile-open .sidebar-title span { opacity: 1; }
  .app-sidebar.mobile-open .nav-item { justify-content: flex-start; padding: 9px 10px; }
  .app-sidebar.mobile-open .nav-item > span { opacity: 1; max-width: unset; }
  .app-sidebar.mobile-open .theme-text-moon,
  .app-sidebar.mobile-open .theme-text-sun { opacity: 1; max-width: unset; }
  .app-sidebar.mobile-open .sidebar-signout-btn { justify-content: flex-start; padding: 9px 10px; }
  .app-sidebar.mobile-open .sidebar-signout-btn > span { opacity: 1; max-width: unset; }
  .app-sidebar.mobile-open .sidebar-collapse-btn { display: none; }

  .app-content,
  .app-content.sidebar-collapsed {
    margin-left: 0;
    padding-top: 70px;
  }

  .activity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .app-content { padding: 70px 16px 24px; }
  .section-header { flex-direction: column; gap: 14px; align-items: flex-start; }
  .header-actions { width: 100%; justify-content: space-between; }
  .header-actions .btn-primary { flex: 1; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions button { width: 100%; }
  .modal-content { padding: 20px; }
  .tasks-grid,
  .notes-grid { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .activity-number { font-size: 1.8rem; }
  .week-strip { gap: 3px; }
  .day-cell { padding: 8px 2px; }
  .day-num { font-size: 1rem; }
  .task-filter-row { gap: 8px; }
  .filter-chip { padding: 12px 6px; min-height: 70px; }
  .filter-chip-count { font-size: 1.3rem; }
  .filter-chip-label { font-size: 0.62rem; }
}

/* =============================================
   Try Premium CTA (Sidebar)
   ============================================= */

.sidebar-premium-wrap {
  padding: 12px 12px 4px;
}

.sidebar-premium-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #1A1A2E;
  background: linear-gradient(135deg, #F5A623 0%, #FFC971 100%);
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.28);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.sidebar-premium-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.sidebar-premium-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.38);
  filter: brightness(1.04);
}

.sidebar-premium-cta:hover::before {
  transform: translateX(100%);
}

.premium-icon-wrap {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  flex-shrink: 0;
}

.premium-icon-wrap svg {
  width: 16px;
  height: 16px;
  color: #1A1A2E;
  fill: #1A1A2E;
}

.premium-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.18s;
}

.premium-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.premium-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  line-height: 1.2;
  white-space: nowrap;
}

.app-sidebar.collapsed .sidebar-premium-wrap {
  padding: 12px 8px 4px;
}

.app-sidebar.collapsed .sidebar-premium-cta {
  justify-content: center;
  padding: 9px;
}

.app-sidebar.collapsed .premium-text {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

@media (max-width: 960px) {
  .app-sidebar.mobile-open .sidebar-premium-cta { justify-content: flex-start; padding: 10px 12px; }
  .app-sidebar.mobile-open .premium-text { opacity: 1; max-width: unset; }
}

/* =============================================
   Premium Modal
   ============================================= */

.premium-modal-content {
  max-width: 460px;
  position: relative;
  padding: 0;
  overflow: hidden;
}

.premium-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-close-btn:hover {
  background: rgba(0, 0, 0, 0.28);
}

.premium-hero {
  background: linear-gradient(135deg, #F5A623 0%, #FFC971 100%);
  color: #1A1A2E;
  padding: 32px 28px 24px;
  text-align: center;
  position: relative;
}

.premium-hero-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.premium-hero-icon svg {
  width: 30px;
  height: 30px;
  fill: #1A1A2E;
  color: #1A1A2E;
}

.premium-hero h3 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1A1A2E;
}

.premium-tagline {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(26, 26, 46, 0.78);
}

.premium-features {
  list-style: none;
  padding: 22px 26px 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.premium-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.premium-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.premium-features li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.premium-features li strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.premium-features li span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.premium-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  margin: 18px 26px 0;
  background: var(--color-primary-light);
  border-radius: 12px;
}

.premium-price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.premium-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.premium-period {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.premium-note {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-actions {
  padding: 18px 26px 24px;
  margin: 0;
}

.premium-upgrade-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

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

.tasks-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.board-column {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  overflow: hidden;
}

.board-column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-sub);
  background: rgba(255, 255, 255, 0.02);
}

.board-column-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.board-column-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.board-column-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--border-sub);
  padding: 2px 8px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
}

.board-column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.board-column-body .task-card {
  flex-direction: row;
}

.board-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 8px;
  opacity: 0.7;
}

.tasks-board .empty-state {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  .tasks-board { grid-template-columns: 1fr; }
}

.task-card[draggable="true"] { cursor: grab; }
.task-card[draggable="true"]:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.45; }

.board-column-body.drag-over {
  background: var(--surface-hover, rgba(255, 255, 255, 0.03));
  outline: 2px dashed var(--color-primary);
  outline-offset: -6px;
  border-radius: 10px;
}

/* ── Floating Action Button ─────────────────────────────────────────────────── */

.fab-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 500;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 128, 145, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  flex-shrink: 0;
}

.fab-main:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 28px rgba(0, 128, 145, 0.5);
  transform: scale(1.05);
}

.fab-main svg {
  width: 24px;
  height: 24px;
  color: white;
  transition: transform 0.25s, opacity 0.2s;
  position: absolute;
}

.fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg);
}

.fab-container.open .fab-icon-plus {
  opacity: 0;
  transform: rotate(90deg);
}

.fab-container.open .fab-icon-close {
  opacity: 1;
  transform: rotate(0deg);
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s;
}

.fab-container.open .fab-menu {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 28px;
  background: var(--surface-nav);
  border: 1px solid var(--border-sub);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--text);
  backdrop-filter: blur(16px);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}

.fab-item:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: scale(1.02);
}

.fab-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.fab-item-label {
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 600px) {
  .fab-container { bottom: 20px; right: 16px; }
  .fab-main { width: 50px; height: 50px; }
  .fab-main svg { width: 20px; height: 20px; }
}
