/* Ortak mobil kullanilabilirlik duzeltmeleri - finans hesaplarini etkilemez. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

button,
a,
summary,
input,
select,
textarea {
  touch-action: manipulation;
}

@media (max-width: 991.98px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar {
    max-width: min(86vw, 300px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .content,
  .page-wrap,
  .page-head,
  .panel,
  .ui-card,
  .form-section,
  .table-responsive {
    min-width: 0;
    max-width: 100%;
  }

  .btn,
  .ui-button,
  .icon-btn,
  .global-back,
  details > summary {
    min-height: 44px;
  }

  .form-control,
  .form-select,
  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  textarea {
    min-height: 92px;
  }

  .table-actions {
    gap: 8px;
  }

  .table-actions .btn,
  .table-actions .icon-btn {
    min-height: 44px;
  }

  .supplier-payment-history summary,
  .supplier-manage summary,
  .supplier-debt-add > summary,
  .dashboard-detail-panel > summary {
    display: flex;
    align-items: center;
    padding-block: 11px;
    line-height: 1.35;
  }

  .product-card-actions {
    width: 100%;
    gap: 7px;
  }

  .product-card-actions .btn {
    min-height: 44px;
  }

  .product-card-actions .btn:not(.btn-portal-muted) {
    flex: 1 1 auto;
    min-width: 0;
  }

  .product-card-actions .btn-portal-muted {
    flex: 0 0 44px;
    width: 44px;
  }
}

@media (max-width: 575.98px) {
  .topbar {
    min-width: 0;
    padding-inline: 8px;
  }

  .topbar-left {
    min-width: 0;
    gap: 4px;
  }

  .topbar > .d-flex {
    min-width: 0;
    margin-left: auto;
    gap: 2px !important;
  }

  .topbar .icon-btn,
  .topbar .global-back {
    width: 36px !important;
    min-width: 36px !important;
    flex: 0 0 36px;
    padding-inline: 0;
  }

  .topbar .presence-button {
    width: 50px !important;
    min-width: 50px !important;
    flex-basis: 50px;
    padding-inline: 6px;
  }

  .topbar .presence-button span {
    display: none !important;
  }

  .page-head {
    align-items: stretch;
    gap: 14px;
  }

  .page-head .actions,
  .page-head > .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .page-head .actions .btn,
  .page-head > .btn {
    width: 100%;
  }

  .filterbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .filterbar > *,
  .filterbar .search-box,
  .filterbar .btn {
    width: 100%;
    min-width: 0;
  }

  .finance-period-filter {
    gap: 8px;
    padding: 11px;
  }

  .finance-period-filter label,
  .finance-period-filter .ui-button {
    min-width: 0;
  }

  .clean-overview-grid,
  .clean-payment-chips {
    gap: 10px !important;
  }

  .clean-overview-card {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .clean-payment-panel {
    padding: 14px !important;
  }

  .modal-footer {
    gap: 8px;
  }

  .modal-footer .btn,
  .modal-footer .ui-button {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .topbar-title {
    display: none;
  }

  .topbar > .d-flex {
    margin-left: auto;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .hero-actions .ui-button {
    width: 100%;
  }

  .hero-actions .roadside-quick-link {
    grid-column: 1 / -1;
  }
}
