/* ── Amigurumi World Admin — Mobile Overrides ─────────────────────────── */

/* Touch targets: minimum 44px */
@media (max-width: 768px) {
  /* Sidebar toggle */
  #kt_app_sidebar_mobile_toggle {
    width: 44px !important;
    height: 44px !important;
  }

  /* Checkbox touch areas */
  .form-check-input {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }
  .form-check {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Action dropdown buttons */
  .btn-flex.btn-center {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Menu items bigger touch area */
  .menu-link {
    min-height: 44px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Content container */
  #kt_app_content_container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Cards tighter on mobile */
  .card-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Tables: card-style on mobile */
  .table-responsive {
    margin: 0 -12px;
    width: calc(100% + 24px);
  }

  /* Table font size */
  .table.fs-6 {
    font-size: 0.85rem !important;
  }
  .table th {
    font-size: 0.7rem !important;
    white-space: nowrap;
  }

  /* Symbol/avatar smaller on mobile */
  .symbol.symbol-50px {
    width: 36px !important;
    height: 36px !important;
  }
  .symbol.symbol-50px > .symbol-label,
  .symbol.symbol-50px > img {
    width: 36px !important;
    height: 36px !important;
  }

  /* Page title */
  .fs-3 {
    font-size: 1.1rem !important;
  }

  /* Bulk action bar — stack buttons */
  #bulkBar .d-flex {
    flex-wrap: wrap;
  }
  #bulkBar .btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Stat cards on dashboard */
  .fs-2hx {
    font-size: 1.5rem !important;
  }

  /* Modals full screen on mobile */
  .modal-dialog {
    margin: 0;
    max-width: 100%;
    min-height: 100vh;
  }
  .modal-content {
    border-radius: 0;
    min-height: 100vh;
  }

  /* Bottom safe area for iOS */
  #kt_app_footer {
    padding-bottom: env(safe-area-inset-bottom, 8px);
  }

  /* Navbar spacing */
  .app-navbar-item {
    gap: 4px;
  }
  .app-navbar-item .fs-7 {
    display: none;
  }

  /* Header title on mobile */
  #kt_app_header_wrapper .fs-4 {
    font-size: 0.9rem !important;
  }

  /* Tab navigation scrollable */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tabs .nav-item {
    flex-shrink: 0;
  }
  .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Filter forms stack */
  .card-body form .row {
    gap: 8px;
  }

  /* Pagination compact */
  .pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 6px;
    font-size: 13px;
  }

  /* Login page */
  #kt_app_root .p-10 {
    padding: 1.5rem !important;
  }
  #kt_app_root .w-lg-500px {
    width: 100% !important;
  }

  /* Lightbox */
  #imageLightbox .modal-dialog {
    min-height: auto;
  }
  #imageLightbox .modal-content {
    min-height: auto;
    background: transparent !important;
  }
}

/* Tablet tweaks */
@media (min-width: 769px) and (max-width: 1024px) {
  .symbol.symbol-50px {
    width: 40px !important;
    height: 40px !important;
  }
  .symbol.symbol-50px > .symbol-label,
  .symbol.symbol-50px > img {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Bottom floating action for quick access */
@media (max-width: 768px) {
  .mobile-fab {
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
@media (min-width: 769px) {
  .mobile-fab {
    display: none !important;
  }
}
