/* =========================================================
   Gannu Mobile World - Billing  |  Theme taken from the shop bill
   Blue (GANNU) + Red (MOBILE WORLD) + Yellow tagline + Green seal
   ========================================================= */
:root {
    --blue: #1d5fae;
    --blue-dark: #153f78;
    --blue-soft: #e6f0fa;
    --red: #e2403f;
    --red-dark: #bf2e2e;
    --pink: #ec3f73;
    --yellow: #ffe14d;
    --saffron: #ff8a1f;
    --green: #2e7d46;
    --green-soft: #e3f4e8;
    --paper: #eef5fb;
    --card: #ffffff;
    --text: #1b2433;
    --muted: #667085;
    --line: #d7e2ee;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(21, 63, 120, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; color: var(--text); font-size: 15px; line-height: 1.45;
    font-family: "Segoe UI", "Nirmala UI", Roboto, "Noto Sans", Arial, sans-serif;
    background: var(--paper) linear-gradient(180deg, #fff9e6 0, var(--paper) 260px) no-repeat;
    min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.ic { flex-shrink: 0; vertical-align: -3px; }

/* ---------- Header (like the bill top) ---------- */
.rainbow { height: 6px; background: linear-gradient(90deg, #ffd23f, #ff7eb3, #ec3f73, #8fd3ff, #7ee08a, #ffd23f); }
.brandbar { display: flex; align-items: center; gap: 18px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--green); }
.brand-name { display: block; font-size: 25px; font-weight: 900; letter-spacing: .5px; line-height: 1.05; }
.b { color: var(--blue); }
.r { color: var(--red); }
.brand-sub { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--yellow); background: linear-gradient(90deg, var(--pink), var(--red)); padding: 2px 12px; border-radius: 20px; }
.brand-dev { margin: 0 auto; font-size: 18px; font-weight: 700; color: #b5460f; display: flex; align-items: center; gap: 8px; font-family: "Nirmala UI", "Noto Sans Devanagari", serif; }
.brand-user { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-left: auto; }
.logout-link { margin-left: 8px; color: var(--red); font-weight: 600; padding: 6px 10px; border: 1px solid #f3c2c2; border-radius: 8px; }
.logout-link:hover { background: #fdecec; text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: var(--blue); border: 0; color: #fff; font-size: 22px; width: 44px; height: 40px; border-radius: 8px; cursor: pointer; }

.mainnav { background: linear-gradient(180deg, var(--blue), var(--blue-dark)); position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.mainnav-inner { max-width: 1240px; margin: 0 auto; display: flex; gap: 4px; padding: 6px 16px; overflow-x: auto; }
.mainnav a { display: flex; align-items: center; gap: 7px; color: #dce8f8; padding: 9px 14px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.mainnav a.active { background: #fff; color: var(--blue-dark); }
.mainnav a.nav-cta { background: var(--red); color: #fff; box-shadow: 0 2px 0 var(--red-dark); }
.mainnav a.nav-cta.active { background: var(--yellow); color: var(--red-dark); }

.container { max-width: 1240px; margin: 0 auto; padding: 22px 20px 30px; }
.foot { text-align: center; color: var(--muted); padding: 18px; font-size: 13px; border-top: 1px solid var(--line); background: #fff; }
.foot div { margin: 3px 0; }

h1 { font-size: 24px; margin: 0 0 16px; color: var(--blue-dark); }
h2 { font-size: 18px; margin: 0 0 12px; color: var(--blue-dark); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-sub { color: var(--muted); margin: -10px 0 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.top-blue { border-top: 4px solid var(--blue); }
.card.top-red { border-top: 4px solid var(--red); }

/* ---------- Devotional banner (aarti) ---------- */
.dev-banner {
    position: relative; overflow: hidden; border-radius: 16px; margin-bottom: 20px;
    background: radial-gradient(circle at 18% 50%, #fff3c4 0, #ffd98a 28%, #f59b2b 62%, #c2410c 100%);
    color: #4a1d00; display: flex; align-items: center; gap: 26px; padding: 26px 30px 30px;
    box-shadow: 0 6px 22px rgba(194, 65, 12, .25);
}
.garland { position: absolute; left: 0; right: 0; top: 0; height: 16px;
    background: radial-gradient(circle at 8px 4px, #ffb000 6px, transparent 7px) 0 0 / 16px 16px repeat-x,
                radial-gradient(circle at 8px 4px, #ff6a00 6px, transparent 7px) 8px 3px / 16px 16px repeat-x; }
.garland.bottom { top: auto; bottom: -6px; transform: scaleY(-1); }
.dev-text { flex: 1; }
.dev-line1 { font-size: 34px; font-weight: 800; color: #7a1f00; font-family: "Nirmala UI", "Noto Sans Devanagari", serif; text-shadow: 0 1px 0 #ffe9a8; }
.dev-line2 { font-size: 20px; font-weight: 600; color: #5c1a00; margin-top: 4px; font-family: "Nirmala UI", "Noto Sans Devanagari", serif; }
.dev-greet { margin-top: 12px; font-size: 16px; color: #3d1600; }
.dev-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn.btn-aarti { background: #7a1f00; color: #ffe9a8; border: 0; box-shadow: 0 3px 0 #4a1200; }
.btn.btn-aarti:hover { background: #5c1700; }

.aarti-stage { position: relative; width: 190px; height: 190px; flex-shrink: 0; }
.aarti-stage.small { width: 170px; height: 170px; margin: 0 auto 14px; }
.aarti-img { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); object-fit: cover; border-radius: 50%; border: 4px solid #ffd54a; box-shadow: 0 0 0 4px #b5460f, 0 0 30px 8px rgba(255, 214, 90, .8); background: #fff; }
.aarti-glow { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,170,.95), rgba(255,200,60,0) 70%); animation: glow 2.4s ease-in-out infinite; }
.aarti-orbit { position: absolute; inset: 0; animation: orbit 6s linear infinite; }
.aarti-orbit.paused { animation-play-state: paused; }
.diya { position: absolute; left: 50%; bottom: -4px; margin-left: -17px; animation: orbit 6s linear infinite reverse; width: 34px; height: 14px; background: linear-gradient(#d97706, #92400e); border-radius: 0 0 20px 20px; }
.diya::before { content: ""; position: absolute; left: -6px; right: -6px; top: 10px; height: 6px; background: #b45309; border-radius: 6px; }
.flame { position: absolute; left: 50%; bottom: 10px; width: 12px; height: 20px; margin-left: -6px; background: radial-gradient(ellipse at 50% 80%, #fff 0 15%, #ffe066 30%, #ff9f1c 60%, rgba(255,80,0,0) 75%); border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; animation: flicker .18s infinite alternate; filter: drop-shadow(0 0 6px #ffb703); }
.mini-diya { position: relative; display: inline-block; width: 22px; height: 10px; background: linear-gradient(#d97706, #92400e); border-radius: 0 0 12px 12px; margin-top: 12px; }
.mini-diya .flame { width: 8px; height: 14px; margin-left: -4px; bottom: 7px; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes glow { 50% { opacity: .55; transform: scale(.94); } }
@keyframes flicker { from { transform: scaleY(1) rotate(-2deg); } to { transform: scaleY(1.12) rotate(2deg); } }

/* ---------- Big action tiles (easy for everyone) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(21,63,120,.14); text-decoration: none; }
.tile .ti { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--blue); }
.tile b { font-size: 17px; }
.tile small { color: var(--muted); }
.tile.red .ti { background: var(--red); }
.tile.green .ti { background: var(--green); }
.tile.orange .ti { background: var(--saffron); }
.tile.pink .ti { background: var(--pink); }
.tile.dark .ti { background: var(--blue-dark); }
.tile.main { background: linear-gradient(135deg, var(--red), var(--pink)); color: #fff; border: 0; }
.tile.main small { color: #ffe9ef; }
.tile.main .ti { background: rgba(255,255,255,.2); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.stat .si { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.stat.red .si { background: #fde8e8; color: var(--red); }
.stat.green .si { background: var(--green-soft); color: var(--green); }
.stat.orange .si { background: #fff1de; color: var(--saffron); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 23px; font-weight: 800; }

/* ---------- Forms ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.span-all { grid-column: 1 / -1; }
label { display: block; font-size: 13.5px; font-weight: 700; color: #344054; margin-bottom: 5px; }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.req { color: var(--red); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #c5d3e3; border-radius: 9px; font: inherit; background: #fff; color: var(--text); min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #bcd6f6; border-color: var(--blue); }
input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; }
textarea { resize: vertical; }
.field { margin-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; min-height: 44px; border-radius: 9px; border: 1.5px solid transparent; background: var(--blue); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--blue-dark); }
.btn-red { background: var(--red); }
.btn-red:hover { background: var(--red-dark); }
.btn-green { background: #1fa855; }
.btn-green:hover { background: #178a45; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; }
.btn-orange { background: var(--saffron); }
.btn-orange:hover { background: #e67700; }
.btn-light { background: #fff; color: var(--blue-dark); border-color: #c5d3e3; }
.btn-light:hover { background: var(--blue-soft); }
.btn-sm { padding: 6px 11px; min-height: 34px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 17px; min-height: 52px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { padding: 11px 12px; border-bottom: 1px solid #e8eef5; text-align: left; vertical-align: middle; }
table.list th { background: var(--red); color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
table.list tbody tr:nth-child(even) td { background: #f8fbfe; }
table.list tbody tr:hover td { background: #fff8e1; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.in { background: var(--green-soft); color: var(--green); }
.badge.sold { background: #fde3e3; color: var(--red-dark); }
.badge.due { background: #fff1d6; color: #9a5b00; }
.empty { text-align: center; padding: 30px !important; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 220px; }
.filters .grow input { width: 100%; }
.summary-line { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; color: var(--muted); }
.summary-line b { color: var(--text); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.alert-success { background: var(--green-soft); color: #135c32; border: 1px solid #b5e0c5; }
.alert-error { background: #fde3e3; color: #8e1f1f; border: 1px solid #f3b9b9; }
.alert-info { background: #fff8e1; color: #7a5200; border: 1px solid #f5dc9a; font-weight: 500; }

.pager { display: flex; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pager span { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Bill form (steps) ---------- */
.step-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-no { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.step-title h2 { margin: 0; }
.step-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.scan-box { background: var(--blue-soft); border: 2px dashed #9dbde6; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.scan-box input { font-size: 17px; min-height: 52px; border-color: var(--blue); }

table.items { width: 100%; border-collapse: collapse; }
table.items th { background: var(--red); color: #fff; padding: 9px 8px; font-size: 12.5px; text-align: left; }
table.items td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items td.sn { font-weight: 700; padding-top: 18px; text-align: center; }
table.items td.amt { padding-top: 18px; font-weight: 700; }
table.items input { padding: 8px 9px; }
.linked-tag { display: inline-block; margin-top: 3px; font-size: 11px; color: var(--green); font-weight: 700; }

.totals-box { width: 100%; max-width: 420px; margin-left: auto; background: #fffdf4; border: 1px solid #f3e3a6; border-radius: 12px; padding: 12px 16px; }
.totals-box .row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eadca6; }
.totals-box .row.grand { font-size: 22px; font-weight: 900; color: var(--red); border-bottom: 0; padding-top: 10px; }
.words { font-style: italic; color: var(--muted); font-size: 13px; }

.save-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 2px solid var(--red); padding: 12px 16px; margin: 0 -20px -30px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; z-index: 20; backdrop-filter: blur(4px); }
.save-bar .total-now { margin-right: auto; font-size: 18px; font-weight: 800; color: var(--blue-dark); }
.save-bar .total-now span { color: var(--red); }

.suggest { position: relative; }
.suggest-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1.5px solid var(--blue); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.15); z-index: 40; max-height: 300px; overflow-y: auto; display: none; margin-top: 2px; }
.suggest-list div { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #eef2f6; font-size: 14px; }
.suggest-list div:hover { background: #fff6d6; }

/* ---------- Bill ready panel ---------- */
.done-panel { background: linear-gradient(135deg, #e7f8ee, #fff); border: 2px solid #8fd4a9; border-radius: 16px; padding: 20px 22px; margin: 0 auto 18px; max-width: 820px; }
.done-panel h2 { color: var(--green); margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.share-row .btn { flex-direction: column; min-height: 76px; font-size: 15px; gap: 4px; }
.tool-row { max-width: 820px; margin: 0 auto 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 30, 55, .55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 16px; max-width: 480px; width: 100%; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal h2 { display: flex; gap: 8px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2433; color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: none; max-width: 90vw; text-align: center; }

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #fff4cc, #ffd27a 40%, #f08c2a); }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; max-width: 820px; width: 100%; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(120, 40, 0, .35); }
.login-side { background: radial-gradient(circle at 50% 40%, #fff3c4, #ffc861 55%, #e36414); padding: 34px 20px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.login-side .dev-line1 { font-size: 28px; }
.login-side .dev-line2 { font-size: 17px; }
.login-box { background: #fff; padding: 34px 30px; }
.login-box .shop-name { font-size: 28px; font-weight: 900; line-height: 1.1; }
.tag-pill { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--yellow); background: linear-gradient(90deg, var(--pink), var(--red)); padding: 3px 12px; border-radius: 20px; }

/* ---------- Help page ---------- */
.help { font-family: "Nirmala UI", "Noto Sans Devanagari", "Segoe UI", sans-serif; font-size: 16px; line-height: 1.75; }
.help h2 { margin-top: 26px; padding: 8px 14px; background: var(--blue-soft); border-left: 5px solid var(--red); border-radius: 6px; }
.help h3 { color: var(--red-dark); margin: 18px 0 6px; }
.help ol li, .help ul li { margin-bottom: 6px; }
.help .tip { background: #fff8e1; border: 1px solid #f5dc9a; border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.help .warn { background: #fde8e8; border: 1px solid #f3b9b9; border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.help .btnlike { display: inline-block; background: var(--red); color: #fff; padding: 0 8px; border-radius: 5px; font-size: 14px; font-weight: 700; }
.help .btnlike.blue { background: var(--blue); }
.help .btnlike.green { background: #25d366; }
.help table { border-collapse: collapse; width: 100%; }
.help td, .help th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.help th { background: var(--red); color: #fff; }
.toc { columns: 2; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .brand-dev { display: none; }
}
@media (max-width: 900px) {
    .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
    .share-row { grid-template-columns: repeat(2, 1fr); }
    .brand-user { display: none; }
    .menu-btn { display: block; }
    .mainnav { display: none; position: static; }
    body.nav-open .mainnav { display: block; }
    body.nav-open .brand-user { display: flex; padding: 0 24px 10px; }
    .mainnav-inner { flex-direction: column; }
    .dev-banner { flex-direction: column; text-align: center; }
    .dev-actions { justify-content: center; }
    .login-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .g2, .g3, .g4 { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tile { padding: 14px; }
    .tile b { font-size: 15px; }
    .container { padding: 14px 12px 30px; }
    .brand-name { font-size: 19px; }
    .brand-logo { width: 42px; height: 42px; }
    .dev-line1 { font-size: 26px; }
    .save-bar { margin: 0 -12px -30px; }
    .toc { columns: 1; }
}

/* =========================================================
   PRINT BILL  (same look as the paper bill)
   ========================================================= */
.bill-page { max-width: 820px; margin: 0 auto; }
.bill { position: relative; background: #fff; width: 100%; border: 2px solid var(--blue); font-size: 13px; color: #111; overflow: hidden;
    background-image: linear-gradient(180deg, #fffbe8 0, #ffffff 120px); }
.bill-rainbow { height: 7px; background: linear-gradient(90deg, #ffd23f, #ff7eb3, #ec3f73, #8fd3ff, #7ee08a, #ffd23f); }
.bill-head { display: grid; grid-template-columns: 110px 1fr 170px; align-items: center; padding: 10px 14px 4px; gap: 10px; }
.bill-gstin { color: var(--red); font-weight: 700; font-family: Georgia, "Times New Roman", serif; font-size: 13px; }
.bill-logo img { width: 100px; height: 100px; border-radius: 50%; display: block; }
.bill-title { text-align: center; }
.bill-title .gmw { font-size: 24px; font-weight: 900; color: var(--blue); letter-spacing: 3px; font-style: italic; }
.bill-title .name { font-size: 33px; font-weight: 900; line-height: 1.05; letter-spacing: .5px; }
.bill-title .tag { display: inline-block; background: linear-gradient(90deg, var(--pink), var(--red)); color: var(--yellow); font-weight: 700; padding: 3px 18px; border-radius: 16px; margin-top: 5px; font-size: 13px; }
.bill-phones { text-align: right; font-weight: 800; font-size: 15px; line-height: 1.5; }
.bill-phones .wa { color: #1fa855; }
.bill-address { text-align: center; font-weight: 700; padding: 4px 10px 10px; font-size: 14.5px; }
.bill-parties { display: grid; grid-template-columns: 1.6fr 1fr; border-top: 2px solid var(--blue); }
.bill-parties > div { padding: 8px 12px; }
.bill-parties > div:first-child { border-right: 2px solid var(--blue); }
.bill-parties .f { padding: 4px 0; border-bottom: 1px dotted #888; min-height: 25px; }
.bill-parties .f b { font-weight: 600; color: #333; display: inline-block; min-width: 92px; }
.bill-items { width: 100%; border-collapse: collapse; position: relative; }
.bill-items th { background: var(--red); color: #fff; padding: 8px 6px; border: 1px solid var(--red-dark); font-size: 12.5px; font-style: italic; }
.bill-items td { border-left: 1px solid var(--blue); border-right: 1px solid var(--blue); padding: 7px 8px; vertical-align: top; }
.bill-items td.desc b { font-size: 14px; }
.bill-items tbody tr.filler td { height: 150px; }
.bill-items tfoot td { border: 1px solid var(--blue); padding: 5px 8px; }
.bill-items .imei { font-size: 12.5px; color: #222; margin-top: 3px; }
.bill-watermark { position: absolute; left: 50%; top: 52%; width: 250px; height: 250px; transform: translate(-50%, -50%); opacity: .08; pointer-events: none; border-radius: 50%; }
.bill-brands { background: #eef4fb; font-weight: 800; color: var(--blue-dark); font-size: 12px; letter-spacing: .3px; }
.bill-brands span { display: inline-block; padding: 1px 6px; margin: 1px; border-radius: 4px; color: #fff; font-size: 11px; }
.bill-gtotal td { font-size: 17px; font-weight: 900; }
.bill-foot { display: grid; grid-template-columns: 1.5fr 1fr; border-top: 2px solid var(--blue); }
.bill-foot .terms { padding: 8px 12px; font-size: 11px; white-space: pre-line; font-family: Georgia, "Times New Roman", serif; }
.bill-foot .sign { padding: 8px 12px; text-align: right; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; min-height: 130px; position: relative; }
.bill-foot .sign .for { font-weight: 800; color: var(--blue-dark); font-size: 14px; }
.bill-foot .sign-img { max-height: 46px; max-width: 170px; }
.bill-foot .seal-img { position: absolute; right: 150px; bottom: 26px; width: 150px; opacity: .85; transform: rotate(-6deg); }
.bill-thanks { text-align: center; font-size: 12px; padding: 5px; background: #fff7d6; border-top: 1px solid #f0dc8c; color: #7a3a00; font-family: "Nirmala UI", "Noto Sans Devanagari", serif; }

@media (max-width: 640px) {
    body:not(.pdf-mode) .bill { font-size: 11px; }
    body:not(.pdf-mode) .bill-head { grid-template-columns: 64px 1fr; }
    body:not(.pdf-mode) .bill-logo img { width: 60px; height: 60px; }
    body:not(.pdf-mode) .bill-phones { grid-column: 1 / -1; text-align: center; }
    body:not(.pdf-mode) .bill-title .name { font-size: 22px; }
    body:not(.pdf-mode) .bill-parties, body:not(.pdf-mode) .bill-foot { grid-template-columns: 1fr; }
    body:not(.pdf-mode) .bill-parties > div:first-child { border-right: 0; border-bottom: 2px solid var(--blue); }
    body:not(.pdf-mode) .bill-foot .seal-img { position: static; transform: none; }
}
/* PDF is always made in desktop (A4) layout */
body.pdf-mode .bill { font-size: 12.5px; }

@media print {
    @page { size: A4; margin: 7mm; }
    body { background: #fff !important; }
    .no-print, .brandbar, .mainnav, .rainbow, .foot, .tool-row, .done-panel, .modal-bg, .toast { display: none !important; }
    .container { padding: 0; max-width: none; }
    .bill-page { max-width: none; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =========================================================
   HOME HERO  (Jai Shree Shyam + Aarti)
   ========================================================= */
.hero {
    position: relative; overflow: hidden; border-radius: 20px; margin-bottom: 26px; min-height: 290px;
    display: flex; align-items: center; gap: 34px; padding: 46px 40px 34px;
    color: #fff3d6;
    background:
        radial-gradient(circle at 18% 55%, rgba(255, 210, 110, .55) 0, rgba(255, 210, 110, 0) 34%),
        repeating-conic-gradient(from 0deg at 92% 50%, rgba(255,255,255,.05) 0 6deg, rgba(255,255,255,0) 6deg 12deg),
        linear-gradient(115deg, #4a0b0b 0%, #7c1a0b 38%, #b9400f 70%, #e8792a 100%);
    box-shadow: 0 14px 34px rgba(110, 25, 0, .35), inset 0 0 0 2px rgba(255, 207, 92, .35);
}
.hero::after { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255, 214, 120, .35); border-radius: 14px; pointer-events: none; }

/* marigold toran */
.toran { position: absolute; left: 0; right: 0; top: 0; height: 30px; display: flex; justify-content: space-around; z-index: 2;
    background: radial-gradient(circle at 10px 6px, #ffb000 7px, transparent 8px) 0 0 / 20px 14px repeat-x,
                radial-gradient(circle at 10px 6px, #ff7a00 7px, transparent 8px) 10px 4px / 20px 14px repeat-x; }
.toran i { position: relative; width: 14px; height: 30px; margin-top: 12px;
    background: radial-gradient(circle, #ffb000 6px, transparent 7px) 0 0 / 14px 13px repeat-y; }
.toran i::after { content: ""; position: absolute; left: 1px; bottom: -14px; width: 12px; height: 18px; background: #2f8a3c; border-radius: 0 100% 0 100%; transform: rotate(45deg); }
.toran i:nth-child(even) { height: 20px; }

/* hanging temple bells */
.hero-bell { position: absolute; top: 18px; width: 2px; height: 58px; background: #d6a73a; z-index: 2; transform-origin: top center; }
.hero-bell.left { left: 62%; }
.hero-bell.right { right: 7%; }
.hero-bell span { position: absolute; left: -15px; bottom: -28px; width: 32px; height: 30px; border-radius: 50% 50% 8px 8px / 70% 70% 8px 8px;
    background: linear-gradient(90deg, #a8761c, #ffe08a 45%, #c48a22); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.hero-bell span::after { content: ""; position: absolute; left: 12px; bottom: -6px; width: 8px; height: 8px; border-radius: 50%; background: #8a5d12; }
.hero.playing .hero-bell { animation: swing 1.1s ease-in-out infinite alternate; }
.hero.playing .hero-bell.right { animation-delay: .4s; }
@keyframes swing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }

/* logo with rays + orbiting diya */
.hero-stage { position: relative; width: 230px; height: 230px; flex-shrink: 0; z-index: 1; }
.rays { position: absolute; inset: -30px; border-radius: 50%;
    background: repeating-conic-gradient(rgba(255, 220, 120, .35) 0 5deg, rgba(255, 220, 120, 0) 5deg 15deg);
    -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%);
    animation: orbit 40s linear infinite; }
.hero.playing .rays { animation-duration: 12s; }
.hero .aarti-glow { inset: 0; background: radial-gradient(circle, rgba(255, 236, 160, .9), rgba(255, 190, 60, 0) 68%); }
.hero-img { position: absolute; left: 50%; top: 50%; width: 200px; transform: translate(-50%, -52%); filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.hero .aarti-orbit { inset: -6px; animation-duration: 7s; }
.hero .diya { animation-duration: 7s; }
.hero.playing .aarti-orbit, .hero.playing .diya { animation-duration: 3s; }

.hero-text { flex: 1; z-index: 1; min-width: 0; }
.hero-l1 { font-family: "GMW Hindi", "Nirmala UI", serif; font-size: 44px; font-weight: 800; line-height: 1.15; color: #ffd76a; text-shadow: 0 2px 0 #5b1200, 0 0 18px rgba(255, 200, 80, .45); }
.hero-l2 { font-family: "GMW Hindi", "Nirmala UI", serif; font-size: 23px; font-weight: 600; margin-top: 6px; color: #fff0c9; }
.hero-greet { margin-top: 12px; font-size: 15px; color: #ffe2b0; }

.aarti-player { margin-top: 18px; display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 10px 14px 10px 10px;
    background: rgba(40, 6, 0, .38); border: 1px solid rgba(255, 214, 120, .45); border-radius: 50px; backdrop-filter: blur(3px); }
.aarti-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0; display: grid; place-items: center;
    color: #5b1200; background: radial-gradient(circle at 35% 30%, #fff3c2, #ffcf4d 55%, #e09b12); box-shadow: 0 0 0 4px rgba(255, 214, 120, .3), 0 6px 14px rgba(0,0,0,.35); }
.aarti-btn:hover { transform: scale(1.05); }
.aarti-btn .i-pause { display: none; }
.hero.playing .aarti-btn .i-play { display: none; }
.hero.playing .aarti-btn .i-pause { display: block; }
.hero.playing .aarti-btn { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 214, 120, .15), 0 6px 14px rgba(0,0,0,.35); } }
.aarti-info { flex: 1; min-width: 0; }
.aarti-title { font-family: "GMW Hindi", "Nirmala UI", serif; font-weight: 700; font-size: 17px; color: #ffe08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aarti-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.2); margin: 7px 0 4px; cursor: pointer; overflow: hidden; }
.aarti-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd76a, #ff8a1f); border-radius: 6px; }
.aarti-time { display: flex; justify-content: space-between; font-size: 12px; color: #ffd9a8; gap: 8px; }

.petals { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.petals i { position: absolute; top: -20px; width: 12px; height: 9px; border-radius: 60% 0 60% 0; opacity: .95; animation: fall linear forwards; }
@keyframes fall { to { top: 110%; margin-left: 60px; rotate: 540deg; } }

.sec-title { margin-top: 4px; }
.brand-logo { box-shadow: none !important; width: 62px !important; height: auto !important; border-radius: 0 !important; }

@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding: 50px 18px 26px; gap: 14px; }
    .hero-stage { width: 190px; height: 190px; }
    .hero-img { width: 165px; }
    .aarti-player { margin-left: auto; margin-right: auto; text-align: left; }
    .hero-l1 { font-size: 34px; }
    .hero-l2 { font-size: 19px; }
}

.hero-login { background: radial-gradient(circle at 50% 38%, rgba(255, 220, 120, .55), rgba(255,220,120,0) 45%), linear-gradient(160deg, #4a0b0b, #8c2209 55%, #e0701f) !important; color: #ffe9b8; }
.hero-login .dev-line1 { color: #ffd76a; text-shadow: 0 2px 0 #5b1200; font-family: "GMW Hindi", "Nirmala UI", serif; }
.hero-login .dev-line2 { color: #fff0c9; font-family: "GMW Hindi", "Nirmala UI", serif; }
.hero-login .aarti-stage.small { width: 190px; height: 190px; }

/* ---------- Banner v2: logo | aarti | clock + panchang (all pages) ---------- */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr) 330px; gap: 28px; padding: 44px 26px 26px 34px; }
.hero-min { position: absolute; right: 14px; top: 34px; z-index: 4; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,214,120,.6);
    background: rgba(40,6,0,.4); color: #ffd76a; cursor: pointer; font-size: 14px; line-height: 1; }
.hero-min:hover { background: rgba(40,6,0,.7); }
.hero-bell.right { right: 380px; }
.hero-bell.left { left: 48%; }

.panchang { position: relative; z-index: 2; align-self: stretch; background: rgba(30, 4, 0, .42); border: 1px solid rgba(255, 214, 120, .5);
    border-radius: 16px; padding: 14px 16px; color: #ffe9c2; backdrop-filter: blur(3px); box-shadow: inset 0 0 24px rgba(255, 190, 60, .12); }
.pc-top { display: flex; align-items: center; gap: 14px; }
.clock { position: relative; width: 86px; height: 86px; flex-shrink: 0; border-radius: 50%;
    background: radial-gradient(circle, #fff8e1 0 58%, #f3d27a 59% 64%, #b8801f 65% 70%, #ffe08a 71% 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 0 0 2px #8a5a12; }
.clock b { position: absolute; left: 50%; top: 6px; width: 2px; height: 37px; margin-left: -1px; transform-origin: 50% 37px; }
.clock b::before { content: ""; display: block; width: 2px; height: 6px; background: #7a1f00; border-radius: 1px; }
.clock b:nth-child(3n+1)::before { height: 9px; width: 3px; margin-left: -.5px; }
.clock i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 3px; }
.clock .h { width: 4px; height: 22px; margin-left: -2px; background: #4a0b0b; }
.clock .m { width: 3px; height: 31px; margin-left: -1.5px; background: #7a1f00; }
.clock .s { width: 1.5px; height: 34px; margin-left: -.75px; background: #e4474c; }
.clock em { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #e4474c; box-shadow: 0 0 0 2px #fff8e1; }
.pc-digital { font-size: 30px; font-weight: 800; color: #ffd76a; letter-spacing: .5px; line-height: 1; font-variant-numeric: tabular-nums; }
.pc-digital small { font-size: 14px; font-weight: 700; color: #ffe9c2; margin-left: 2px; }
.pc-date { font-size: 15px; font-weight: 700; margin-top: 5px; color: #fff3d6; }
.pc-vaar { font-family: "GMW Hindi", "Nirmala UI", serif; font-size: 15px; color: #ffd76a; margin-top: 2px; }
.pc-samvat { margin: 11px 0 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 214, 120, .14); text-align: center;
    font-family: "GMW Hindi", "Nirmala UI", serif; font-size: 13.5px; color: #ffe9c2; }
.pc-samvat b { color: #ffd76a; }
.pc-lines { font-family: "GMW Hindi", "Nirmala UI", serif; font-size: 13.5px; line-height: 1.5; }
.pc-lines div { display: grid; grid-template-columns: 58px 1fr; gap: 6px; padding: 2px 0; border-bottom: 1px dashed rgba(255, 214, 120, .2); }
.pc-lines div:last-child { border-bottom: 0; }
.pc-lines span { color: #ffc56b; }
.pc-lines b { font-weight: 600; color: #fff3d6; }

/* compact banner on all other pages */
.hero.compact { min-height: 0; padding: 38px 22px 16px 24px; gap: 20px; margin-bottom: 20px; grid-template-columns: auto minmax(0, 1fr) 520px; }
.hero.compact .hero-stage { width: 130px; height: 130px; }
.hero.compact .hero-img { width: 112px; }
.hero.compact .rays { inset: -18px; }
.hero.compact .hero-l1 { font-size: 30px; }
.hero.compact .hero-l2 { font-size: 17px; margin-top: 2px; }
.hero.compact .hero-greet { display: none; }
.hero.compact .aarti-player { margin-top: 10px; padding: 6px 12px 6px 6px; }
.hero.compact .aarti-btn { width: 44px; height: 44px; }
.hero.compact .panchang { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding: 10px 14px; }
.hero.compact .pc-top { grid-row: span 2; flex-direction: column; gap: 6px; text-align: center; }
.hero.compact .clock { width: 70px; height: 70px; }
.hero.compact .clock b { top: 5px; height: 30px; transform-origin: 50% 30px; }
.hero.compact .clock .h { height: 17px; } .hero.compact .clock .m { height: 24px; } .hero.compact .clock .s { height: 27px; }
.hero.compact .pc-digital { font-size: 21px; }
.hero.compact .pc-digital small { font-size: 11px; }
.hero.compact .pc-date { font-size: 12px; }
.hero.compact .pc-vaar { font-size: 12.5px; }
.hero.compact .pc-samvat { margin: 0 0 5px; font-size: 12.5px; padding: 4px 6px; }
.hero.compact .pc-lines { font-size: 12.5px; line-height: 1.35; columns: 2; column-gap: 12px; }
.hero.compact .pc-lines div { grid-template-columns: 48px 1fr; break-inside: avoid; }
.hero.compact .hero-bell { height: 40px; }
.hero.compact .hero-bell.right { right: 570px; }
.hero.compact .hero-bell.left { left: 34%; }

/* minimised: one thin strip */
.hero.mini { min-height: 0; padding: 30px 60px 10px 20px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.hero.mini .hero-stage { width: 46px; height: 46px; }
.hero.mini .hero-img { width: 44px; }
.hero.mini .rays, .hero.mini .aarti-orbit, .hero.mini .hero-l2, .hero.mini .hero-greet, .hero.mini .hero-bell,
.hero.mini .pc-lines, .hero.mini .pc-samvat, .hero.mini .clock, .hero.mini .pc-date { display: none; }
.hero.mini .hero-text { display: flex; align-items: center; gap: 16px; }
.hero.mini .hero-l1 { font-size: 22px; white-space: nowrap; }
.hero.mini .aarti-player { margin: 0; flex: 1; padding: 4px 10px 4px 4px; }
.hero.mini .aarti-btn { width: 36px; height: 36px; }
.hero.mini .aarti-time { display: none; }
.hero.mini .panchang { display: flex !important; align-items: center; padding: 6px 12px; background: none; border: 0; box-shadow: none; }
.hero.mini .pc-top { flex-direction: row !important; }
.hero.mini .pc-digital { font-size: 20px; }
.hero.mini .pc-vaar { font-size: 12px; }
.hero.mini .hero-min { top: 26px; }

@media (max-width: 1200px) {
    .hero, .hero.compact { grid-template-columns: auto minmax(0, 1fr); }
    .hero .panchang, .hero.compact .panchang { grid-column: 1 / -1; }
    .hero-bell.right, .hero.compact .hero-bell.right { right: 8%; }
}
@media (max-width: 900px) {
    .hero, .hero.compact { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 48px 14px 18px; }
    .hero .panchang { width: 100%; text-align: left; }
    .hero.compact .panchang { grid-template-columns: 1fr; }
    .hero.compact .pc-top { flex-direction: row; text-align: left; justify-content: center; }
    .hero.compact .pc-lines { columns: 1; }
    .hero.mini { grid-template-columns: auto 1fr; text-align: left; justify-items: stretch; padding: 30px 46px 8px 12px; }
    .hero.mini .panchang, .hero.mini .hero-l1 { display: none !important; }
    .hero-bell.left { left: 12%; } .hero-bell.right, .hero.compact .hero-bell.right { right: 12%; }
}
.hero-min { top: auto; bottom: 10px; right: 10px; }
.hero.mini .hero-min { top: auto; bottom: 8px; }
.hero.mini { padding-top: 24px; }
.hero.mini .toran i { display: none; }
.hero.mini .toran { height: 16px; }
.hero.compact { grid-template-columns: auto minmax(0, 1fr) 600px; }
.hero.compact .pc-lines { column-gap: 16px; }
.hero.compact .pc-lines div { grid-template-columns: 46px 1fr; }
.hero.compact .hero-bell.right { right: 650px; }
.hero.compact .hero-bell.left { left: 31%; }
@media (max-width: 1200px) { .hero.compact { grid-template-columns: auto minmax(0, 1fr); } .hero.compact .hero-bell.right { right: 8%; } }
@media (max-width: 900px) { .hero.compact { grid-template-columns: 1fr; } }

/* =========================================================
   MOBILE FIRST POLISH  (phones are the main device)
   ========================================================= */
.tabbar, .drawer-head, .drawer-logout, .nav-shade { display: none; }
.credit { margin-top: 6px; font-size: 13px; color: #556; }
.credit a { font-weight: 700; color: var(--red); }
.login-credit { text-align: center; margin-top: 18px; }

@media (max-width: 900px) {
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    input, select, textarea { font-size: 16px; }            /* stops iPhone from zooming */
    .container { padding: 14px 12px 24px; }

    /* top bar */
    .brandbar { padding: 8px 12px; gap: 10px; position: sticky; top: 0; z-index: 40; }
    .brand { gap: 8px; min-width: 0; }
    .brand-logo { width: 46px !important; }
    .brand-name { font-size: 19px; white-space: nowrap; }
    .brand-sub { font-size: 9.5px; padding: 1px 8px; white-space: nowrap; max-width: 62vw; overflow: hidden; text-overflow: ellipsis; }
    .brand-user, body.nav-open .brand-user { display: none !important; }
    .menu-btn { display: block; flex-shrink: 0; }

    /* side drawer menu */
    .mainnav { display: block !important; position: fixed; left: 0; top: 0; bottom: 0; width: 290px; max-width: 86vw; z-index: 90;
        transform: translateX(-105%); transition: transform .25s ease; overflow-y: auto; box-shadow: 6px 0 24px rgba(0,0,0,.3); }
    body.nav-open .mainnav { transform: none; }
    .nav-shade { display: block; position: fixed; inset: 0; background: rgba(10, 20, 40, .5); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s; }
    body.nav-open .nav-shade { opacity: 1; pointer-events: auto; }
    .mainnav-inner { flex-direction: column; padding: 0 0 20px; gap: 2px; overflow: visible; }
    .mainnav a { padding: 14px 20px; border-radius: 0; font-size: 16px; }
    .mainnav a.active { background: rgba(255,255,255,.95); }
    .mainnav a.nav-cta { margin: 8px 14px; border-radius: 10px; }
    .drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 14px; background: rgba(0,0,0,.18); color: #fff; margin-bottom: 6px; }
    .drawer-head img { width: 48px; }
    .drawer-head b { display: block; font-size: 15px; }
    .drawer-head small { color: #cfe0f7; font-size: 13px; }
    .drawer-head button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
    .drawer-logout { display: flex !important; color: #ffc9c9 !important; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }

    /* bottom tab bar */
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(21,63,120,.12);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: #667085; text-decoration: none !important; padding: 2px 0; }
    .tabbar a.on { color: var(--blue); }
    .tabbar .tab-new { color: var(--red); }
    .tabbar .tab-new .plus { width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center; color: #fff;
        background: linear-gradient(135deg, var(--red), var(--pink)); box-shadow: 0 6px 14px rgba(226, 64, 63, .45), 0 0 0 4px #fff; }

    .foot { padding-bottom: 20px; }
    .page-head { gap: 10px; }
    .page-head h1 { font-size: 21px; }
    .page-head .btn { flex: 1 1 auto; }
    .filters > div, .filters .grow, .filters input, .filters select { width: 100%; min-width: 0; }
    .filters .btn { flex: 1; }
    .card { padding: 16px 14px; }
    .save-bar { bottom: calc(64px + env(safe-area-inset-bottom)); margin: 0 -12px -24px; padding: 10px 12px; border-radius: 14px 14px 0 0; }
    .save-bar .btn-light { display: none; }
    .save-bar .btn-lg { padding: 12px 18px; }
    .modal-bg { align-items: flex-end; padding: 0; }
    .modal { border-radius: 18px 18px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
    .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) {
    /* list tables become cards */
    table.list.cards thead { display: none; }
    table.list.cards, table.list.cards tbody, table.list.cards tr, table.list.cards td { display: block; width: 100%; }
    .table-wrap.has-cards { border: 0; overflow: visible; }
    table.list.cards { background: transparent; }
    table.list.cards tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; box-shadow: var(--shadow); }
    table.list.cards tbody tr:nth-child(even) td, table.list.cards tbody tr:hover td { background: transparent; }
    table.list.cards td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right !important; min-height: 0; }
    table.list.cards td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; text-align: left; flex-shrink: 0; }
    table.list.cards td:first-child { border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 2px; font-size: 16px; }
    table.list.cards td.actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 10px; }
    table.list.cards td.actions::before, table.list.cards td[data-label=""]::before { display: none; }
    table.list.cards td.actions .btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
    table.list.cards td.empty { justify-content: center; text-align: center !important; }
    table.list.cards td.empty::before { display: none; }

    /* bill form: each item is a card */
    table.items thead { display: none; }
    table.items, table.items tbody { display: block; }
    table.items tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 10px; background: #f7faff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; position: relative; }
    table.items td { border: 0; padding: 0; display: block; }
    table.items td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
    table.items td.sn { position: absolute; left: 12px; top: 10px; padding: 0; font-size: 13px; color: var(--red); }
    table.items td.sn::before { content: "Item "; display: inline; font-size: 13px; color: var(--red); }
    table.items td:nth-child(2) { grid-column: 1 / -1; margin-top: 18px; }
    table.items td:nth-child(3) { grid-column: 1 / -1; }
    table.items td.amt { grid-column: 1 / -1; text-align: right; padding: 0; font-size: 17px; color: var(--blue-dark); }
    table.items td.amt::before { display: inline; margin-right: 8px; }
    table.items td:last-child { position: absolute; right: 10px; top: 6px; }
    table.items td:last-child::before { display: none; }
    .scan-box input { font-size: 16px; }
    .totals-box { max-width: none; }
    .step-title h2 { font-size: 17px; }

    .tiles { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .stat .value { font-size: 18px; }
    .stat .si { width: 36px; height: 36px; }
    .share-row .btn { min-height: 70px; font-size: 14px; }
    .tool-row .btn { flex: 1 1 auto; }
    .done-panel { padding: 16px 14px; }
    .done-panel h2 { font-size: 17px; }
    .summary-line { gap: 10px; font-size: 14px; }
    .login-box { padding: 26px 20px; }
    .login-side { padding: 22px 14px; }
}
.linked-tag[hidden] { display: none !important; }
.filters input[type=checkbox] { width: 20px !important; min-width: 0 !important; flex: 0 0 20px; }
@media (max-width: 900px) {
    .filters label:has(input[type=checkbox]) { justify-content: flex-start; }
    .hero.mini .panchang { display: flex !important; margin-left: auto; padding: 0; }
    .hero.mini .pc-vaar, .hero.mini .pc-date { display: none; }
    .hero.mini .pc-digital { font-size: 17px; }
    .hero.mini { grid-template-columns: auto 1fr auto; }
    .hero.mini .aarti-title { font-size: 14px; }
}

/* ---------- password eye ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 38px; border: 0; background: none;
    color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw-eye:hover { color: var(--blue); background: var(--blue-soft); }

/* ---------- cancelled / test bills ---------- */
.badge.test { background: #ece4ff; color: #5b3cc4; }
.row-cancelled td { color: #8a8f99; }
.row-cancelled .amt-val { text-decoration: line-through; }
.cancel-why { font-size: 12px; color: var(--red-dark); margin-top: 3px; max-width: 220px; }
.cancel-panel { max-width: 820px; margin: 0 auto 14px; padding: 14px 18px; border: 2px solid #f3b9b9; background: #fde8e8; border-radius: 14px; color: #8e1f1f; }
.cancel-panel h2 { color: var(--red-dark); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.done-panel.is-cancelled { opacity: .85; border-color: #d7dbe2; background: #f6f7f9; }
.done-panel.is-cancelled h2 { color: var(--muted); }
.cancel-red { color: var(--red-dark) !important; border-color: #f3c2c2 !important; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; margin: 0; cursor: pointer; font-weight: 600; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { padding: 8px 12px; border: 1.5px solid #c5d3e3; border-radius: 20px; font-size: 13.5px; color: #344054; background: #fff; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.check-line { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--text) !important; }
.check-line input { flex: 0 0 20px; margin-top: 2px; }
.bill-preview { margin: 14px 0 6px; padding: 12px 14px; border-radius: 10px; background: #fff8e1; border: 1px solid #f5dc9a; font-size: 15px; }
.bill-preview b { font-size: 20px; color: var(--red-dark); letter-spacing: .5px; }
