/* ==========================================================================
   dashboard2 — base / component library
   Implements the component vocabulary described in mdfile/DOCUMENTATION.md
   §4. Class-based (not inline styles) so real Blade markup with @can/@foreach
   stays readable. No Bootstrap CSS is loaded on dashboard2 pages — the real
   Bootstrap JS plugins (modal, dropdown data-api) that ship in
   layouts/footer-scripts.blade.php still run unmodified, so their plain
   class names (.modal, .modal-dialog, .pagination, ...) are styled here too.
   ========================================================================== */

.d2 * { box-sizing: border-box; }

.d2-body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  min-height: 100vh;
}

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.d2 ::-webkit-scrollbar { width: 9px; height: 9px; }
.d2 ::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 9px; }
.d2 ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Numbers ---------- */
.d2 [dir="ltr"], .d2-num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.d2-shell { display: flex; min-height: 100vh; }
.d2-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Sidebar ---------- */
.d2-sidebar {
  width: 268px; flex: 0 0 268px;
  background: var(--sf);
  border-inline-end: 1px solid var(--bd);
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
  transition: width .18s ease, flex-basis .18s ease;
  z-index: 40;
}
.d2-sidebar.is-collapsed { width: 76px; flex-basis: 76px; }
.d2-sidebar.is-collapsed .d2-hide-collapsed { display: none !important; }
.d2-sidebar:not(.is-collapsed) .d2-show-collapsed { display: none !important; }

.d2-brand-row { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--bd); }
.d2-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d2-brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-lg);
  background: linear-gradient(140deg, oklch(0.62 0.2 265), oklch(0.6 0.19 320));
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 16px oklch(0.58 0.19 285 / 0.38);
}
.d2-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.d2-brand-text .name { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-brand-text .sub { font-size: 10px; letter-spacing: .14em; color: var(--ink3); }

.d2-icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-md);
  border: 1px solid var(--bd); background: var(--sf2); color: var(--ink2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.d2-icon-btn:hover { color: var(--ac); border-color: var(--ac); }

.d2-navsearch { position: relative; }
.d2-navsearch .ms { position: absolute; inset-inline-start: 11px; top: 9px; font-size: 18px; color: var(--ink3); pointer-events: none; }
.d2-navsearch input {
  width: 100%; font-family: inherit; font-size: 13px; padding: 9px 12px; padding-inline-start: 36px;
  border-radius: var(--r-md); border: 1px solid var(--bd); background: var(--sf2); color: var(--ink); outline: none;
}
.d2-navsearch input:focus { border-color: var(--ac); background: var(--sf); }

.d2-viewtabs { display: flex; gap: 3px; background: var(--sf2); border: 1px solid var(--bd); padding: 3px; border-radius: var(--r-md); }
.d2-viewtabs button {
  flex: 1; border: 0; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 6px 8px; border-radius: 8px; background: transparent; color: var(--ink2);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.d2-viewtabs button.active { background: var(--ac); color: #fff; }

.d2-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.d2-nav-group { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.d2-nav-group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px 6px; cursor: pointer; border-radius: 9px; border: 0; background: transparent; width: 100%;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink3); white-space: nowrap;
}
.d2-nav-group-title:hover { background: var(--sf2); }
.d2-nav-group-title .ms { font-size: 17px; transition: transform .15s ease; }
.d2-nav-group.is-closed .d2-nav-group-title .ms { transform: rotate(-90deg); }
.d2-nav-group.is-closed .d2-nav-group-items { display: none; }

.d2-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
  text-decoration: none; color: var(--ink2); font-size: 13.5px; font-weight: 500;
}
.d2-nav-item:hover { background: var(--sf2); text-decoration: none; color: var(--ink2); }
.d2-nav-item.is-active { background: var(--ac); color: #fff; font-weight: 600; }
.d2-nav-item .ms { font-size: 21px; flex: 0 0 21px; }
.d2-nav-item .label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-nav-item .d2-badge { font-size: 11px; font-weight: 600; background: var(--acs); color: var(--ac); border-radius: 20px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.d2-nav-item.is-active .d2-badge { background: rgba(255,255,255,.25); color: #fff; }

.d2-sidebar-foot { padding: 10px; border-top: 1px solid var(--bd); display: flex; flex-direction: column; gap: 4px; }
.d2-signout {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
  text-decoration: none; color: var(--dgr); font-size: 13.5px; background: transparent; border: 0; width: 100%; cursor: pointer;
}
.d2-signout:hover { background: var(--dgrs); text-decoration: none; color: var(--dgr); }
.d2-signout .ms { font-size: 21px; flex: 0 0 21px; }

/* ---------- Header ---------- */
.d2-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--sf); border-bottom: 1px solid var(--bd); position: relative; z-index: 30;
}
.d2-header h1 { margin: 0; font-family: 'Noto Kufi Arabic', sans-serif; font-size: 17px; font-weight: 700; }
.d2-header .subtitle { font-size: 12.5px; color: var(--ink3); }
.d2-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.d2-chip {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2);
  background: var(--sf2); border: 1px solid var(--bd); padding: 8px 12px; border-radius: var(--r-md);
}
.d2-btn-soft {
  font-family: inherit; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500;
  color: var(--ink2); background: var(--sf2); border: 1px solid var(--bd); padding: 8px 13px; border-radius: var(--r-md);
  cursor: pointer; text-decoration: none;
}
.d2-btn-soft:hover { text-decoration: none; color: var(--ink2); }
.d2-count-pill { font-size: 11px; font-weight: 600; background: var(--ac); color: #fff; border-radius: 20px; padding: 1px 7px; }

/* ---------- Header dropdowns (notifications / user menu / layout switch) ----------
   No Bootstrap CSS is loaded on dashboard2 pages, so plain .dropdown-menu
   has nothing hiding it by default. These two classes replace it: hidden
   by default, shown on hover (and on keyboard focus) via pure CSS. */
.d2-dropdown { position: relative; }
.d2-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  pointer-events: none;
  background: var(--sf);
}
.d2-dropdown:hover .d2-dropdown-menu,
.d2-dropdown:focus-within .d2-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
/* invisible bridge over the gap so moving the cursor from the trigger
   down into the menu doesn't close it first */
.d2-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  inset-inline: 0;
  height: 10px;
}

/* ---------- Old/new layout switch (header control) ---------- */
.d2-layout-switch { display: flex; gap: 3px; background: var(--sf2); border: 1px solid var(--bd); padding: 3px; border-radius: var(--r-md); }
.d2-layout-switch a {
  border: 0; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500; padding: 6px 11px;
  border-radius: 8px; background: transparent; color: var(--ink2); text-decoration: none;
  display: flex; align-items: center; gap: 5px;
}
.d2-layout-switch a:hover { text-decoration: none; color: var(--ink); }
.d2-layout-switch a.is-active { background: var(--ac); color: #fff; }
.d2-layout-switch a .ms { font-size: 15px; }

.d2-tabs2 { display: flex; gap: 3px; background: var(--sf2); border: 1px solid var(--bd); padding: 3px; border-radius: var(--r-md); }
.d2-tabs2 a, .d2-tabs2 button {
  border: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 13px;
  border-radius: 8px; background: transparent; color: var(--ink2); text-decoration: none;
}
.d2-tabs2 a.is-active, .d2-tabs2 button.is-active { background: var(--ac); color: #fff; }
.d2-tabs2 a:hover { text-decoration: none; }

.d2-avatar-round {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(140deg, oklch(0.7 0.14 265), oklch(0.68 0.14 320));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.d2-avatar-round img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Weather widget (kept functional: same .weather-* class names as before) ---------- */
.weather-widget { margin: 0; }
.weather-container {
  background: linear-gradient(140deg, var(--ac), oklch(0.6 0.18 240));
  border-radius: var(--r-md); padding: 0 12px; height: 38px; color: #fff; min-width: 118px;
  box-shadow: 0 6px 16px var(--shdw); cursor: pointer; transition: transform .2s ease; display: flex; align-items: center;
}
.weather-container:hover { transform: translateY(-2px); }
.weather-icon i { font-size: 22px !important; }
.weather-info { line-height: 1.15; }
.weather-temp { font-size: 13px; font-weight: 700; }
.weather-city { font-size: 10.5px; opacity: .9; }
.weather-error { background: linear-gradient(140deg, var(--dgr), oklch(0.55 0.2 5)); }

/* ---------- Cards / panels ---------- */
.d2-content { padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 18px; }
.d2-card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r-xl); overflow: hidden; }
.d2-panel-head {
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; border-bottom: 1px solid var(--bd);
}
.d2-panel-head-left { display: flex; align-items: center; gap: 11px; }
.d2-panel-icon {
  width: 40px; height: 40px; border-radius: var(--r-lg); color: #fff; display: flex; align-items: center;
  justify-content: center; flex: 0 0 40px;
}
.d2-panel-title { margin: 0; font-family: 'Noto Kufi Arabic', sans-serif; font-size: 15px; font-weight: 600; }
.d2-panel-sub { font-size: 12px; color: var(--ink3); }
.d2-panel-count {
  display: inline-flex; align-items: center; gap: 7px; font-family: 'Noto Kufi Arabic', sans-serif; font-size: 19px;
  font-weight: 700; color: #fff; padding: 5px 15px; border-radius: 12px;
}

/* ---------- Tables ---------- */
.d2-table-wrap { overflow-x: auto; }
.d2-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.d2-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--sf2); padding: 10px 14px; text-align: start;
  font-size: 11.5px; font-weight: 600; color: var(--ink3); border-bottom: 1px solid var(--bd); white-space: nowrap;
}
.d2-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--bd); vertical-align: middle; }
.d2-table tbody tr:hover { background: var(--sf2); }

.d2-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.d2-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.d2-pill-ok    { background: var(--oks);  color: var(--ok); }
.d2-pill-warn  { background: var(--acs);  color: var(--warn); }
.d2-pill-danger{ background: var(--dgrs); color: var(--dgr); }
.d2-pill-neutral{ background: var(--sf2); color: var(--ink2); }

.d2-tag { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--acs); color: var(--ac); white-space: nowrap; }

.d2-name-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.d2-name-link:hover { color: var(--ac); text-decoration: none; }
.d2-name-link span.label { font-weight: 500; white-space: nowrap; border-bottom: 1px dashed var(--bd); }
.d2-name-link.has-debt span.label { color: var(--dgr); border-bottom-color: var(--dgr); }

.d2-avatar-tile {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; overflow: hidden;
  background: var(--acs); color: var(--ac); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.d2-avatar-tile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons ---------- */
.d2-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 8px 16px; border-radius: var(--r-md);
  border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.d2-btn-primary { background: var(--ac); color: #fff; }
.d2-btn-primary:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.d2-btn-ok { background: var(--ok); color: #fff; }
.d2-btn-ok:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.d2-btn-outline { background: var(--sf2); color: var(--ink2); border: 1px solid var(--bd); }
.d2-btn-outline:hover { color: var(--ac); border-color: var(--ac); text-decoration: none; }
.d2-btn-icon {
  width: 32px; height: 32px; border-radius: var(--r-md); border: 1px solid var(--bd); background: var(--sf2);
  color: var(--ink2); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.d2-btn-icon:hover { color: var(--ac); border-color: var(--ac); }
.d2-btn-icon-danger:hover { color: var(--dgr); border-color: var(--dgr); background: var(--dgrs); }

/* ---------- Filters / inputs (used above real forms/selects) ---------- */
.d2-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.d2-input, .d2-select, select.d2-input {
  font-family: inherit; font-size: 12.5px; padding: 8px 11px; border-radius: var(--r-md);
  border: 1px solid var(--bd); background: var(--sf2); color: var(--ink2);
}

/* ---------- Progress ---------- */
.d2-progress { height: 4px; border-radius: 4px; background: var(--sf2); overflow: hidden; }
.d2-progress > span { display: block; height: 100%; border-radius: 4px; background: var(--ac); }

/* ---------- Tiles (main dashboard quick links) ---------- */
.d2-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); gap: 11px; }
.d2-tile {
  text-decoration: none; color: inherit; background: var(--sf); border: 1px solid var(--bd); border-radius: 15px;
  padding: 12px 13px; display: flex; align-items: center; gap: 11px; position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
.d2-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px var(--shdw); text-decoration: none; color: inherit; }
.d2-tile-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; color: #fff; }
.d2-tile .label { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 14.5px; font-weight: 600; }
.d2-tile .value { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }

/* ---------- Floating dropdown menu (rendered outside overflow containers) ---------- */
.d2-menu-overlay { position: fixed; inset: 0; z-index: 60; }
.d2-menu {
  position: fixed; z-index: 61; width: 280px; background: var(--sf); border: 1px solid var(--bd);
  border-radius: 14px; box-shadow: 0 16px 40px var(--shdw); padding: 8px; display: flex; flex-direction: column;
  gap: 2px; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; color: var(--ink); max-height: 70vh; overflow-y: auto;
}
.d2-menu-title { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink3); padding: 6px 10px 8px; }
.d2-menu-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; font-size: 13px; }
.d2-menu-row:hover { background: var(--sf2); }
.d2-menu-row.is-danger { color: var(--dgr); }
.d2-menu-row.is-danger:hover { background: var(--dgrs); }
.d2-menu-row[role="button"] { cursor: pointer; }
.d2-menu-check { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.d2-menu-check input { accent-color: var(--ac); width: 16px; height: 16px; }
.d2-menu-move { display: flex; gap: 3px; }
.d2-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---------- Modal (real Bootstrap modal plugin — jQuery, bundled in the
   unmodified layouts/footer-scripts.blade.php — still drives .modal('show')/
   ('hide') correctly; only the CSS was missing on dashboard2 pages, so the
   dialog would otherwise render inline in the page flow instead of as a
   hidden, centered overlay). Same class names/attributes the real markup +
   JS already use. */
/* Generic Bootstrap ".fade" utility (every modal instance already ships
   class="modal fade"; the JS plugin times its show/hide sequence off a
   transitionend listener on the .modal element itself, which only fires if
   .modal has an actual CSS transition -- this rule was missing entirely on
   dashboard2 pages, so the plugin's wait-for-transition fell through
   immediately and the modal just snapped open/closed instead of fading). */
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .fade { transition: none; }
}

.modal {
  position: fixed; top: 0; left: 0; z-index: 1050; display: none;
  width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0;
}
.modal.show { display: block; }
/* Dialog slide+fade (the generic .fade rule above handles the backdrop and
   the modal element's own opacity/timing; this adds the dialog's slide-down
   motion, matching Bootstrap's default modal animation). */
.modal.fade .modal-dialog { transition: transform .3s ease-out; transform: translate(0, -30px); }
.modal.fade.show .modal-dialog { transform: translate(0, 0); }
@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog { transition: none; }
}
.modal-dialog {
  position: relative; width: auto; margin: 1.75rem auto; max-width: 500px;
  pointer-events: none;
}
.modal-dialog.modal-lg { max-width: 760px; }
.modal-content {
  position: relative; display: flex; flex-direction: column; width: 100%;
  background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r-xl);
  outline: 0; pointer-events: auto; box-shadow: 0 20px 50px var(--shdw);
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--bd); gap: 12px;
}
.modal-title { margin: 0; font-family: 'Noto Kufi Arabic', sans-serif; font-size: 15px; font-weight: 600; color: var(--ink); }
.modal-body { padding: 18px; color: var(--ink2); font-size: 13.5px; line-height: 1.7; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 18px 0; border-top: 1px solid var(--bd); margin-top: 14px;
}
.modal .close {
  padding: 0; margin: 0; background: transparent; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink3); opacity: 1;
}
.modal .close:hover { color: var(--dgr); }
.modal-backdrop {
  position: fixed; top: 0; left: 0; z-index: 1040; width: 100%; height: 100%; background: #000;
}
.modal-backdrop.show { opacity: .5; }
body.modal-open { overflow: hidden; }

/* ---------- Pagination (real Laravel `pagination::bootstrap-4` output) ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pagination .page-item { display: block; }
.pagination .page-link {
  display: flex; align-items: center; justify-content: center; min-width: 32px;
  height: 32px; padding: 0 9px; border-radius: var(--r-md); border: 1px solid var(--bd);
  background: var(--sf2); color: var(--ink2); font-size: 12.5px; text-decoration: none;
}
.pagination .page-link:hover { color: var(--ac); border-color: var(--ac); text-decoration: none; }
.pagination .page-item.active .page-link,
.pagination .page-item span.page-link[aria-current] {
  background: var(--ac); border-color: var(--ac); color: #fff;
}
.pagination .page-item.disabled .page-link {
  color: var(--ink3); background: var(--sf2); border-color: var(--bd); cursor: default; opacity: .55;
}

/* ---------- Spinner (Bootstrap's .spinner-border, used by the real
   AJAX refresh loader) ---------- */
.spinner-border {
  display: inline-block; width: 2rem; height: 2rem; vertical-align: text-bottom;
  border: .25em solid currentColor; border-inline-end-color: transparent;
  border-radius: 50%; animation: d2-spin .75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: .2em; }
.text-primary { color: var(--ac) !important; }
@keyframes d2-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.d2-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--bd); background: var(--sf); font-size: 12px; color: var(--ink3);
}
.d2-footer a { color: var(--ac); }

@media (max-width: 900px) {
  .d2-sidebar { position: fixed; inset-inline-start: 0; top: 0; }
}

/* ==========================================================================
   gx-* responsive layout -- off-canvas sidebar drawer on small/medium
   screens (≤900px). gym-theme.css ships no breakpoints of its own (it's
   desktop-only out of the box), so this bridges the gap entirely here
   without ever touching gym-theme.css itself. Pure presentation: the
   drawer open/close state is a CSS class toggled by dashboard2-ui.js,
   nothing here changes any page's data or logic.
   ========================================================================== */
/* مخفي افتراضيًا على كل المقاسات؛ يُظهره فقط الـ media query أدناه على
   الشاشات الصغيرة/المتوسطة -- !important ضروري هنا أيضاً لأن
   body.gx .gx-btn (gym-theme.css) يفرض display:inline-flex بتخصيصية أعلى. */
.gx-mobile-nav-toggle { display: none !important; }

/* ملاحظة أهم: gym-theme.css يحمَّل بعد base.css، وقواعده مثل .gx-sidebar
   و body.gx .gx-btn تتساوى أو تتفوّق فى التخصيصية (specificity) مع قواعدنا
   هنا -- فيفوز هو عند التعادل لأنه يُحمَّل لاحقًا. لذلك كل خاصية هنا تتعارض
   مع قيمة من gym-theme.css (position/display) تُكتب بـ !important عمداً،
   وليس كعادة سيئة -- هذا هو أسلوب "سد الفجوة" الوحيد المتاح بدون تعديل
   gym-theme.css نفسه أو ترتيب تحميل الملفات. */
@media (max-width: 900px) {
  /* height:100dvh (مع fallback لـ 100vh للمتصفحات القديمة): الدرج هنا
     position:fixed، و100vh على متصفحات الموبايل (خصوصًا iOS Safari) لا
     يطابق المساحة المرئية الفعلية فى كل الحالات -- شريط العنوان/الأسفل
     الديناميكى فى Safari يجعل 100vh يُحسَب أحيانًا أكبر أو أصغر من
     الشاشة المرئية فعليًا بحسب لحظة ظهور/اختفاء هذه الأشرطة، فكان الدرج
     يظهر مقصوصًا (ينتهى قبل نهاية الشاشة فعليًا) تحديدًا على الموبايل رغم
     أنه height:100vh ظاهريًا. 100dvh (dynamic viewport height) مصمّمة
     خصيصًا لهذه الحالة ليطابق المساحة المرئية الفعلية لحظيًا. */
  .gx-sidebar {
    position: fixed !important;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1050;
    width: 260px !important;
    flex-basis: 260px !important;
    height: 100vh !important;
    height: 100dvh !important;
    transition: transform .25s ease;
    box-shadow: 0 0 28px oklch(0 0 0 / .28);
  }
  html[dir="ltr"] .gx-sidebar { transform: translateX(-100%); }
  html[dir="rtl"] .gx-sidebar { transform: translateX(100%); }
  /* !important ضروري: html[dir] .gx-sidebar أعلى تخصيصية من .gx-sidebar.gx-sidebar-open
     (سيليكتور العنصر html يرفع تخصيصية قاعدة الاتجاه، فتفوز رغم ترتيبها الأسبق فى الملف). */
  .gx-sidebar.gx-sidebar-open { transform: translateX(0) !important; }

  /* الدرج المفتوح يبقى بعرضه الكامل حتى لو كان وضع "أيقونات فقط" لسطح
     المكتب مفعّلاً مسبقاً -- طي الأيقونات غير مفيد على شاشة صغيرة. */
  .gx-sidebar.is-collapsed.gx-sidebar-open { width: 260px !important; flex-basis: 260px !important; }
  .gx-sidebar.is-collapsed.gx-sidebar-open .gx-sidebar-hide { display: flex !important; }
  .gx-sidebar.is-collapsed.gx-sidebar-open .gx-nav-item { justify-content: flex-start; padding: 10px 14px; }

  .gx-main { width: 100%; }

  .gx-mobile-nav-toggle { display: inline-flex !important; }

  /* الدرج مغلق أصلاً translateX خارج الشاشة، لكنه يبقى position:fixed
     بعرضه الكامل (260px) فى نفس مكانه فى الـ DOM -- بعض المتصفحات تحسب
     "منطقة التمرير القابلة للمسح" (scrollable overflow) للصفحة بالاعتماد
     على الموضع الهندسى الأصلى للعنصر قبل تطبيق transform، فيظهر سكرول
     أفقى لعرض الصفحة بالكامل (= عرض الشاشة + عرض الدرج) تحديدًا فى حالة
     "الدرج مغلق" رغم أنه غير مرئى. هذا الحل آمن 100% على هذا المقاس: لا
     يوجد هنا أى عنصر sticky يعتمد على كون body/html هو الحاوية القابلة
     للتمرير (ذلك فقط فى media query سطح المكتب أعلى 900px)، وأى محتوى
     عريض فعليًا (جدول، إلخ) له أصلاً غلاف overflow-x:auto خاص به
     (.gx-table-wrap/.d2-table-wrap) فلن يتأثر. */
  html, body { overflow-x: hidden; max-width: 100%; }
}

/* ارتفاع السايدبار (سطح المكتب/التابلت فوق 900px فقط -- تحت ذلك السايدبار
   درج overlay منفصل، height:100vh بالكامل أعلاه هو السلوك الصحيح له ولا
   علاقة له بهذا التصحيح). --gx-header-offset تُحسَب وتُحدَّث بـ JS
   (dashboard2-ui.js، syncSidebarHeaderOffset) لتطابق ارتفاع كل ما يسبق
   .gx-shell فعليًا فى الصفحة (الهيدر + تنبيه الترخيص إن ظهر)، بدلاً من
   افتراض gym-theme.css أن السايدبار أول عنصر فى الصفحة (height:100vh من
   y=0) -- وهو افتراض خاطئ هنا يجعل أسفل قائمة السايدبار يقع دائمًا تحت
   حافة الشاشة بمقدار ذلك الارتفاع عند التمرير لأعلى الصفحة. */
@media (min-width: 901px) {
  .gx-sidebar {
    top: var(--gx-header-offset, 0px) !important;
    /* نفس مشكلة 100dvh الموضّحة أعلاه للدرج (شريط عنوان/أسفل Safari
       الديناميكى يجعل 100vh لا يطابق المساحة المرئية الفعلية لحظيًا) --
       تنطبق بنفس الدرجة هنا على أى جهاز بعرض >900px (تابلت/هاتف بالعرض)
       يفتح Safari على الموبايل، وهى بالضبط حالة "السايدبار مقصوص فى
       الرئيسية" التى استمرت حتى بعد إصلاح --gx-header-offset. */
    height: calc(100vh - var(--gx-header-offset, 0px)) !important;
    height: calc(100dvh - var(--gx-header-offset, 0px)) !important;
  }
}

.gx-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / .45);
  z-index: 1040;
}
.gx-sidebar-backdrop.is-open { display: block; }

body.gx-sidebar-is-open { overflow: hidden; }

/* صفحات الطباعة لا تحتاج أي من هذا */
@media print {
  .gx-sidebar-backdrop, .gx-mobile-nav-toggle { display: none !important; }
}

/* ---------- Status switch ---------- */
.d2-switch { position: relative; display: inline-flex; width: 42px; height: 23px; cursor: pointer; flex: 0 0 42px; }
.d2-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.d2-switch .d2-switch-track { position: absolute; inset: 0; background: var(--bd); border-radius: 20px; transition: background .15s ease; }
.d2-switch .d2-switch-thumb {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px oklch(0.3 0.03 265 / .3); transition: inset-inline-start .15s ease;
}
.d2-switch input:checked ~ .d2-switch-track { background: var(--ac); }
.d2-switch input:checked ~ .d2-switch-thumb { inset-inline-start: 22px; }
.d2-switch input:disabled ~ .d2-switch-track { opacity: .5; cursor: default; }

/* ---------- Sortable table headers ---------- */
.d2-th-sort { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; cursor: pointer; user-select: none; }
.d2-th-sort:hover { color: var(--ac); text-decoration: none; }
.d2-th-sort.is-active { color: var(--ac); }
.d2-th-sort .ms { font-size: 14px; }

/* ---------- Expandable table rows ---------- */
.d2-row-toggle { display: flex; align-items: center; gap: 11px; cursor: pointer; min-width: 0; }
.d2-row-toggle .d2-row-chevron { font-size: 20px; color: var(--ink3); transition: transform .15s ease; }
.d2-row-toggle.is-open .d2-row-chevron { color: var(--ac); transform: rotate(180deg); }
.d2-table tbody tr.is-expanded { background: var(--sf2); }
.d2-table tbody tr.d2-expand-row td { padding: 0 18px 18px; background: var(--sf2); }
.d2-subcard { background: var(--sf); border: 1px solid var(--bd); border-radius: 14px; overflow: hidden; }

/* ==========================================================================
   gx-* additions — small gaps gym-theme.css leaves open, filled here without
   ever editing/renaming anything inside gym-theme.css itself.
   ========================================================================== */

/* gym-theme.css gives .gx-nav-group-head cursor:pointer but ships no actual
   collapse behaviour (reference.html's group headers are static/decorative).
   Mirrors the .d2-nav-group.is-closed pattern above. */
.gx-nav-group-head .ms:last-child { transition: transform .15s ease; }
.gx-nav-group.is-closed .gx-nav-group-head .ms:last-child { transform: rotate(-90deg); }
.gx-nav-group.is-closed .gx-nav-group-items { display: none; }

/* gym-theme.css lays out .gx-nav-group-head (flex/padding/radius/:hover bg)
   but never gives it a base background/border/color -- it is a plain
   <button> in the markup, so every browser's native button chrome (a light
   "buttonface" fill + outset border, and an unstyled dark glyph colour for
   the expand_more chevron) shows through underneath. That native fill
   happens to look acceptable in light mode purely by coincidence (it's
   close to --bg), but in dark mode it renders as a glaring white/light box
   around every group label -- exactly what looked unpolished. Reset the
   native chrome only (base state); gym-theme.css's existing :hover rule is
   left untouched and keeps working, now against a transparent base instead
   of a native button face, same as every other nav row. */
.gx-nav-group-head {
  background: transparent;
  border: 1px solid var(--bd);
  color: var(--ink2);
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}
.gx-nav-group-head:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.gx-nav-group:not(.is-closed) > .gx-nav-group-head {
  border-color: var(--ac);
  color: var(--ac);
}
.gx-nav-group:not(.is-closed) > .gx-nav-group-head .gx-nav-group-label { color: inherit; }

/* الدرج مطوي للأيقونات فقط (sidebar.is-collapsed) -- عناوين المجموعات
   (gx-nav-group-head/label) كانت تعرض الأيقونة مع جزء مبتور من النص دائمًا،
   لأن gym-theme.css لا يعرف عنها شيئًا خاصًا (فقط .gx-nav-item مغطاة بقاعدته
   الجاهزة). نفس حل .gx-sidebar-hide المستخدم بالفعل فى nav-item.blade.php
   (main-sidebar.blade.php يلف نص كل عنوان مجموعة وسهم expand_more بنفس
   الكلاس الآن)، مع توسيط الأيقونة المتبقية مثل .gx-nav-item تمامًا. */
.gx-sidebar.is-collapsed .gx-nav-group-head { justify-content: center; }

/* gym-theme.css only ships a JS-cloned floating .gx-menu (position:fixed,
   built on demand from a <template>). The header's notification "close"
   icons are bound once at page load by a non-delegated jQuery handler in
   layouts/footer-scripts.blade.php, so their markup must already exist in
   the DOM — a menu built on demand would never receive that binding. This
   is an always-in-DOM, hover/focus-shown dropdown instead, mirroring the
   .d2-dropdown/.d2-dropdown-menu mechanism above but styled with gx tokens;
   its content reuses gym-theme's own .gx-menu-item/.gx-menu-label/.gx-menu-sep
   (those classes only style rows and don't depend on the floating wrapper). */
.gx-dropdown { position: relative; }
.gx-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  pointer-events: none;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 14px;
  box-shadow: 0 16px 40px var(--shdw);
}
.gx-dropdown:hover .gx-dropdown-menu,
.gx-dropdown:focus-within .gx-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.gx-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  inset-inline: 0;
  height: 10px;
}

/* .gx-seg (gym-theme.css §4) only styles a <button> child; extend the same
   look to an <a> child for real navigation controls (language switcher). */
.gx-seg > a {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 500;
  padding: 6px 13px; border-radius: 8px; background: transparent; color: var(--ink2); text-decoration: none;
}
.gx-seg > a:hover { text-decoration: none; color: var(--ink); }
.gx-seg > a.is-on { background: var(--ac); color: #fff; }

/* .gx-switch (gym-theme.css §11) is a plain clickable element whose "on"
   state is the .is-on class, toggled by JS — it ships no CSS reacting to a
   nested native <input>'s :checked state. Pages that need a real checkbox
   underneath (for a plain AJAX change handler, not a submitted form field)
   hide it visually here so only the track/thumb show; the JS is
   responsible for keeping .is-on in sync with the checkbox on change. */
.gx-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* gx-detail — icon + label/value row, used on read-only "show" pages
   (packages/show, guest-packages/show) and the calendar-day appointment
   modal. NOT actually part of gym-theme.css (confirmed by grep — it has no
   .gx-detail rule at all); this was wrongly assumed to already exist there
   and used without a definition, so it rendered completely unstyled
   (icon/label/value stacked in block flow instead of laid out as a row).
   Defined here instead of inside gym-theme.css itself. */
.gx-detail { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gx-detail .ms { color: var(--ink3); font-size: 22px; flex: 0 0 24px; }
.gx-detail .k { font-size: 11.5px; color: var(--ink3); }
.gx-detail .v { font-size: 14px; color: var(--ink); font-weight: 500; }

/* gx-alert — validation-error / flash-message banner. Also not part of
   gym-theme.css; used bare (undefined) on the trainees subscriptions page
   and rendered with no background/border/color at all as a result — the
   exact same undefined-class mistake as .gx-detail above. Defined here so
   it's available everywhere, and used by dashboard2.layouts.master's
   global $errors->any() block (every page gets validation-error display
   for free, instead of each page needing its own copy). */
.gx-alert { padding: 12px 16px; border-radius: var(--r-ctl); border: 1px solid var(--bd); margin-bottom: 16px; }
.gx-alert ul { margin: 0; padding-inline-start: 18px; }
.gx-alert-danger  { background: var(--dgrs); color: var(--dgr); border-color: var(--dgr); }
.gx-alert-success { background: var(--oks);  color: var(--ok);  border-color: var(--ok); }
.gx-alert-warning { background: var(--warns);color: var(--warn);border-color: var(--warn); }
.gx-alert-info    { background: var(--acs);  color: var(--ac);  border-color: var(--ac); }

/* gx-btn disabled state — gym-theme.css styles every .gx-btn-* variant but
   never a disabled one, so a disabled gx-btn looked fully active/clickable
   (wrong on any page using the disabled HTML attribute or a Blade @if(...)
   disabled class token on a gx-btn, e.g. the trainers/supervision page).
   No pointer-events:none here on purpose: a real <button disabled> already
   can't be clicked or focused (the browser enforces that on its own) and a
   plain .disabled-classed element still needs hover to work so its title
   tooltip explaining WHY it's disabled can show — pointer-events:none
   blocks hover too, which is exactly the bug this caused on the guests
   index page's disabled Edit button (title set, but nothing ever showed
   on hover, because the real disabled attribute already kills hover in
   every browser — see .gx-btn-disabled-hint below for the fix pattern). */
.gx-btn:disabled, .gx-btn.disabled { opacity: .5; cursor: not-allowed; }

/* gx-btn-disabled-hint — the accessible way to pair a "why is this
   disabled" tooltip with a disabled-looking action: NEVER put the real
   disabled attribute on an element that also needs a hover title, because
   disabled form controls/links don't receive pointer events in any
   browser (title tooltips included) no matter what CSS says. Use this
   class instead of the disabled attribute (drop the disabled attribute
   itself, and drop any href/data-toggle/onclick the enabled version has,
   so there's nothing left to fire): it looks the same — dimmed, not-allowed
   cursor — but stays hoverable so title actually shows. */
.gx-btn-disabled-hint { opacity: .5; cursor: not-allowed; }

/* d-none — dashboard2 ships no Bootstrap CSS, so this common Bootstrap
   utility only exists scoped to .d2-legacy (bootstrap-compat.css, for the
   wrapped legacy pages). A handful of gx-* pages' own inline <script>
   blocks toggle it directly (classList.add/remove('d-none')) on elements
   outside any .d2-legacy wrapper -- e.g. the invoices/import page's
   progress indicator -- and silently did nothing there, since no
   unscoped .d-none rule existed. Defined here, unscoped, so it works
   anywhere in dashboard2, not just inside .d2-legacy. */
.d-none { display: none !important; }

/* ==========================================================================
   gx-table-wrap — مؤشر تمرير أفقى بصرى (scroll shadow) على كل الشاشات
   الصغيرة/المتوسطة. gym-theme.css يضيف overflow-x:auto فقط (بدون أى
   تلميح بصرى)، فأى جدول أعرض من الشاشة (وهى الأغلبية على الموبايل فى هذا
   المشروع) يُمرَّر بدون أن يعرف المستخدم أصلاً أن هناك المزيد. هذا تدرّج
   CSS بحت (بلا JS) يظهر فقط عند وجود محتوى فعلى يمكن تمريره فى ذلك
   الاتجاه (يختفى تلقائيًا عند وصول التمرير للنهاية) — نفس تقنية
   "CSS scroll shadows" القياسية. */
.gx-table-wrap {
  background:
    linear-gradient(to var(--gx-scroll-fade-dir, left), var(--sf) 30%, transparent) left / 24px 100% no-repeat local,
    linear-gradient(to var(--gx-scroll-fade-dir-rev, right), var(--sf) 30%, transparent) right / 24px 100% no-repeat local,
    linear-gradient(to var(--gx-scroll-fade-dir, left), oklch(0 0 0 / .14), transparent) left / 10px 100% no-repeat scroll,
    linear-gradient(to var(--gx-scroll-fade-dir-rev, right), oklch(0 0 0 / .14), transparent) right / 10px 100% no-repeat scroll;
}
html[dir="rtl"] .gx-table-wrap { --gx-scroll-fade-dir: right; --gx-scroll-fade-dir-rev: left; }

/* خلية صف موسَّع (colspan="100") تحتوى جدولاً فرعياً أعرض من الشاشة: بدون
   max-width:0 يكبر الجدول الخارجى كله ليلائم أعرض محتوى بداخله (انظر نفس
   الشرح فى trainees/index.blade.php حيث تُستخدَم هذه الفئة) -- مُعرَّفة هنا
   أيضًا كقاعدة عامة لأى صفحة أخرى تحتاج نفس النمط مستقبلاً. */
/* padding:0 !important ضرورى: body.gx .gx-table td (gym-theme.css) أعلى
   تخصيصية من .gx-subrow-cell وحدها، ويضيف padding خاص به كان سيتضاعف مع
   padding الموجود أصلاً فى .gx-subrow-panel بداخلها. */
.gx-subrow-cell { max-width: 0; padding: 0 !important; }

/* نماذج/بطاقات معلومات بعمودين (مثل .gx-info-card فى مودالات الاشتراك
   السريعة) تتكدّس عمودًا واحدًا على الموبايل بدلاً من أن تضيق كل خانة حتى
   التصاق النص. gym-theme.css لا يُعرّف .gx-info-card أصلاً (مُعرَّفة محليًا
   فى partial الاشتراكات السريعة)، لكن القاعدة هنا عامة لأى grid بعمودين
   بنفس الاسم مستقبلاً. */
@media (max-width: 480px) {
  .gx-info-card { grid-template-columns: 1fr !important; }
}

/* مودالات Bootstrap فى هذا المشروع (.modal-dialog فى base.css) تُستخدَم
   بعرض ثابت (max-width:500px) وmargin:1.75rem auto -- على شاشة أضيق من
   ~540px هذا يترك هوامش جانبية ضيقة جدًا وغير متناسقة بدلاً من الاستفادة
   الكاملة من العرض. توسيع الهامش الجانبى الأدنى فقط (لا تغيير لأى منطق أو
   حقن JS، معيار bootstrap القياسى نفسه). */
@media (max-width: 575.98px) {
  .modal-dialog { margin: 10px; max-width: calc(100% - 20px); }
}

/* ==========================================================================
   gx-header — تخفيف الازدحام على الموبايل. كل عنصر هنا (الطقس، ملء
   الشاشة، اسم/دور المستخدم كنص) حقيقى ويعمل، لكن تكديسها كلها فى صف واحد
   (gx-header-tools مُعرَّفة flex-wrap فى gym-theme.css لكن بدون أى منطق
   أولوية) كان يُنتج صفًا مزدحمًا بعناصر كثيرة على شاشة ضيقة. العناصر
   المخفاة هنا زخرفية/غير أساسية (الطقس) أو غير مفيدة عمليًا على موبايل
   (واجهة Fullscreen API غالبًا غير مدعومة أصلاً فى متصفحات iOS)، أو تتكرر
   معلوماتها فعليًا (اسم/دور المستخدم موجودان بالكامل أيضًا داخل قائمته
   المنسدلة عند فتحها) -- لا إخفاء لأى عنصر وظيفى أساسى (الإشعارات، تبديل
   المظهر، تنبيه الترخيص، تبديل اللغة تبقى كلها ظاهرة). */
@media (max-width: 600px) {
  .gx-header { padding: 10px 14px; gap: 8px; }
  .gx-header-tools { gap: 6px; }
  .gx-header .weather-widget,
  .gx-header #btnFullscreen,
  .gx-header .gx-user .gx-stack-tight { display: none; }
  .gx-header .gx-chip { padding: 5px 9px; font-size: 11.5px; }
}

/* ---- مودالات الإشعارات/المستخدم فى الهيدر على الموبايل ------------------
   .gx-dropdown-menu (base.css أعلاه) موضعها absolute بعرض ثابت (340px
   للإشعارات) مرتبط بموضع الزر المُشغِّل داخل صف أيقونات قد يلتف على عدة
   أسطر على شاشة ضيقة -- فكانت تُفتح مُمتدة غالبًا خارج حافة الشاشة
   اليمنى، وتظهر مقصوصة/غير مكتملة. dashboard2-ui.js (initHeaderDropdowns)
   يُحوّلها هنا فقط (أقل من 600px) إلى position:fixed بإحداثيات محسوبة من
   موضع الزر الفعلى ومحصورة داخل حدود الشاشة؛ هذه القاعدة فقط تمنع CSS من
   محاولة تطبيق موضعها الأصلى (الذى يتجاهله الـ JS بتعيين inline style على
   كل حال، لكن توضيحًا للنية). لا تغيير على سطح المكتب (JS لا يعمل فوق
   600px أصلاً). */
@media (max-width: 600px) {
  .gx-header .gx-dropdown-menu { inset-inline-end: auto; }
}

/* ==========================================================================
   gx-nav — مؤشر تمرير رأسى بصرى (نفس تقنية .gx-table-wrap أعلاه). قائمة
   الروابط الجانبية (.gx-nav، overflow-y:auto فى gym-theme.css) غالبًا
   أطول من المساحة المتاحة تحتها (مؤكَّد: ~664px محتوى فى ~454-655px مساحة
   على شاشات الديسكتوب/اللابتوب الشائعة) على كل صفحات المشروع بلا استثناء،
   بدون أى تلميح بصرى أن هناك المزيد أسفلها -- فيبدو وكأن القائمة "مقصوصة"
   بدلاً من كونها قابلة للتمرير. نفس حل الجداول بالضبط: تدرّج CSS يظهر فقط
   عند وجود محتوى فعلى يمكن تمريره لأسفل، ويختفى تلقائيًا عند وصول
   التمرير للنهاية. */
.gx-nav {
  background:
    linear-gradient(var(--sf), transparent) top / 100% 20px no-repeat local,
    linear-gradient(transparent, var(--sf)) bottom / 100% 20px no-repeat local,
    linear-gradient(oklch(0 0 0 / .12), transparent) top / 100% 8px no-repeat scroll,
    linear-gradient(transparent, oklch(0 0 0 / .12)) bottom / 100% 8px no-repeat scroll;
}
