/* Dial2Hire — member left sidebar + page shell (layouts/app, partials/member-sidebar) */

.d2h-shell { display: flex; align-items: flex-start; gap: 1.5rem; max-width: 1640px; margin: 0 auto; padding: 1.25rem 1rem 0; }
.d2h-shell-main { flex: 1 1 auto; min-width: 0; }
.d2h-shell-main > .container:first-child,
.d2h-shell-main > section:first-child { margin-top: 0; }

/* Mobile "Menu" button */
.ms-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .95rem; border-radius: 999px; border: 1px solid var(--d2h-border); background: #fff; font-weight: 700; font-size: .85rem; color: var(--d2h-ink); box-shadow: var(--d2h-shadow-sm); }
.ms-toggle .bi { color: var(--d2h-blue); font-size: 1.1rem; }

/* Sidebar */
.ms-sidebar { --ms-w: 272px; }
.ms-panel { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; height: 100%; }

@media (min-width: 992px) {
    .ms-sidebar { width: var(--ms-w); flex: 0 0 var(--ms-w); position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin; }
    .ms-panel { background: #fff; border: 1px solid var(--d2h-border); border-radius: 1.25rem; box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .25), var(--d2h-shadow-sm); height: auto; }

    /* Scrollbar hidden until the sidebar is hovered (space stays reserved so nothing shifts). */
    .ms-sidebar { scrollbar-gutter: stable; scrollbar-color: transparent transparent; transition: scrollbar-color .2s; }
    .ms-sidebar:hover, .ms-sidebar:focus-within { scrollbar-color: rgba(100, 116, 139, .45) transparent; }
    .ms-sidebar::-webkit-scrollbar { width: 6px; }
    .ms-sidebar::-webkit-scrollbar-track { background: transparent; }
    .ms-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
    .ms-sidebar:hover::-webkit-scrollbar-thumb, .ms-sidebar:focus-within::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .45); }
    .ms-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .7); }
}
@media (max-width: 991.98px) {
    .ms-sidebar.offcanvas-lg { width: min(86vw, 320px); }
    .ms-panel { overflow-y: auto; background: #fff; }
}

.ms-head { display: flex; align-items: center; gap: .75rem; padding: .85rem; border-radius: 1rem; background: linear-gradient(135deg, var(--d2h-blue) 0%, #5b3df5 100%); color: #fff; box-shadow: 0 12px 24px -14px rgba(var(--d2h-blue-rgb), .8); }
.ms-head .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: .85; }
.ms-avatar { width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .85rem; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); font-weight: 800; letter-spacing: .02em; }
.ms-name { font-weight: 800; line-height: 1.2; }
.ms-phone { font-size: .75rem; opacity: .85; }

.ms-nav { display: flex; flex-direction: column; gap: .15rem; }
.ms-section { margin: .85rem .6rem .35rem; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.ms-link { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: .8rem; background: transparent; color: #334155; font-weight: 600; font-size: .92rem; text-align: left; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.ms-ico { width: 2rem; height: 2rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .65rem; background: #f1f5f9; color: #475569; font-size: 1rem; transition: inherit; }
.ms-ext { font-size: .7rem; color: #cbd5e1; }
.ms-link:hover { background: var(--d2h-blue-soft); color: var(--d2h-blue); transform: translateX(2px); }
.ms-link:hover .ms-ico { background: #fff; color: var(--d2h-blue); box-shadow: var(--d2h-shadow-sm); }
.ms-link:hover .ms-ext { color: var(--d2h-blue); }
.ms-link.active { background: linear-gradient(135deg, var(--d2h-blue) 0%, #4f46e5 100%); color: #fff; box-shadow: 0 10px 22px -12px rgba(var(--d2h-blue-rgb), .9); }
.ms-link.active .ms-ico { background: rgba(255, 255, 255, .2); color: #fff; }
.ms-link:focus-visible { outline: 2px solid var(--d2h-blue); outline-offset: 2px; }
.ms-logout { margin-top: .5rem; color: #dc2626; }
.ms-logout .ms-ico { background: #fef2f2; color: #dc2626; }
.ms-logout:hover { background: #fef2f2; color: #b91c1c; }
.ms-logout:hover .ms-ico { color: #b91c1c; }

.ms-wallet { padding: 1rem; border-radius: 1rem; background: linear-gradient(160deg, #f8fbff 0%, #eef3ff 100%); border: 1px solid #dfe7fb; }
.ms-wallet-title { font-weight: 800; color: var(--d2h-ink); }
.ms-wallet-bal { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; background: var(--d2h-green-soft); color: var(--d2h-green); font-weight: 800; font-size: 1.05rem; }
.ms-wallet-note { margin: .6rem 0 .8rem; font-size: .76rem; color: var(--d2h-muted); line-height: 1.45; }
.ms-wallet-btn { background: var(--d2h-blue); color: #fff; font-weight: 700; border-radius: .75rem; padding: .5rem .9rem; }
.ms-wallet-btn:hover { background: var(--d2h-blue-dark); color: #fff; }
