/* Hoan Tien Hay v4.9.0 responsive interaction improvements. */
html, body { overflow-x: clip; }
.profile-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.profile-tabs {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e9edf3);
  border-radius: 14px;
}
.profile-tabs a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted, #667085);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.profile-tabs a:hover,
.profile-tabs a:focus-visible,
.profile-tabs a[aria-current="true"] {
  color: var(--brand, #ee4d2d);
  background: var(--brand-soft, #fff3ee);
  outline: none;
}
.profile-content { min-width: 0; }
.profile-content > section { scroll-margin-top: 100px; }
.input-shell [data-clear-input] { width: 44px; min-width: 44px; height: 44px; }
.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-modal {
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.admin-modal-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(90dvh, calc(100dvh - 20px));
  overflow: hidden;
  overscroll-behavior: contain;
}
.admin-modal-card > .stack-form,
.admin-modal-card > .order-review-layout,
.admin-modal-card > .account-tool-grid,
.admin-modal-card > .payout-actions {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.admin-modal-card > .modal-title,
.admin-modal-card > .modal-x { flex: 0 0 auto; }
.admin-modal-card .sticky-save,
.admin-modal-card .payout-actions { padding-bottom: max(16px, env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  button:not([hidden]),
  input[type="submit"],
  input[type="button"],
  [role="button"],
  a.admin-btn,
  a.btn,
  .mobile-bottom-nav a,
  .admin-sidebar a,
  .profile-tabs a,
  [data-modal-open] {
    min-height: 44px;
  }
  .icon-button,
  .menu-toggle,
  .theme-toggle,
  .mobile-menu-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
  }
  .tiny-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .user-chip { min-height: 44px; }
  .profile-layout { display: block; }
  .profile-tabs {
    position: sticky;
    top: 62px;
    z-index: 20;
    display: flex;
    gap: 4px;
    margin: 0 -2px 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-tabs a { flex: 0 0 auto; min-height: 46px; }
  .profile-content > section { scroll-margin-top: 132px; }
  .admin-modal-card {
    width: 100%;
    max-height: min(92dvh, calc(100dvh - 20px));
    border-radius: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile-tabs a { scroll-behavior: auto; }
}
