/* ============================================================
   DIVUSH DASHBOARD — Mobile Final Fix
   Injected into every dashboard page
   ============================================================ */

/* ── FORCE LIGHT BACKGROUND ── */
html, body {
  background: #f4f6f8 !important;
  color: #1a1c1e !important;
}

/* ── SIDEBAR: START OFF-SCREEN, SLIDE IN ── */
@media (max-width: 900px) {

  /* Force block layout - override flex */
  body {
    display: block !important;
    overflow-x: hidden !important;
    min-height: 100vh !important;
  }

  /* Sidebar OFF-SCREEN by default */
  .sidebar {
    transform: translateX(110%) !important;
    transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
    position: fixed !important;
    top: 0 !important; right: 0 !important;
    bottom: 0 !important;
    width: 240px !important;
    z-index: 350 !important;
    background: #1a3a5c !important;
    box-shadow: none !important;
    overflow-y: auto !important;
  }

  /* Sidebar OPEN state */
  .sidebar.mob-open {
    transform: translateX(0) !important;
    box-shadow: -4px 0 24px rgba(0,0,0,.3) !important;
  }

  /* OVERLAY */
  .mob-overlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.55) !important;
    z-index: 300 !important;
    backdrop-filter: blur(2px) !important;
  }
  .mob-overlay.open { display: block !important; }

  /* HAMBURGER */
  .mob-toggle {
    display: flex !important;
    position: fixed !important;
    top: 10px !important; right: 10px !important;
    z-index: 400 !important;
    background: #1a3a5c !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    border-radius: 10px !important;
    padding: 9px 11px !important;
    flex-direction: column !important;
    gap: 5px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.3) !important;
  }
  .mob-toggle span {
    width: 19px !important; height: 2px !important;
    background: #fff !important;
    border-radius: 2px !important;
    display: block !important;
    transition: all .22s !important;
  }
  .mob-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px) !important; }
  .mob-toggle.open span:nth-child(2) { opacity: 0 !important; width: 0 !important; }
  .mob-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px) !important; }

  /* MAIN: full width, padding for bottom nav */
  .main {
    margin-right: 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 62px 12px 74px !important;
    background: #f4f6f8 !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
  }

  /* TOP BAR */
  .top-bar, .page-hdr {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .page-title { font-size: 19px !important; color: #1a1c1e !important; }
  .page-sub   { font-size: 11px !important; color: #5a6572 !important; }
  .ver-badge  { font-size: 11px !important; padding: 5px 12px !important; align-self: flex-start !important; }

  /* LIVE BAR */
  .live-bar {
    padding: 8px 12px !important;
    gap: 6px !important;
    font-size: 11px !important;
    flex-wrap: wrap !important;
    background: #f0f5ff !important;
    border-color: rgba(26,58,92,.2) !important;
  }
  .live-sep { display: none !important; }

  /* STATS: 2x2 GRID - CRITICAL FIX */
  .stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .sc, .stat {
    padding: 13px 14px !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.1) !important;
  }
  .sc-n, .stat-n { font-size: 26px !important; line-height: 1.1 !important; }
  .sc-s { display: none !important; }

  /* QUICK ACTIONS */
  .quick {
    grid-template-columns: repeat(3,1fr) !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
  }
  .qa { padding: 12px 8px !important; background: #fff !important; }
  .qa-icon { font-size: 20px !important; }
  .qa-lbl  { font-size: 10px !important; }

  /* TWO COL → ONE COL */
  .two-col, .three-col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* TABLES */
  .tbl-box, .tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
  }
  table { min-width: 500px !important; font-size: 12px !important; }
  thead th {
    background: #1a3a5c !important;
    color: rgba(255,255,255,.85) !important;
    padding: 10px 12px !important;
    font-size: 10px !important;
  }
  tbody td { padding: 10px 12px !important; font-size: 12px !important; }

  /* SECTION TITLES */
  .sec-title {
    font-size: 11px !important;
    color: #1a3a5c !important;
    margin-bottom: 8px !important;
  }

  /* BUTTONS in table rows */
  td button, td .btn, td a.btn {
    background: rgba(26,58,92,.09) !important;
    color: #1a3a5c !important;
    border: 1px solid rgba(26,58,92,.2) !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
    min-height: 32px !important;
  }
  td .btn-block, td button.btn-block {
    background: rgba(176,50,50,.08) !important;
    color: #8b2020 !important;
    border-color: rgba(176,50,50,.2) !important;
  }
  td .btn-approve, td button.btn-approve {
    background: rgba(26,122,64,.1) !important;
    color: #1a5c32 !important;
    border-color: rgba(26,122,64,.2) !important;
  }
  td .btn-delete, td button.btn-delete {
    background: rgba(176,50,50,.07) !important;
    color: #8b2020 !important;
    border-color: rgba(176,50,50,.18) !important;
  }
  td .btn-mail, td button.btn-mail {
    background: rgba(26,58,92,.09) !important;
    color: #1a3a5c !important;
    border-color: rgba(26,58,92,.2) !important;
  }

  /* PENDING ALERT */
  .pending-alert {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  /* FILTERS */
  .filters-bar { flex-wrap: wrap !important; gap: 8px !important; }
  .search-box  { width: 100% !important; font-size: 14px !important; }
  .filter-btn  { font-size: 12px !important; }

  /* MODALS */
  .modal-box, .modal-inner, .modal {
    width: 96vw !important;
    max-width: 96vw !important;
    padding: 18px 14px !important;
  }

  /* CARDS (notifications etc) */
  .card { background: #fff !important; }
  .two-col > div { width: 100% !important; }

  /* BOTTOM NAV */
  .fp-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    z-index: 350 !important;
    background: #1a3a5c !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    height: 62px !important;
    box-shadow: 0 -2px 16px rgba(0,0,0,.2) !important;
  }
  .fp-bnav-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 9px !important;
    color: rgba(255,255,255,.5) !important;
    text-decoration: none !important;
    transition: color .15s !important;
    padding: 6px 0 !important;
  }
  .fp-bnav-item.active, .fp-bnav-item:hover {
    color: #e8692a !important;
  }
  .fp-bnav-icon { font-size: 18px !important; line-height: 1 !important; }
}