    /* ==========================================================
   BLU CRM - Mobile Responsive Styles
   Pendekatan: CSS-only, tidak override z-index app asli
   ========================================================== */

    /* 1. TOUCH: Hapus 300ms delay di semua elemen interaktif */
    button,
    a,
    input,
    select,
    textarea,
    [role="button"] {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    /* 2. TOPBAR mobile */
    @media (max-width: 820px) {
      .topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px !important;
      }

      .topbar h1 {
        font-size: 16px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
      }

      .topbar p {
        font-size: 11px !important;
      }

      .top-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
      }
    }

    @media (max-width: 480px) {
      #syncNow {
        display: none !important;
      }

      #monthFilter {
        max-width: 120px;
        font-size: 12px;
      }

      #logout {
        padding: 7px 12px;
        font-size: 12px;
      }
    }

    /* 3. SIDEBAR overlay - backdrop (area kanan sidebar saja) */
    #sidebarBackdrop {
      display: none;
      position: fixed;
      top: 0;
      bottom: 0;
      left: 290px;
      /* mulai SETELAH sidebar */
      right: 0;
      background: rgba(16, 30, 54, .55);
      z-index: 39;
    }

    #sidebarBackdrop.show {
      display: block;
    }

    /* 4. TABEL card-style di mobile */
    @media (max-width: 640px) {
      .table-wrap {
        border-radius: 12px;
      }

      .data-table {
        min-width: unset !important;
      }

      .data-table thead {
        display: none;
      }

      .data-table tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin: 8px 6px;
        padding: 10px 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(16, 30, 54, .06);
      }

      .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        padding: 5px 0 !important;
        border: none !important;
        font-size: 13px;
        border-bottom: 1px solid #f1f5f9 !important;
      }

      .data-table tbody td:last-child {
        border-bottom: none !important;
      }

      .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #657086;
        font-size: 11px;
        text-transform: uppercase;
        min-width: 100px;
        flex-shrink: 0;
      }
    }

    /* 5. MODAL full-screen di mobile */
    @media (max-width: 640px) {
      .modal-backdrop {
        padding: 0 !important;
        align-items: flex-end !important;
      }

      .modal {
        width: 100% !important;
        max-height: 92vh !important;
        border-radius: 24px 24px 0 0 !important;
        padding: 20px 16px !important;
      }

      .form-grid {
        grid-template-columns: 1fr !important;
      }

      .form-grid .span-2,
      .form-grid .span-3 {
        grid-column: span 1 !important;
      }
    }

    /* 6. PIPELINE horizontal scroll */
    @media (max-width: 820px) {
      .pipeline-board {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
      }

      .stage-col {
        min-width: 210px !important;
        max-width: 210px !important;
        flex-shrink: 0;
        scroll-snap-align: start;
      }
    }

    /* 7. INBOX stacked */
    @media (max-width: 820px) {
      .inbox-layout {
        grid-template-columns: 1fr !important;
      }

      .chat-list {
        max-height: 300px !important;
      }

      .conversation {
        max-height: 260px !important;
      }
    }

    /* 8. KPI smaller font */
    @media (max-width: 480px) {
      .kpi .value {
        font-size: 22px !important;
      }

      .card {
        padding: 14px !important;
      }

      .card h3 {
        font-size: 15px !important;
      }
    }

    /* 9. GRID collapse */
    @media (max-width: 640px) {

      .grid-4,
      .grid-3,
      .grid-2 {
        grid-template-columns: 1fr !important;
      }

      .bar-row {
        grid-template-columns: 90px 1fr 44px !important;
        font-size: 12px !important;
      }
    }

    /* 10. CONTENT padding bawah untuk bottom nav */
    @media (max-width: 820px) {
      .content {
        padding-bottom: 72px !important;
      }
    }

    /* 11. BOTTOM NAV bar */
    #blu-bottom-nav {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 58px;
      z-index: 35;
      /* di bawah sidebar (40) agar tidak menutupi sidebar */
      background: linear-gradient(180deg, #101E36, #1C3259);
      border-top: 1px solid rgba(255, 255, 255, .12);
      padding: 0;
      justify-content: space-around;
      align-items: center;
    }

    #blu-bottom-nav button {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      border: 0;
      background: transparent;
      color: rgba(255, 255, 255, .6);
      font-size: 10px;
      font-weight: 700;
      padding: 6px 10px;
      border-radius: 10px;
      cursor: pointer;
      min-width: 52px;
      touch-action: manipulation;
      -webkit-tap-highlight-color: rgba(255, 255, 255, .1);
    }

    #blu-bottom-nav button span.bnav-icon {
      font-size: 18px;
      line-height: 1;
    }

    #blu-bottom-nav button.active,
    #blu-bottom-nav button:active {
      color: #D9330F;
    }

    @media (max-width: 820px) {
      #blu-bottom-nav {
        display: flex;
      }
    }

    /* 12. TOAST naik di mobile */
    @media (max-width: 640px) {
      .toast {
        bottom: 68px !important;
        left: 12px !important;
        right: 12px !important;
        max-width: 100% !important;
      }
    }

    /* 13. SEARCH full-width */
    @media (max-width: 640px) {
      #globalSearchResult {
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
      }
    }

    /* 14. LOGIN card */
    @media (max-width: 480px) {
      .login-card {
        padding: 20px 16px !important;
      }

      .login-hero {
        display: none;
      }

      .login-wrap {
        grid-template-columns: 1fr !important;
      }
    }

    /* 15. REPORTS toolbar */
    @media (max-width: 640px) {
      #reportMonthFilter {
        width: 100%;
      }

      .toolbar {
        flex-wrap: wrap !important;
      }

      .toolbar input,
      .toolbar select {
        width: 100% !important;
      }
    }

    /* 16. USERS table scroll */
    @media (max-width: 820px) {
      #users .table-wrap {
        overflow-x: auto;
      }

      #users .data-table {
        min-width: 600px !important;
      }
    }
