@media (max-width: 767px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .page-container {
        width: 100%;
        max-width: none;
        margin: 0;
        gap: 20px;
        animation: none;
    }

.app-content {
  overflow-x: hidden;
}

/*====================
Blok 1 — Page Header Mobile: membentuk welcome card bergradasi untuk judul dan aksi setiap halaman.
======================*/
.page-header-actions {
  position: relative;
  isolation: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 22px 20px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(135deg, #111827 0%, #312E81 55%, #6D28D9 100%);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.2);
}

.page-header-actions::after {
  position: absolute;
  z-index: -1;
  top: -45px;
  right: -35px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  content: "";
  pointer-events: none;
}

.page-header-actions > div {
  min-width: 0;
}

.page-header-actions h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.55px;
  overflow-wrap: anywhere;
}

.page-header-actions p {
  margin: 0;
  color: rgba(255, 255, 255,1.0 );
  font-size: 12px;
  line-height: 1.7;
}

.page-header-actions > button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 8px;
  max-width: 100%;
  min-height: 40px;
  margin-left: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}


  /* ==========================================
     MOBILE FLOATING ACTION BUTTON
     ========================================== */

  .page-header-actions .btn,
  .masterpage-header .btn {
    position: fixed;
    right: 20px;
    bottom: 88px;

    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border-radius: 50%;

    background: #2563eb;
    color: #ffffff;

    font-size: 0;
    line-height: 0;

    gap: 0;

    box-shadow:
      0 6px 18px rgba(37, 99, 235, 0.28),
      0 2px 6px rgba(15, 23, 42, 0.12);

    z-index: 99;
  }

  .page-header-actions .btn i {
    width: 24px;
    height: 24px;

    display: block;

    margin: 0;
    padding: 0;

    flex: 0 0 24px;

    stroke-width: 2.4;
  }

  .page-header-actions .btn:active {
    background: #1d4ed8;
    transform: scale(0.94);
  }



  /* ==========================================
     CARD
     ========================================== */

  .card {
    width: 100%;
    border-radius: 14px;
  }


  /* ==========================================
     SEARCH & FILTER
     ========================================== */

  .search-box {
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .filter-box {
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .search-box .form-control,
  .filter-box .form-control {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--bg-main, #f8fafc);
    font-size: 12px;
  }

  .search-box .form-control:focus,
  .filter-box .form-control:focus {
    background: var(--bg-surface, #ffffff);
  }


  /* ==========================================
     SEARCH / FILTER CARD
     ========================================== */

  .page-container > .card:has(.search-box),
  .page-container > .card:has(.filter-box) {
    padding: 12px;
    margin-bottom: 0;
    border-radius: 14px;
    background: var(--primary-50, #f8fafc);
    box-shadow:
      0 3px 12px rgba(15, 23, 42, 0.05);
  }

  .page-container > .card:has(.search-box) > .flex,
  .page-container > .card:has(.filter-box) > .flex {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }


  /* ==========================================
     FILTER SELECT
     ========================================== */

  .filter-box select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px;

    padding-right: 38px;
  }


  /* ==========================================
     TABLE CONTAINER
     ========================================== */

  .page-container > .table-container {
    width: 100%;
    margin-bottom: 0;
  }


  /* ==========================================
     MASTER DATA TABS
     ========================================== */

  .master-tab-nav {
    width: 100%;
    margin-bottom: 0;
  }

  .master-tab-list {
    width: 100%;
    overflow-x: auto;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .master-tab-list::-webkit-scrollbar {
    display: none;
  }

  .master-tab-btn {
    flex: 0 0 auto;
    min-width: 115px;
    height: 44px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 9px 9px 0 0;
  }

  .master-tab-btn i {
    width: 16px;
    height: 16px;
  }


  /* ==========================================
     UTILITY
     ========================================== */

  .p-4 {
    padding: 0.875rem;
  }

  .mb-4 {
    margin-bottom: 1rem;
  }

  .mb-2 {
    margin-bottom: 0.5rem;
  }

  .gap-4 {
    gap: 0.875rem;
  }

  .w-full {
    width: 100%;
  }

}