/* الموبايل في النسخة السحابية: القائمة درج، والصفحة بعرض الشاشة كله. */
.mo-burger, .mo-scrim { display: none; }
/* اللي يخص الكمبيوتر: مفيش «جهاز رئيسي» على النت، والترخيص = «الاشتراك والبيانات» */
.net-pill, #nav a[data-page=license], #nav a[data-page=plans] { display: none !important; }
html[data-mo-cloud] .gate { background: #07080b; }
html[data-mo-cloud] .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; }
  body:not(.gated) .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 { width: 100% !important; max-width: 100vw; margin: 0 !important; height: auto !important; min-width: 0 !important; box-sizing: border-box; overflow-x: hidden; padding-top: 58px !important; }
  .main table { display: block; overflow-x: auto; max-width: 100%; }
  .main th, .main td { white-space: nowrap; }
  input, select, textarea { font-size: 16px !important; max-width: 100%; }
  .card, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .card { overflow-x: auto; }
  .menu-btn, .clock { display: none !important; }
  .topbar { padding-inline-start: 60px !important; flex-wrap: wrap; height: auto !important; gap: 6px; min-height: 60px; }
  .topbar .search { flex: 1 1 100%; order: 2; min-width: 0; max-width: none; }
  .top-actions { min-width: 0; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
  .main { padding-top: 0 !important; }
  .page-head { flex-wrap: wrap; gap: 8px; }
  .page-head > * { min-width: 0; }
  .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; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
