/* ============================================================
   Home app styles (prefix .home-).
   ============================================================ */
.home-top { display: flex; justify-content: flex-end; margin: -4px 0 var(--sp-3); }
.home-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); grid-auto-flow: dense; }
@media (min-width: 900px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-grid .widget.span-2 { grid-column: span 2; } }
@media (min-width: 1400px) { .home-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }

/* widgets carry the colour of their app: re-derive the accent tokens locally (root-level color-mix would not follow) */
.home-grid .widget {
  --accent: var(--a); --accent-ink: var(--a-ink);
  --accent-soft: color-mix(in srgb, var(--a) 14%, transparent);
  --accent-soft-2: color-mix(in srgb, var(--a) 26%, transparent);
}
.home-grid .widget.bare { grid-column: 1 / -1; }
.home-grid .widget.bare::before { display: none; }
.home-grid .widget.bare { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 4px 2px var(--sp-2); }
.widget-h .more { background: none; border: 0; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.widget-b { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.widget.locked .btn { margin-top: 6px; }

.home-greet { margin: 0; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: var(--track-tight); line-height: 1.1; }
.home-date { margin: 4px 0 0; color: var(--text-2); font-weight: 600; }

.home-empty { color: var(--text-3); font-size: 13.5px; font-weight: 600; padding: 6px 0; }
.home-count { display: flex; align-items: baseline; gap: 6px; color: var(--text-2); font-weight: 600; flex-wrap: wrap; }
.home-count strong { font-size: var(--fs-xl); font-weight: 800; color: var(--text); letter-spacing: var(--track-tight); }
.home-tasks .trow { padding-left: 8px; padding-right: 8px; }
.home-link { align-self: flex-start; }

.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.home-now { display: flex; flex-direction: column; gap: 6px; cursor: pointer; border-radius: 12px; }
.home-now-k { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--a-ink); }
.home-now-t { font-size: var(--fs-lg, 18px); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.home-now-s { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.home-now-s b { margin-left: auto; color: var(--text); font-weight: 800; }
.home-now .progress { margin-top: 4px; }

.home-budget { display: flex; align-items: center; gap: 16px; }
.home-ring { position: relative; width: 88px; height: 88px; flex: none; }
.home-ring .ring { width: 100%; height: 100%; display: block; }
.home-ring-c { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.home-budget-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-budget-t .v { font-size: var(--fs-xl); font-weight: 800; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.home-sub { font-size: 13px; font-weight: 700; color: var(--text-2); }
.home-sub.neg { color: var(--danger); }

.home-pots { display: flex; flex-direction: column; gap: 12px; }
.home-pot { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.home-pot .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.home-pot .hint { white-space: nowrap; }
.home-spark { color: var(--a); display: block; width: 120px; height: 36px; }
.home-spark .spark { width: 100%; height: 100%; display: block; }

.home-lay-h { margin: 0 0 4px; font-size: var(--fs-lg, 18px); font-weight: 800; }
.home-lay { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; }
.home-lay-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
.home-lay-row[data-app="tasks"] { --a: var(--app-tasks); }
.home-lay-row[data-app="finance"] { --a: var(--app-finance); }
.home-lay-row[data-app="home"] { --a: var(--app-home); }
.home-lay-row[data-app="inventory"] { --a: var(--app-inventory); }
.home-lay-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--a); flex: none; }
.home-lay-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.home-lay-f { margin-top: 8px; flex-wrap: wrap; }
.widget-b > .btn { align-self: flex-start; }
