/* Miss Minute app theme: the Pathshala mobile look, layered over each app's style.css.
   Each app sets --g1 / --g2 (its gradient) in index.html. Same file in bechde, billpe, dhobigo;
   each app's skin.css then gives it its own personality. */
:root {
  --brand: var(--g1); --brand-dark: var(--g1);
  --ink: #111827; --muted: #6b7280; --line: #eceef3; --bg: #f4f5fb; --card: #fff;
  --radius: 20px; --nav-h: 66px; --float: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
html, body { background: var(--bg); }
body { padding-bottom: calc(var(--float) + 6px); font-size: 14.5px; }
a { color: var(--g1); }

/* ---------- curved gradient header ---------- */
.topbar { position: relative; top: auto; z-index: 1; display: block; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 40px; border-radius: 0 0 28px 28px; }
.topbar.tall { padding-bottom: 62px; }
.topbar::before, .topbar::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); pointer-events: none; }
.topbar::before { width: 220px; height: 220px; right: -70px; top: -95px; }
.topbar::after { width: 140px; height: 140px; left: -55px; bottom: -75px; }
.tb-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.tb-who { flex: 1; min-width: 0; }
.tb-hi { font-size: 12.5px; opacity: .85; }
.tb-nm { font-size: 18px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { background: rgba(255,255,255,.2); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; cursor: pointer; padding: 0; flex: none; }
.tb-av { width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.22); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; text-decoration: none; flex: none; }
.topbar .bell { margin-left: 0; width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 18px; position: relative; color: #fff; text-decoration: none; flex: none; }
.topbar .bell .badge { top: -4px; right: -4px; }
.topbar h1 { margin: 16px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.4px; position: relative; z-index: 1; }
.tb-sub { font-size: 13px; opacity: .9; position: relative; z-index: 1; margin-top: 2px; }
main { position: relative; z-index: 2; }
/* home screens overlap the header with their first card; inner pages start below it */
.topbar.tall + main { margin-top: -44px !important; padding-top: 0 !important; }
.topbar:not(.tall) + main { padding-top: 16px !important; }

/* ---------- cards & tiles ---------- */
.card, .stat, .lcard, .pcard, .invoice, .list a, .list .li, .dlist a, .irow { border-radius: var(--radius); border: 0; box-shadow: 0 4px 18px rgba(17, 24, 39, .06); }
.irow { border-radius: 16px; }
.card { padding: 16px; margin-bottom: 14px; }
.card h3 { font-size: 15.5px; font-weight: 700; }
h2 { font-weight: 800; letter-spacing: -.2px; }
.stats { gap: 12px; margin-bottom: 14px; }
.stat { padding: 14px; }
.stat b { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.grid { gap: 14px; }
.lcard .img { border-radius: var(--radius) var(--radius) 0 0; }
.lcard .price, .dprice { font-weight: 800; letter-spacing: -.3px; }
.ico, .avatar { border-radius: 14px; background: color-mix(in srgb, var(--g1) 12%, white); color: var(--g1); }
.empty .big { font-size: 44px; }

/* ---------- buttons, chips, pills, forms ---------- */
.btn { border-radius: 14px; padding: 13px 18px; background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 6px 16px -6px var(--g1); }
.btn.sm { border-radius: 11px; padding: 8px 13px; box-shadow: none; }
.btn.ghost { background: color-mix(in srgb, var(--g1) 11%, white); color: var(--g1); box-shadow: none; }
.btn.line { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ok { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 6px 16px -6px #059669; }
.btn.danger { background: #fee2e2; color: #dc2626; box-shadow: none; }
.chip { border: 0; background: #fff; box-shadow: 0 2px 8px rgba(17,24,39,.06); font-weight: 600; padding: 8px 14px; }
.chip.on { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; }
.pill { font-weight: 700; padding: 3px 10px; }
.pill.brand { background: color-mix(in srgb, var(--g1) 12%, white); color: var(--g1); }
label.f input, label.f select, label.f textarea { border-radius: 13px; background: #fafbff; padding: 12px 14px; }
.search input { border-radius: 14px; border: 0; box-shadow: 0 2px 10px rgba(17,24,39,.07); }
.search .btn { padding: 12px 16px; }
.filters select { border: 0; border-radius: 12px; box-shadow: 0 2px 8px rgba(17,24,39,.06); }
.seg, .tabs2 { background: #eef0f6; border-radius: 14px; padding: 4px; }
.seg button, .tabs2 button { border-radius: 11px; font-weight: 600; }
.seg button.on, .tabs2 button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(17,24,39,.08); }
.locbar { border-radius: 16px; box-shadow: 0 4px 18px rgba(17,24,39,.08); padding: 12px 14px; }
.error { border-radius: 12px; }

/* ---------- floating bottom nav ---------- */
.nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: var(--nav-h); padding: 0 6px;
  border: 0; border-radius: 22px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(17,24,39,.14); max-width: 700px; margin: 0 auto; }
.nav a { color: #9ca3af; font-weight: 600; font-size: 10.5px; }
.nav a .ic { font-size: 20px; transition: transform .2s; }
.nav a.on { color: var(--g1); }
.nav a.on .ic { transform: translateY(-2px); }
.nav a.on::after { content: ""; position: absolute; bottom: 4px; width: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.nav a.sell .ic { background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 8px 18px -6px var(--g1); margin-top: -26px; width: 50px; height: 50px; border: 4px solid var(--bg); }
.nav a.sell.on::after { display: none; }

/* bars that sit above the nav: float them too */
.actionbar, .composer, .summary-bar { left: 10px; right: 10px; bottom: var(--float); border: 0; border-radius: 18px;
  box-shadow: 0 10px 26px rgba(17,24,39,.14); max-width: 700px; margin: 0 auto; padding: 10px 12px; }
.composer input { border-radius: 14px; background: #fafbff; }
.has-actionbar { padding-bottom: 90px; }

/* ---------- sheets & toasts ---------- */
.sheet-bg { background: rgba(17,24,39,.5); animation: tfade .2s; }
.sheet { border-radius: 26px 26px 0 0; padding-top: 10px; animation: tup .25s ease-out; }
.sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: #d1d5db; margin: 0 auto 14px; }
.sheet h3 { font-size: 18px; }
@keyframes tup { from { transform: translateY(40px); opacity: .6; } }
@keyframes tfade { from { opacity: 0; } }
.toast { border-radius: 14px; bottom: calc(var(--float) + 70px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }

/* ---------- login: full-screen gradient ---------- */
body:has(.auth) { background: linear-gradient(160deg, var(--g1) 0%, var(--g2) 60%, var(--g3, var(--g2)) 100%); min-height: 100vh; }
body:has(.auth) .topbar { display: none; }
html:has(.auth) { background: var(--g2); }
body:has(.auth) .topbar + main, body:has(.auth) main { margin-top: 0 !important; padding-top: calc(30px + env(safe-area-inset-top, 0px)) !important; }
.auth .hero { color: #fff; padding: 10px 0 18px; }
.auth .hero .mark { background: #fff; color: var(--g1); width: 84px; height: 84px; border-radius: 26px; font-size: 40px; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.auth .hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.auth .hero .muted, .auth > .small, .auth > p { color: rgba(255,255,255,.9) !important; }
.auth > p a, .auth > .small a { color: #fff; }
.auth .demo-logins { gap: 10px; }
.auth .demo-logins .btn { border: 0; color: #fff; text-align: left; padding: 14px 12px; border-radius: 18px; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.4); background: linear-gradient(135deg, #4338ca, #7c3aed); }
.auth .demo-logins .btn:nth-child(4n+2) { background: linear-gradient(135deg, #0f766e, #0891b2); }
.auth .demo-logins .btn:nth-child(4n+3) { background: linear-gradient(135deg, #ea580c, #db2777); }
.auth .demo-logins .btn:nth-child(4n+4) { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.auth .demo-logins .btn .muted, .auth .demo-logins .btn span { color: rgba(255,255,255,.88) !important; }
