/* BATARD OS v1.11.1.2 — Mobile responsive hotfix */

.mobile-nav-toggle,
.mobile-nav-backdrop {
  display: none;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .app {
    position: relative;
  }

  .sb {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 320;
    width: min(82vw, 284px) !important;
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: 18px 0 50px rgba(0, 0, 0, .42);
  }

  .app.mobile-nav-open .sb {
    transform: translateX(0);
  }

  .sb-name,
  .sb-sup,
  .ni span,
  .nsec,
  .sbbot div {
    display: block !important;
  }

  .ni {
    min-height: 44px;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 310;
    border: 0;
    background: rgba(0, 0, 0, .58);
  }

  .app.mobile-nav-open .mobile-nav-backdrop {
    display: block;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    flex: 0 0 38px;
    font-size: 19px;
  }

  .main {
    width: 100%;
  }

  .tb {
    height: 56px;
    padding: 0 12px;
    gap: 8px;
  }

  .bc {
    flex: 1;
    min-width: 0;
  }

  .bc .cur {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tbr {
    gap: 8px;
  }

  .srch {
    width: 118px;
    padding: 7px 9px;
  }

  .bell {
    font-size: 17px;
  }

  .sc {
    padding: 14px 12px 28px;
  }

  .ph {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .ph > div:first-child,
  .ha {
    width: 100%;
    min-width: 0;
  }

  .ha {
    flex-wrap: wrap;
  }

  .ha > button,
  .ha > a {
    min-height: 42px;
  }

  .ptit {
    font-size: 18px;
    line-height: 1.25;
  }

  .kg,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kc,
  .sgi {
    min-width: 0;
    padding: 12px;
  }

  .ki {
    display: none;
  }

  .kv {
    font-size: 20px;
  }

  .g2,
  .g3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .card {
    max-width: 100%;
  }

  .ch {
    gap: 10px;
  }

  .table-scroll table:not(.auth-responsive-table) {
    width: max-content;
    min-width: 680px;
  }

  .table-scroll::-webkit-scrollbar {
    height: 7px;
  }

  .table-scroll::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 999px;
  }

  .auth-responsive-table,
  .auth-responsive-table tbody,
  .auth-responsive-table tr,
  .auth-responsive-table td {
    display: block;
    width: 100%;
  }

  .auth-responsive-table {
    min-width: 0 !important;
  }

  .auth-responsive-table thead {
    display: none;
  }

  .auth-responsive-table tr {
    padding: 10px 12px;
    border-bottom: .5px solid var(--border);
  }

  .auth-responsive-table tr:last-child {
    border-bottom: 0;
  }

  .auth-responsive-table td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 6px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .auth-responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .auth-cell-value {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .auth-responsive-table td.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .auth-responsive-table td.auth-actions::before {
    width: 96px;
    flex: 0 0 96px;
  }

  .auth-responsive-table td.auth-empty {
    display: block;
  }

  .auth-responsive-table td.auth-empty::before {
    display: none;
  }

  .fb input.fi,
  .fb select {
    min-width: min(100%, 180px);
  }

  .modal-ov {
    padding: 12px;
  }

  .modal,
  .modal.wide {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .mbd {
    padding: 15px;
  }

  .mf {
    padding: 12px 15px;
  }

  .mf button {
    min-height: 42px;
  }

  .notif-panel {
    top: 56px;
    width: 100%;
    height: calc(100vh - 56px);
  }

  .global-search-results {
    position: fixed !important;
    top: 58px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-height: 60vh !important;
  }

  .toast {
    right: 12px;
    bottom: 14px;
    left: 12px;
    width: auto;
    transform: none;
  }

  .stepper {
    overflow-x: auto;
  }

  .step {
    min-width: 150px;
  }
}

@media (max-width: 380px) {
  .srch {
    width: 98px;
  }

  .sc {
    padding-inline: 10px;
  }

  .kg,
  .summary-grid {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .bc {
    flex: 0 0 auto;
  }

  .bc .cur {
    display: none;
  }
}
