/* FinGenie app demo: a phone-sized app with synthetic data. On a phone it fills the screen; on a wide screen it
   sits in a device frame next to a short explanation. */
:root {
  --navy: #0b1530; --navy-2: #13204a; --ink: #0f1a33; --text: #33405e; --muted: #6b7794;
  --bg: #f4f7fb; --card: #fff; --line: #e3e8f1; --green: #2fd47e; --green-d: #15a85f; --gold: #f5b942;
  --red: #e5484d; --amber: #f59e0b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--navy);
  -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3 { font-family: "Rubik", "Heebo", sans-serif; color: var(--ink); margin: 0; line-height: 1.25; }

/* Page around the phone (wide screens only) */
.stage { min-height: 100%; display: grid; grid-template-columns: minmax(0, 420px) auto; justify-content: center; align-items: center; gap: 56px;
  padding: 32px 24px; background: radial-gradient(1000px 600px at 85% -10%, #1d3170 0%, transparent 60%), var(--navy); }
.side { color: #cfd8ee; max-width: 420px; }
.side h1 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.side .lead { font-size: 1.05rem; line-height: 1.7; }
.side ul { padding: 0; list-style: none; margin: 18px 0; display: grid; gap: 10px; }
.side li { display: flex; gap: 10px; line-height: 1.55; }
.side li b { color: #fff; }
.side .ctrl { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.side .btn { background: var(--green); color: var(--navy); border: 0; border-radius: 999px; padding: .7em 1.3em; font-weight: 700; }
.side .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.side .note { font-size: .85rem; color: #93a0bf; }
.side a { color: var(--green); }
.embed .stage { grid-template-columns: auto; padding: 12px; background: transparent; }
.embed .side, .embed .back { display: none; }
.embed body, body.embed { background: transparent; }

/* The phone */
.phone { position: relative; width: 390px; height: 800px; max-height: calc(100vh - 48px); border-radius: 48px; background: #05091a; padding: 12px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), inset 0 0 0 2px #2a3558; }
.app { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .stage { display: block; padding: 0; min-height: 100%; }
  .side { display: none; }
  .phone { width: 100%; height: 100dvh; max-height: none; border-radius: 0; padding: 0; box-shadow: none; }
  .app { border-radius: 0; }
  .embed .phone { height: 720px; border-radius: 40px; padding: 10px; }
  .embed .app { border-radius: 32px; }
}

.status { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px 4px; font-size: .78rem; font-weight: 700; color: var(--ink); direction: ltr; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 10px; }
.top small { color: var(--muted); display: block; font-size: .8rem; }
.top h2 { font-size: 1.25rem; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }
.bell i { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
  color: #fff; font-size: .7rem; font-style: normal; font-weight: 700; display: grid; place-items: center; }
.bell i[hidden] { display: none; }

.view { flex: 1; overflow-y: auto; padding: 0 16px 16px; display: grid; gap: 12px; align-content: start; }
.view[hidden] { display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.card h3 { font-size: .95rem; margin-bottom: 8px; }
.hero { background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #cfd8ee; border: 0; }
.hero small { font-size: .8rem; }
.hero .big { display: block; color: #fff; font-family: "Rubik", sans-serif; font-size: 2rem; font-weight: 700; margin: 2px 0; }
.up { color: var(--green); font-weight: 700; font-size: .85rem; }
.hero svg { width: 100%; height: 56px; margin-top: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; font-size: .78rem; }
.split b { display: block; color: #fff; font-size: .95rem; }

.row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.row:first-of-type { border-top: 0; }
.row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); font-size: 1.05rem; flex-shrink: 0; }
.row .grow { flex: 1; min-width: 0; }
.row small { display: block; color: var(--muted); font-size: .75rem; }
.row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--red); }
.pos { color: var(--green-d); }

/* Advisor recommendation cards */
.rec { display: grid; gap: 6px; text-align: start; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.rec.urgent { border-color: #f6c4c6; background: #fff7f7; }
.rec .head { display: flex; align-items: center; gap: 8px; }
.rec .head b { flex: 1; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.rec p { margin: 0; font-size: .85rem; line-height: 1.5; }
.rec .save { font-weight: 700; color: var(--green-d); font-size: .85rem; }
.chip { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #e8f9f0; color: var(--green-d); white-space: nowrap; }
.chip.new { background: #eef2ff; color: #3b4fd8; }
.chip.urgent { background: #fde2e3; color: #b42318; }
.chip.done { background: #e8f9f0; color: var(--green-d); }
.chip.later { background: #f1f3f8; color: var(--muted); }
.total { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.total b { font-family: "Rubik", sans-serif; font-size: 1.3rem; color: var(--green-d); }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .8s; }

/* Cash-flow forecast */
.flow svg { width: 100%; height: 110px; }
.flow .warn { color: var(--red); font-weight: 700; font-size: .82rem; }
.flow .ok { color: var(--green-d); font-weight: 700; font-size: .82rem; }

/* Tab bar */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 6px 14px; }
.tabs button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: .72rem; color: var(--muted); padding: 6px 0; border-radius: 12px; position: relative; }
.tabs button span { font-size: 1.2rem; }
.tabs em { font-style: normal; }
.tabs button[aria-current="page"] { color: var(--navy); font-weight: 700; background: var(--bg); }
.tabs i { position: absolute; top: 2px; inset-inline-start: 58%; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff;
  font-size: .62rem; font-style: normal; display: grid; place-items: center; padding: 0 4px; }
.tabs i[hidden] { display: none; }

/* Push notification */
.push { position: absolute; top: 10px; inset-inline: 10px; z-index: 20; display: flex; gap: 10px; align-items: flex-start; text-align: start;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border: 0; border-radius: 20px; padding: 12px 14px;
  box-shadow: 0 16px 40px -12px rgba(11,21,48,.45); transform: translateY(-140%); transition: transform .45s cubic-bezier(.2,.9,.3,1.2); }
.push.show { transform: translateY(0); }
.push .logo { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.push small { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.push b { display: block; color: var(--ink); font-size: .88rem; line-height: 1.35; margin: 2px 0; }
.push span.t { font-size: .8rem; line-height: 1.4; display: block; }

/* Bottom sheet */
.sheet-bg { position: absolute; inset: 0; z-index: 30; background: rgba(11,21,48,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-bg.show { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 31; max-height: 88%; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0;
  padding: 10px 18px 22px; transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.3,1); }
.sheet.show { transform: translateY(0); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { font-size: 1.15rem; margin: 6px 0 8px; }
.sheet h3 { font-size: .85rem; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.sheet p, .sheet li { font-size: .9rem; line-height: 1.6; }
.sheet ol { padding-inline-start: 1.2rem; margin: 0; }
.sheet table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sheet td { padding: 6px 0; border-top: 1px solid var(--line); }
.sheet td:last-child { text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet .actions { display: grid; gap: 8px; margin-top: 16px; }
.sheet .primary { border: 0; border-radius: 14px; padding: 14px; background: var(--navy); color: #fff; font-weight: 700; font-size: 1rem; }
.sheet .secondary { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; font-weight: 600; }
.sheet .fine { font-size: .75rem; color: var(--muted); margin-top: 12px; }
.sheet .letter { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: .82rem; white-space: pre-wrap; }
.success { text-align: center; padding: 18px 0 6px; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: var(--navy); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 10px; animation: pop .4s; }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-tag { position: absolute; bottom: 74px; inset-inline-start: 12px; z-index: 5; font-size: .66rem; background: rgba(11,21,48,.75); color: #fff; padding: 2px 8px; border-radius: 999px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
.credit { text-align: center; font-size: .8rem; color: #93a0bf; padding: 14px 16px 22px; background: var(--navy); }
.credit a { color: #cfd8ee; text-decoration: underline; }
.embed .credit { display: none; }
.muted { color: var(--muted); }
.view > div h2 { font-size: 1.15rem; margin-top: 4px; }
.view > div small { color: var(--muted); }
.tabs .tab-genie { width: 26px; height: 26px; border-radius: 7px; }
