/* G5-UX-NAV (owner decision, Checkpoint 42), REVISED by the Header & Navigation Reorganization (owner direction 2026-10-21): developer portal only —
   every rule is scoped to .bs-developer-portal, so the public site (.st-shell) and the SystemAdmin panel (_AdminLayout, no .st-nav) are untouched.
   The 15 loose links that needed a second row (C3-1388) are now Home + grouped dropdown sections + «حسابي» (see nav-menus.css), so the header is ONE row
   and the switch to the existing menu (drawer) moves from 1388 px to 1099 px. Official CSS files are not changed. */

/* menu button and logout: readable on the white portal header (they inherited the dark site's light ink) */
.bs-developer-portal .st-nav .st-burger { color: var(--bs-navy-950); border-color: #cfdced; background: #fff; }

/* one row: logo | sections | account */
.bs-developer-portal .st-nav__inner { flex-wrap: nowrap; padding-block: .45rem; }
.bs-developer-portal .st-nav__links { flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.bs-developer-portal .st-nav__links a { white-space: nowrap; }
.bs-developer-portal .st-nav__side { justify-content: flex-end; }

/* below 1100 px: the existing menu (same sections, same links, same permissions); «حسابي» stays in the header */
@media (max-width: 1099.98px) {
    .bs-developer-portal .st-nav__links { display: none; }
    .bs-developer-portal .st-nav__side > a { display: none; }
    .bs-developer-portal .st-burger { display: grid; }
}

/* R5 (owner decision, Checkpoint 42): /Developer/Finance early-withdrawal button may wrap on narrow screens (text unchanged) */
.bs-developer-portal form[data-withdraw-form] .btn { white-space: normal; max-width: 100%; }

/* R4 (owner decision 2026-10-21, option R4-A as previewed in 06-G5/ux-nav/P06G5-R4-Finance-Grid-Design.md §3-§4): the six balance
   cards of /Developer/Finance. `grid-3` is not defined in any loaded stylesheet (and is also used by admin pages), so this is
   scoped to the developer portal AND to dl[data-dev-balance] only; no generic grid-3/grid-2 rule. Markup, texts and numbers unchanged.
   3 columns; 2 up to 760 px; 1 up to 420 px. */
.bs-developer-portal dl[data-dev-balance] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.bs-developer-portal dl[data-dev-balance] > div { border: 1px solid rgba(15, 40, 80, .12); border-radius: 12px; padding: .6rem .8rem; background: #fff; }
.bs-developer-portal dl[data-dev-balance] dt { font-size: .85rem; opacity: .75; }
.bs-developer-portal dl[data-dev-balance] dd { margin: .2rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 760px) { .bs-developer-portal dl[data-dev-balance] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .bs-developer-portal dl[data-dev-balance] { grid-template-columns: 1fr; } }
