/* Arbitrage — product styles on top of MDS (tokens only; no hex, no px colour/space/radius literals). */

/* Shell: the page scrolls as a whole (sidebar sticky), so the browser's own scroll, find and print work. */
.arb-app .mds-main { overflow: visible; min-width: 0; }
.arb-app .mds-sidebar { min-height: 100dvh; }
.arb-brand { display: flex; align-items: center; gap: var(--mds-space-2); }
.arb-brand__mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--mds-radius-md); background: var(--mds-accent); color: var(--mds-on-accent); }
.arb-brand__text { display: flex; flex-direction: column; line-height: var(--mds-leading-tight); font-weight: var(--mds-weight-semibold); }
.arb-brand__text small { font-size: var(--mds-text-xs); font-weight: var(--mds-weight-regular); color: var(--mds-text-3); margin-top: 2px; }
.arb-topsearch { width: min(440px, 100%); }
.arb-topsearch .mds-kbd { position: absolute; right: var(--mds-space-2); top: 50%; transform: translateY(-50%); }
.arb-user { display: flex; align-items: center; gap: var(--mds-space-2); background: none; border: 0; padding: var(--mds-space-1) var(--mds-space-2); border-radius: var(--mds-radius-md); cursor: pointer; color: var(--mds-text-2); }
.arb-user:hover { background: var(--mds-surface-hover); }
.arb-user__text { display: flex; flex-direction: column; text-align: left; line-height: var(--mds-leading-tight); }
.arb-user__text b { font-weight: var(--mds-weight-medium); color: var(--mds-text); font-size: var(--mds-text-sm); }
.arb-user__text small { font-size: var(--mds-text-xs); color: var(--mds-text-3); }
.arb-bell { gap: var(--mds-space-1); padding: 0 var(--mds-space-2); }
.arb-bell svg { width: 20px; height: 20px; }
.arb-bell__dot { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--mds-radius-full); background: var(--mds-danger-solid); color: var(--mds-text-inverse); font-size: var(--mds-text-xs); font-weight: var(--mds-weight-semibold); line-height: 18px; text-align: center; border: 2px solid var(--mds-surface); box-sizing: content-box; }
.arb-only-m { display: none !important; }
@media (max-width: 1023px) {
  .arb-only-m { display: inline-flex !important; }
  .arb-hide-m { display: none !important; }
  .arb-topsearch { flex: 1; }
}

/* Mockup-only: state switcher (not part of the product). */
.arb-mock-bar { position: sticky; top: 0; z-index: calc(var(--mds-z-sticky) + 1); display: flex; align-items: center; gap: var(--mds-space-3); padding: var(--mds-space-2) var(--mds-space-4); background: var(--mds-p-ink-900); color: var(--mds-p-ink-100); font-size: var(--mds-text-sm); overflow-x: auto; }
.arb-mock-bar .mds-segmented { flex: none; }

/* Page header meta line under the title */
.arb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mds-space-2) var(--mds-space-4); color: var(--mds-text-2); font-size: var(--mds-text-sm); }
.arb-meta > span { display: inline-flex; align-items: center; gap: var(--mds-space-1); }

/* Lifecycle strip — the signature detail: the court's fixed path of a proceeding. */
.arb-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--mds-border); border-radius: var(--mds-radius-lg); background: var(--mds-surface); overflow: hidden; }
.arb-flow__step { position: relative; display: flex; flex-direction: column; gap: var(--mds-space-1); padding: var(--mds-space-4); border-right: 1px solid var(--mds-border); color: inherit; text-decoration: none; min-width: 0; }
.arb-flow__step:last-child { border-right: 0; }
.arb-flow__step:hover { background: var(--mds-surface-hover); text-decoration: none; }
.arb-flow__n { font-size: var(--mds-text-xs); color: var(--mds-text-3); font-weight: var(--mds-weight-medium); }
.arb-flow__label { font-size: var(--mds-text-sm); color: var(--mds-text-2); line-height: var(--mds-leading-snug); min-height: 2.6em; }
.arb-flow__value { font-size: var(--mds-text-2xl); font-weight: var(--mds-weight-semibold); font-variant-numeric: tabular-nums; letter-spacing: var(--mds-tracking-tight); }
.arb-flow__meta { font-size: var(--mds-text-xs); color: var(--mds-text-3); }
.arb-flow__meta--warn { color: var(--mds-warning); font-weight: var(--mds-weight-medium); }
.arb-flow__bar { height: 4px; border-radius: var(--mds-radius-full); background: var(--mds-surface-sunken); overflow: hidden; margin-top: var(--mds-space-2); }
.arb-flow__bar > span { display: block; height: 100%; background: var(--mds-accent); }
.arb-flow__step[aria-current="true"] { background: var(--mds-accent-soft); }
.arb-flow__step[aria-current="true"] .arb-flow__label { color: var(--mds-accent-text); }
@media (max-width: 1023px) and (min-width: 768px) { .arb-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .arb-flow__step:nth-child(3) { border-right: 0; } .arb-flow__step:nth-child(-n+3) { border-bottom: 1px solid var(--mds-border); } }
@media (max-width: 767px) { .arb-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .arb-flow__step { padding: var(--mds-space-3); border-bottom: 1px solid var(--mds-border); } .arb-flow__step:nth-child(3) { border-right: 1px solid var(--mds-border); } .arb-flow__step:nth-child(2n) { border-right: 0; } .arb-flow__step:last-child { grid-column: 1 / -1; border-bottom: 0; } .arb-flow__value { font-size: var(--mds-text-xl); } }

/* Stage track inside a proceeding (same 6 steps, horizontal) */
.arb-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--mds-space-1); }
.arb-track__step { display: flex; flex-direction: column; gap: var(--mds-space-2); font-size: var(--mds-text-xs); color: var(--mds-text-3); min-width: 0; }
.arb-track__step::before { content: ""; height: 4px; border-radius: var(--mds-radius-full); background: var(--mds-surface-sunken); }
.arb-track__step[data-done="true"]::before { background: var(--mds-accent); }
.arb-track__step[data-done="true"] { color: var(--mds-text-2); }
.arb-track__step[aria-current="step"]::before { background: var(--mds-accent); }
.arb-track__step[aria-current="step"] { color: var(--mds-text); font-weight: var(--mds-weight-semibold); }
.arb-track__step b { display: block; font-weight: inherit; font-size: var(--mds-text-sm); line-height: var(--mds-leading-snug); }

/* Two-column page (content + aside) */
.arb-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--mds-space-6); align-items: start; }
.arb-split > .mds-stack, .arb-split > aside { min-width: 0; }
@media (max-width: 1279px) { .arb-split { grid-template-columns: minmax(0, 1fr); } }

/* Section heading inside a card body */
.arb-section-title { font-size: var(--mds-text-sm); font-weight: var(--mds-weight-semibold); color: var(--mds-text); margin: 0 0 var(--mds-space-3); }

/* File rows (documents) */
.arb-files { display: flex; flex-direction: column; }
.arb-file { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--mds-space-3); align-items: center; padding: var(--mds-space-3) var(--mds-space-4); border-top: 1px solid var(--mds-divider); }
.arb-file:first-child { border-top: 0; }
.arb-file__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--mds-radius-md); background: var(--mds-surface-2); color: var(--mds-text-2); }
.arb-file__name { font-weight: var(--mds-weight-medium); }
.arb-file__meta { font-size: var(--mds-text-xs); color: var(--mds-text-3); }
.arb-file__actions { display: flex; gap: var(--mds-space-1); }

/* Drop zone */
.arb-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--mds-space-2); padding: var(--mds-space-8) var(--mds-space-6); border: 1px dashed var(--mds-border-strong); border-radius: var(--mds-radius-lg); background: var(--mds-surface-2); color: var(--mds-text-2); }
.arb-drop__icon { color: var(--mds-text-3); }
.arb-drop strong { color: var(--mds-text); font-weight: var(--mds-weight-semibold); }
.arb-drop[data-filled="true"] { border-style: solid; border-color: var(--mds-border); background: var(--mds-surface); align-items: stretch; text-align: left; padding: var(--mds-space-4); }

/* Mobile card list (table → cards at ≤ 767px) */
.arb-cards { display: none; }
@media (max-width: 767px) {
  .arb-table-desktop { display: none; }
  .arb-cards { display: flex; flex-direction: column; }
  .arb-card-row { display: flex; flex-direction: column; gap: var(--mds-space-1); padding: var(--mds-space-3) var(--mds-space-4); border-top: 1px solid var(--mds-divider); color: inherit; }
  .arb-card-row:first-child { border-top: 0; }
  .arb-card-row__top { display: flex; justify-content: space-between; align-items: center; gap: var(--mds-space-2); }
  .arb-card-row__sub { display: flex; justify-content: space-between; gap: var(--mds-space-2); font-size: var(--mds-text-sm); color: var(--mds-text-2); }
}

/* Auth pages */
.arb-auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, 520px) minmax(0, 1fr); background: var(--mds-surface); }
.arb-auth__side { background: var(--mds-surface-2); border-right: 1px solid var(--mds-border); padding: var(--mds-space-12); display: flex; flex-direction: column; justify-content: space-between; gap: var(--mds-space-8); }
.arb-auth__main { display: flex; align-items: center; justify-content: center; padding: var(--mds-space-8) var(--mds-space-6); }
.arb-auth__box { width: min(400px, 100%); display: flex; flex-direction: column; gap: var(--mds-space-6); }
@media (max-width: 1023px) { .arb-auth { grid-template-columns: minmax(0, 1fr); } .arb-auth__side { display: none; } .arb-auth__main { align-items: flex-start; padding: var(--mds-space-10) var(--mds-space-4); } }
.arb-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--mds-space-2); }
.arb-otp .mds-input { height: 52px; text-align: center; font-size: var(--mds-text-xl); font-weight: var(--mds-weight-semibold); font-variant-numeric: tabular-nums; padding: 0; }

/* Utility */
.arb-num-lg { font-size: var(--mds-text-lg); font-weight: var(--mds-weight-semibold); font-variant-numeric: tabular-nums; }
.arb-nowrap { white-space: nowrap; }
.arb-w-full { width: 100%; }

/* Mini stage track in a table cell: 5 segments under the status badge */
.arb-mini { display: grid; grid-template-columns: repeat(5, 12px); gap: 2px; margin-top: var(--mds-space-1); }
.arb-mini > i { height: 3px; border-radius: var(--mds-radius-full); background: var(--mds-surface-sunken); }
.arb-mini > i.on { background: var(--mds-accent); }
.arb-status { display: flex; flex-direction: column; align-items: flex-start; }

.mds-segmented button { white-space: nowrap; }
.arb-table-fit { min-width: 0; table-layout: fixed; }
.arb-table-fit th, .arb-table-fit td { padding-left: var(--mds-space-3); padding-right: var(--mds-space-3); }
.arb-table-fit th.is-num { width: 5.5rem; white-space: normal; line-height: 1.2; }
.arb-table-fit .mds-truncate { display: block; }
.arb-only-xs { display: none !important; }
@media (max-width: 767px) {
  .arb-topsearch { display: none; }
  .arb-only-xs { display: inline-flex !important; }
  .arb-flow__label { min-height: 0; }
}

/* ---------- form page (04) ---------- */
.arb-form-page { max-width: 1200px; }
.arb-form-page .mds-form-section:first-of-type { border-top: 0; padding-top: 0; }
.arb-form-section__desc { font-size: var(--mds-text-sm); color: var(--mds-text-2); margin: var(--mds-space-1) 0 0; max-width: 36ch; }
.arb-fields { display: flex; flex-direction: column; gap: var(--mds-space-4); min-width: 0; }
.arb-suffix { position: relative; }
.arb-suffix > .mds-input { padding-right: calc(var(--mds-space-3) + 2ch); text-align: right; font-variant-numeric: tabular-nums; }
.arb-suffix > span { position: absolute; right: var(--mds-space-3); top: 50%; transform: translateY(-50%); color: var(--mds-text-3); pointer-events: none; }
.arb-actions-bar { position: sticky; bottom: 0; z-index: 2; display: flex; gap: var(--mds-space-2); justify-content: flex-end; align-items: center; padding: var(--mds-space-3) 0; background: var(--mds-bg); border-top: 1px solid var(--mds-divider); }
.arb-actions-bar__note { margin-right: auto; font-size: var(--mds-text-sm); color: var(--mds-text-3); }
.arb-calc { display: flex; flex-direction: column; gap: var(--mds-space-2); font-size: var(--mds-text-sm); }
.arb-calc__row { display: flex; justify-content: space-between; gap: var(--mds-space-3); color: var(--mds-text-2); }
.arb-calc__row b { color: var(--mds-text); font-weight: var(--mds-weight-semibold); font-variant-numeric: tabular-nums; }
.arb-calc__total { padding-top: var(--mds-space-2); border-top: 1px solid var(--mds-divider); font-size: var(--mds-text-md); }
.arb-next { margin: 0; padding-left: var(--mds-space-5); display: flex; flex-direction: column; gap: var(--mds-space-2); font-size: var(--mds-text-sm); color: var(--mds-text-2); }
.arb-radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mds-space-2); }
.arb-radio-card { display: flex; gap: var(--mds-space-2); align-items: flex-start; padding: var(--mds-space-3); border: 1px solid var(--mds-border); border-radius: var(--mds-radius-md); background: var(--mds-surface); cursor: pointer; min-height: 44px; }
.arb-radio-card input { margin: 2px 0 0; accent-color: var(--mds-accent); }
.arb-radio-card b { display: block; font-weight: var(--mds-weight-medium); }
.arb-radio-card small { display: block; color: var(--mds-text-3); font-size: var(--mds-text-xs); }
.arb-radio-card:has(input:checked) { border-color: var(--mds-accent); background: var(--mds-accent-soft); }
.arb-radio-card:has(input:checked) small { color: var(--mds-accent-text); }
.arb-errsum ul { margin: var(--mds-space-1) 0 0; padding-left: var(--mds-space-5); }
.arb-errsum a { color: inherit; text-decoration: underline; }
@media (max-width: 767px) {
  .arb-radio-cards { grid-template-columns: minmax(0, 1fr); }
  .arb-actions-bar { margin: 0 calc(-1 * var(--mds-space-4)); padding: var(--mds-space-3) var(--mds-space-4); background: var(--mds-surface); }
  .arb-actions-bar__note { display: none; }
  .arb-actions-bar .mds-btn { flex: 1; height: var(--mds-control-lg); }
}
.arb-fsec { display: flex; flex-direction: column; gap: var(--mds-space-4); padding: var(--mds-space-6) 0; border-top: 1px solid var(--mds-divider); }
.arb-fsec:first-child { border-top: 0; padding-top: 0; }
.arb-fsec .arb-form-section__desc { max-width: 64ch; }
.arb-shot .arb-actions-bar { position: static; }

/* ---------- import wizard (05) ---------- */
.arb-steps { padding: var(--mds-space-1) 0 var(--mds-space-2); }
.arb-why { font-size: var(--mds-text-xs); color: var(--mds-text-2); margin-top: var(--mds-space-1); }
.arb-missing { color: var(--mds-danger); }
.arb-filebar { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--mds-space-3); align-items: center; }
.arb-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: var(--mds-space-2); vertical-align: 1px; }
.arb-dot--success { background: var(--mds-success-solid); }
.arb-dot--danger { background: var(--mds-danger-solid, var(--mds-danger)); }
.arb-dot--warning { background: var(--mds-warning-solid); }
.arb-match { display: flex; flex-direction: column; gap: var(--mds-space-3); }
.arb-match__row { display: flex; justify-content: space-between; gap: var(--mds-space-3); font-size: var(--mds-text-md); }
.arb-match__row span { display: inline-flex; gap: var(--mds-space-2); align-items: center; color: var(--mds-text-2); }
.arb-match__row span svg { color: var(--mds-success); }
.arb-match__row--warn span svg { color: var(--mds-warning); }
.arb-match__row b { font-variant-numeric: tabular-nums; font-weight: var(--mds-weight-semibold); }
.arb-run { max-width: 720px; }
.arb-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--mds-space-2); font-size: var(--mds-text-md); color: var(--mds-text-3); }
.arb-checklist li { display: flex; gap: var(--mds-space-2); align-items: center; }
.arb-checklist li[data-done="true"] { color: var(--mds-text-2); }
.arb-checklist li[data-done="true"] svg { color: var(--mds-success); }
.arb-checklist li[aria-current="step"] { color: var(--mds-text); font-weight: var(--mds-weight-medium); }
@media (max-width: 1023px) { .arb-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.arb-checklist .mds-spinner { width: 16px; height: 16px; }
@media (max-width: 767px) {
  .arb-steps .mds-step:not([aria-current]) { display: none; }
  .arb-steps .mds-step[aria-current]::after { content: "· քայլ " attr(data-of); order: 2; width: auto; height: auto; background: none; color: var(--mds-text-3); font-weight: var(--mds-weight-regular); }
}
.arb-resp { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mds-text); }
@media (max-width: 767px) {
  .arb-steps .mds-step:not([aria-current]) { display: flex; position: absolute; visibility: hidden; width: 0; overflow: hidden; }
  .arb-actions-bar { flex-wrap: wrap; }
  .arb-actions-bar .mds-btn { flex: 1 1 100%; }
  .arb-actions-bar .mds-spacer { display: none; }
}

/* ---------- proceeding detail (06) ---------- */
.arb-title-row { display: flex; align-items: center; gap: var(--mds-space-3); flex-wrap: wrap; }
.arb-tabpanel { padding-top: var(--mds-space-4); }
.arb-dl-tight { grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); font-size: var(--mds-text-sm); }
.arb-person { display: flex; gap: var(--mds-space-3); align-items: center; }
.arb-history { margin: 0; padding: 0; list-style: none; }
.arb-history__head { display: flex; justify-content: space-between; gap: var(--mds-space-3); flex-wrap: wrap; }
.arb-history__head b { font-weight: var(--mds-weight-semibold); }
.arb-radio-list { display: flex; flex-direction: column; gap: var(--mds-space-2); }
.mds-dl dd a { display: inline-flex; align-items: center; gap: var(--mds-space-1); }
@media (max-width: 767px) { .arb-track { grid-template-columns: minmax(0, 1fr); gap: var(--mds-space-2); } .arb-track__step { flex-direction: row; align-items: center; } .arb-track__step::before { width: 4px; height: 20px; flex: none; } .arb-track__step b { flex: 1; } }
.arb-track { margin: 0; padding: 0; list-style: none; }
.arb-shot body { position: relative; }
.arb-shot .mds-overlay { position: absolute; align-items: start; padding-top: calc(var(--mds-space-12) * 2); }
.arb-shot .mds-drawer { position: absolute; }

/* ---------- arbitr search (07) ---------- */
.arb-search-page { max-width: 880px; }
.arb-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--mds-space-3); align-items: start; }
.arb-search .mds-field { margin: 0; }
.arb-search__btn { align-self: start; margin-top: calc(var(--mds-text-sm) * 1.35 + var(--mds-space-2)); }
.arb-recent { display: flex; flex-direction: column; }
.arb-recent a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--mds-space-3); padding: var(--mds-space-3) var(--mds-space-5); border-top: 1px solid var(--mds-divider); color: inherit; }
.arb-recent a:first-child { border-top: 0; }
.arb-recent a:hover { background: var(--mds-surface-hover); }
@media (max-width: 767px) {
  .arb-search { grid-template-columns: minmax(0, 1fr); }
  .arb-search__btn { margin-top: 0; height: var(--mds-control-lg); }
}

/* ---------- users (08) ---------- */
.arb-userc { display: flex; gap: var(--mds-space-3); align-items: center; min-width: 0; }
.arb-userc > div { min-width: 0; }
.arb-userc b { display: block; font-weight: var(--mds-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.arb-2fa { display: inline-flex; gap: var(--mds-space-1); align-items: center; font-size: var(--mds-text-sm); color: var(--mds-text-2); }
.arb-2fa--on svg { color: var(--mds-success); }
.arb-2fa--off { color: var(--mds-warning); }
.arb-menu-users { position: absolute; right: 40px; top: 404px; width: 300px; z-index: var(--mds-z-dropdown); }
.arb-fields-list { display: flex; flex-direction: column; border: 1px solid var(--mds-border); border-radius: var(--mds-radius-md); }
.arb-fields-list__head, .arb-fields-list__row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 84px 84px; gap: var(--mds-space-3); align-items: center; padding: var(--mds-space-2) var(--mds-space-3); }
.arb-fields-list__head { font-size: var(--mds-text-xs); color: var(--mds-text-3); border-bottom: 1px solid var(--mds-divider); }
.arb-fields-list__row { border-top: 1px solid var(--mds-divider); min-height: 44px; }
.arb-fields-list__head + .arb-fields-list__row { border-top: 0; }
.arb-fields-list__row > svg { color: var(--mds-text-3); cursor: grab; }
.arb-fields-list__row[data-off="true"] span.n { color: var(--mds-text-3); }
.arb-fields-list__row[data-drag="true"] { background: var(--mds-surface); box-shadow: var(--mds-shadow-2); border-radius: var(--mds-radius-sm); }
.arb-fields-list .c { justify-self: center; }
@media (max-width: 1023px) { .arb-menu-users { display: none; } }
.mds-dl { margin: 0; } /* proposal for MDS: reset UA dl margin */

/* ---------- app shell in Blade (layouts/master, header, sidebar) ---------- */
/* Bootstrap/AdminLTE are still loaded for the page contents: keep the shell on MDS fonts and sizes. */
.arb-body { margin: 0; font-family: var(--mds-font-sans); color: var(--mds-text); background: var(--mds-bg); }
@media (min-width: 1024px) { .arb-app .mds-sidebar { position: sticky; top: 0; height: 100dvh; } }
.arb-app .mds-sidebar__brand { color: var(--mds-text); text-decoration: none; }
.arb-app .mds-sidebar__brand:hover { text-decoration: none; }
.arb-app .mds-nav-item svg { flex: none; }
.arb-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arb-nav-button { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.arb-nav-group > summary { list-style: none; cursor: pointer; }
.arb-nav-group > summary::-webkit-details-marker { display: none; }
.arb-nav-group__chevron { margin-left: auto; color: var(--mds-text-3); transition: transform var(--mds-duration-fast) var(--mds-ease-out); }
.arb-nav-group[open] .arb-nav-group__chevron { transform: rotate(180deg); }
.arb-nav-group { display: flex; flex-direction: column; gap: var(--mds-space-1); }
.arb-nav-sub { padding-left: calc(var(--mds-space-2) + 20px + var(--mds-space-3)); font-weight: var(--mds-weight-regular); }
.arb-scrim { position: fixed; inset: 0; background: var(--mds-overlay); z-index: calc(var(--mds-z-drawer) - 1); }
@media (min-width: 1024px) { .arb-scrim { display: none; } }
/* Above legacy AdminLTE content (.small-box-footer has z-index 10), below the mobile drawer. */
.arb-app .mds-topbar { z-index: var(--mds-z-dropdown); }
.arb-topsearch .mds-input { width: 100%; }
.arb-topsearch__close { display: none; }
@media (max-width: 767px) {
  .arb-topsearch.arb-topsearch--open { display: flex; position: absolute; left: var(--mds-space-2); right: var(--mds-space-2); top: var(--mds-space-2); z-index: var(--mds-z-dropdown); width: auto; }
  .arb-topsearch--open .mds-input { padding-right: calc(var(--mds-space-2) + 32px); }
  .arb-topsearch--open .arb-topsearch__close { display: inline-flex; position: absolute; right: var(--mds-space-1); }
}

/* Notifications: bell + panel (02-dashboard «bell») */
.arb-notif-wrap { position: relative; }
.arb-bell { position: relative; }
.arb-notif { position: absolute; top: calc(100% + var(--mds-space-2)); right: 0; width: 400px; max-height: min(560px, calc(100dvh - var(--mds-topbar-h) - var(--mds-space-6))); overflow: auto; box-shadow: var(--mds-shadow-3); border: 0; z-index: var(--mds-z-dropdown); }
.arb-notif .mds-card__header { position: sticky; top: 0; background: var(--mds-surface); z-index: 1; }
.arb-notif-list { list-style: none; margin: 0; padding: 0; }
.arb-notif-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--mds-space-3); align-items: start; padding: var(--mds-space-3) var(--mds-space-4); border-top: 1px solid var(--mds-divider); }
.arb-notif-list li:first-child { border-top: 0; }
.arb-notif-list li[data-unread="true"] { background: var(--mds-accent-soft); }
.arb-notif-list li > div { display: flex; flex-direction: column; gap: 2px; font-size: var(--mds-text-sm); min-width: 0; }
.arb-notif-list b { font-weight: var(--mds-weight-medium); color: var(--mds-text); }
.arb-notif-list span { color: var(--mds-text-2); overflow-wrap: anywhere; }
.arb-notif-list time { color: var(--mds-text-3); font-size: var(--mds-text-xs); }
.arb-notif__open { padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.arb-notif__del { opacity: 0; }
.arb-notif-list li:hover .arb-notif__del, .arb-notif__del:focus-visible { opacity: 1; }
@media (hover: none) { .arb-notif__del { opacity: 1; } }
.arb-notif__empty { padding: var(--mds-space-8) var(--mds-space-6); }
.arb-att__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--mds-radius-md); background: var(--mds-surface-2); color: var(--mds-text-2); flex: none; }
.arb-att__icon--danger { background: var(--mds-danger-soft); color: var(--mds-danger); }
.arb-att__icon--warning { background: var(--mds-warning-soft); color: var(--mds-warning); }
.arb-att__icon--info { background: var(--mds-info-soft); color: var(--mds-info); }
.arb-att__icon--success { background: var(--mds-success-soft); color: var(--mds-success); }
@media (max-width: 767px) {
  .arb-notif-wrap { position: static; }
  .arb-notif { position: fixed; top: calc(var(--mds-topbar-h) + var(--mds-space-1)); left: var(--mds-space-2); right: var(--mds-space-2); width: auto; }
  .arb-notif .mds-card__header { padding-inline: var(--mds-space-4); gap: var(--mds-space-2); }
}

/* User menu */
.arb-user-wrap { position: relative; }
.arb-user-menu { position: absolute; top: calc(100% + var(--mds-space-1)); right: 0; --mds-origin: top right; }
.arb-user-menu form { margin: 0; }
.arb-user__text b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pages not yet rebuilt on MDS keep their Bootstrap layout and the full width. */
.arb-page--legacy { max-width: none; }
