/* Nettlo v1.5.0 (formerly Expense Manager) — mobile first.
   Palette from the Nettlo logo; lives in this :root block only. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/poppins-800.woff2") format("woff2"); }

:root {
  /* brand */
  --lav-1: #D1B9F5;
  --lav-2: #E4D3F7;
  --lav-3: #F5EBF9;
  --purple: #9B72E3;
  --purple-2: #8B65DC;
  --purple-ink: #5C3FAD;
  --mint: #66D3B4;
  --mint-2: #82DEC3;
  --indigo: #2E2468;

  /* roles */
  --primary: var(--purple-ink);      /* buttons: 7.6:1 on white text */
  --primary-dark: #4A3290;
  --secondary: var(--mint);
  --secondary-dark: #4FC3A2;
  --on-secondary: var(--indigo);
  --accent: var(--purple-ink);
  --bg: #FAF6FD;
  --surface: #FFFFFF;
  --text: var(--indigo);
  --muted: #5E5685;
  --border: #E4D3F7;
  --border-strong: #D1B9F5;
  --success: #17644F;
  --success-bg: #E3F7F0;
  --danger: #B42346;
  --danger-bg: #FDECF1;
  --danger-ink: #9A1C3B;
  --owing: #B42346;
  --owed: #17644F;
  --on-primary: #FFFFFF;
  --input: #FFFFFF;
  --placeholder: #8A82AE;
  --focus: rgba(152, 114, 227, .45);
  --radius: 20px;
  --radius-sm: 14px;
  --tap: 50px;
  --shadow: 0 1px 2px rgba(46, 36, 104, .05), 0 10px 30px rgba(92, 63, 173, .08);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  min-height: 100dvh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--lav-3) 0, var(--bg) 320px) no-repeat, var(--bg);
}
a { color: var(--accent); text-underline-offset: 3px; }
main { width: min(100%, 44rem); margin: 0 auto; padding: 1.25rem 1.15rem 2.75rem; flex: 1; }
h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.25; margin: .2rem 0 .9rem; letter-spacing: -.015em; }
h2 { font-size: 1.02rem; font-weight: 800; margin: 1.8rem 0 .7rem; color: var(--indigo); }
h3 { font-weight: 600; }
p { margin: .4rem 0 .85rem; }
strong { font-weight: 600; }
.tagline, .lead, .hint, .muted, .crumb, footer p { color: var(--muted); }
.hint { font-size: .9rem; }
.small { font-size: .82rem; }
.lead { font-size: 1.02rem; font-weight: 600; }
.crumb { margin: 0 0 .9rem; font-size: .92rem; }
.crumb a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; min-height: 40px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* top bar */
.top {
  background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top); position: sticky; top: 0; z-index: 20;
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.top-row {
  width: min(100%, 44rem); margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .55rem 1.15rem .35rem;
}
.top .brand {
  color: var(--indigo); text-decoration: none; font-weight: 800; font-size: 1.22rem; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; white-space: nowrap;
}
.top .brand img { width: 32px; height: 32px; display: block; flex: none; border-radius: 9px; }
.top-actions { display: flex; align-items: center; gap: .45rem; flex: none; }
.top-actions form { margin: 0; }
.logout-btn { color: var(--muted); font-size: .88rem; font-weight: 600; padding: 0 .35rem; }
.go-pro-link {
  background: var(--mint); color: var(--indigo); text-decoration: none; font-weight: 700; font-size: .8rem;
  padding: .38rem .8rem; border-radius: 999px; white-space: nowrap; min-height: 34px; display: inline-flex; align-items: center;
}
.go-pro-link:hover { background: var(--mint-2); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-ink)); color: #fff;
  font-weight: 700; font-size: .98rem; text-decoration: none;
  box-shadow: 0 0 0 3px var(--lav-2);
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; box-shadow: 0 0 0 4px var(--lav-2); }
.app-nav {
  width: min(100%, 44rem); margin: 0 auto; display: flex; gap: .4rem; overflow-x: auto;
  padding: .2rem 1.15rem .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-tab {
  flex: none; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem;
  padding: .45rem .95rem; border-radius: 999px; min-height: 38px; display: inline-flex; align-items: center;
}
.app-tab:hover { background: var(--lav-3); color: var(--indigo); }
.app-tab[aria-current="page"] { background: var(--lav-2); color: var(--purple-ink); }

/* auth */
.page.auth main { padding-top: 1.6rem; }
.auth-logo { display: block; width: 88px; height: 88px; margin: 0 auto .8rem; border-radius: 22px; box-shadow: 0 12px 30px rgba(92, 63, 173, .22); }
.auth-card { background: var(--surface); border-radius: 26px; padding: 1.8rem 1.3rem 1.6rem; box-shadow: var(--shadow); margin-top: .6rem; border: 1px solid var(--border); }
.auth-card h1 { margin-bottom: .15rem; text-align: center; font-size: 1.75rem; font-weight: 800; }
.auth-card .tagline { text-align: center; margin-bottom: 1.3rem; }
.switch { text-align: center; margin-top: 1.1rem; }
.made-in-india {
  display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 1.4rem auto 0;
  color: var(--indigo); font-weight: 600; font-size: .92rem; letter-spacing: .01em;
}
.made-in-india .flag { display: block; border-radius: 3px; box-shadow: 0 1px 3px rgba(46, 36, 104, .18); }

/* forms */
label { display: block; font-weight: 600; font-size: .93rem; margin: 1rem 0 .4rem; color: var(--indigo); }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="search"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; height: var(--tap); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 1rem; font: inherit; background: var(--input); color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input[readonly], input:disabled { background: var(--lav-3); color: var(--muted); border-color: var(--border); }
input::placeholder { color: var(--placeholder); opacity: 1; }
input:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px var(--focus); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--purple-ink) 50%), linear-gradient(135deg, var(--purple-ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; min-height: var(--tap); border: 0; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 1rem; text-align: center; text-decoration: none;
  cursor: pointer; padding: .8rem 1rem; margin-top: 1rem;
  -webkit-tap-highlight-color: transparent; transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px rgba(92, 63, 173, .25); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--secondary); color: var(--on-secondary); }
.btn.secondary:hover { background: var(--secondary-dark); }
.btn.ghost { background: var(--surface); color: var(--purple-ink); border: 1.5px solid var(--border-strong); }
.btn.ghost:hover { background: var(--lav-3); border-color: var(--purple); }
.row-actions { margin: 1rem 0; }
.row-actions.two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row-actions.two .btn { margin-top: 0; }
.row-actions + .row-actions { margin-top: -.3rem; }

/* summary tiles */
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 1rem; }
.total { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.05rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.total span { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; }
.total strong { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.total.pos { background: linear-gradient(160deg, #fff 40%, var(--success-bg)); }
.total.neg { background: linear-gradient(160deg, #fff 40%, var(--danger-bg)); }
.total.pos strong { color: var(--owed); }
.total.neg strong { color: var(--owing); }

/* cards */
.stack { display: flex; flex-direction: column; gap: .7rem; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; border: 1px solid var(--border);
}
a.card { transition: border-color .15s, transform .1s; }
a.card:hover { border-color: var(--lav-1); }
a.card:active { transform: scale(.995); }
.group-card { position: relative; padding-right: 2.6rem; }
.group-card::after { content: "›"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--lav-1); font-weight: 400; }
.group-card strong { display: block; font-size: 1.05rem; font-weight: 600; }
.group-card span { display: block; margin-top: .15rem; font-size: .92rem; }
.pos { color: var(--owed); font-weight: 600; }
.neg { color: var(--owing); font-weight: 600; }
.zero { color: var(--muted); }

.tabs {
  display: flex; gap: .25rem; overflow-x: auto; margin: 0 0 1.1rem; padding: .3rem;
  background: var(--lav-3); border-radius: 999px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 1 1 0; text-align: center; text-decoration: none; color: var(--muted);
  font-weight: 600; padding: .55rem .7rem; border-radius: 999px; min-width: max-content;
  font-size: .88rem; white-space: nowrap; min-height: 40px; display: flex; align-items: center; justify-content: center;
}
.tabs a[aria-current="page"] { color: var(--purple-ink); background: var(--surface); box-shadow: 0 2px 8px rgba(92, 63, 173, .12); }

.flash { border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 0 0 1rem; font-weight: 500; font-size: .95rem; }
.flash.ok { background: var(--success-bg); color: var(--success); border: 1px solid #BDEBDD; }
.flash.err { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid #F6C9D5; }

.share-list { display: flex; flex-direction: column; gap: .55rem; margin: .6rem 0 1rem; }
.share-row {
  display: flex; align-items: center; gap: .6rem; margin: 0; font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .45rem .7rem;
  min-height: var(--tap);
}
.share-row input[type="checkbox"] { width: 1.35rem; height: 1.35rem; accent-color: var(--purple-ink); flex: none; }
.share-row .who { flex: 1; }
.inr-wrap { display: flex; align-items: center; gap: .25rem; color: var(--muted); font-weight: 600; }
.inr-wrap input { width: 6.6rem; height: 2.6rem; text-align: right; padding: 0 .6rem; }
.share-sum { font-weight: 600; min-height: 1.4em; }
.share-sum.bad { color: var(--danger); }
.share-sum.good { color: var(--success); }

.exp-top { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.amt { font-weight: 700; white-space: nowrap; color: var(--indigo); }
.shares { font-size: .88rem; color: var(--muted); }
.item-actions { display: flex; gap: 1.1rem; margin-top: .4rem; }
.link-btn {
  background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600;
  cursor: pointer; padding: .4rem 0; min-height: 44px;
}
.item-actions .link-btn, .item-actions a { font-size: .92rem; }
.item-actions .link-btn { color: var(--danger); }
form.inline { display: inline; margin: 0; }
.deleted { opacity: .55; }
.deleted strong { text-decoration: line-through; }

.people, .balances { list-style: none; padding: 0; margin: 0 0 1rem; }
.people li, .balances li {
  background: var(--surface); border-radius: var(--radius-sm); padding: .9rem 1.05rem; margin-bottom: .55rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.balances li { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.you { font-size: .72rem; color: var(--purple-ink); background: var(--lav-2); border-radius: 999px; padding: .05rem .5rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.suggest { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.empty { background: var(--surface); border: 1.5px dashed var(--lav-1); border-radius: var(--radius); padding: 1.3rem 1.1rem; color: var(--muted); text-align: center; }
.more { margin-top: 1.1rem; text-align: center; }
.more a { font-weight: 600; }

footer {
  text-align: center; flex-shrink: 0;
  padding: 1rem 1.1rem 1.4rem; padding-bottom: max(1.4rem, env(safe-area-inset-bottom));
  font-size: .78rem; line-height: 1.4;
}
footer p { margin: 0; }
footer .powered { margin-top: .2rem; }
footer .powered a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 720px) {
  main { padding-top: 2rem; }
  .auth-card { padding: 2.2rem 2.2rem 2rem; }
  .page.auth main { width: min(100%, 30rem); padding-top: 3rem; }
  h1 { font-size: 1.8rem; }
  .totals { gap: 1rem; }
}

/* Pro, advances, reports */
.badge-pro {
  display: inline-flex; align-items: center; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; background: var(--mint); color: var(--indigo);
  border-radius: 999px; padding: .12rem .55rem; vertical-align: middle;
}
.top-actions .badge-pro { padding: .3rem .7rem; font-size: .74rem; }
.btn.locked { opacity: .96; }
.promo {
  display: block; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, var(--purple-ink), var(--purple) 70%, var(--purple-2));
  border-radius: var(--radius); padding: 1.05rem 1.15rem; box-shadow: 0 10px 26px rgba(92, 63, 173, .25); margin: 0 0 1.1rem;
  position: relative; overflow: hidden;
}
.promo::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(130, 222, 195, .35); }
.promo strong { display: block; font-weight: 700; position: relative; }
.promo span { display: block; color: #F1E9FC; margin-top: .2rem; font-size: .9rem; position: relative; }
.pro-pill {
  display: inline-block; background: var(--success-bg); color: var(--success);
  border-radius: 999px; padding: .2rem .8rem; font-weight: 700; font-size: .82rem; margin: 0 0 1rem;
}
.upsell { background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.1rem 1.3rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.2rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.feature-list li { margin: 0; padding: .8rem 1rem .8rem 2.9rem; position: relative; border-bottom: 1px solid var(--lav-3); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: "✓"; position: absolute; left: 1rem; top: .82rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--mint); color: var(--indigo); font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.price { font-size: 2rem; font-weight: 800; color: var(--purple-ink); letter-spacing: -.02em; }
.price span { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.qr-box { background: var(--surface); border-radius: var(--radius); padding: 1.1rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.qr-box img { display: block; margin: 0 auto .55rem; width: min(240px, 100%); height: auto; background: #fff; }
.qr-share-row { margin: 0 0 .7rem; }
.qr-share {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #25D366; color: #fff; text-decoration: none;
  border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit;
  appearance: none; -webkit-appearance: none; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.qr-share svg { display: block; width: 22px; height: 22px; }
.qr-share:hover, .qr-share:focus-visible { background: #1EBE57; }
.qr-share:focus-visible { outline: 2px solid #075E54; outline-offset: 2px; }
.qr-share:active { transform: scale(.96); }
.mono { font-size: .78rem; word-break: break-all; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.chip {
  text-decoration: none; color: var(--muted); background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 999px; padding: .45rem .9rem; font-weight: 600; font-size: .9rem; min-height: 40px; display: inline-flex; align-items: center;
}
.chip[aria-current="page"] { border-color: var(--purple); color: var(--purple-ink); background: var(--lav-3); }
.chart { display: block; margin: .4rem 0 1rem; max-width: 100%; height: auto; }
fieldset.choice { border: 0; padding: 0; margin: .4rem 0 1rem; }
fieldset.choice legend { font-weight: 600; margin: 0 0 .4rem; }

.em-toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  background: var(--indigo); color: #fff; padding: .75rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .92rem; font-weight: 600; z-index: 80;
  width: max-content; max-width: calc(100% - 2rem);
  text-align: center; box-shadow: 0 10px 26px rgba(46, 36, 104, .3); pointer-events: none;
}

/* account recovery */
.recover-links { line-height: 2; font-size: .92rem; }
.recover-links a { font-weight: 600; }
.support-note { text-align: center; margin-top: .8rem; font-size: .88rem; }
.optional { font-weight: 400; color: var(--muted); }
.field-hint { margin: .4rem 0 0; font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.recovery h3 { font-size: 1rem; margin: 0 0 .35rem; }
.rec-card { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.15rem 1.2rem; box-shadow: var(--shadow); margin: 0 0 1rem; border: 1px solid var(--border); }
.rec-card.highlight { border: 2px solid var(--purple); }
.rec-card form { margin: 0; }
.rec-card .hint { margin: .6rem 0 0; }
.status-line { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; vertical-align: middle; }
.pill-ok { background: var(--success-bg); color: var(--success); }
.pill-warn { background: #FFF2DE; color: #8A4B00; }
.inline-link { padding: 0; font-size: .9rem; text-decoration: underline; color: var(--accent); }
.btn-row { display: flex; gap: .6rem; }
.btn-row .btn { flex: 1; }
.code-card { background: var(--surface); border: 2px dashed var(--purple); border-radius: var(--radius); padding: 1.2rem; text-align: center; margin: 1rem 0; }
.code-value { font-size: 1.35rem; font-weight: 800; margin: 0; user-select: all; word-break: break-all; color: var(--indigo); }
.user-results { list-style: none; padding: 0; margin: 1rem 0 0; }
.user-results li { background: var(--surface); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: .6rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.user-results p { margin: 0; overflow-wrap: anywhere; }
.user-results .hint { margin-top: .2rem; font-size: .85rem; }

/* admin user counts */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 1.3rem; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.05rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat:first-child { background: linear-gradient(135deg, var(--purple-ink), var(--purple)); color: #fff; border: 0; }
.stat:first-child span { color: #EDE3FB; }
.stat span { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat strong { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat-list { list-style: none; padding: 0; margin: 0 0 1.3rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border); }
.stat-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 1.05rem; border-bottom: 1px solid var(--lav-3); margin: 0; }
.stat-list li:last-child { border-bottom: 0; }
.stat-list span { color: var(--muted); }
.admin-tools { margin: 1.1rem 0 0; }
.admin-tools a { font-weight: 600; text-decoration: none; }

/* v1.3.0 profile */
.profile-head { display: flex; align-items: center; gap: 1rem; margin: .2rem 0 .4rem; }
.profile-head h1 { margin: 0; font-size: 1.45rem; overflow-wrap: anywhere; }
.profile-head p { margin: .1rem 0 0; }
.details { padding: .2rem 1.1rem; margin: 0; }
.detail-row { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--lav-3); align-items: baseline; }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--muted); font-size: .88rem; flex: none; }
.detail-row dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.form-card { padding: .3rem 1.1rem 1.2rem; }
.plan { display: inline-block; border-radius: 999px; padding: .08rem .6rem; font-size: .8rem; font-weight: 700; }
.plan-pro { background: var(--mint); color: var(--indigo); }
.plan-free { background: var(--lav-2); color: var(--purple-ink); }
.inline-cta { font-size: .85rem; font-weight: 600; margin-left: .3rem; white-space: nowrap; }
.item-actions { align-items: center; }
.item-actions a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.tabs a { padding: .55rem .6rem; font-size: .86rem; }

/* ---------- v1.4.0 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.foot-links { margin-top: .25rem !important; }
.foot-links a, .ver-link { color: inherit; }
.ver-link { font-weight: 600; }

/* header avatar photo */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.has-photo { background: var(--lav-2); }

/* profile */
.profile-head { flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 0; }
.logout-form { margin: 0; }
.logout-top { width: auto; min-height: 40px; margin: 0; padding: .4rem .95rem; font-size: .88rem; }
.logout-btn-big { background: var(--danger-bg); color: var(--danger-ink); border: 1.5px solid #F6C9D5; margin-top: 1.4rem; }
.logout-btn-big:hover { background: #FBDDE6; }
.photo-card { padding: .2rem 1.1rem 1rem; margin: 1rem 0 0; }
.photo-label { margin-top: .9rem; }
input[type="file"] { width: 100%; font: inherit; font-size: .9rem; color: var(--muted); padding: .55rem; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--lav-3); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .45rem .9rem; margin-right: .7rem; background: var(--primary); color: #fff; cursor: pointer; }
.photo-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.photo-actions .btn { width: auto; flex: 0 0 auto; padding: .6rem 1.2rem; min-height: 44px; }
.danger-link { color: var(--danger) !important; }
.link-list { padding: .2rem 0; }
.link-list a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: .6rem 1.1rem; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--lav-3); color: var(--indigo); }
.link-list a::after { content: "›"; color: var(--lav-1); font-size: 1.4rem; font-weight: 400; }
.link-list a:last-child { border-bottom: 0; }
.sub-details { border-top: 1px solid var(--lav-3); margin-top: .9rem; padding-top: .3rem; }
.sub-details summary { cursor: pointer; font-weight: 600; color: var(--purple-ink); min-height: 44px; display: flex; align-items: center; }
.btn.danger { color: var(--danger-ink); border-color: #F6C9D5; }
.inline-row { display: block; }
.pin-input { letter-spacing: .5em; font-size: 1.3rem !important; text-align: center; }

/* lock screen */
.page.locked main { padding-top: 2.4rem; }
.lock-card { text-align: center; }
.lock-avatar { margin: 0 auto .7rem; }
.lock-card label { text-align: left; }
.forgot-pin { margin-top: 1rem; text-align: left; }
.forgot-pin summary { cursor: pointer; font-weight: 600; color: var(--purple-ink); text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* split type segmented control */
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; padding: .3rem; margin: 0 0 .5rem; border: 0; background: var(--lav-3); border-radius: 16px; }
.segmented.two-seg { grid-template-columns: 1fr 1fr; margin-top: 1rem; }
.seg { margin: 0; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; border-radius: 12px; font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; gap: .2rem; flex-wrap: wrap; line-height: 1.15; padding: .2rem; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg:has(input:checked) { background: var(--surface); color: var(--purple-ink); box-shadow: 0 2px 8px rgba(92, 63, 173, .14); }
.seg:has(input:focus-visible) { outline: 3px solid var(--focus); }
.seg.locked { font-size: .78rem; }
.seg.locked .badge-pro { font-size: .58rem; padding: .05rem .35rem; }
.mode-percent, .mode-shares, .mode-note, .mode-exact-btn { display: none; }
.share-row .calc { font-size: .82rem; color: var(--muted); font-weight: 600; min-width: 4.8rem; text-align: right; display: none; }
#expense-form[data-mode="equal"] .mode-exact, #expense-form[data-mode="percent"] .mode-exact, #expense-form[data-mode="shares"] .mode-exact { display: none; }
#expense-form[data-mode="percent"] .mode-percent, #expense-form[data-mode="shares"] .mode-shares { display: flex; }
#expense-form[data-mode="equal"] .calc, #expense-form[data-mode="percent"] .calc, #expense-form[data-mode="shares"] .calc { display: block; }
#expense-form[data-mode="exact"] .mode-exact-btn, #expense-form[data-mode=""] .mode-exact-btn { display: flex; }
#expense-form[data-mode="equal"] .mode-note-equal, #expense-form[data-mode="exact"] .mode-note-exact, #expense-form[data-mode="percent"] .mode-note-percent, #expense-form[data-mode="shares"] .mode-note-shares { display: block; }
.mode-percent input, .mode-shares input { width: 4.6rem; }
.itemised-hint { margin-top: -.4rem; }

/* balances / statements */
.balances li > div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.stmt-link { font-size: .8rem; font-weight: 600; text-decoration: none; }
.kitty-row { background: linear-gradient(160deg, #fff 40%, #E8FBF5) !important; }
.kitty-suggest { color: var(--muted); }
.wa-btn { background: #25D366; color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 211, 102, .28); }
.wa-btn:hover { background: #1EBE57; }
.wa-btn svg { width: 22px; height: 22px; }
.wa-preview { margin: .6rem 0 0; }
.wa-preview summary { cursor: pointer; font-size: .88rem; color: var(--muted); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.wa-preview pre { white-space: pre-wrap; font: inherit; font-size: .85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem; margin: .3rem 0 0; color: var(--indigo); }
.stmt-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .4rem 0 .8rem; }
.stmt-summary .stat strong { font-size: 1.15rem; }
.stmt-summary .stat:first-child { background: var(--surface); color: inherit; border: 1px solid var(--border); }
.stmt-summary .stat:first-child span { color: var(--muted); }
.stmt-summary .stat.bal { background: linear-gradient(135deg, var(--purple-ink), var(--purple)); color: #fff; border: 0; }
.stmt-summary .stat.bal span { color: #EDE3FB; }
.stmt-summary .stat.bal strong { color: #fff; }
.stmt-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.stmt-row { display: flex; justify-content: space-between; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--lav-3); margin: 0; }
.stmt-row:last-child { border-bottom: 0; }
.stmt-main { min-width: 0; display: flex; flex-direction: column; }
.stmt-main strong { font-size: .93rem; overflow-wrap: anywhere; }
.stmt-nums { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; font-weight: 700; }
.stmt-list .empty { border: 0; }
.group-bal li a { font-weight: 600; text-decoration: none; }

/* kitty */
.kitty-hero { background: linear-gradient(135deg, #5C3FAD, #9872E3 65%, #66D3B4 140%); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: 0 10px 26px rgba(92, 63, 173, .25); }
.kitty-hero span { display: block; color: #EDE3FB; font-size: .85rem; font-weight: 500; }
.kitty-hero strong { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.kitty-hero p { margin: .2rem 0 0; color: #F1E9FC; font-size: .88rem; }
.table-wrap { padding: 0; overflow-x: auto; }
.kitty-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.kitty-table th, .kitty-table td { padding: .65rem .5rem; text-align: right; border-bottom: 1px solid var(--lav-3); white-space: nowrap; }
.kitty-table th:first-child { text-align: left; white-space: normal; padding-left: .75rem; }
.kitty-table td:last-child { padding-right: .75rem; }
.kitty-table td small { display: block; font-size: .7rem; font-weight: 500; opacity: .85; }
.kitty-table thead th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kitty-table tbody tr:last-child th, .kitty-table tbody tr:last-child td { border-bottom: 0; }
.from-kitty { border-left: 4px solid var(--mint); }

/* itemised bill */
.two-col, .three-col { display: grid; gap: 0 .7rem; }
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: 1fr 1fr 1.3fr; }
.item-row { padding: .7rem .8rem; }
.item-top { display: flex; gap: .5rem; align-items: center; }
.item-top > input { flex: 1; min-width: 0; height: 2.8rem; }
.item-top .inr-wrap input { width: 5.6rem; height: 2.8rem; }
.who-chips { margin: .55rem 0 0; gap: .4rem; }
.chip-check { margin: 0; font-weight: 600; font-size: .84rem; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .8rem; border-radius: 999px; border: 1.5px solid var(--border); color: var(--muted); background: var(--surface); cursor: pointer; }
.chip-check input:checked + span { background: var(--lav-2); border-color: var(--purple); color: var(--purple-ink); }
.chip-check input:focus-visible + span { outline: 3px solid var(--focus); }
.disc-wrap { display: flex; gap: .3rem; }
.disc-wrap input { min-width: 0; }
.disc-wrap select { width: 4.2rem; flex: none; padding: 0 1.6rem 0 .7rem; background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%; }
.bill-summary { margin-top: 1rem; }
.bill-lines { margin: 0 0 .6rem; }
.bill-lines div { display: flex; justify-content: space-between; padding: .2rem 0; }
.bill-lines dt { color: var(--muted); }
.bill-lines dd { margin: 0; font-weight: 600; }
.bill-total { border-top: 1px solid var(--lav-2); margin-top: .3rem; padding-top: .45rem !important; font-size: 1.05rem; }
.bill-total dt { color: var(--indigo); font-weight: 700; }
.bill-people { list-style: none; padding: 0; margin: 0; }
.bill-people li { display: grid; grid-template-columns: 1fr auto auto; gap: .7rem; align-items: baseline; padding: .45rem 0; border-top: 1px dashed var(--lav-2); }

/* help + changelog */
.page.wide main { width: min(100%, 40rem); }
.faq-list { display: flex; flex-direction: column; gap: .55rem; }
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: .85rem 2.6rem .85rem 1.05rem; min-height: 50px; display: flex; align-items: center; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.05rem; top: 50%; transform: translateY(-50%); font-size: 1.35rem; color: var(--purple); font-weight: 500; }
.faq[open] summary::after { content: "−"; }
.faq[open] summary { color: var(--purple-ink); }
.faq-body { padding: 0 1.05rem .9rem; font-size: .94rem; }
.faq-body p, .faq-body ul { margin: .1rem 0 .6rem; }
.faq-body ul { padding-left: 1.1rem; }
.faq-body li { margin-bottom: .3rem; }
.contact-card { margin-top: 1rem; }
.contact-card p { margin: .2rem 0 0; }
.release h2 { margin: .3rem 0 .5rem; font-size: 1.05rem; }
.release ul { margin: 0; padding-left: 1.15rem; font-size: .93rem; }
.release li { margin-bottom: .3rem; }
.release-top { display: flex; justify-content: space-between; align-items: center; }
.ver { font-weight: 800; color: var(--purple-ink); background: var(--lav-2); border-radius: 999px; padding: .1rem .65rem; font-size: .82rem; }
.release.latest { border: 2px solid var(--purple); }
.release.latest .ver { background: var(--mint); color: var(--indigo); }

/* ===== v1.5.0: email code, members by mobile, member ledger, A4 statement, settlement QR ===== */
.center { text-align: center; }
.eyebrow { text-align: center; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--purple); margin: .3rem 0 0; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 800; }
.mobile-field { display: flex; align-items: stretch; }
.mobile-field span { display: flex; align-items: center; padding: 0 .75rem; border: 1.5px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--lav-3); color: var(--indigo); font-weight: 700; }
.mobile-field input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; flex: 1; min-width: 0; margin: 0; }
.mobile-field { margin-bottom: .2rem; }
.inline-form { display: inline; margin: 0; }
.inline-form.center { display: block; text-align: center; margin: .6rem 0 0; }
.linklike { background: none; border: 0; padding: .4rem; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-prompt { display: block; text-decoration: none; background: linear-gradient(135deg, var(--mint-2), var(--mint)); color: var(--indigo); border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.link-prompt strong { display: block; font-weight: 800; }
.link-prompt span { font-size: .9rem; }
.invite-card .stack { margin-top: .6rem; }
.members-list li.member-row { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; }
.member-row.is-pending { background: var(--lav-3); }
.member-main { min-width: 0; overflow-wrap: anywhere; }
.member-main .muted { white-space: nowrap; font-size: .86rem; }
.member-side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-size: .86rem; text-align: right; }
.tiny-link { font-size: .8rem; font-weight: 600; }
.mini-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lav-2); color: var(--purple-ink); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pill-pending { background: var(--lav-2); color: var(--purple-ink); }
.pill-sync { background: var(--mint-2); color: var(--indigo); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .62rem; }
.btn.small { min-height: 34px; padding: .25rem .7rem; font-size: .82rem; margin: 0; }
.btn.wa-btn svg { width: 18px; height: 18px; }
.form-card label:first-of-type { margin-top: 0; }
.alt-add { margin-top: 1rem; }
.alt-add summary { cursor: pointer; font-weight: 600; color: var(--purple-ink); }
.ml-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.ml-head h1 { margin: 0; font-size: 1.35rem; }
.ml-head p { margin: 0; font-size: .85rem; }
.group-badge { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--purple), var(--purple-ink)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.ml-card { background: linear-gradient(160deg, var(--purple-ink) 0, var(--purple-2) 70%, var(--purple) 100%); color: #fff; border-radius: var(--radius); padding: 1.1rem; box-shadow: 0 12px 28px rgba(92, 63, 173, .28); }
.ml-member { display: flex; align-items: center; gap: .7rem; }
.ml-member small { display: block; color: var(--lav-1); font-size: .75rem; }
.ml-member strong { font-size: 1.1rem; font-weight: 800; }
.ml-member .pill { margin-left: auto; }
.avatar-lg { width: 46px; height: 46px; border-radius: 50%; background: var(--mint); color: var(--indigo); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.ml-net { margin-top: 1rem; }
.ml-net small { color: var(--lav-2); font-size: .8rem; margin-right: .4rem; }
.ml-amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; margin: .2rem 0 .3rem; color: #fff; }
.ml-amount.neg { color: #fff; }
.ml-amount.pos { color: var(--mint-2); }
.ml-payee { display: flex; align-items: center; gap: .6rem; background: rgba(255, 255, 255, .12); border-radius: var(--radius-sm); padding: .55rem .7rem; margin-top: .5rem; }
.ml-payee small { display: block; color: var(--lav-1); font-size: .72rem; }
.ml-payee b { margin-left: auto; font-weight: 800; }
.ml-payee .mini-avatar { background: var(--mint); color: var(--indigo); }
.ml-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .9rem 0 0; }
.ml-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .6rem; }
.ml-stats small { display: block; color: var(--muted); font-size: .72rem; }
.ml-stats strong { font-weight: 800; font-size: .92rem; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; }
.ml-list { list-style: none; padding: 0; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ml-row { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: .6rem; padding: .7rem .8rem; border-top: 1px solid var(--lav-2); align-items: center; }
.ml-row:first-child { border-top: 0; }
.ml-date { font-size: .75rem; font-weight: 700; color: var(--purple-ink); background: var(--lav-3); border-radius: 8px; text-align: center; padding: .25rem .2rem; }
.ml-desc strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.ml-desc small { color: var(--muted); font-size: .75rem; }
.ml-amt { font-weight: 800; font-size: .9rem; white-space: nowrap; }
/* settlement QR card */
.qr-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 14px 34px rgba(46, 36, 104, .14); padding: 1.1rem 1.1rem .8rem; text-align: center; max-width: 22rem; margin: 0 auto 1rem; }
.qr-card header { display: flex; justify-content: space-between; align-items: center; }
.qr-brand { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; color: var(--indigo); }
.qr-tag { background: var(--indigo); color: #fff; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; border-radius: 999px; padding: .2rem .6rem; }
.qr-group { margin: .8rem 0 0; font-weight: 700; color: var(--purple-ink); }
.qr-owes { margin: .2rem 0 0; }
.qr-amount { font-size: 2.1rem; font-weight: 800; margin: 0 0 .5rem; color: var(--indigo); letter-spacing: -.02em; }
.qr-box { background: #fff; border: 2px solid var(--lav-2); border-radius: 18px; padding: .6rem; display: inline-block; }
.qr-img { display: block; width: 220px; height: 220px; }
.qr-missing { max-width: 16rem; margin: .5rem; color: var(--muted); }
.qr-scan { font-size: .8rem; color: var(--muted); margin: .4rem 0 .6rem; }
.qr-payee { display: flex; align-items: center; gap: .6rem; text-align: left; background: var(--lav-3); border-radius: var(--radius-sm); padding: .55rem .7rem; }
.qr-payee small { display: block; color: var(--muted); font-size: .72rem; }
.qr-payee em { display: block; font-style: normal; font-size: .8rem; color: var(--purple-ink); }
.qr-card footer { font-size: .72rem; color: var(--muted); margin-top: .6rem; border-top: 1px dashed var(--lav-2); padding-top: .45rem; }
/* A4 monochrome statement */
.page.statement main { width: min(100%, 52rem); }
.stmt-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.stmt-bar .btn { width: auto; margin: 0; }
.a4-sheet { background: #fff; color: #000; border: 1px solid #ddd; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); padding: 1.4rem 1.2rem; font-size: .82rem; }
.a4-sheet h1, .a4-sheet h2 { color: #000; }
.stmt-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid #000; padding-bottom: .7rem; }
.stmt-brand { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.2rem; }
.stmt-mark { width: 30px; height: 30px; border: 2px solid #000; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.stmt-title { text-align: right; }
.stmt-title h1 { font-size: 1.05rem; margin: 0 0 .2rem; text-transform: uppercase; letter-spacing: .06em; }
.stmt-title p { margin: 0; font-size: .75rem; }
.stmt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; margin: .9rem 0; }
.stmt-meta dt { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.stmt-meta dd { margin: 0; font-weight: 700; }
.stmt-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; margin: .6rem 0 .3rem; }
.stmt-sub span { font-weight: 500; text-transform: none; letter-spacing: 0; }
.stmt-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stmt-table th { text-align: left; border-bottom: 1.5px solid #000; padding: .35rem .3rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.stmt-table td { border-bottom: 1px solid #e5e5e5; padding: .4rem .3rem; vertical-align: top; }
.stmt-table .num { text-align: right; white-space: nowrap; }
.stmt-table tfoot td { border-top: 1.5px solid #000; border-bottom: 0; font-weight: 800; }
.stmt-calc { border: 1.5px solid #000; border-radius: 6px; padding: .7rem .8rem; margin-top: 1rem; }
.stmt-formula { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .3rem; }
.stmt-eq { font-size: 1rem; margin: 0; font-variant-numeric: tabular-nums; }
.stmt-eq strong { font-weight: 800; font-size: 1.15rem; }
.stmt-word { border: 1.5px solid #000; border-radius: 4px; padding: .05rem .4rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em; margin-left: .3rem; }
.stmt-note { font-size: .72rem; color: #444; margin: .3rem 0 0; }
.stmt-foot { display: flex; justify-content: space-between; gap: .6rem; border-top: 1px solid #000; margin-top: 1.4rem; padding-top: .5rem; font-size: .66rem; color: #444; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: #fff !important; }
  header.top, footer, .no-print, .flash { display: none !important; }
  main { width: 100% !important; padding: 0 !important; }
  .a4-sheet { border: 0; box-shadow: none; padding: 0; font-size: 10pt; }
  .stmt-table tr { break-inside: avoid; }
}
.stmt-table td:first-child { white-space: nowrap; }

/* v1.5.0 simplified sign-in card */
.auth-simple { padding-top: 2.2rem; padding-bottom: 2.2rem; }
.auth-simple .auth-logo { margin-bottom: .9rem; }
.auth-simple h1 { margin-bottom: .35rem; }
.tagline.one-line { white-space: nowrap; margin-bottom: 1.8rem; }
.auth-simple form .btn.primary { margin-top: 1.4rem; }
.page.auth .made-in-india { margin-top: 2rem; }

/* v1.6.0 plans */
.plan-now { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.plan-grid { display: flex; flex-direction: column; gap: .9rem; margin: 1rem 0; }
.plan-card { position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.1rem 1rem; box-shadow: var(--shadow); }
.plan-card h2 { margin: 0; font-size: 1.1rem; }
.plan-card form { margin: 0; }
.plan-card .btn { margin-top: .7rem; }
.plan-card.hero { border: 2px solid var(--purple); background: linear-gradient(160deg, #fff 55%, var(--lav-3)); box-shadow: 0 14px 30px rgba(92, 63, 173, .18); }
.plan-card.free { box-shadow: none; background: var(--lav-3); }
.plan-tag { position: absolute; top: -.7rem; right: 1rem; background: var(--mint); color: var(--indigo); font-size: .7rem; font-weight: 800; border-radius: 999px; padding: .2rem .7rem; }
.plan-tag.founders { background: var(--indigo); color: #fff; }
.plan-price { font-size: 1.9rem; font-weight: 800; color: var(--purple-ink); margin: .2rem 0 .1rem; letter-spacing: -.02em; }
.plan-price span { font-size: .9rem; font-weight: 600; color: var(--muted); }
.plan-blurb { margin: .2rem 0 0; font-size: .92rem; color: var(--muted); }
.plan-features summary { cursor: pointer; font-weight: 700; color: var(--purple-ink); }

/* v1.7.0 welcome flow: splash + how-it-works slides */
.switch.small { font-size: .85rem; margin: 1rem 0 0; text-align: center; }
.page.welcome { background: linear-gradient(180deg, var(--lav-3) 0%, #fff 70%); }
.page.welcome main { padding: 0 0 1rem; display: flex; flex-direction: column; }
.page.welcome footer { display: none; }
.wl { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.wl-splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.5rem; }
.wl-how { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.js .wl.started .wl-splash, .js .wl:not(.started) .wl-how { display: none; }
.wl-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem .2rem; }
.wl-brand { font-weight: 800; color: var(--indigo); }
.wl-skip { color: var(--purple-ink); font-weight: 600; text-decoration: none; padding: .4rem .2rem; }
.wl-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wl-track::-webkit-scrollbar { display: none; }
.wl-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem 1.6rem; box-sizing: border-box; }
.wl-slide h2 { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 1.55rem; margin: 1.2rem 0 .5rem; }
.wl-slide p { color: var(--muted); max-width: 22rem; line-height: 1.55; }
.wl-art { width: 100%; max-width: 270px; height: auto; }
.wl-last .btn { max-width: 20rem; width: 100%; }
.wl-logo-sm { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 24px rgba(92, 63, 173, .22); }
.google-btn { margin-top: .8rem; display: flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; color: #1F1F1F; border: 1px solid #DADCE0; font-weight: 600; }
.google-btn:hover { background: #F8F9FA; }
.google-btn[disabled] { opacity: .55; cursor: not-allowed; }
.g-logo { width: 20px; height: 20px; flex: 0 0 20px; }
.hint.center { text-align: center; }
.wl-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem 1.4rem; }
.wl-dots { display: flex; gap: .45rem; }
.wl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lav-1); }
.wl-dot.on { background: var(--purple-ink); width: 24px; border-radius: 5px; }
.wl-next { width: auto; margin: 0; padding-left: 1.8rem; padding-right: 1.8rem; }
.wl-how.at-end .wl-next { visibility: hidden; }
.upi-pay { margin-top: 1rem; }
.page.welcome main { padding-bottom: 0; }
.wl-how { height: 100vh; height: 100dvh; }

/* v1.7.0 offline badge */
.sync-badge { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(92vw, 26rem); background: var(--indigo); color: #fff; border-radius: 18px; padding: .55rem .7rem .55rem 1rem; box-shadow: 0 12px 30px rgba(46, 36, 104, .35); z-index: 60; font-size: .9rem; }
.sync-badge[hidden] { display: none; }
.sync-row { display: flex; align-items: center; gap: .6rem; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); flex: 0 0 10px; }
.sync-badge.offline .sync-dot { background: #F5B85C; }
.sync-badge.busy .sync-dot { animation: wl-blink 1s infinite; }
@keyframes wl-blink { 50% { opacity: .3; } }
.sync-text { flex: 1; font-weight: 600; cursor: pointer; }
.sync-now { background: var(--mint); color: var(--indigo); border: 0; border-radius: 12px; padding: .45rem .8rem; font: inherit; font-weight: 700; min-height: 36px; }
.sync-now[hidden] { display: none; }
.sync-list, .sync-notes { list-style: none; margin: 0; padding: 0; display: none; }
.sync-badge.open .sync-list, .sync-badge.open .sync-notes { display: block; }
.sync-list li, .sync-notes li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0 0; font-size: .85rem; color: #E4D3F7; }
.sync-notes li { color: #FFE3B3; }
.sync-list button, .sync-clear { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; min-width: 32px; min-height: 30px; font: inherit; }
.sync-badge.done { background: var(--purple-ink); }

/* v1.7.0 splash, playful version (~2.5 s, then holds). Transforms/opacity only: no layout shift. */
.wl-logo-wrap { position: relative; width: 128px; height: 128px; }
.wl-logo { display: block; width: 128px; height: 128px; border-radius: 32px; box-shadow: 0 18px 40px rgba(92, 63, 173, .28); transform-origin: 50% 100%; animation: wl-drop 1.6s cubic-bezier(.33, 0, .2, 1) both; }
@keyframes wl-drop {
  0%   { opacity: 0; transform: translateY(-70vh) scale(.92, 1.12); }
  6%   { opacity: 1; }
  24%  { transform: translateY(0) scale(1.18, .78); }      /* land: squash */
  33%  { transform: translateY(-46px) scale(.94, 1.08); }  /* bounce 1: stretch */
  42%  { transform: translateY(0) scale(1.1, .88); }
  49%  { transform: translateY(-16px) scale(.98, 1.03); }  /* bounce 2 */
  55%  { transform: translateY(0) scale(1.04, .96); }
  60%  { transform: translateY(0) scale(1) rotate(0); }
  66%  { transform: rotate(-7deg); }                       /* wiggle */
  72%  { transform: rotate(6deg); }
  78%  { transform: rotate(-3deg); }
  84%  { transform: rotate(0) scale(1); }
  91%  { transform: scale(1.1); }                          /* pop */
  100% { opacity: 1; transform: none; }
}
.wl-coins { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.wl-coins i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); opacity: 0; animation: wl-burst .8s cubic-bezier(.15, .7, .3, 1) 1.38s both; }
.wl-coins i:nth-child(1) { --c: #66D3B4; --x: -112px; --y: -64px; }
.wl-coins i:nth-child(2) { --c: #9B72E3; --x: 108px; --y: -70px; width: 10px; height: 10px; }
.wl-coins i:nth-child(3) { --c: #D1B9F5; --x: -128px; --y: 14px; }
.wl-coins i:nth-child(4) { --c: #82DEC3; --x: 124px; --y: 20px; width: 11px; height: 11px; }
.wl-coins i:nth-child(5) { --c: #9B72E3; --x: -82px; --y: 84px; width: 9px; height: 9px; }
.wl-coins i:nth-child(6) { --c: #66D3B4; --x: 88px; --y: 88px; }
.wl-coins i:nth-child(7) { --c: #82DEC3; --x: -26px; --y: -118px; width: 10px; height: 10px; }
.wl-coins i:nth-child(8) { --c: #D1B9F5; --x: 34px; --y: -112px; width: 12px; height: 12px; }
@keyframes wl-burst {
  0%   { opacity: 0; transform: translate(0, 0) scale(.3); }
  15%  { opacity: 1; }
  70%  { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.12), calc(var(--y) * 1.12 + 14px)) scale(.6); }
}
.wl-name { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 2.4rem; color: var(--indigo); margin: 1.2rem 0 .2rem; }
.wl-l { display: inline-block; animation: wl-letter .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.wl-l:nth-child(1) { animation-delay: 1.4s; }
.wl-l:nth-child(2) { animation-delay: 1.46s; }
.wl-l:nth-child(3) { animation-delay: 1.52s; }
.wl-l:nth-child(4) { animation-delay: 1.58s; }
.wl-l:nth-child(5) { animation-delay: 1.64s; }
.wl-l:nth-child(6) { animation-delay: 1.7s; }
@keyframes wl-letter { 0% { opacity: 0; transform: translateY(-22px) scale(.7); } 60% { opacity: 1; transform: translateY(3px) scale(1.06); } 100% { opacity: 1; transform: none; } }
.wl-motto { font-weight: 600; color: var(--purple-ink); font-size: 1.1rem; margin: 0 0 2.2rem; animation: wl-up .5s ease-out 1.85s both; }
.wl-start { max-width: 20rem; animation: wl-up .4s ease-out 2s both, wl-pulse .6s ease-in-out 2.45s 1; }
.wl-free { color: var(--muted); font-size: .85rem; margin-top: 1rem; animation: wl-up .4s ease-out 2.1s both; }
@keyframes wl-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes wl-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(92, 63, 173, .25); } 50% { transform: scale(1.04); box-shadow: 0 10px 26px rgba(92, 63, 173, .38); } }
@media (prefers-reduced-motion: reduce) {
  .wl-logo, .wl-l, .wl-motto, .wl-start, .wl-free { animation: none; }
  .wl-coins { display: none; }
  .wl-track { scroll-behavior: auto; }
}

