/* الموبايل في النسخة السحابية: القائمة درج، والصفحة بعرض الشاشة كله. */
.mo-burger, .mo-scrim { display: none; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.sidebar a { color: inherit; text-decoration: none; }
@media (max-width: 900px) {
  .app { display: block !important; height: auto !important; min-height: 100dvh; }
  .sidebar, [data-layout] .sidebar {
    position: fixed !important; top: 0; bottom: 0; inset-inline-start: 0; inset-inline-end: auto; width: min(84vw, 300px) !important; height: 100dvh !important;
    max-width: none; margin: 0 !important; border-radius: 0 !important; display: flex !important; flex-direction: column !important; overflow-y: auto; z-index: 800; transform: translateX(100%); transition: transform .18s ease;
  }
  body.mo-nav .sidebar { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.25); }
  .mo-scrim { position: fixed; inset: 0; background: rgba(8, 12, 20, .5); z-index: 790; }
  body:not(.mo-nav) .mo-scrim { display: none; }
  body.mo-nav .mo-scrim { display: block; }
  .mo-burger { display: flex; align-items: center; justify-content: center; position: fixed; top: 8px; inset-inline-start: 8px; z-index: 700; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--border, #d7dde6); background: var(--panel, #fff); color: var(--text, #16202e); font-size: 22px; line-height: 1; box-shadow: 0 3px 12px rgba(0,0,0,.14); }
  .main, main, #view, #content { width: 100% !important; max-width: 100vw; margin: 0 !important; height: auto !important; min-width: 0 !important; box-sizing: border-box; overflow-x: hidden; }
  .main, main { padding-top: 58px !important; }
  table { display: block; overflow-x: auto; max-width: 100%; }
  th, td { white-space: nowrap; }
  input, select, textarea { font-size: 16px !important; max-width: 100%; }
  .pos-wrap, .pos, .pos-layout { display: block !important; height: auto !important; }
  .card, .grid-2 > *, .grid-3 > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .card { overflow-x: auto; }
  .card svg { max-width: 100%; }
  .pos-toolbar { flex-wrap: wrap; }
  .pos-toolbar input[type=search] { flex: 1 1 100%; width: 100%; min-width: 0; box-sizing: border-box; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; max-height: 52dvh; }
  .modal, .modal-box { width: calc(100vw - 16px) !important; max-width: none !important; max-height: 96dvh; overflow-y: auto; box-sizing: border-box; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr) !important; }
}
