.stats-bar { display:flex; gap:var(--space-4); margin-bottom:var(--space-6); flex-wrap:wrap; }
.stat-card { flex:1; min-width:140px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); padding:var(--space-5); display:flex; align-items:center; gap:var(--space-4); box-shadow:var(--shadow-sm); }
.stat-icon { width:44px; height:44px; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.stat-icon svg { width:22px; height:22px; }
.stat-icon.purple { background:var(--color-primary-light); color:var(--color-primary); }
.stat-icon.green  { background:#D1FAE5; color:#065F46; }
.stat-icon.amber  { background:#FEF3C7; color:#92400E; }
.stat-icon.red    { background:#FEE2E2; color:#991B1B; }
html.dark .stat-icon.green { background:#064e3b; color:#34d399; }
html.dark .stat-icon.amber { background:#451a03; color:#fbbf24; }
html.dark .stat-icon.red   { background:#450a0a; color:#f87171; }
.stat-info { display:flex; flex-direction:column; }
.stat-value { font-size:1.6rem; font-weight:800; line-height:1; }
.stat-label { font-size:.78rem; color:var(--color-text-secondary); margin-top:2px; }

.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); }
.dashboard-grid .card.full-width { grid-column:1/-1; }

.greeting { margin-bottom:var(--space-6); }
.greeting h1 { font-size:1.8rem; font-weight:800; }
.greeting p  { color:var(--color-text-secondary); font-size:.95rem; margin-top:4px; }

.dash-task-item { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) 0; border-bottom:1px solid var(--color-border); }
.dash-task-item:last-child { border-bottom:none; }
.dash-task-item input[type="checkbox"] { width:17px; height:17px; accent-color:var(--color-primary); cursor:pointer; flex-shrink:0; }
.dash-task-title { flex:1; font-size:.9rem; font-weight:500; cursor:pointer; }
.dash-task-title:hover { color:var(--color-primary); }
.dash-task-item.done .dash-task-title { text-decoration:line-through; color:var(--color-text-muted); }
.dash-task-date { font-size:.78rem; color:var(--color-text-muted); flex-shrink:0; }

.dash-note-item { display:flex; flex-direction:column; gap:4px; padding:var(--space-3) 0; border-bottom:1px solid var(--color-border); cursor:pointer; }
.dash-note-item:last-child { border-bottom:none; }
.dash-note-item:hover .dash-note-title { color:var(--color-primary); }
.dash-note-title { font-size:.9rem; font-weight:500; }
.dash-note-preview { font-size:.8rem; color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-note-meta { font-size:.75rem; color:var(--color-text-muted); }

.dash-project-item { display:flex; flex-direction:column; gap:var(--space-2); padding:var(--space-3) 0; border-bottom:1px solid var(--color-border); cursor:pointer; }
.dash-project-item:last-child { border-bottom:none; }
.dash-project-item:hover .dash-project-name { color:var(--color-primary); }
.dash-project-name { font-size:.9rem; font-weight:500; }
.dash-project-meta { display:flex; justify-content:space-between; font-size:.78rem; color:var(--color-text-muted); }

.quick-add-btn { position:fixed; bottom:calc(var(--mobile-nav-height, 0px) + var(--space-5)); right:var(--space-5); background:var(--color-primary); color:#fff; border-radius:var(--radius-full); width:56px; height:56px; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-lg); transition:background var(--transition),transform var(--transition); z-index:50; }
.quick-add-btn:hover { background:var(--color-primary-hover); transform:scale(1.05); }
.quick-add-btn svg { width:26px; height:26px; }

/* ── Tablet (≤1024px) ── */
@media (max-width:1024px) {
  .greeting h1 { font-size:1.5rem; }
  .stat-value { font-size:1.4rem; }
}

/* ── Phone (≤640px) ── */
@media (max-width:640px) {
  /* Stats: 2×2 grid on phone */
  .stats-bar { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3); margin-bottom:var(--space-4); }
  /* Stack icon above number, fully centered */
  .stat-card {
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: var(--space-4) var(--space-2);
    gap: var(--space-2); min-width: 0;
  }
  .stat-info { align-items: center; }
  .stat-icon { width:36px; height:36px; }
  .stat-icon svg { width:18px; height:18px; }
  .stat-value { font-size:1.3rem; }

  .dashboard-grid { grid-template-columns:1fr; gap:var(--space-3); }
  .dashboard-grid .card.full-width { grid-column:1; }

  .greeting { margin-bottom:var(--space-4); }
  .greeting h1 { font-size:1.3rem; }

  /* FAB sits above bottom nav */
  .quick-add-btn { bottom:calc(var(--mobile-nav-height, 62px) + var(--space-4)); right:var(--space-4); width:50px; height:50px; }
  .quick-add-btn svg { width:22px; height:22px; }
}
