/* JamilMart design system — one stylesheet for admin, reseller panel, website and stores.
   Fonts: Anek Bangla (headings, numbers), Hind Siliguri (body). Money uses Western digits.
   Tokens follow the owner's design canvas (docs/design/Main.dc.html). */

:root {
  --emerald: #2563EB; --emerald-dark: #1D4ED8; --emerald-soft: #EAF1FE; --emerald-ink: #1D4ED8;
  --forest: #14213D; --forest-2: #1A2A4A; --forest-line: #1E3158; --forest-ink: #CBD8EE; --forest-quiet: #A9BCDD;
  --marigold: #FFC94D; --marigold-ink: #14213D; --marigold-soft: #FFF1CC;
  --paper: #F6F8FC; --white: #FFFFFF; --ink: #16213A; --ink-2: #3E4C68; --slate: #5B6882;
  --line: #E3E9F4; --line-2: #EEF2F9; --field: #D3DCEB;
  --amber: #6E4E00; --amber-soft: #FFF1CC;
  --blue: #274A7C; --blue-soft: #E4ECF8;
  --purple: #4B3482; --purple-soft: #ECE6F7;
  --red: #A82A2A; --red-strong: #D23C3C; --red-soft: #F8E1DE;
  --grey-soft: #E8EEF8;
  --bkash: #E2136E; --bkash-soft: #FCE4EF; --nagad: #F6921E; --nagad-soft: #FDEBD6;
  --c-wholesale: #52607A; --c-packing: #C9B26B; --c-delivery: #1F5F8B; --c-cod: #8C6BB1; --c-profit: #2563EB;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --font-head: 'Anek Bangla', 'Hind Siliguri', system-ui, sans-serif;
  --font-body: 'Hind Siliguri', 'Anek Bangla', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06);
  --shadow-card: 0 0 0 1px rgba(20, 33, 61, .06), 0 1px 2px rgba(20, 33, 61, .05), 0 14px 32px -14px rgba(20, 33, 61, .16);
  --shadow-pop: 0 12px 40px rgba(20, 33, 61, .18);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 26px; letter-spacing: -.005em; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--emerald); }
a:hover { color: var(--emerald-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--slate); }
.small { font-size: 13.5px; }
.pos { color: var(--emerald-ink); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[x-cloak] { display: none !important; }
.big { font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* ---------- app shell (shared by admin and reseller) ---------- */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 0 0 240px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side--dark { background: var(--forest); color: var(--forest-ink); }
.side--light { background: var(--white); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; text-decoration: none; color: inherit; }
.side--dark .brand { border-bottom: 1px solid var(--forest-line); }
.side--light .brand { border-bottom: 1px solid var(--line); }
.brand b { display: block; font-family: var(--font-head); font-size: 20px; line-height: 1.1; }
.side--dark .brand b { color: var(--white); }
.brand small { font-size: 12.5px; opacity: .85; }
.side--dark .brand small { color: var(--forest-quiet); opacity: 1; }
.nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__group { font-size: 12.5px; padding: 14px 12px 4px; }
.side--dark .nav__group { color: var(--forest-quiet); }
.side--light .nav__group { color: var(--slate); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); text-decoration: none; color: inherit; font-size: 15px; transition: background-color .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a > span:not(.nav__count) { flex: 1; min-width: 0; }
.side--dark .nav a:hover { background: var(--forest-2); color: var(--white); }
.side--dark .nav a[aria-current="page"] { background: var(--emerald); color: var(--white); font-weight: 600; }
.side--light .nav a:hover { background: var(--paper); }
.side--light .nav a[aria-current="page"] { background: var(--emerald-soft); color: var(--emerald-dark); font-weight: 600; }
.nav__count { margin-left: auto; background: var(--marigold); color: var(--marigold-ink); font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.side__foot { padding: 12px 16px 16px; font-size: 13px; }
.side--dark .side__foot { border-top: 1px solid var(--forest-line); color: var(--forest-quiet); }
.side--light .side__foot { border-top: 1px solid var(--line); color: var(--slate); }

.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 28px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar__grow { flex: 1; }
.topbar .topbar__menu { display: none; }
.content { padding: 24px 28px 56px; display: flex; flex-direction: column; gap: 22px; max-width: 1320px; width: 100%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--emerald); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }

/* ---------- admin shell (AdminNav / AdminPhones) ---------- */
.shell--admin .side { flex-basis: 248px; padding: 20px 14px 0; }
.shell--admin .brand { padding: 4px 12px 20px; border-bottom: 0; }
.shell--admin .nav { padding: 0; gap: 4px; }
.shell--admin .nav a { min-height: 44px; padding: 0 12px; gap: 12px; font-weight: 500; }
.shell--admin .nav a svg { width: 20px; height: 20px; }
.shell--admin .nav a:not([aria-current="page"]) { color: var(--forest-ink); }
.shell--admin .side__foot { margin-top: 16px; padding: 16px 12px 16px; display: flex; flex-direction: column; gap: 12px; color: var(--white); }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-user .avatar { background: var(--forest-line); }
.side-user b { display: block; font-weight: 500; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { font-size: 12px; color: var(--forest-quiet); }
.seg { display: flex; gap: 2px; border-radius: var(--r-md); padding: 3px; background: var(--grey-soft); }
.seg a, .seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--white); color: var(--forest); box-shadow: 0 1px 2px rgba(20, 33, 61, .12); }
.seg--dark { background: var(--forest-line); }
.seg--dark a, .seg--dark button { color: var(--white); }
.seg--dark [aria-current="true"] { background: var(--white); color: var(--forest); }
.seg--line { background: var(--white); box-shadow: inset 0 0 0 1px var(--field); }
.seg--line [aria-current="true"] { background: var(--forest); color: var(--white); box-shadow: none; }

.ahead { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(246, 248, 252, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.ahead__brand { display: none; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 17px; flex: 1; min-width: 0; }
.ahead__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahead__grow { flex: 1; }
.ahead__btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-sm); background: var(--forest-line); color: var(--white); cursor: pointer; flex: none; font-weight: 600; text-decoration: none; }
.ahead__btn:hover { color: var(--white); filter: brightness(1.1); }
.umenu { position: relative; }
.umenu__btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 6px 4px 4px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.umenu__btn:hover { background: var(--grey-soft); }
.umenu__btn b { font-weight: 600; font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 8px; z-index: 50; display: flex; flex-direction: column; gap: 2px; }
.umenu__who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; flex-direction: column; }
.umenu__pop a, .umenu__pop button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-decoration: none; cursor: pointer; width: 100%; text-align: left; font-weight: 500; }
.umenu__pop a:hover, .umenu__pop button:hover { background: var(--paper); color: var(--ink); }

.subnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--grey-soft); border-radius: 12px; padding: 4px; align-self: flex-start; max-width: 100%; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.subnav a:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.subnav a[aria-current="page"] { background: var(--white); color: var(--forest); box-shadow: 0 1px 2px rgba(20, 33, 61, .12); }
.subnav .nav__count { margin-left: 0; }

.tabbar { display: none; }

/* ---------- global search ---------- */
.gsearch { position: relative; width: min(420px, 100%); }
.gsearch__field { position: relative; display: flex; align-items: center; }
.gsearch__field svg { position: absolute; left: 12px; color: var(--slate); pointer-events: none; }
.gsearch__input { width: 100%; min-height: 44px; border-radius: var(--r-md); border: 1px solid var(--field); background: var(--white); padding: 0 40px 0 40px; color: var(--ink); }
.gsearch__input:focus { outline: 2px solid var(--emerald); outline-offset: 0; border-color: var(--emerald); }
.gsearch__kbd { position: absolute; right: 10px; font-size: 12px; color: var(--slate); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--paper); }
.gsearch__pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--white); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 60; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; }
.gsearch__group { font-size: 12.5px; font-weight: 600; color: var(--slate); padding: 10px 10px 4px; }
.gsearch__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); min-height: 48px; }
.gsearch__item:hover, .gsearch__item.is-active { background: var(--paper); color: var(--ink); }
.gsearch__ico { flex: 0 0 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--grey-soft); color: var(--ink-2); }
.gsearch__item b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__item small { display: block; color: var(--slate); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__item > span:nth-child(2) { flex: 1; min-width: 0; }
.gsearch__empty { padding: 18px 12px; color: var(--slate); text-align: center; font-size: 14px; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.page-head__text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.page-head__text p { color: var(--slate); font-size: 14px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 14px; color: var(--slate); }
.crumb a { color: var(--slate); }

/* ---------- panels / cards ---------- */
.card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 20px; min-width: 0; }
.card--dark { background: var(--forest); color: var(--white); }
.panel { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
.panel__head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 18px 20px 12px; border-bottom: 1px solid var(--line-2); }
.panel__head h2 { flex: 1; font-size: 18px; }
.panel__title { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.panel__title h2 { flex: none; }
.panel__title p { font-size: 13.5px; color: var(--slate); }
.panel__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.panel__foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rows > * { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.rows > *:last-child { border-bottom: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; align-items: start; }
.g4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .wide { flex: 1.6 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .narrow { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sb { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- stats & pipeline ---------- */
.stat { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: transform .18s var(--ease-out), box-shadow .18s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20, 33, 61, .06), 0 12px 28px rgba(20, 33, 61, .10); }
.stat__value { font-family: var(--font-head); font-size: 28px; font-weight: 700; line-height: 1.2; order: 2; }
.stat__label { font-size: 14px; color: var(--slate); order: 1; }
.stat__hint { font-size: 13px; color: var(--slate); order: 3; }
.stat__delta { order: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--slate); margin-top: 4px; }
.stat__value small { font-size: 16px; font-weight: 500; color: var(--slate); }
.stat--dark { background: var(--forest); color: var(--white); }
.stat--dark .stat__label, .stat--dark .stat__value small { color: var(--forest-quiet); }
.stat--dark .stat__hint, .stat--dark .stat__delta { color: var(--forest-quiet); }
.delta { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta--up { background: var(--emerald-soft); color: var(--emerald-ink); }
.delta--down { background: var(--red-soft); color: var(--red); }
.delta--flat { background: var(--grey-soft); color: var(--ink-2); }
.pipeline { display: flex; flex-wrap: wrap; background: var(--forest); color: var(--white); border-radius: var(--r-lg); overflow: hidden; }
.pipeline__stage { flex: 1 1 170px; padding: 18px 22px; border-right: 1px solid var(--forest-line); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.pipeline__stage:hover { background: var(--forest-2); color: var(--white); }
.pipeline__stage b { font-family: var(--font-head); font-size: 36px; line-height: 1.05; }
.pipeline__stage span { color: var(--forest-ink); }
.pipeline__stage small { color: var(--forest-quiet); font-size: 13.5px; }
.pipeline__ends { flex: 1.2 1 240px; display: flex; flex-direction: column; color: var(--ink); }
.pipeline__ends a { flex: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 22px; text-decoration: none; color: inherit; }
.pipeline__ends a:first-child { background: var(--emerald-soft); }
.pipeline__ends a:last-child { background: var(--red-soft); }
.pipeline__ends b { font-family: var(--font-head); font-size: 26px; }
.pipeline__ends small { margin-left: auto; color: var(--ink-2); font-size: 13.5px; }
/* AdminDashboard "অর্ডারের পথ" band: tiles with count + ৳ per stage */
.band { background: var(--forest); color: var(--white); border-radius: var(--r-lg); padding: 20px; box-shadow: 0 18px 40px -26px rgba(20, 33, 61, .7); }
.band__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.band__head a { color: var(--marigold); font-weight: 600; font-size: 14px; text-decoration: none; }
.panel__head > a { text-decoration: none; }
.band__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.band__tile { background: var(--forest-line); border-radius: 12px; padding: 14px 16px; color: var(--white); text-decoration: none; display: flex; flex-direction: column; transition: transform .18s var(--ease-out), filter .18s; }
.band__tile:hover { color: var(--white); transform: translateY(-2px); filter: brightness(1.12); }
.band__tile > span { font-size: 13px; font-weight: 600; color: var(--forest-ink); }
.band__tile b { font-family: var(--font-head); font-weight: 700; font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.band__tile small { font-size: 14px; color: var(--forest-ink); font-variant-numeric: tabular-nums; }
.band__tile--ok { background: var(--emerald); }
.band__tile--ok span, .band__tile--ok small { color: #E2E8F5; }
.band__tile--bad { background: var(--red); }
.band__tile--bad span, .band__tile--bad small { color: #FBE3DF; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-md); border: 0; background: var(--white); color: var(--forest); box-shadow: inset 0 0 0 1px var(--field); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2; transition: transform .15s, filter .15s, background-color .15s, box-shadow .15s; }
.btn:hover { color: var(--forest); box-shadow: inset 0 0 0 1px #9AAECF; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: linear-gradient(180deg, #4F8EF7, var(--emerald)); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(20, 33, 61, .3); }
.btn--primary:hover { filter: brightness(1.05); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(20, 33, 61, .3); }
.btn--accent { background: linear-gradient(180deg, #FFD36B, var(--marigold)); color: var(--marigold-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(20, 33, 61, .2); }
.btn--accent:hover { filter: brightness(1.05); color: var(--marigold-ink); box-shadow: none; }
.btn--dark { background: var(--forest); color: var(--white); box-shadow: none; }
.btn--dark:hover { filter: brightness(1.25); color: var(--white); box-shadow: none; }
.btn--danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn--danger:hover { background: #F2CFCA; color: var(--red); box-shadow: none; }
.btn--danger-solid { background: var(--red-strong); color: var(--white); box-shadow: none; }
.btn--danger-solid:hover { filter: brightness(1.06); color: var(--white); box-shadow: none; }
.btn--warn { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.btn--warn:hover { background: #FBE6A8; color: var(--amber); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--emerald); box-shadow: none; }
.btn--ghost:hover { background: var(--emerald-soft); color: var(--emerald-dark); box-shadow: none; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--xs { min-height: 30px; padding: 0 9px; font-size: 13px; border-radius: var(--r-sm); gap: 5px; }
.btn--xs svg { width: 14px; height: 14px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .45; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--emerald); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.copy { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.copy__btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--white); box-shadow: inset 0 0 0 1px var(--field); color: var(--ink-2); border-radius: 8px; min-height: 28px; padding: 0 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.copy__btn:hover { color: var(--forest); box-shadow: inset 0 0 0 1px #99A4B9; }
.copy__btn.is-done { background: var(--emerald-soft); color: var(--emerald-ink); box-shadow: none; }
.copy__btn svg { width: 14px; height: 14px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge--plain::before { display: none; }
.badge--green { background: var(--emerald-soft); color: var(--emerald-ink); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--purple { background: var(--purple-soft); color: var(--purple); }
.badge--grey { background: var(--grey-soft); color: var(--ink-2); }
.badge--dark { background: var(--forest); color: var(--marigold); }
.badge--marigold { background: var(--marigold); color: var(--marigold-ink); }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 0 8px; border-radius: 999px; background: var(--marigold); color: var(--marigold-ink); }
.paypill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.5; background: var(--grey-soft); color: var(--ink-2); }
.paypill img { height: 16px; width: auto; display: inline-block; }
.paypill--bkash { background: var(--bkash); color: var(--white); }
.paypill--nagad { background: var(--nagad); color: var(--white); }
.paypill--img { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); padding: 3px 10px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--field); border-radius: var(--r-md); background: var(--white); color: var(--ink); }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--emerald); outline-offset: 0; border-color: var(--emerald); }
.input[readonly] { background: var(--paper); }
.input--big { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.field .hint, .check .hint { font-size: 13px; color: var(--slate); }
.field .error { font-size: 13px; color: var(--red); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border: 2px solid var(--red-strong); }
.affix { display: flex; align-items: stretch; }
.affix > span { display: inline-flex; align-items: center; padding: 0 12px; background: var(--paper); border: 1px solid var(--field); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); color: var(--slate); font-weight: 600; }
.affix .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--emerald); flex: none; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-md); background: var(--white); cursor: pointer; }
.radio-card:has(input:checked) { border: 2px solid var(--emerald); font-weight: 600; }
.radio-card input { accent-color: var(--emerald); width: 18px; height: 18px; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.dropzone { border: 2px dashed #99A4B9; border-radius: var(--r-md); padding: 22px; text-align: center; color: var(--slate); background: var(--white); cursor: pointer; display: block; }
.dropzone:hover { border-color: var(--emerald); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--slate); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .num, .table .r { text-align: right; white-space: nowrap; }
.table .sub { display: block; font-size: 13px; color: var(--slate); }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: #F7F8FA; }
.table tr.is-selected td { background: #F0F5FE; }
.table tbody tr { transition: background-color .15s; }
.nowrap { white-space: nowrap; }
.trxid { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .03em; }

/* ---------- tabs, filters ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a, .tabs button { border: 1px solid transparent; background: none; border-radius: 999px; padding: 6px 14px; color: var(--slate); font-weight: 500; text-decoration: none; cursor: pointer; font-size: 15px; min-height: 36px; }
.tabs a:hover, .tabs button:hover { background: var(--grey-soft); color: var(--ink); }
.tabs [aria-current="true"], .tabs [aria-pressed="true"], .tabs [aria-current="page"] { background: var(--forest); color: var(--white); }
.tabs span { opacity: .75; margin-left: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .toolbar .select { min-height: 40px; width: auto; }

/* ---------- money split ---------- */
.split-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; }
.split-bar i { display: block; min-width: 3px; }
.legend { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: 15px; }
.legend .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.kv { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 8px 14px; font-size: 15px; margin: 0; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.checklist { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; list-style: none; }
.checklist .ok { color: var(--emerald); }
.checklist .no { color: var(--red); }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.mini { background: var(--paper); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.mini span { font-size: 13px; color: var(--slate); }
.mini b { font-size: 18px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- to-do list (AdminDashboard) ---------- */
.todo { display: flex; flex-direction: column; }
.todo__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.todo__row:last-child { border-bottom: 0; }
.todo__n { flex: 0 0 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--grey-soft); color: var(--ink-2); }
.todo__n--blue { background: var(--blue-soft); color: var(--blue); }
.todo__n--amber { background: var(--amber-soft); color: var(--amber); }
.todo__n--red { background: var(--red-soft); color: var(--red); }
.todo__n--purple { background: var(--purple-soft); color: var(--purple); }
.todo__text { flex: 1; min-width: 0; }
.todo__text b { font-weight: 600; display: block; }
.todo__text small { display: block; color: var(--slate); font-size: 13px; }
.rank { display: flex; flex-direction: column; }
.rank__row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.rank__row:last-child { border-bottom: 0; }
.rank__i { width: 20px; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.rank__who { flex: 1; min-width: 0; }
.rank__who a, .rank__who b { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__who small { color: var(--slate); font-size: 13px; }
.rank__val { text-align: right; font-variant-numeric: tabular-nums; }
.rank__val b { font-weight: 700; display: block; }
.rank__val small { color: var(--slate); font-size: 13px; }

/* ---------- alerts, empty, toast ---------- */
.alert { border-radius: var(--r-md); padding: 12px 16px; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.alert--info { background: var(--blue-soft); color: #1D3A63; }
.alert--warn { background: var(--amber-soft); color: #5C3B00; }
.alert--error { background: var(--red-soft); color: #7A2219; }
.alert--success { background: var(--emerald-soft); color: #051C4B; }
.empty { padding: 36px 20px; text-align: center; color: var(--slate); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty__icon { width: 64px; height: 64px; }
.empty__title { color: var(--ink); font-size: 16px; }
.empty p { font-size: 14px; max-width: 420px; }
.empty .btn { margin-top: 4px; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(560px, 92vw); }
.toast { background: var(--forest); color: var(--white); padding: 11px 16px; border-radius: var(--r-md); font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); animation: up .3s var(--ease-out) both; }
.toast--error { background: var(--red); }

/* ---------- skeleton loader ---------- */
.skel { display: flex; flex-direction: column; gap: 10px; }
.skel__line, .skel__block, .skel__circle { display: block; border-radius: 8px; background: linear-gradient(90deg, #E8EEF8 0%, #F6F8FC 50%, #E8EEF8 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel__line { height: 12px; }
.skel__line--lg { height: 26px; width: 55%; }
.skel__block { height: 160px; border-radius: 12px; }
.skel__circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.skel__row { display: flex; align-items: center; gap: 12px; }
.skel__row .skel__line { flex: 1; }
.skel-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 20px; }
[wire\:loading].skel, [wire\:loading].skel-card { display: none; }

/* ---------- drawer / modal / side panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 33, 61, .4); z-index: 80; animation: fade .2s ease-out both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--white); z-index: 81; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slide-in .26s var(--ease-out) both; }
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.drawer__head h2 { flex: 1; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.drawer__foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; flex-wrap: wrap; }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 90vh; overflow-y: auto; background: var(--white); border-radius: var(--r-lg); display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: pop .22s var(--ease-out) both; }
.sidepanel { flex: 1 1 400px; display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 84px; }
.sidepanel__close { margin-left: auto; }

/* ---------- media ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.thumb { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--emerald-soft); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__tag { position: absolute; left: 8px; top: 8px; background: var(--emerald); color: var(--white); font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.thumb__x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.product-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; }
.product-card__img { aspect-ratio: 1 / 1; background: var(--emerald-soft); display: flex; align-items: center; justify-content: center; color: var(--slate); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.meter { height: 7px; border-radius: 4px; background: #E6E8EC; overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; background: var(--emerald); transform-origin: left; animation: grow .8s var(--ease-out) both; }
.meter.is-full i { background: var(--amber); }

/* ---------- language switch ---------- */
.lang { display: inline-flex; gap: 2px; border-radius: var(--r-md); padding: 3px; font-size: 14px; font-weight: 600; background: var(--white); box-shadow: inset 0 0 0 1px var(--field); }
.lang a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--forest); color: var(--white); }

/* ---------- public website ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.site-header .wrap { display: flex; align-items: center; gap: 12px 26px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; flex: 1; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 0; }
.auth-card { max-width: 440px; margin: 48px auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 28px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- motion (CSS only, respects reduced motion) ---------- */
@keyframes up { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } }
.rise > * { animation: up .55s var(--ease-out) both; }
.rise > *:nth-child(2) { animation-delay: .06s; }
.rise > *:nth-child(3) { animation-delay: .12s; }
.rise > *:nth-child(4) { animation-delay: .18s; }
.rise > *:nth-child(5) { animation-delay: .24s; }
.rise > *:nth-child(n+6) { animation-delay: .3s; }
.chart-box canvas { animation: fade .6s .1s ease-out both; }
.spark path.ln { stroke-dasharray: 1; animation: draw 1.4s .3s ease-out both; }

/* ---------- print ---------- */
@media print {
  .side, .topbar, .ahead, .tabbar, .subnav, .no-print, .toasts { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .panel, .card, .stat { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .side { position: fixed; left: 0; top: 0; z-index: 90; width: 270px; transform: translateX(-100%); transition: transform .18s; }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-pop); }
  .topbar .topbar__menu { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 48px; gap: 16px; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .hide-mobile { display: none !important; }
  h1 { font-size: 24px; }

  /* admin phone: dark top bar + bottom tab bar (AdminPhones) */
  .shell--admin .ahead { background: var(--forest); border-bottom: 0; padding: 6px 12px 6px 16px; min-height: 56px; gap: 8px; backdrop-filter: none; }
  .shell--admin .ahead__brand { display: flex; }
  .shell--admin .ahead__btn { display: inline-flex; }
  .shell--admin .ahead .gsearch, .shell--admin .ahead .lang, .shell--admin .ahead .umenu, .shell--admin .ahead__grow { display: none; }
  .shell--admin .ahead.is-searching .gsearch { display: block; position: absolute; left: 8px; right: 8px; top: 6px; width: auto; }
  .shell--admin .content { padding-bottom: 96px; }
  .shell--admin .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--white); box-shadow: 0 -1px 0 var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--slate); background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--emerald); }
  .tabbar .nav__count { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 11px; padding: 0 6px; }
  .sidepanel { position: static; }
  .table td { white-space: nowrap; }
}
@media (max-width: 600px) {
  .g4.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g4.kpis .stat { padding: 14px; }
  .g4.kpis .stat__value { font-size: 22px; }
  .g4.kpis .stat__value small { display: block; font-size: 13px; }
  .page-head__actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 981px) { .hide-desktop { display: none !important; } }
