/* ============ Hisaab design system ============ */
:root {
  --bg: #fff8f1;
  --bg2: #fff1e3;
  --card: #ffffff;
  --ink: #1d1b2f;
  --muted: #6b6879;
  --line: #f0e3d6;
  --saffron: #ff7a1a;
  --pink: #e8336f;
  --teal: #0f8b8d;
  --indigo: #3b2f8f;
  --green: #129c55;
  --red: #d63a2f;
  --gold: #f2b01e;
  --brand: #0f8b8d;
  --brand-ink: #ffffff;
  --brand-soft: #e2f4f2;
  --grad: linear-gradient(120deg, #ff7a1a 0%, #e8336f 55%, #7b2ff2 100%);
  --grad-teal: linear-gradient(120deg, #0f8b8d 0%, #12a46b 100%);
  --grad-warm: linear-gradient(135deg, #ff9a3c 0%, #e8336f 100%);
  --grad-cool: linear-gradient(135deg, #3b2f8f 0%, #0f8b8d 100%);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 10px 30px rgba(120, 60, 20, .08);
  --shadow-lg: 0 20px 50px rgba(232, 51, 111, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14111d;
    --bg2: #1b1726;
    --card: #1f1b2c;
    --ink: #f3eff8;
    --muted: #a9a3b8;
    --line: #2f2940;
    --brand: #35c9c0;
    --brand-ink: #062322;
    --brand-soft: #163634;
    --green: #3ad884;
    --red: #ff7468;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --shadow-lg: 0 20px 50px rgba(232, 51, 111, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(255, 122, 26, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(15, 139, 141, .08), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--brand); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.grad-text { background: linear-gradient(90deg, #ff7a1a, #e8336f, #7b2ff2, #e8336f, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--grad); opacity: .9; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo i { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 20px; box-shadow: 0 6px 16px rgba(232, 51, 111, .35); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.top nav a:hover { color: var(--ink); }
.top nav a.btn { color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pill strong { color: var(--ink); }
.pill.pro { background: var(--grad); color: #fff; border-color: transparent; }
.pill.pro strong { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 11px 18px; border-radius: 12px; font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-position .4s ease;
}
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--grad); background-size: 160% auto; border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(232, 51, 111, .28); }
.btn.primary:hover { background-position: right center; box-shadow: 0 12px 28px rgba(232, 51, 111, .38); }
.btn.primary::after, .btn.wa::after, .btn.red::after, .btn.teal::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn.primary:hover::after, .btn.wa:hover::after, .btn.red:hover::after, .btn.teal:hover::after { left: 130%; }
.btn.teal { background: var(--grad-teal); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(15, 139, 141, .28); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 15px 26px; font-size: 18px; border-radius: 14px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { color: var(--ink); background: var(--bg2); }
.btn.red { background: linear-gradient(135deg, #f0533f, #d12a5c); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(214, 58, 47, .25); }
.btn.wa { background: linear-gradient(135deg, #25d366, #129c55); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(18, 156, 85, .25); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Landing ---------- */
.hero { position: relative; padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--muted); }
.badge b { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(18,156,85,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(18,156,85,0); } 100% { box-shadow: 0 0 0 0 rgba(18,156,85,0); } }
.hero h1 { font-size: clamp(36px, 5.6vw, 62px); line-height: 1.18; letter-spacing: -.01em; margin: 18px 0 16px; }
.hero p.lead { color: var(--muted); font-size: 19px; max-width: 560px; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 14px; }
.trust span::before { content: "✓ "; color: var(--green); font-weight: 800; }
.blobs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; animation: float 12s ease-in-out infinite; }
.blob.b1 { width: 340px; height: 340px; background: #ff9a3c; top: -40px; right: 4%; }
.blob.b2 { width: 280px; height: 280px; background: #e8336f; top: 220px; right: 26%; animation-delay: -4s; opacity: .3; }
.blob.b3 { width: 260px; height: 260px; background: #0f8b8d; top: 120px; left: -80px; animation-delay: -8s; opacity: .25; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(20px, -30px) scale(1.08); } }

/* Phone mockup */
.phone-wrap { position: relative; }
.phone { position: relative; width: 300px; margin: 0 auto; padding: 14px; border-radius: 38px; background: linear-gradient(160deg, #2b2440, #120f1c); box-shadow: 0 30px 60px rgba(40, 20, 60, .35), inset 0 0 0 2px rgba(255,255,255,.08); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
.screen { background: #fffaf4; border-radius: 26px; overflow: hidden; color: #1d1b2f; font-size: 13px; }
.screen .sh { background: var(--grad); color: #fff; padding: 14px 16px 12px; }
.screen .sh b { font-size: 16px; display: block; }
.screen .sh small { opacity: .85; }
.screen .sb { padding: 12px 14px 16px; }
.mrow { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eadccd; animation: rowin .7s ease both; }
.mrow:nth-child(1) { animation-delay: .3s; } .mrow:nth-child(2) { animation-delay: .6s; } .mrow:nth-child(3) { animation-delay: .9s; }
@keyframes rowin { from { opacity: 0; transform: translateX(-12px); } }
.mtot { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; padding: 10px 0 8px; }
.mtot b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mqr { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #f0e3d6; border-radius: 14px; padding: 10px; }
.mqr img { width: 68px; height: 68px; border-radius: 6px; animation: qrpulse 2.2s ease-in-out infinite; }
@keyframes qrpulse { 50% { box-shadow: 0 0 0 6px rgba(255, 122, 26, .25); } }
.paidtoast { position: absolute; right: 0; bottom: 60px; background: var(--card); color: var(--ink); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; animation: pop 9s infinite both; }
.paidtoast i { width: 26px; height: 26px; border-radius: 50%; background: #129c55; color: #fff; display: grid; place-items: center; font-style: normal; }
@keyframes pop { 0%, 40% { opacity: 0; transform: translateY(14px) scale(.9); } 46%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.wachip { position: absolute; left: 0; top: -14px; background: linear-gradient(135deg, #25d366, #129c55); color: #fff; border-radius: 14px; padding: 9px 13px; font-size: 13px; font-weight: 700; box-shadow: 0 14px 30px rgba(18,156,85,.35); animation: pop 9s infinite both; animation-delay: -4.5s; }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--card); margin: 30px 0 10px; }
.marquee div { display: flex; gap: 44px; width: max-content; padding: 14px 0; animation: scroll 34s linear infinite; font-weight: 700; color: var(--muted); }
.marquee span { white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 36px 0 60px; }
.stat { border-radius: var(--radius); padding: 20px; color: #fff; box-shadow: var(--shadow); transition: transform .25s ease; }
.stat:hover { transform: translateY(-4px) rotate(-1deg); }
.stat strong { display: block; font-size: 30px; line-height: 1.2; }
.stat span { opacity: .92; font-size: 14px; }
.s1 { background: var(--grad-warm); } .s2 { background: var(--grad-teal); } .s3 { background: var(--grad-cool); } .s4 { background: linear-gradient(135deg, #f2b01e, #ff7a1a); }

.section { padding: 10px 0 60px; }
.section-title { text-align: center; font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 30px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; position: relative; overflow: hidden; }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c, var(--grad)); }
.ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; background: var(--c, var(--grad)); box-shadow: 0 10px 22px rgba(0,0,0,.12); transition: transform .3s ease; }
.feature:hover .ico { transform: rotate(-8deg) scale(1.08); }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding-top: 34px; margin-top: 20px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -20px; left: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(232, 51, 111, .35); }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 780px; margin: 0 auto; }
.pricing .card { position: relative; }
.pricing .price { font-size: 44px; font-weight: 800; margin: 6px 0; letter-spacing: -.02em; }
.pricing .price small { font-size: 16px; color: var(--muted); font-weight: 600; }
.pricing ul { list-style: none; padding: 0; margin: 14px 0 20px; }
.pricing li { padding: 6px 0 6px 30px; position: relative; color: var(--muted); }
.pricing li::before { content: "✓"; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.pricing .featured { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.pricing .featured li::before { background: var(--grad); color: #fff; }
.ribbon { position: absolute; top: -14px; right: 20px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(232, 51, 111, .35); }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--pink); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 10px 0 0; }

.cta-band { margin: 0 0 60px; border-radius: 26px; padding: 44px 28px; text-align: center; color: #fff; background: linear-gradient(90deg, #ff7a1a, #e8336f, #7b2ff2, #e8336f, #ff7a1a); background-size: 200% auto; animation: shine 10s linear infinite; box-shadow: var(--shadow-lg); }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); }
.cta-band p { margin: 0 0 22px; opacity: .92; }
.cta-band .btn { background: #fff; color: var(--pink); border: none; }
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; background: var(--card); }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* Reveal on scroll (only when JS marks the page) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- App ---------- */
.app { display: grid; grid-template-columns: 270px 1fr; gap: 22px; padding: 24px 0 48px; }
.side { display: flex; flex-direction: column; gap: 14px; }
.side .card { padding: 16px; }
.kpi { border-radius: var(--radius); padding: 18px; color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.14); }
.kpi span { font-size: 14px; opacity: .92; }
.kpi strong { display: block; font-size: 26px; letter-spacing: -.01em; }
.kpi.k1 { background: var(--grad-warm); }
.kpi.k2 { background: var(--grad-cool); }
.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.tabs4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
.tab { border: none; background: transparent; box-shadow: none; padding: 11px 6px; font-size: 15px; border-radius: 12px; color: var(--muted); }
.tab:hover { transform: none; background: var(--bg2); color: var(--ink); }
.tab.active, .tab.active:hover { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(232, 51, 111, .28); }
.view > .card + .card { margin-top: 16px; }
.view { animation: fadeup .35s ease; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; }
.card-title i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; background: var(--c, var(--grad)); font-size: 17px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.list button { text-align: left; background: transparent; border: 1.5px solid transparent; border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; transition: background .15s ease, transform .15s ease; }
.list button:hover { background: var(--bg2); transform: translateX(3px); }
.list button.active { background: linear-gradient(var(--brand-soft), var(--brand-soft)) padding-box, var(--grad-teal) border-box; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; font-size: 17px; }
.plan { font-size: 14px; color: var(--muted); }
.plan strong { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(255, 122, 26, .15); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.result { border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 8px; background: linear-gradient(135deg, rgba(255,122,26,.10), rgba(232,51,111,.10) 50%, rgba(15,139,141,.10)); border: 1px solid var(--line); }
.result div span { display: block; font-size: 13px; color: var(--muted); }
.result div strong { font-size: 26px; letter-spacing: -.01em; }

.items { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.items th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 6px; border-bottom: 1px solid var(--line); }
.items td { padding: 6px; vertical-align: top; }
.items tr { animation: fadeup .3s ease; }
.items td.num { width: 100px; }
.items td.hsn { width: 90px; }
.items td.gst { width: 86px; }
.items td.amt { width: 110px; text-align: right; padding-top: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.items td.del { width: 38px; }
.items input, .items select { padding: 8px 9px; }
.totals { margin-left: auto; max-width: 340px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-variant-numeric: tabular-nums; background: var(--bg2); border-radius: 14px; padding: 14px 16px; }
.totals .grand { font-size: 22px; font-weight: 800; border-top: 1px dashed var(--muted); padding-top: 8px; }
.totals .grand + .grand { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.totals .words { grid-column: 1 / -1; font-size: 13px; color: var(--muted); text-align: right; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty b { display: block; font-size: 40px; }
.notice { background: linear-gradient(135deg, #fff2df, #ffe3ec); color: #6b2f14; border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; border: 1px solid #ffd3b3; }
@media (prefers-color-scheme: dark) { .notice { background: #3a2418; color: #ffd9bf; border-color: #5a3420; } }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); flex-wrap: wrap; }
.seg label { padding: 8px 12px; cursor: pointer; font-size: 14px; display: flex; gap: 6px; align-items: center; font-weight: 600; transition: background .15s ease; }
.seg label:has(input:checked) { background: var(--brand-soft); color: var(--brand); }
.seg label + label { border-left: 1.5px solid var(--line); }
.seg input { width: auto; accent-color: var(--saffron); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 12px; }
.check input { width: auto; accent-color: var(--saffron); }
.cust { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.cust > span:first-child { display: flex; gap: 10px; align-items: center; }
.bal { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.chip.due { background: rgba(214, 58, 47, .12); color: var(--red); }
.chip.adv { background: rgba(18, 156, 85, .12); color: var(--green); }
.chip.ok { background: var(--bg2); color: var(--muted); }
.bal.due { color: var(--red); }
.bal.adv { color: var(--green); }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th, .ledger td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.ledger th { font-size: 13px; color: var(--muted); font-weight: 700; }
.ledger tbody tr { transition: background .15s ease; }
.ledger tbody tr:hover { background: var(--bg2); }
.ledger .r { text-align: right; }
.ledger .gave { color: var(--red); font-weight: 700; }
.ledger .got { color: var(--green); font-weight: 700; }
.qrbox { display: flex; gap: 16px; align-items: center; margin-top: 16px; background: var(--bg2); border-radius: 14px; padding: 12px; }
.qrbox:empty { display: none; }
.qrbox img { width: 128px; height: 128px; background: #fff; border-radius: 10px; padding: 4px; }
.lock { background: linear-gradient(135deg, rgba(123,47,242,.10), rgba(232,51,111,.10)); border: 1px dashed var(--pink); border-radius: 14px; padding: 14px 16px; font-size: 14px; margin: 10px 0; }
.lock strong { color: var(--ink); }
.bars { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px; }
.bar { display: grid; grid-template-columns: 60px 1fr 110px; gap: 10px; align-items: center; font-size: 14px; }
.bar > div { height: 12px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.bar > div i { display: block; height: 100%; border-radius: 999px; background: var(--grad); width: var(--w); animation: grow 1s ease both; }
@keyframes grow { from { width: 0; } }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; z-index: 50; font-size: 15px; font-weight: 600; box-shadow: 0 14px 30px rgba(0,0,0,.25); animation: toastin .35s cubic-bezier(.2,1.4,.4,1); max-width: calc(100vw - 32px); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 20px) scale(.9); } }
.confetti { position: fixed; top: -14px; width: 10px; height: 14px; z-index: 60; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); } }
.stamp { animation: stamp .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes stamp { from { opacity: 0; transform: scale(.94) translateY(10px); } }

/* ---------- Bill (screen + print) ---------- */
.bill { background: #fff; color: #1d1b2f; border-radius: 16px; font-size: 14px; overflow: hidden; border: 1px solid #f0e3d6; box-shadow: 0 10px 30px rgba(120, 60, 20, .10); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bill .band { height: 8px; background: linear-gradient(90deg, #ff7a1a, #e8336f, #7b2ff2, #0f8b8d); }
.bill .in { padding: 22px; }
.bill .bh { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #f0e3d6; }
.bill .shop { font-size: 24px; font-weight: 800; margin: 0; color: #1d1b2f; }
.bill .muted { color: #6b6879; font-size: 13px; }
.bill .ttl { text-align: right; }
.bill .ttl b { font-size: 19px; display: inline-block; background: linear-gradient(120deg, #ff7a1a, #e8336f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bill table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.bill th, .bill td { padding: 8px 6px; text-align: left; font-variant-numeric: tabular-nums; }
.bill th { background: #fff1e3; font-size: 12px; color: #8a4b1c; }
.bill th:first-child { border-radius: 8px 0 0 8px; } .bill th:last-child { border-radius: 0 8px 8px 0; }
.bill td { border-bottom: 1px dashed #eadccd; }
.bill .r { text-align: right; }
.bill .bf { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; align-items: flex-start; }
.bill .tot { min-width: 260px; }
.bill .tot div { display: flex; justify-content: space-between; padding: 3px 0; gap: 16px; }
.bill .tot .g { font-weight: 800; font-size: 18px; margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: linear-gradient(120deg, #ff7a1a, #e8336f); color: #fff; }
.bill .tot .w { display: block; color: #6b6879; font-size: 12px; text-align: right; }
.bill .qr { text-align: center; font-size: 12px; color: #333; background: #fff8f1; border: 1px solid #f0e3d6; border-radius: 12px; padding: 10px; }
.bill .qr:empty { display: none; }
.bill .qr img { width: 124px; height: 124px; display: block; margin: 0 auto 4px; }
.bill .qr .upi { font-weight: 800; color: #0f8b8d; }
.bill .thanks { text-align: center; margin-top: 18px; color: #3b2f8f; font-weight: 700; }
.bill .made { text-align: center; margin-top: 6px; font-size: 11px; color: #999; }
.bill .paid { display: inline-block; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 12px; margin-top: 6px; background: #e3f6ec; color: #129c55; }
.bill .paid.due { background: #fde8e6; color: #d63a2f; }

.doc { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .top, .side, footer, .toast, .confetti { display: none !important; }
  .app { display: block; padding: 0; }
  .main > *:not(.doc) { display: none !important; }
  .doc { display: block; font-size: 13px; }
  .doc .bill { border: none; box-shadow: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .app .side { order: 2; }
  .top nav a.hide-sm { display: none; }
  .tabs4 { grid-template-columns: repeat(2, 1fr); }
  .items, .items tbody { display: block; }
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 1fr 1fr 1fr 34px; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
  .items td { width: auto !important; padding: 0 !important; }
  .items td:first-child { grid-column: 1 / -1; }
  .items td.hsn, .items td.amt { display: none; }
  .ledger th, .ledger td { font-size: 13px; padding: 7px 4px; }
  .bill .in { padding: 14px; }
  .bill .bh { flex-direction: column; }
  .bill .ttl { text-align: left; }
  .bill .bf { flex-direction: column-reverse; }
  .bill .tot { width: 100%; min-width: 0; }
  .bar { grid-template-columns: 50px 1fr 96px; }
  .phone { width: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
