/* AbanRah V29: transport directory pages + page-flow sidebar + account menu.
 * Final layer after V28. All data/action links remain native elements.
 */
@media (min-width: 992px) {
  body.abanrah-app-body { --ar-v29-sidebar-width: 216px; --ar-v29-sidebar-slim: 54px; }
  body.sidebar-collapsed.abanrah-app-body { --ar-v29-sidebar-width: var(--ar-v29-sidebar-slim); }
  body.abanrah-app-body.ar-v27-dense {--ar-v29-sidebar-width:var(--ar-v26-sidebar-actual,158px);}
  body.abanrah-app-body:not(.ar-v27-dense) .abanrah-app-shell,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-app-shell {
    display:grid!important; direction:ltr!important; width:100%!important;max-width:100%!important;
    grid-template-columns:minmax(0,1fr) var(--ar-v29-sidebar-width)!important;
    align-items:start!important; position:relative!important;min-height:100vh!important;
  }
  html[dir="ltr"] body.abanrah-app-body:not(.ar-v27-dense) .abanrah-app-shell {grid-template-columns:var(--ar-v29-sidebar-width) minmax(0,1fr)!important;}
  body.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar,
  body.abanrah-app-body.ar-v27-dense .abanrah-sidebar {
    position:relative!important; inset:auto!important;top:auto!important;bottom:auto!important;
    grid-row:1!important;grid-column:2!important;direction:inherit!important;
    width:var(--ar-v29-sidebar-width, var(--ar-v26-sidebar-actual,216px))!important;
    min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    overflow:visible!important;transform:none!important;transition: none!important;
    align-self:start!important;margin:0!important;box-shadow:none!important;
  }
  html[dir="ltr"] body.abanrah-app-body .abanrah-sidebar {grid-column:1!important;}
  body.abanrah-app-body:not(.ar-v27-dense) .abanrah-workspace,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-workspace {
    grid-column:1!important;grid-row:1!important;direction:inherit!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding:0!important;position:relative!important;
    display:flex!important;flex-direction:column!important;min-height:100vh!important;
  }
  html[dir="ltr"] body.abanrah-app-body:not(.ar-v27-dense) .abanrah-workspace {grid-column:2!important;}
  body.abanrah-app-body .abanrah-sidebar-nav,
  body.abanrah-app-body.ar-v27-dense .abanrah-sidebar-nav {
    flex:0 0 auto!important; min-height:0!important;height:auto!important;max-height:none!important;
    overflow:visible!important;overscroll-behavior:auto!important;
  }
  body.abanrah-app-body .abanrah-sidebar-foot {flex:0 0 auto!important;}
  /* The collapsed rail does not reserve an invisible 216px column. */
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-brand-copy,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-user-copy,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-user-settings,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-nav-label,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-nav-link span,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-nav-chevron,
  body.sidebar-collapsed.abanrah-app-body:not(.ar-v27-dense) .abanrah-sidebar .abanrah-submenu {display:none!important;}
  body.abanrah-app-body .abanrah-sidebar-head {min-height:53px;padding:7px!important;}
  body.abanrah-app-body .abanrah-sidebar .abanrah-user-card {display:none!important;}
  body.abanrah-app-body .abanrah-nav-link {white-space:normal!important;min-height:35px;padding-block:6px!important;}
  body.abanrah-app-body:not(.ar-v27-dense) .abanrah-content {max-width:100%!important;min-width:0!important;padding:10px clamp(8px,1vw,18px)!important;}
  body.abanrah-app-body .abanrah-topbar {position:relative!important;z-index:30!important;}
}
/* Single mobile drawer scroll; no independent scrolling for nested nav on phones either. */
@media (max-width:991.98px) {
  body.abanrah-app-body .abanrah-sidebar {
    position:fixed!important;height:100dvh!important;max-height:100dvh!important;
    overflow-y:auto!important;overflow-x:hidden!important; overscroll-behavior:contain!important;
    z-index:1040!important;
  }
  body.abanrah-app-body .abanrah-sidebar-nav {height:auto!important;max-height:none!important;flex:0 0 auto!important;overflow:visible!important;}
}
/* Account dropdown, on the username chip in the global topbar. */
body.abanrah-app-body .abanrah-account-menu {position:relative;flex:0 0 auto;z-index:1100;}
body.abanrah-app-body .abanrah-account-trigger {cursor:pointer;display:flex;gap:7px;align-items:center;max-width:230px;}
body.abanrah-app-body .abanrah-account-trigger .abanrah-profile-copy {display:flex!important;flex-direction:column;min-width:0;text-align:start;}
body.abanrah-app-body .abanrah-account-trigger .abanrah-profile-copy strong {white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis;font-size:12px;}
body.abanrah-app-body .abanrah-account-trigger .abanrah-profile-copy small {font-size:10px;}
body.abanrah-app-body .abanrah-account-trigger > i {font-size:10px;color:#64778f;}
body.abanrah-app-body .abanrah-account-trigger[aria-expanded="true"] {border-color:#9cbad7;background:#f0f6fc;}
body.abanrah-app-body .abanrah-account-dropdown {
  position:absolute;inset-inline-end:0;top:calc(100% + 8px);
  width:240px;max-width:min(85vw,270px);z-index:1120;
  background:#fff;color:#213951;border:1px solid #d4e1ee;border-radius:12px;
  box-shadow:0 15px 40px rgba(12,34,66,.18);padding:6px;
  text-align:start;direction:inherit;
}
body.abanrah-app-body .abanrah-account-dropdown[hidden] {display:none!important;}
body.abanrah-app-body .abanrah-account-dropdown-heading {padding:10px 11px;border-bottom:1px solid #e4ecf4;margin-bottom:4px;display:flex;flex-direction:column;gap:2px;min-width:0;}
body.abanrah-app-body .abanrah-account-dropdown-heading strong {font-size:13px;overflow-wrap:anywhere;}
body.abanrah-app-body .abanrah-account-dropdown-heading small {font-size:11px;color:#63768c;direction:ltr;unicode-bidi:isolate;text-align:start;}
body.abanrah-app-body .abanrah-account-dropdown a {min-height:38px;padding:8px 11px;border-radius:7px;display:flex;align-items:center;gap:11px;font-size:12px;font-weight:600;color:#294666;}
body.abanrah-app-body .abanrah-account-dropdown a:hover,body.abanrah-app-body .abanrah-account-dropdown a:focus-visible {background:#eef4fb;color:#16365f;}
body.abanrah-app-body .abanrah-account-dropdown-separator {height:1px;background:#e4ecf4;margin:5px 0;}
body.abanrah-app-body .abanrah-account-dropdown a.abanrah-account-logout {color:#b42c38;}
body.abanrah-app-body .abanrah-account-dropdown a.abanrah-account-logout:hover {background:#fff0f1;}
body.abanrah-app-body .abanrah-account-dropdown a > i {flex:0 0 19px;text-align:center;}
@media(max-width:550px) {body.abanrah-app-body .abanrah-account-trigger .abanrah-profile-copy small {display:none;}body.abanrah-app-body .abanrah-account-trigger .abanrah-profile-copy strong {max-width:62px;}body.abanrah-app-body .abanrah-account-trigger {gap:4px;padding:4px!important;}}
/* Directory UI for Trucks and Drivers: compact, aligned, no vertical dead space. */
body.abanrah-app-body .ar-v29-directory-page {width:100%;max-width:100%;min-width:0;margin:0 auto;padding:0;color:#20364e;}
body.abanrah-app-body .ar-v29-directory-head {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;margin:0 0 7px;padding:9px 13px;background:#203b65;border-radius:10px;color:#fff;min-height:48px;}
body.abanrah-app-body .ar-v29-directory-head h2 {color:#fff!important;font-size:clamp(15px,1.1vw,18px)!important;line-height:1.45!important;margin:0!important;flex:1 1 230px;font-weight:750;}
body.abanrah-app-body .ar-v29-directory-actions {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
body.abanrah-app-body .ar-v29-directory-actions .ar-v29-count {font-size:12px;color:#f3f8ff;background:#ffffff17;border:1px solid #ffffff23;border-radius:8px;padding:5px 8px;white-space:nowrap;}
body.abanrah-app-body .ar-v29-directory-actions .btn {font-size:12px;padding:5px 11px;border-radius:7px;}
body.abanrah-app-body .ar-v29-search-panel {background:#fff;border:1px solid #dce6ef;border-radius:10px;margin:0 auto 8px;padding:9px 10px;box-shadow:0 3px 9px #13365e09;}
body.abanrah-app-body .ar-v29-filter-form, body.abanrah-app-body .abanrah-content form.ar-v29-filter-form.abanrah-modern-form {display:flex!important;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px!important;max-width:850px;margin:0 auto!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;}
body.abanrah-app-body .ar-v29-filter-fields {min-width:0;flex:1 1 270px;max-width:650px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;}
body.abanrah-app-body .ar-v29-filter-fields :is(p,div) {margin:0!important;min-width:0;}
body.abanrah-app-body .ar-v29-filter-fields label {font-size:12px;line-height:1.5;margin:0 6px;}
body.abanrah-app-body .ar-v29-filter-fields :is(input,select,.form-control) {width:min(100%,360px)!important;min-width:0!important;max-width:360px!important;height:37px!important;margin:0!important;border:1px solid #bed1e0!important;border-radius:8px!important;}
body.abanrah-app-body .ar-v29-filter-form > .btn,body.abanrah-app-body .ar-v29-filter-form .abanrah-form-actions .btn {min-height:36px!important;border-radius:7px!important;font-size:12px!important;padding:6px 17px!important;margin:0!important;}
body.abanrah-app-body .ar-v29-filter-form .abanrah-form-actions {margin:0!important;display:flex;}
body.abanrah-app-body .ar-v29-directory-scroll {width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;background:#fff;border:1px solid #dbe5ef;border-radius:9px;margin-bottom:8px;}
body.abanrah-app-body .ar-v29-directory-table.ar-v28-managed-table {width:100%!important;min-width:var(--ar-v29-table-min,1110px)!important;max-width:none!important;table-layout:fixed!important;direction:inherit!important;}
body.abanrah-app-body .ar-v29-directory-table :is(th,td) {font-size:12px!important;padding:7px 6px!important;vertical-align:middle!important;line-height:1.5!important;min-width:0!important;white-space:normal!important;overflow-wrap:break-word!important;text-align:center!important;}
body.abanrah-app-body .ar-v29-directory-table thead th {background:#e9f1fa!important;color:#203a60!important;font-size:11.5px!important;font-weight:750!important;}
body.abanrah-app-body .ar-v29-directory-table .ar-v29-index {font-weight:800;direction:ltr;unicode-bidi:isolate;white-space:nowrap!important;}
body.abanrah-app-body .ar-v29-directory-table .ar-v29-id-text {unicode-bidi:isolate;direction:ltr;display:block;overflow-wrap:anywhere;word-break:break-word;font-variant-numeric:tabular-nums;font-weight:650;}
body.abanrah-app-body .ar-v29-directory-table .ar-v29-name-text {unicode-bidi:plaintext;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere;text-align:start;line-height:1.55;}
body.abanrah-app-body .ar-v29-directory-table .btn {min-height:27px;padding:4px 7px;font-size:11px!important;line-height:1.3;white-space:normal;max-width:100%;margin-block:2px;}
body.abanrah-app-body .ar-v29-driver-photo {object-fit:cover;border-radius:9px;width:42px;height:42px;display:block;margin:0 auto;}
body.abanrah-app-body .ar-v29-driver-table {--ar-v29-table-min:1170px;}
body.abanrah-app-body .ar-v29-truck-table {--ar-v29-table-min:1080px;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(1),body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(1) {width:45px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(2) {width:135px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(3) {width:95px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(4) {width:125px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(5),body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(6),body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(7) {width:92px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(8) {width:128px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(9) {width:72px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(10) {width:109px!important;}
body.abanrah-app-body .ar-v29-truck-table tr > :nth-child(11) {width:95px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(2) {width:65px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(3) {width:175px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(4) {width:127px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(5) {width:108px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(6) {width:95px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(7) {width:112px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(8) {width:111px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(9) {width:107px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(10) {width:79px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(11) {width:65px!important;}
body.abanrah-app-body .ar-v29-driver-table tr > :nth-child(12) {width:82px!important;}
body.abanrah-app-body .ar-v29-pagination {display:flex;justify-content:center;margin:11px 0;}
body.abanrah-app-body .ar-v29-pagination .pagination {flex-wrap:wrap;gap:3px;}
@media(max-width:767.98px){body.abanrah-app-body .ar-v29-directory-head{padding:8px 10px;}body.abanrah-app-body .ar-v29-directory-actions{width:100%;justify-content:space-between;}body.abanrah-app-body .ar-v29-filter-form {flex-direction:column!important;align-items:stretch!important;}body.abanrah-app-body .ar-v29-filter-fields {width:100%;flex-basis:auto;}body.abanrah-app-body .ar-v29-directory-scroll {overflow-x:auto;}}
/* Shell uses physical LTR grid placement; restore reading direction inside both columns. */
html[dir="rtl"] body.abanrah-app-body .abanrah-sidebar,
html[dir="rtl"] body.abanrah-app-body .abanrah-workspace,
html[dir="rtl"] body.abanrah-app-body.ar-v27-dense .abanrah-sidebar,
html[dir="rtl"] body.abanrah-app-body.ar-v27-dense .abanrah-workspace {direction:rtl!important;}
html[dir="ltr"] body.abanrah-app-body .abanrah-sidebar,
html[dir="ltr"] body.abanrah-app-body .abanrah-workspace,
html[dir="ltr"] body.abanrah-app-body.ar-v27-dense .abanrah-sidebar,
html[dir="ltr"] body.abanrah-app-body.ar-v27-dense .abanrah-workspace {direction:ltr!important;}
