/* ================================================================
   Solo — Home / Dashboard (Cream redesign, v2.0.0)
   Hero status card · RecCard list · QuietRow background · Latest
   ================================================================ */

/* ── Greeting ───────────────────────────────────────────────── */
.home-greeting {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  padding-left: 2px;
  letter-spacing: -0.1px;
}

/* ── Hero status card ───────────────────────────────────────── */
.home-hero {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 28px 24px 26px;
  border-radius: 28px;
  /* Soft coral wash anchored at top-right corner — replaces the
     positioned + blurred .home-hero-orb that was clipping awkwardly
     against the card's 28px corner radius. As a CSS background layer
     it's fully resolution-independent and never produces a hard edge. */
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 120, 86, 0.16), rgba(224, 120, 86, 0) 62%),
    linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  animation: heroEnter 500ms var(--ease-tap);
}
/* Suppress entrance animation on re-render (e.g. after modal close) — prevents flicker */
.home-hero.no-entrance { animation: none; }

/* Legacy decoration — kept in markup, hidden visually. The wash is now
   part of .home-hero's background gradient. */
.home-hero-orb { display: none; }

.home-hero-status {
  display: flex; align-items: center; gap: 8px;
  position: relative;
}

.home-hero-headline {
  position: relative;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.8px;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}

.home-hero-saving {
  position: relative;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px;
}

.home-hero-saving-label { display: block; }

.home-hero-rate {
  font-size: 13px;
  color: var(--good);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  padding-bottom: 4px;
}

/* ── Sections (Needs your approval, In the background, Latest) ── */
.home-section { margin-top: 24px; }

.home-section-label {
  display: block;
  margin-bottom: 10px;
  padding-left: 4px;
}

.home-section-headrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 10px;
}

.home-link {
  background: none; border: 0; cursor: pointer;
  font-size: 12px; color: var(--ink-3);
  font-family: inherit;
  padding: 4px 6px;
  border-radius: 8px;
}
.home-link:hover { color: var(--ink-2); }

/* ── Empty Home state (no bills) ────────────────────────────── */
.home-empty {
  margin-top: 8px;
  padding: 36px 24px 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 70%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.home-empty-eyebrow {
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.home-empty-headline {
  font-size: 34px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.8px;
  margin-top: 8px;
  line-height: 1.05;
  text-wrap: balance;
}
.home-empty-body {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}
.home-empty-actions {
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 10px;
}

/* Rotating example block — 3 stacked cards, CSS-only cycle */
.hero-example-stage {
  position: relative;
  margin-top: 22px;
  min-height: 58px;
}
.hero-example {
  position: absolute; inset: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  opacity: 0;
}
.hero-example-glyph {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.hero-example-body { flex: 1; min-width: 0; }
.hero-example-name {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.hero-example-meta {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-top: 1px;
}
.hero-example-save { color: var(--good); }
.hero-example-spark {
  color: var(--accent);
  display: flex; align-items: center;
}
.hero-example:nth-child(1) { animation: heroExample1 7.2s ease-in-out infinite; }
.hero-example:nth-child(2) { animation: heroExample2 7.2s ease-in-out infinite; }
.hero-example:nth-child(3) { animation: heroExample3 7.2s ease-in-out infinite; }

@keyframes heroExample1 {
  0%, 1%   { opacity: 0; transform: translateY(4px); }
  4%, 32%  { opacity: 1; transform: none; }
  35%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes heroExample2 {
  0%, 34%  { opacity: 0; transform: translateY(4px); }
  37%, 65% { opacity: 1; transform: none; }
  68%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes heroExample3 {
  0%, 67%  { opacity: 0; transform: translateY(4px); }
  70%, 99% { opacity: 1; transform: none; }
  100%     { opacity: 0; transform: translateY(-4px); }
}

/* Trust micro-cards under the empty state */
.trust-cards {
  margin-top: 28px;
  display: flex;
  gap: 10px;
}
.trust-card {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.35;
  letter-spacing: -0.05px;
}
.trust-card-icon {
  display: block;
  color: var(--good);
  margin-bottom: 6px;
}

/* ── Home footer (Privacy / Terms / Contact) ─────────────────── */
.home-footer {
  margin-top: 40px;
  padding: 18px 0 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
}
.home-footer a {
  color: var(--ink-3);
  text-decoration: none;
}
.home-footer a:hover {
  color: var(--ink);
}
.home-footer-dot {
  color: var(--ink-3);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .hero-example { animation: none; }
  .hero-example:nth-child(1) { opacity: 1; }
  .hero-example:nth-child(2),
  .hero-example:nth-child(3) { display: none; }
}

/* ── Switch history (legacy on home) ─────────────────────────── */
/* Kept simple: setting-row pattern still works */

/* ── Bill List (legacy used on Bills tab) ───────────────────── */
.bill-list {
  display: flex; flex-direction: column; gap: 0;
}

/* ── Bill Card (current row layout, restyled) ───────────────── */
.bill-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s ease;
}
.bill-card:hover { background: rgba(31, 27, 22, 0.02); border-radius: 14px; }
.bill-card:last-child { border-bottom: none; }
.bill-card:active { transform: scale(0.99); transition: transform 80ms var(--ease-tap); }

.bill-card .chip { transition: background 400ms var(--ease), color 400ms var(--ease); }
.bill-card-switch-btn { transition: background 400ms var(--ease), color 400ms var(--ease); }

.bill-card-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--ink);
  overflow: hidden;
}
.bill-card-icon .sf-icon { width: 56%; height: 56%; display: inline-flex; align-items: center; justify-content: center; }
.bill-card-icon .sf-icon svg { width: 100% !important; height: 100% !important; stroke-width: 1.8; }
.bill-card-icon > svg { width: 56% !important; height: 56% !important; stroke-width: 1.8; }

/* Category-tinted icon boxes */
.bill-card-icon.utilities    { background: var(--warn-soft);   color: #8B6420; }
.bill-card-icon.internet     { background: var(--accent-soft); color: var(--accent-ink); }
.bill-card-icon.insurance    { background: var(--good-soft);   color: var(--good-ink); }
.bill-card-icon.finance      { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.subscriptions { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.vehicle      { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.lifestyle    { background: var(--warn-soft);   color: #8B6420; }
.bill-card-icon.childcare    { background: var(--good-soft);   color: var(--good-ink); }

.bill-card-body { flex: 1; min-width: 0; }
.bill-card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.bill-card-provider {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bill-scanned-badge { opacity: 0.45; }
.bill-scanned-badge .sf-icon-xs svg { width: 11px; height: 11px; }

.bill-card-right { text-align: right; flex-shrink: 0; }
.bill-card-amount {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bill-card-amount .text-xs { font-size: 11px; }

.bill-card-saving {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--good);
  margin-top: 2px;
}

.bill-card-checking {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
  animation: checking-pulse 1.6s ease-in-out infinite;
}
@keyframes checking-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.bill-card-switch-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  margin-top: 2px;
}

/* ── Status Indicators (legacy) ─────────────────────────────── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.status-dot--switch    { background: var(--accent); }
.status-dot--progress  { background: var(--good); animation: pulse 2s ease-in-out infinite; }
.status-dot--optimised { background: var(--good); }
.status-dot--neutral   { background: var(--ink-3); }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(127, 166, 140, 0.4); }
  50%      { opacity: 0.7; box-shadow: 0 0 0 6px rgba(127, 166, 140, 0); }
}

/* ── Subscription Overlap Card ─────────────────────────────── */
.overlap-section {
  display: flex; flex-direction: column; gap: 10px;
}

.overlap-card {
  background: var(--surface);
  border: 1px solid rgba(217, 164, 65, 0.30);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, transform 80ms var(--ease-tap);
  -webkit-tap-highlight-color: transparent;
}
.overlap-card:active { transform: scale(0.98); }
.overlap-card:hover { border-color: rgba(217, 164, 65, 0.5); }

.overlap-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
}

/* ── Legacy savings hero (still referenced in some renderers) ── */
.savings-hero {
  text-align: center;
  padding: 32px 24px;
  animation: heroEnter 500ms var(--ease-tap);
}
.savings-hero-label {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
}
.savings-hero-amount {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 54px;
  font-weight: 400;
  color: var(--good);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.savings-hero-amount.potential { color: var(--accent); }
.savings-hero-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.savings-locked {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: var(--good-soft);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: var(--good-ink);
  margin-top: 12px;
}
