/* =========================================================
   MONPURA NETWORK — ENTERPRISE MANAGEMENT SYSTEM STYLESHEET
   File: admin/style.css (UPDATED WITH PARTNERS, TRANSLATION, & HISTORY GRIDS)
   ========================================================= */

:root {
  --color-primary: #1666d6;
  --color-primary-dark: #0e4fae;
  --color-primary-light: #eaf2ff;
  --color-accent: #4a90f2;
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f8fc;
  --color-border: #e4e9f2;
  --color-text: #1c2536;
  --color-text-muted: #6b7686;
  --color-success: #17a86b;
  --color-success-bg: #e7f8f0;
  --color-warning: #e6a80f;
  --color-warning-bg: #fdf5e0;
  --color-danger: #e0453f;
  --color-danger-bg: #fbe9e8;
  --color-info: #4a90f2;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(20, 40, 90, 0.06);
  --shadow-md: 0 6px 20px rgba(20, 40, 90, 0.08);
  --shadow-lg: 0 12px 34px rgba(20, 40, 90, 0.14);
  --sidebar-w: 260px;
  --topbar-h: 68px;
  --mobile-nav-h: 64px;
  --transition: 0.2s ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ================= LOADER ================= */
.loader-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #ffffff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.loader-spinner {
  width: 42px; height: 42px;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-overlay p { color: var(--color-text-muted); font-size: 14px; margin: 0; font-weight: 500; }

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: calc(100vw - 32px);
}
.toast {
  background: #1c2536; color: #fff;
  padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.25s ease;
  min-width: 240px; max-width: 360px;
}
.toast.toast-success { background: var(--color-success); }
.toast.toast-error { background: var(--color-danger); }
.toast.toast-warning { background: var(--color-warning); color: #3a2c00; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ================= MODAL OVERLAYS ================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(15, 25, 45, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: var(--radius-md);
  padding: 26px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-box h3 { margin: 0 0 14px; font-size: 18px; color: var(--color-primary-dark); }
.modal-box p { margin: 0 0 20px; color: var(--color-text-muted); font-size: 14px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* PRINTABLE INVOICES & STATEMENTS */
.invoice-modal-box { max-width: 650px; }
.printable-invoice {
  background: #fff; padding: 22px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1c2536;
}
.invoice-header { text-align: center; margin-bottom: 12px; }
.invoice-header h2 { margin: 0 0 2px; font-size: 20px; color: var(--color-primary-dark); }
.invoice-header p { margin: 2px 0; font-size: 12px; color: var(--color-text-muted); }
.invoice-details p { margin: 5px 0; font-size: 13px; display: flex; justify-content: space-between; }

/* PRINT TABLE STYLING */
.print-table {
  width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px;
}
.print-table th, .print-table td {
  border: 1px solid #ddd; padding: 7px 9px; text-align: left;
}
.print-table th {
  background-color: #f2f5f9; color: #0e4fae; font-weight: 700;
}

/* ================= BUTTONS ================= */
.btn {
  border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-surface-alt); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-border); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #c8362f; }
.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: #128a57; }
.link-btn {
  background: none; border: none; color: var(--color-primary);
  font-size: 13.5px; font-weight: 600; padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ================= AUTH SCREENS ================= */
.auth-screen {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f5f9ff 0%, #ffffff 60%);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
}
.brand-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; justify-content: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 22px; font-weight: 800; color: var(--color-primary-dark); }
.brand-sub { font-size: 10px; letter-spacing: 2px; color: var(--color-text-muted); font-weight: 700; }

.auth-form h2 { margin: 0 0 4px; font-size: 22px; text-align: center; }
.auth-subtitle { text-align: center; color: var(--color-text-muted); font-size: 13.5px; margin: 0 0 22px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin: 14px 0 6px; }
.field-input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); font-size: 14px;
  background: var(--color-surface-alt); color: var(--color-text);
  transition: border-color var(--transition), background var(--transition);
}
.field-input:focus { outline: none; border-color: var(--color-primary); background: #fff; }
.field-input:disabled { color: var(--color-text-muted); cursor: not-allowed; }
.auth-form .btn { margin-top: 20px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--color-text-muted); margin: 18px 0 0; }

/* ================= APP SHELL & SIDEBAR ================= */
.app-shell { display: flex; min-height: 100vh; width: 100%; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, #0d3b82, var(--color-primary-dark));
  display: none; flex-direction: column;
  padding: 22px 16px; color: #fff;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; }
.brand-text-sm { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text-sm span { font-weight: 800; font-size: 16px; }
.brand-text-sm small { font-size: 9px; letter-spacing: 1.5px; opacity: 0.85; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; color: rgba(255,255,255,0.85);
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 14px; text-align: left; transition: background var(--transition);
}
.nav-item i { width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.1); }
.nav-item.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }

.sidebar-logout {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-top: 10px;
}
.sidebar-logout:hover { background: rgba(255,255,255,0.22); }

.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ================= TOPBAR & TRANSLATION CONTROLS ================= */
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid var(--color-border);
  background: #fff; position: sticky; top: 0; z-index: 50;
}
.topbar-title h1 { font-size: 19px; margin: 0; font-weight: 700; }
.topbar-actions-area { display: flex; align-items: center; gap: 16px; }

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  box-shadow: var(--shadow-sm);
}
.lang-toggle-btn {
  border: none;
  background: none;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: calc(var(--radius-sm) - 2px);
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.lang-toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-user-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.topbar-user-info span { font-size: 13.5px; font-weight: 600; }
.topbar-user-info small { font-size: 11px; color: var(--color-primary); font-weight: 700; }
.topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}

/* ================= CONTENT / PAGES ================= */
.content { flex: 1; padding: 18px 16px calc(var(--mobile-nav-h) + 24px); }
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin: 4px 0 16px;
}
.section-header h2 { font-size: 18px; margin: 0; }
.section-header h3 { font-size: 16px; margin: 0; color: var(--color-primary-dark); }

/* ================= WELCOME BANNER ================= */
.welcome-banner {
  background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
  color: #fff; border-radius: var(--radius-lg);
  padding: 22px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.welcome-banner h2 { margin: 0 0 4px; font-size: 19px; }
.welcome-banner p { margin: 0; font-size: 13px; opacity: 0.9; }

.status-badge {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}
.status-active { background: rgba(255,255,255,0.22); color: #fff; }

/* ================= STAT GRID (ALL GRIDS BY DEFAULT) ================= */
.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.stat-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.icon-blue { background: #eaf2ff; color: #1666d6; }
.icon-green { background: #e7f8f0; color: #17a86b; }
.icon-purple { background: #f1eafe; color: #7c4dea; }
.icon-orange { background: #fdf1e0; color: #e08a0f; }
.icon-teal { background: #e2f7f5; color: #159f96; }

.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--color-text-muted); }
.stat-value { font-size: 15px; font-weight: 700; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= SEARCH & FILTER BAR ================= */
.search-filter-bar {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.search-filter-bar input { flex: 1; min-width: 200px; }

/* ================= EVERYTHING GRID SYSTEM (সব GRID) ================= */
.customer-cards-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
.customer-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.cust-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cust-name { font-size: 16px; font-weight: 700; color: var(--color-primary-dark); }
.cust-id-tag { font-size: 11px; background: var(--color-primary-light); color: var(--color-primary); padding: 2px 8px; border-radius: 4px; font-weight: 700; }

.cust-details-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  font-size: 12.5px; color: var(--color-text-muted);
}
.cust-details-grid div strong { color: var(--color-text); font-weight: 600; }

.cust-created-by-badge {
  font-size: 11px; background: #f0f4f9; color: #405065;
  padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid #dce4ee;
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}

.cust-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--color-border); }

/* ================= PARTNER CARDS SPECIFIC STYLING ================= */
.partner-card {
  background: #ffffff; border: 1.5px solid #dbe6f6;
  border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.partner-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.partner-title { font-size: 17px; font-weight: 800; color: #0d3b82; }
.partner-phone { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.partner-stats-box {
  background: var(--color-surface-alt); border-radius: var(--radius-sm);
  padding: 10px 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.partner-stat-item small { font-size: 11px; color: var(--color-text-muted); display: block; }
.partner-stat-item span { font-size: 14.5px; font-weight: 700; }

/* ================= RESPONSIVE GRID FOR LISTS (GRID SYSTEM FOR ALL) ================= */
.responsive-list-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
.list-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 16px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm);
}
.list-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.list-card-title { font-weight: 700; font-size: 14.5px; }
.list-card-sub { font-size: 12px; color: var(--color-text-muted); }

.pill { padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; }
.pill-paid { background: var(--color-success-bg); color: var(--color-success); }
.pill-processing { background: var(--color-warning-bg); color: var(--color-warning); }
.pill-unpaid { background: #e3edff; color: #2a5fc9; }
.pill-overdue { background: var(--color-danger-bg); color: var(--color-danger); }

/* FINANCIAL ENTRY PILLS */
.pill-expense { background: var(--color-danger-bg); color: var(--color-danger); }
.pill-income { background: var(--color-success-bg); color: var(--color-success); }
.pill-investment { background: #f1eafe; color: #7c4dea; }
.pill-withdrawal { background: #fde8e8; color: #d92525; }
.pill-plus { background: var(--color-success-bg); color: var(--color-success); }
.pill-minus { background: var(--color-danger-bg); color: var(--color-danger); }

/* ================= PACKAGE GRID ================= */
.package-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.package-item {
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 8px;
}

/* ================= NOTICES ================= */
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm);
}

/* ================= HISTORY GRID (PREMIUM FILTER GRID TABS) ================= */
.history-tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.hist-tab-btn {
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.hist-tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.history-grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ================= MOBILE BOTTOM NAV ================= */
.mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  height: var(--mobile-nav-h);
  background: #fff; border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 -2px 12px rgba(20,40,90,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mnav-item {
  background: none; border: none; display: flex; flex-direction: column;
  align-items: center; gap: 3px; color: var(--color-text-muted);
  font-size: 10.5px; flex: 1; padding: 6px 0;
}
.mnav-item i { font-size: 17px; }
.mnav-item.active { color: var(--color-primary); }

/* ================= MORE SHEET ================= */
.more-sheet {
  position: fixed; inset: 0; z-index: 9997; background: rgba(15,25,45,0.45);
  display: flex; align-items: flex-end; animation: fadeIn 0.2s ease;
}
.more-sheet-box {
  background: #fff; width: 100%; border-radius: 18px 18px 0 0;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  display: flex; flex-direction: column; gap: 4px;
}
.more-item {
  display: flex; align-items: center; gap: 14px; background: none; border: none;
  padding: 14px 12px; font-size: 15px; color: var(--color-text); border-radius: var(--radius-sm);
  text-align: left;
}
.more-item i { width: 20px; color: var(--color-primary); text-align: center; }
.more-cancel { justify-content: center; color: var(--color-text-muted); font-weight: 600; border-top: 1px solid var(--color-border); margin-top: 4px; padding-top: 14px; }

/* ================= CARD ================= */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
}

/* ================= DEVELOPER CREDIT BANNER ================= */
.developer-footer-credit {
  text-align: center;
  padding: 14px 10px;
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}
.developer-footer-credit a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
}
.developer-footer-credit a:hover {
  color: var(--color-primary-dark);
}

/* ================= RESPONSIVE BREAKPOINTS ================= */
@media (min-width: 576px) {
  .history-tabs-bar {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .customer-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
  .responsive-list-grid { grid-template-columns: repeat(2, 1fr); }
  .history-grid-container { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 26px 28px 32px; }
}

@media (min-width: 992px) {
  .sidebar { display: flex; }
  .mobile-nav, .more-sheet { display: none !important; }
  .content { padding: 30px 36px 40px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .customer-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .package-grid { grid-template-columns: repeat(3, 1fr); }
  .responsive-list-grid { grid-template-columns: repeat(3, 1fr); }
  .history-grid-container { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .customer-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ================= STRICT PORTRAIT PRINT ORIENTATION MODE (BLANK PAGE & MULTI-PAGE FIXES) ================= */
@media print {
  /* ১. পুরো পেজের হাইট ও ওভারফ্লো আনলক করা, যাতে একাধিক পেজে কন্টেন্ট যেতে পারে */
  html, body {
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    background: #ffffff !important;
  }
  
  @page {
    size: portrait;
    margin: 15mm 10mm 15mm 10mm;
  }
  
  /* ২. ব্যাকগ্রাউন্ড স্ক্রিন ও অপ্রয়োজনীয় জিনিস সম্পূর্ণরূপে হাইড করা */
  body > :not(.modal-overlay),
  #confirm-modal,
  #customer-modal,
  #manager-modal,
  #partner-account-modal,
  #partner-edit-modal,
  #partner-txn-modal,
  #developer-reset-modal,
  #package-modal,
  #payment-submit-modal,
  #bill-modal,
  #finance-modal,
  #other-account-modal,
  #notice-modal,
  .toast-container,
  .loader-overlay,
  .modal-actions {
    display: none !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  /* ৩. মডাল ব্যাকড্রপ বা ওভারলেকে স্ক্রলযোগ্য এবং আনলক করা */
  .modal-overlay:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    position: absolute !important; /* পজিশন ফিক্সড থেকে এবসলিউট এ পরিবর্তন */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  /* ৪. আসল ম্যাজিক: মডাল বক্সের স্ক্রিন-হাইট লক এবং স্ক্রলবার তুলে দেওয়া */
  .modal-box {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;     /* স্ক্রিন হাইট লক বাতিল (অত্যন্ত জরুরি) */
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;     /* ওভারফ্লো ভিজিবল করা, যাতে কন্টেন্ট ২য়/৩য় পেজে ফ্লো হতে পারে */
  }

  /* ৫. প্রিন্ট টেবিল পেজ ব্রেক রুলস */
  .print-table {
    display: table !important;
    width: 100% !important;
    margin-top: 15px !important;
    border: 1px solid #000000 !important;
    border-collapse: collapse !important;
  }

  .print-table th, .print-table td {
    display: table-cell !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
  }

  /* টেবিল বা রো পেজের মাঝখানে অর্ধেক কেটে যাওয়া রোধ করতে */
  .print-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .print-table th {
    background-color: #f2f5f9 !important;
    font-weight: 700 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}