/* ==========================================================================
   MONPURA TELECOM — assets/css/app.css
   --------------------------------------------------------------------------
   ডিজাইন সিস্টেম: এমারেল্ড/টিল ব্র্যান্ড, মোবাইল-ফার্স্ট, অ্যাপ-শেল (সাইডবার + বটম নেভ),
   কার্ড/টেবিল/ফর্ম/ব্যাজ/ডায়ালগ/টোস্ট, প্রিন্ট লেআউট (A4 + 80mm রিসিপ্ট)।
   JS চুক্তি (assets/js/app.js):
     - body.drawer-open  → মোবাইল ড্রয়ার খোলা; .drawer-backdrop থেকে [hidden] সরানো/বসানো
     - #net-banner[hidden], #toast-host > .toast.toast-{success|error|warning|info}(.is-leaving)
     - dialog#mt-confirm  → showModal()
     - [data-loading-text] সাবমিট বাটন → .is-loading
   মডিউল-নির্দিষ্ট স্টাইল (POS ইত্যাদি) সংশ্লিষ্ট ফাইল লেখার সময় নিচে যোগ হবে।
   ========================================================================== */

/* ---------- ১. টোকেন ---------- */
:root {
  --primary: #047857;
  --primary-600: #059669;
  --primary-700: #036249;
  --primary-dark: #064E3B;
  --accent: #0D9488;
  --primary-soft: #E7F6EF;

  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --text: #172033;
  --muted: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --ok: #16A34A;
  --warn: #D97706;
  --err: #DC2626;
  --info: #2563EB;
  --ok-soft: #ECFDF3;
  --warn-soft: #FFF7E6;
  --err-soft: #FEF2F2;
  --info-soft: #EFF6FF;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .18);

  --header-h: 60px;
  --bottom-h: 64px;
  --sidebar-w: 256px;

  --font: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

/* ---------- ২. রিসেট ও বেস ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0 0 .5em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
ul, ol { padding: 0; margin: 0; }
small { font-size: .82em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

:focus-visible { outline: 3px solid rgba(4, 120, 87, .35); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--primary-dark); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: calc(var(--safe-t) + 8px); text-decoration: none; }

.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tone-success { --tone: var(--ok); }
.tone-warning { --tone: var(--warn); }
.tone-danger  { --tone: var(--err); }
.tone-info    { --tone: var(--info); }
.tone-neutral { --tone: #475569; }

/* ---------- ৩. বাটন ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 2px 8px rgba(4, 120, 87, .28); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-700), var(--primary)); }
.btn-ghost { background: var(--surface); color: var(--primary-dark); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-dark); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ৪. ফর্ম ---------- */
.form-field { margin-bottom: 14px; }
.form-field > label, .form-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.form-field .req { color: var(--err); }
.form-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.form-error { color: var(--err); font-size: 13px; margin-top: 4px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.input, select.input, textarea.input,
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=date], input[type=month], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 16px; /* iOS জুম রোধ */
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(4, 120, 87, .15);
}
.input[aria-invalid="true"], .is-invalid { border-color: var(--err); }
input::placeholder, textarea::placeholder { color: #94A3B8; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); vertical-align: middle; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.input-group { display: flex; gap: 8px; }
.input-group > .input { flex: 1; min-width: 0; }

/* ---------- ৫. অ্যালার্ট ও ব্যাজ ---------- */
.alert {
  border: 1px solid; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
  font-size: 15px; line-height: 1.55;
}
.alert-info    { background: var(--info-soft); border-color: #BFDBFE; color: #1E40AF; }
.alert-success { background: var(--ok-soft);   border-color: #BBF7D0; color: #166534; }
.alert-warning { background: var(--warn-soft); border-color: #FDE68A; color: #92400E; }
.alert-error   { background: var(--err-soft);  border-color: #FECACA; color: #991B1B; }

.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: #F1F5F9; color: #475569;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-info    { background: #DBEAFE; color: #1E40AF; }

/* ---------- ৬. কার্ড, প্যানেল, স্ট্যাট ---------- */
.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 17px; color: var(--primary-dark); }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.link-more .icon { width: 16px; height: 16px; }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 18px; }
.stat-card {
  --tone: var(--primary);
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 16px 16px 20px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; text-decoration: none;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--tone); border-radius: 5px 0 0 5px;
}
.stat-card::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--tone); opacity: .07;
}
a.stat-card:hover { box-shadow: var(--shadow); border-color: var(--tone); transform: translateY(-2px); text-decoration: none; }
.stat-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.65rem); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-sub { color: var(--muted); font-size: 12.5px; }

.dash-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }

/* ---------- ৭. টেবিল ও তালিকা ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: #F8FBFA; }
.table tr.is-voided td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(100, 116, 139, .5); }
.table tr.is-voided td .badge, .table tr.is-voided td a { text-decoration: none; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }

.list-plain { list-style: none; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }
.li-main { display: flex; flex-direction: column; min-width: 0; }
.li-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-main small { color: var(--muted); }
.li-amount { color: var(--tone, var(--text)); font-weight: 700; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- ৮. এম্পটি স্টেট, পেজার, ব্রেডক্রাম্ব ---------- */
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty-action { margin-top: 12px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600;
}
.page-link:hover { background: var(--primary-soft); text-decoration: none; }
.page-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-gap { color: var(--muted); padding: 0 4px; }
.page-total { margin-left: auto; color: var(--muted); font-size: 14px; }

.breadcrumbs { margin-bottom: 8px; font-size: 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); margin-right: 4px; }
.breadcrumbs span[aria-current] { color: var(--muted); }

/* ---------- ৯. অ্যাপ শেল ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  min-height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; font-size: 19px;
  box-shadow: 0 3px 10px rgba(4, 120, 87, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

.global-search { position: relative; flex: 1; max-width: 440px; margin-left: auto; display: none; }
.global-search input { padding-left: 42px; min-height: 42px; background: var(--surface-2); border-radius: 999px; }
.gs-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.gs-icon .icon { width: 18px; height: 18px; }

.header-user { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.global-search + .header-user { margin-left: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
}
.user-meta { display: none; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); }
.logout-form { margin: 0; }

.app-body { flex: 1; display: flex; min-width: 0; }
.app-main { flex: 1; min-width: 0; outline: none; padding-bottom: calc(var(--bottom-h) + var(--safe-b) + 16px); }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px calc(14px + var(--safe-r)) 24px calc(14px + var(--safe-l)); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-title { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem); color: var(--primary-dark); letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin: 2px 0 0; font-size: 14.5px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* সাইডবার */
.app-sidebar {
  position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(84vw, 300px);
  padding: calc(var(--safe-t) + 14px) 12px calc(var(--safe-b) + 14px) calc(12px + var(--safe-l));
  background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
  transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
}
.drawer-open .app-sidebar { transform: none; }
.drawer-open { overflow: hidden; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.nav-group + .nav-group { margin-top: 14px; }
.nav-group-label { padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; margin: 2px 0;
  border-radius: 12px; color: var(--text); font-weight: 500; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--primary-soft); text-decoration: none; }
.nav-link .icon { color: var(--muted); }
.nav-bn { flex: 1; }
.nav-en { color: var(--muted); font-size: 11.5px; }
.nav-link.is-active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 3px 10px rgba(4, 120, 87, .25); }
.nav-link.is-active .icon, .nav-link.is-active .nav-en { color: rgba(255, 255, 255, .85); }

/* মোবাইল বটম নেভ */
.app-bottomnav {
  position: fixed; z-index: 55; left: 0; right: 0; bottom: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  min-height: calc(var(--bottom-h) + var(--safe-b)); padding: 6px calc(6px + var(--safe-r)) var(--safe-b) calc(6px + var(--safe-l));
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.bottom-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; border-radius: 12px; min-height: 52px;
}
.bottom-link:hover { text-decoration: none; color: var(--primary-dark); }
.bottom-link.is-active { color: var(--primary); background: var(--primary-soft); }

.only-mobile { display: inline-flex; }

/* নেট ব্যানার, টোস্ট */
.net-banner {
  position: fixed; z-index: 90; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 8px) 14px 8px;
  background: #92400E; color: #fff; text-align: center; font-size: 14px;
}
.toast-host {
  position: fixed; z-index: 100; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 14px);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.auth-body .toast-host { bottom: calc(var(--safe-b) + 14px); }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: #0F172A; color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 15px;
  border-left: 5px solid var(--info); animation: toast-in .22s ease;
}
.toast-success { border-left-color: var(--ok); }
.toast-error   { border-left-color: var(--err); }
.toast-warning { border-left-color: var(--warn); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ডায়ালগ */
.dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 440px); width: 100%; color: var(--text); }
.dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.dialog-card { margin: 0; padding: 22px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); }
.dialog-card h2 { font-size: 18px; margin-bottom: 8px; color: var(--primary-dark); }
.dialog-card p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* সাধারণ টুলবার/ফিল্টার (পরবর্তী মডিউলের জন্য) */
.toolbar, .filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .form-field { margin: 0; min-width: 150px; flex: 1; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.stack > * + * { margin-top: 12px; }

/* ---------- ১০. লগইন/পাবলিক পেজ ---------- */
.auth-body {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(13, 148, 136, .22), transparent 60%),
    radial-gradient(800px 480px at 100% 110%, rgba(4, 120, 87, .2), transparent 60%),
    var(--bg);
}
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: calc(var(--safe-t) + 24px) 16px calc(var(--safe-b) + 24px);
}
.auth-brand { text-align: center; }
.auth-brand .brand-mark { width: 64px; height: 64px; font-size: 32px; border-radius: 20px; margin-bottom: 10px; }
.auth-brand h1 { font-size: 24px; color: var(--primary-dark); letter-spacing: .01em; }
.auth-brand p { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.auth-card {
  width: 100%; max-width: 420px; padding: 26px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 20px; color: var(--primary-dark); }
.auth-sub { color: var(--muted); margin: 4px 0 18px; font-size: 14.5px; }

/* ---------- ১১. ডেস্কটপ/ট্যাবলেট ব্রেকপয়েন্ট ---------- */
@media (min-width: 720px) {
  .page { padding-left: calc(24px + var(--safe-l)); padding-right: calc(24px + var(--safe-r)); }
  .global-search { display: block; }
  .user-meta { display: flex; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .toast-host { left: auto; right: 20px; width: 360px; bottom: calc(var(--bottom-h) + var(--safe-b) + 14px); }
}
@media (min-width: 1024px) {
  .only-mobile, .app-bottomnav, .drawer-backdrop { display: none !important; }
  .app-sidebar {
    position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 1;
    flex: none; width: var(--sidebar-w); height: calc(100vh - var(--header-h) - var(--safe-t));
    height: calc(100dvh - var(--header-h) - var(--safe-t)); padding: 16px 12px;
    transform: none; box-shadow: none;
  }
  .app-main { padding-bottom: 32px; }
  .toast-host { bottom: 20px; }
  .brand-text strong { max-width: 240px; }
}
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .panel-wide { grid-column: 1 / -1; }
}
@media (min-width: 1400px) {
  .dash-grid { grid-template-columns: 1.4fr 1fr; }
  .panel-wide { grid-column: 1 / -1; }
}

/* ---------- ১২. ছোট মোবাইল ---------- */
@media (max-width: 719px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 13px 12px 13px 16px; }
  .stat-label { font-size: 13px; }
  .stat-sub { font-size: 11.5px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .card, .panel { padding: 14px; }
}
@media (max-width: 640px) {
  /* data-label থাকা টেবিল মোবাইলে কার্ড-তালিকা হয়; .table-keep দিলে স্ক্রল-টেবিলই থাকে */
  .table:not(.table-keep) thead { display: none; }
  .table:not(.table-keep), .table:not(.table-keep) tbody, .table:not(.table-keep) tr, .table:not(.table-keep) td { display: block; width: 100%; }
  .table:not(.table-keep) tr { padding: 10px 2px; border-bottom: 1px solid var(--border); }
  .table:not(.table-keep) td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 4px; border: 0; text-align: right; }
  .table:not(.table-keep) td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
  .table:not(.table-keep) td.num { text-align: right; }
  .table:not(.table-keep) tbody tr:hover { background: transparent; }
  .pager { justify-content: center; }
  .page-total { width: 100%; margin: 4px 0 0; text-align: center; }
}
@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}

/* ---------- ১৩. মোশন/কন্ট্রাস্ট পছন্দ ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn-primary, .nav-link.is-active { border: 2px solid ButtonText; }
}

/* ---------- ১৪. প্রিন্ট লেআউট ---------- */
.print-doc { background: #E8EDF2; }
.print-toolbar {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: calc(var(--safe-t) + 10px) 12px 10px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--border);
}
.print-page { margin: 16px auto 32px; background: #fff; color: #000; box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; }
.paper-a4 .print-page { width: 100%; max-width: 210mm; min-height: 150mm; padding: 14mm; }
.paper-receipt .print-page { width: 100%; max-width: 80mm; padding: 5mm 4mm; font-size: 12px; }
.print-shop { text-align: center; margin-bottom: 10px; }
.print-shop h1 { font-size: 22px; }
.print-shop p { margin: 0; color: #333; font-size: 13px; }
.print-title { text-align: center; font-size: 17px; margin: 8px 0 12px; padding: 6px 0; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.print-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 16px; margin: 0 0 12px; font-size: 13px; }
.print-meta div { display: flex; gap: 6px; }
.print-meta dt { font-weight: 700; }
.print-meta dt::after { content: ":"; }
.print-meta dd { margin: 0; }
.print-footer { margin-top: 16px; padding-top: 8px; border-top: 1px dashed #666; text-align: center; font-size: 13px; }
.print-doc .table th { background: #F1F5F9; color: #000; }
.print-doc .table td, .print-doc .table th { border-bottom: 1px solid #999; padding: 6px 8px; }
.paper-receipt .print-title { font-size: 14px; }
.paper-receipt .print-meta { grid-template-columns: 1fr; font-size: 12px; }
.paper-receipt .table { font-size: 12px; }
.paper-receipt .table th, .paper-receipt .table td { padding: 3px 2px; }

@page { size: A4; margin: 10mm; }
@page receipt { size: 80mm auto; margin: 3mm; }

@media print {
  html, body { background: #fff !important; }
  .no-print, .app-header, .app-sidebar, .app-bottomnav, .drawer-backdrop, .toast-host, .net-banner, .skip-link { display: none !important; }
  .print-page { margin: 0; box-shadow: none; max-width: none; width: 100%; padding: 0; }
  .paper-receipt .print-page { page: receipt; width: 74mm; }
  .print-doc .table { page-break-inside: auto; }
  .print-doc .table tr { page-break-inside: avoid; }
  .print-doc .table thead { display: table-header-group; }
  .print-doc .table tfoot { display: table-footer-group; }
  a { color: inherit; text-decoration: none; }
  /* প্রিন্টে মোবাইল-কার্ড টেবিল ভাঙবে না */
  .table:not(.table-keep) thead { display: table-header-group; }
  .table:not(.table-keep) { display: table; }
  .table:not(.table-keep) tbody { display: table-row-group; }
  .table:not(.table-keep) tr { display: table-row; padding: 0; }
  .table:not(.table-keep) td { display: table-cell; width: auto; text-align: left; padding: 6px 8px; }
  .table:not(.table-keep) td[data-label]::before { content: none; }
  .table:not(.table-keep) td.num { text-align: right; }
}

/* ---------- ১৫. বিল ভাউচার (A4) — MONPURA TELECOM ---------- */
.voucher { --navy: #17375E; --navy-soft: #EEF3FB; --line: #C5CEDB; font-family: var(--font); color: #111; }
.paper-a4 .voucher.print-page { min-height: 277mm; display: flex; flex-direction: column; }
.voucher .vch-head { text-align: center; margin: 6mm 0 9mm; }
.voucher .vch-head h1 { font-size: 30px; font-weight: 800; letter-spacing: .02em; color: var(--navy); text-transform: uppercase; }
.voucher .vch-sub { margin: 4px 0 0; font-size: 13px; letter-spacing: .06em; color: #555; }
.voucher .vch-contact { margin: 4px 0 0; font-size: 12px; color: #666; }

.voucher .vch-meta { display: grid; gap: 9px; margin-bottom: 8mm; font-size: 13px; }
.voucher .vch-row { display: flex; gap: 22px; align-items: flex-end; }
.voucher .vch-f { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.voucher .vch-grow { flex: 1; }
.voucher .vch-date { width: 190px; }
.voucher .vch-row > .vch-f:not(.vch-grow) { width: 230px; }
.voucher .vch-l { white-space: nowrap; }
.voucher .vch-v { flex: 1; min-width: 40px; min-height: 1.5em; padding: 0 4px; border-bottom: 1px solid #333; font-weight: 600; overflow-wrap: anywhere; }
.voucher .vch-pay { width: 230px; white-space: nowrap; }
.voucher .vch-on { font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--navy); }
.voucher .vch-off { color: #444; }

.voucher .vch-section { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.voucher .vch-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.voucher .vch-table col.c-sl { width: 9%; }
.voucher .vch-table col.c-qty { width: 10%; }
.voucher .vch-table col.c-unit { width: 17%; }
.voucher .vch-table col.c-amt { width: 18%; }
.voucher .vch-table th { background: var(--navy); color: #fff; font-weight: 700; font-size: 12.5px; padding: 8px 8px; border: 1px solid var(--navy); text-align: center; }
.voucher .vch-table th.l { text-align: left; }
.voucher .vch-table tbody td { height: 11mm; padding: 4px 8px; border: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.voucher .vch-table .c { text-align: center; }
.voucher .vch-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.voucher .vch-table tfoot td { background: var(--navy-soft); border: 1px solid var(--line); padding: 6px 8px; font-weight: 700; }
.voucher .vch-table tfoot td:first-child { border-right: 0; }
.voucher .vch-table tfoot tr.vch-grand td { font-size: 14px; color: var(--navy); }

.voucher .vch-notes { display: grid; gap: 10px; margin-top: 7mm; font-size: 13px; }
.voucher .vch-blank { display: block; }

.voucher .vch-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14mm; margin-top: auto; padding-top: 22mm; text-align: center; font-size: 12px; color: #444; }
.voucher .vch-sigline { min-height: 1.6em; border-bottom: 1px solid #333; margin-bottom: 5px; color: #111; font-weight: 600; font-size: 12px; }
.voucher .vch-foot { margin-top: 10mm; padding-bottom: 2mm; text-align: center; font-size: 13px; font-weight: 600; color: #222; }

@media (max-width: 640px) {
  .voucher .vch-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .voucher .vch-date, .voucher .vch-pay, .voucher .vch-row > .vch-f:not(.vch-grow) { width: auto; }
  .voucher .vch-pay { white-space: normal; flex-wrap: wrap; }
  .voucher .vch-sign { gap: 8px; }
  .voucher .vch-head h1 { font-size: 22px; }
  .voucher .vch-table { font-size: 12px; }
  .voucher .vch-table th, .voucher .vch-table tbody td { padding: 4px; }
}
@media print {
  .voucher, .voucher * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper-a4 .voucher.print-page { min-height: 277mm; padding: 0; }
  .voucher .vch-table tr { page-break-inside: avoid; }
}

/* ==========================================================================
   সংশোধন: .row-actions ও .inline-form (সব মডিউলে ব্যবহৃত অ্যাকশন বাটন সারি)
   ========================================================================== */
.row-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end}
.row-actions details{position:relative}
.row-actions details summary{list-style:none;cursor:pointer}
.row-actions details summary::-webkit-details-marker{display:none}
.inline-form{display:inline-flex;margin:0}
@media (max-width:719px){.row-actions{justify-content:flex-start}}
@media print{.row-actions{display:none}}
