/* shell.css — section chrome (shell.js). <html> and #app carry data-section (customer|driver|vendor|admin|apps|dev),
   data-kind (mobile|desktop|wide) and data-layout (tabs|page|bare|admin|admin-bare). Breakpoints: column 430px, dashboard 1024px. */
.shell { min-height: 100vh; min-height: 100dvh; }
.shell__col { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
#main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
#main > .screen { flex: 1 1 auto; }
.side[hidden], .tabbar[hidden] { display: none !important; }

/* ---------------- mobile sections: centred column ---------------- */
html[data-kind="mobile"] .shell__col { width: 100%; max-width: var(--column-max); margin: 0 auto; }
@media (min-width: 431px) {
  html[data-kind="mobile"], html[data-kind="mobile"] body { background: var(--page-outside); }
  html[data-kind="mobile"] .shell__col { box-shadow: var(--shadow-column); }
}
html[data-layout="tabs"] #main { padding-bottom: var(--tabbar-h); }
html[data-layout="tabs"] { --toast-bottom: 115px; }
.shell__top:empty { display: none; }
.shell__hdr { position: sticky; top: 0; z-index: 20; }
/* utility for screens: fixed bar constrained to the column (bottom CTAs, floating buttons) */
.col-fixed { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--column-max); z-index: 15; }
.col-bottom { bottom: 0; padding: 15px var(--gutter) 25px; background: var(--bg); }
html[data-layout="tabs"] .col-bottom { bottom: var(--tabbar-h); }

/* bottom tab bar (components §18/29/31): 375×99, pad 30/29/20/29 */
.tabbar { position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--column-max);
  height: var(--tabbar-h); padding: 0 29px; display: flex; justify-content: space-between; align-items: flex-start; background: var(--bg); box-shadow: var(--shadow-tabbar); }
[data-theme="dark"] .tabbar { border-top: 1px solid var(--stroke); }
.tabbar__item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 30px; min-width: 44px; height: 100%;
  font: 400 14px/1.5 var(--font-sans); color: var(--description-text); white-space: nowrap; }
.tabbar__item.is-active { color: var(--primary); font-weight: 500; }
.tabbar__item:focus-visible { outline: none; }
.tabbar__item:focus-visible span { box-shadow: 0 2px 0 var(--primary); }
html[data-section="driver"] .tabbar__item { gap: 6px; padding-top: 26px; }

/* ---------------- admin (vendor dashboard) ---------------- */
html[data-kind="desktop"] .shell__col { padding: 0 20px 40px 0; }
.side { display: none; flex-direction: column; background: var(--sidebar-bg); color: var(--sidebar-text); padding: 20px; }
.side__logo { display: flex; align-items: center; gap: 10px; height: 30px; flex: none; }
.side__logo .brand-ic { flex: none; }
.side__brand { font: 700 18px/1 var(--font-sans); color: #FFFFFF; white-space: nowrap; flex: 1 1 auto; }
.side__collapse { color: #FFFFFF; margin: 0 -8px 0 0; }
.side__collapse .ic { --ic: 20px; }
.side__nav { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; }
.side__item { display: flex; align-items: center; gap: 12px; width: 100%; height: 45px; padding: 12px 15px; border-radius: var(--radius-pill);
  font: 400 14px/1.5 var(--font-sans); color: var(--sidebar-fg); text-align: left; white-space: nowrap; }
.side__item .ic { --ic: 20px; color: var(--sidebar-icon); }
.side__item:hover { background: var(--sidebar-hover); }
.side__item.is-active { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); font-weight: 500; }
.side__item.is-active .ic { color: var(--sidebar-active-fg); }
.side__item:focus-visible { outline: none; box-shadow: var(--ring-primary); }
.side__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side__badge { margin-left: auto; }
.side__caret { --ic: 18px !important; transition: transform .2s; }
.side__item[aria-expanded="true"] .side__caret { transform: rotate(180deg); }
.side__sub { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 10px 47px; }
.side__sub[hidden] { display: none; }
.side__subitem { font: 400 12px/1.42 var(--font-sans); color: var(--description-text); }
.side__subitem.is-current, .side__subitem:hover { color: #FFFFFF; }
.side__extra { margin-top: auto; padding-top: 30px; display: flex; align-items: center; gap: 20px; }
.side__msg { color: #FFFFFF; }
.side--drawer { display: flex; min-height: 100%; }
.drawer { background: var(--sidebar-bg); }

.adm-top, .adm-mtop { display: none; }
.adm-top__search { width: 345px; max-width: 40%; }
.adm-top__right { display: flex; align-items: center; gap: 30px; }
.adm-top__icons { display: flex; align-items: center; gap: 20px; }
.adm-top__div { width: 1px; height: 40px; background: var(--stroke); }
.adm-icon { position: relative; display: grid; place-items: center; width: 26px; height: 26px; color: var(--heading-hext); }
.adm-icon__badge { position: absolute; top: -2px; right: -2px; }
.adm-avatar { display: block; width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex: none; background: var(--card-background); }
.adm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm-avatar--sm { width: 36px; height: 36px; }
.adm-msearch { margin: 16px 16px 0; height: 44px; padding: 10px 20px; }

@media (min-width: 1024px) {
  html[data-layout="admin"] .side { display: flex; position: fixed; z-index: 25; inset: 0 auto 0 0; width: var(--sidebar-w); overflow-y: auto; scrollbar-width: none; }
  html[data-layout="admin"] .shell__col { margin-left: calc(var(--sidebar-w) + 30px); }
  html[data-layout="admin"][data-rail] .side { width: var(--sidebar-rail-w); padding: 20px 14px; }
  html[data-layout="admin"][data-rail] .shell__col { margin-left: calc(var(--sidebar-rail-w) + 30px); }
  html[data-rail] .side .side__label, html[data-rail] .side .side__brand, html[data-rail] .side .side__caret, html[data-rail] .side .side__sub, html[data-rail] .side .side__badge { display: none; }
  html[data-rail] .side .side__item { width: 44px; height: 44px; padding: 12px; justify-content: center; }
  html[data-rail] .side .side__logo { flex-direction: column; height: auto; gap: 12px; }
  html[data-rail] .side .side__collapse { margin: 0; }
  .adm-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; height: 65px; padding-bottom: 15px; border-bottom: 1px solid var(--stroke); }
  html[data-layout="admin"] #main { padding-top: 20px; }
  .adm-msearch { display: none; }
}
@media (max-width: 1023.98px) {
  html[data-kind="desktop"] .shell__col { padding: 0 0 32px; }
  .adm-mtop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; height: var(--topbar-m-h); padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--stroke); }
  .adm-mtop .icon-btn { margin: 0 -8px 0 -8px; }
  .adm-mtop__logo { display: flex; }
  html[data-layout="admin"] #main { padding: 16px 16px 0; }
}

/* ---------------- overlays per section ---------------- */
/* mobile sections: modals become bottom sheets of column width */
html[data-kind="mobile"] .ov--modal, html[data-kind="wide"] .ov--modal { align-items: flex-end; justify-content: center; }
html[data-kind="mobile"] .modal { width: min(100%, var(--column-max)); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 30px var(--gutter); max-height: 85vh; animation-name: rise; }
/* dashboard: ≥1024 sheets/modals are centred 480px dialogs; <1024 they are full-width bottom sheets (r20, ≤90vh) */
html[data-kind="desktop"] .ov--modal { align-items: center; justify-content: center; padding: 20px; }
@media (min-width: 1024px) {
  html[data-kind="desktop"] .ov--sheet { align-items: center; padding: 20px; }
  html[data-kind="desktop"] .sheet { width: 480px; border-radius: 20px; padding: 25px; animation-name: pop; }
  html[data-kind="desktop"] .sheet__handle { display: none; }
}
@media (max-width: 1023.98px) {
  html[data-kind="desktop"] .ov--modal { align-items: flex-end; padding: 0; }
  html[data-kind="desktop"] .modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 90vh; animation-name: rise; }
  html[data-kind="desktop"] .sheet { width: 100%; border-radius: 20px 20px 0 0; max-height: 90vh; }
}

/* ---------------- dev (gallery / demos) ---------------- */
html[data-kind="wide"] .shell__col { width: 100%; }
