/* JanCares mobile navigation flow: a single header menu, full-width workspace.
   Mirrors Allen T's off-canvas navigation and scroll-direction header. */
@media (max-width:920px){
 html,body{max-width:100%;overflow-x:clip}
 body.admin-authenticated .shell,body.member-authenticated .shell{
  display:block!important;grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  min-height:100dvh!important;overflow:visible!important
 }
 body.admin-authenticated .main,body.member-authenticated .main{
  display:block!important;grid-column:auto!important;grid-row:auto!important;
  margin:0!important;min-width:0!important;width:100%!important;max-width:none!important;
  padding:0 13px calc(35px + env(safe-area-inset-bottom))!important;
  overflow-x:clip!important;overflow-y:visible!important;box-sizing:border-box!important;
  background:#f7f9fc!important
 }
 body.admin-authenticated .side,body.member-authenticated .side,
 body.admin-authenticated .side.jc-expanded,body.member-authenticated .side.jc-expanded{
  display:block!important;position:fixed!important;inset:0 auto 0 0!important;
  grid-column:auto!important;grid-row:auto!important;
  width:min(308px,86vw)!important;height:100dvh!important;max-height:100dvh!important;
  padding:21px 15px calc(22px + env(safe-area-inset-bottom))!important;
  margin:0!important;border:0!important;border-right:1px solid #dce7f1!important;
  border-radius:0!important;background:#fff!important;color:#153957!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  transform:translate3d(-105%,0,0)!important;visibility:hidden!important;pointer-events:none!important;
  z-index:1402!important;box-shadow:none!important;
  transition:transform 220ms cubic-bezier(.2,.8,.2,1),visibility 220ms!important;
  overscroll-behavior:contain!important;box-sizing:border-box!important
 }
 body.admin-authenticated .side.jc-expanded,body.member-authenticated .side.jc-expanded{
  transform:translate3d(0,0,0)!important;visibility:visible!important;pointer-events:auto!important;
  box-shadow:18px 0 48px #092c4d35!important
 }
 body.admin-authenticated .side .brand,body.member-authenticated .side .brand,
 body.admin-authenticated .side.jc-expanded .brand,body.member-authenticated .side.jc-expanded .brand{
  display:block!important;color:#174d7b!important;font-size:22px!important;
  margin:2px 44px 20px 6px!important;padding:0!important
 }
 body.admin-authenticated .side .nav,body.member-authenticated .side .nav,
 body.admin-authenticated .side.jc-expanded .nav,body.member-authenticated .side.jc-expanded .nav{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:5px!important;margin:11px 0 0!important;padding:0!important;border:0!important;
  overflow:visible!important
 }
 body.admin-authenticated .side .nav button,body.member-authenticated .side .nav button,
 body.admin-authenticated .side.jc-expanded .nav button,body.member-authenticated .side.jc-expanded .nav button{
  display:flex!important;flex-direction:row!important;justify-content:flex-start!important;
  align-items:center!important;width:100%!important;min-height:47px!important;
  padding:10px 12px!important;gap:12px!important;
  background:transparent!important;color:#536b82!important;
  border:1px solid transparent!important;border-left:3px solid transparent!important;
  border-radius:11px!important;white-space:normal!important;box-shadow:none!important
 }
 body.admin-authenticated .side .nav button.active,body.member-authenticated .side .nav button.active{
  background:#eaf4fe!important;color:#125c9a!important;
  border-color:#cce6fa!important;border-left-color:#1688c9!important
 }
 body.admin-authenticated .side .nav .jc-nav-icon,body.member-authenticated .side .nav .jc-nav-icon{
  display:inline-block!important;flex:none!important;font-size:20px!important;
  min-width:24px!important;line-height:1.1!important;text-align:center!important
 }
 body.admin-authenticated .side .nav .jc-nav-label,body.member-authenticated .side .nav .jc-nav-label{
  display:block!important;font-size:13px!important;font-weight:760!important;
  line-height:1.2!important;text-align:left!important;overflow-wrap:normal!important
 }
 body.admin-authenticated .side .jc-drawer-close,body.member-authenticated .side .jc-drawer-close{
  display:flex!important;position:absolute!important;top:13px!important;right:13px!important;
  align-items:center!important;justify-content:center!important;width:43px!important;height:43px!important;
  min-height:43px!important;border-radius:12px!important;background:#eef5fb!important;color:#274861!important;
  font-size:26px!important
 }
 body.admin-authenticated .side .jc-drawer-footer,body.member-authenticated .side .jc-drawer-footer{
  display:grid!important;gap:3px!important;margin-top:19px!important
 }
 .jc-nav-backdrop:not([hidden]){
  display:block!important;position:fixed!important;inset:0!important;
  z-index:1401!important;background:rgba(7,20,38,.47)!important;backdrop-filter:blur(2px)!important;
  border:0!important;padding:0!important
 }
 body.jc-drawer-open{overflow:hidden!important;touch-action:pan-y}
 .jc-nav-trigger{
  display:inline-flex!important;flex:none!important;order:-1!important;
  align-items:center!important;justify-content:center!important;
  width:43px!important;height:43px!important;min-width:43px!important;min-height:43px!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:12px!important;
  background:#eff5fa!important;color:#235675!important;font-size:23px!important;
  box-shadow:none!important;cursor:pointer!important
 }
 body.admin-authenticated .top,body.member-authenticated .top{
  display:flex!important;position:sticky!important;top:0!important;z-index:1100!important;
  align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;
  gap:9px!important;min-height:66px!important;
  margin:0 -13px 14px!important;padding:9px 13px!important;
  border:0!important;border-bottom:1px solid #e3ebf2!important;
  border-radius:0!important;background:#fff!important;box-shadow:0 2px 12px #153e5d08!important;
  transform:translate3d(0,0,0);opacity:1;
  transition:transform 220ms ease,opacity 180ms ease!important;will-change:transform
 }
 body.admin-authenticated .top.jc-header-hidden,body.member-authenticated .top.jc-header-hidden{
  transform:translateY(calc(-100% - 8px))!important;opacity:0!important;pointer-events:none!important
 }
 body.admin-authenticated .top>div:first-of-type,body.member-authenticated .top>div:first-of-type{
  flex:1 1 auto!important;min-width:0!important;max-width:100%!important;overflow:hidden!important
 }
 body.admin-authenticated .top .eyebrow,body.member-authenticated .top .eyebrow{
  font-size:10px!important;font-weight:720!important;letter-spacing:.01em!important;
  color:#70859b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
 }
 body.admin-authenticated .top h1,body.member-authenticated .top h1{
  margin:2px 0 0!important;font-size:clamp(18px,4.8vw,24px)!important;
  line-height:1.18!important;letter-spacing:-.03em!important;font-weight:820!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
 }
 body.admin-authenticated .top .jc-theme-switch,body.member-authenticated .top .jc-theme-switch,
 body.admin-authenticated .top .avatar,body.member-authenticated .top .avatar{
  flex:none!important;width:42px!important;min-width:42px!important;height:42px!important
 }
 body.admin-authenticated .workspace-view,body.member-authenticated .jc-member-view{
  min-width:0!important;max-width:100%!important;overflow-wrap:break-word
 }
 body.admin-authenticated .hero,body.member-authenticated .hero{
  padding:15px!important;border-radius:16px!important;margin-bottom:12px!important
 }
 body.admin-authenticated .panel,body.member-authenticated .panel,
 body.admin-authenticated .jc-book,body.member-authenticated .jc-2026-member-balance{
  max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  border-radius:16px!important
 }
 body.admin-authenticated .stats,body.member-authenticated .stats{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important
 }
 body.admin-authenticated .stat:last-child,body.member-authenticated .stat:last-child{
  grid-column:auto!important
 }
 body.admin-authenticated .main .layout,body.member-authenticated .main .layout{
  grid-template-columns:minmax(0,1fr)!important;gap:12px!important
 }
}
@media (max-width:600px){
 body.admin-authenticated .main,body.member-authenticated .main{
  padding-inline:12px!important
 }
 body.admin-authenticated .top,body.member-authenticated .top{
  margin-inline:-12px!important;padding-inline:12px!important
 }
 body.admin-authenticated .panel,body.member-authenticated .panel{
  padding:13px!important;margin-bottom:12px!important
 }
 body.admin-authenticated .jc-book,body.member-authenticated .jc-2026-member-balance{
  padding:15px!important;margin:0 0 13px!important
 }
 body.admin-authenticated .jc-book-head,body.member-authenticated .jc-balance-head{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;gap:11px!important
 }
 body.admin-authenticated .jc-book h2,body.member-authenticated .jc-2026-member-balance h2{
  font-size:21px!important;line-height:1.18!important;margin:4px 0 5px!important
 }
 body.admin-authenticated .jc-kicker,body.member-authenticated .jc-kicker{
  font-size:10px!important;letter-spacing:.09em!important
 }
 body.admin-authenticated .jc-hint,body.member-authenticated .jc-hint{
  font-size:12px!important;line-height:1.35!important;margin:3px 0!important
 }
 body.admin-authenticated .jc-book-date{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;
  align-items:center!important
 }
 body.admin-authenticated .jc-book-date label{grid-column:1/-1;font-size:11px!important;line-height:1.2!important}
 body.admin-authenticated .jc-book-date input{
  grid-column:1!important;min-width:0!important;width:100%!important;min-height:43px!important;
  padding:9px 10px!important;font-size:15px!important
 }
 body.admin-authenticated .jc-book-date button{
  grid-column:2!important;min-height:43px!important;padding:8px 12px!important;font-size:13px!important
 }
 body.admin-authenticated .jc-book-grid,body.member-authenticated .jc-balance-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:1px!important;margin:13px 0!important
 }
 body.admin-authenticated .jc-book-cell,body.member-authenticated .jc-balance-cell{
  padding:12px 10px!important;min-width:0!important
 }
 body.admin-authenticated .jc-book-cell:last-child,body.member-authenticated .jc-balance-cell:last-child{
  grid-column:1/-1
 }
 body.admin-authenticated .jc-book-cell small,body.member-authenticated .jc-balance-cell small{
  font-size:11px!important;line-height:1.25!important
 }
 body.admin-authenticated .jc-book-cell strong,body.member-authenticated .jc-balance-cell strong{
  font-size:22px!important;margin-top:5px!important;line-height:1.15!important
 }
 body.admin-authenticated .jc-book-cell span,body.member-authenticated .jc-balance-cell span{
  font-size:10px!important;line-height:1.3!important
 }
 body.admin-authenticated .jc-book-detail{grid-template-columns:minmax(0,1fr)!important;gap:9px!important;margin-top:12px!important}
 body.admin-authenticated .stats,body.member-authenticated .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.admin-authenticated .stat,body.member-authenticated .stat{padding:12px!important}
 body.admin-authenticated .stat strong,body.member-authenticated .stat strong{font-size:21px!important}
 body.admin-authenticated .scheme-switch,body.member-authenticated .scheme-switch{
  display:flex!important;flex-wrap:wrap!important;gap:7px!important
 }
 body.admin-authenticated .main .jc-application-toolbar,body.member-authenticated .main .jc-control-line{
  gap:9px!important
 }
}
html[data-jc-theme=dark] body.admin-authenticated .main,
html[data-jc-theme=dark] body.member-authenticated .main{background:#0b111b!important}
html[data-jc-theme=dark] body.admin-authenticated .top,
html[data-jc-theme=dark] body.member-authenticated .top{background:#131e2b!important;border-color:#304258!important}
html[data-jc-theme=dark] body.admin-authenticated .side,
html[data-jc-theme=dark] body.member-authenticated .side{background:#172538!important;color:#e9f3ff!important;border-color:#2f4760!important}
html[data-jc-theme=dark] body.admin-authenticated .side .nav button.active,
html[data-jc-theme=dark] body.member-authenticated .side .nav button.active{
 background:#244463!important;color:#f2f8ff!important;border-color:#426b90!important
}
html[data-jc-theme=dark] .jc-nav-trigger{background:#1c3148!important;color:#e7f4ff!important}
@media(prefers-reduced-motion:reduce){
 body.admin-authenticated .top,body.member-authenticated .top,
 body.admin-authenticated .side,body.member-authenticated .side{transition:none!important}
}

/* JanCares drawer refinement: blue branded head, balanced width and pinned identity. */
@media(max-width:920px){
 body.admin-authenticated .side,body.member-authenticated .side,
 body.admin-authenticated .side.jc-expanded,body.member-authenticated .side.jc-expanded{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  width:min(290px,78vw)!important;max-width:78vw!important;
  padding:0 14px calc(14px + env(safe-area-inset-bottom))!important;
  background:#fff!important;border-right:1px solid #d3e4f3!important
 }
 body.admin-authenticated .side .brand,body.member-authenticated .side .brand,
 body.admin-authenticated .side.jc-expanded .brand,body.member-authenticated .side.jc-expanded .brand{
  display:block!important;position:relative!important;isolation:isolate!important;
  flex:none!important;box-sizing:border-box!important;overflow:hidden!important;
  width:calc(100% + 28px)!important;min-height:139px!important;
  padding:33px 61px 28px 21px!important;margin:0 -14px 12px!important;
  border-radius:0 0 20px 0!important;
  color:#fff!important;background:linear-gradient(130deg,#155caa 0%,#087fb6 64%,#12527e 100%)!important;
  font-size:23px!important;line-height:1.25!important;letter-spacing:-.04em!important;
  box-shadow:0 8px 19px #1c6a9b1b!important
 }
 body.admin-authenticated .side .brand::before,body.member-authenticated .side .brand::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  width:190px;height:190px;right:-95px;top:-90px;
  border:28px solid rgba(255,255,255,.16);border-radius:50%
 }
 body.admin-authenticated .side .brand::after,body.member-authenticated .side .brand::after{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  width:180px;height:75px;bottom:-46px;left:-43px;
  border-radius:50%;transform:rotate(-14deg);background:rgba(255,255,255,.12)
 }
 body.admin-authenticated .side .brand small,body.member-authenticated .side .brand small{
  display:block!important;margin-top:8px!important;color:#e1f2ff!important;
  font-size:10px!important;letter-spacing:.13em!important;font-weight:750!important
 }
 body.admin-authenticated .side .jc-drawer-close,body.member-authenticated .side .jc-drawer-close{
  z-index:2!important;top:20px!important;right:12px!important;
  width:40px!important;height:40px!important;min-height:40px!important;
  border:1px solid rgba(255,255,255,.38)!important;border-radius:12px!important;
  color:#fff!important;background:rgba(255,255,255,.16)!important;
  backdrop-filter:blur(7px)
 }
 body.admin-authenticated .side .nav,body.member-authenticated .side .nav{
  flex:none!important;gap:3px!important;margin:7px 0 15px!important
 }
 body.admin-authenticated .side .nav button,body.member-authenticated .side .nav button{
  min-height:45px!important;padding:9px 11px!important;gap:10px!important;
  border-radius:10px!important;font-size:12px!important
 }
 body.admin-authenticated .side .nav .jc-nav-icon,body.member-authenticated .side .nav .jc-nav-icon{
  min-width:23px!important;font-size:19px!important
 }
 body.admin-authenticated .side .nav .jc-nav-label,body.member-authenticated .side .nav .jc-nav-label{
  font-size:12px!important;font-weight:730!important
 }
 body.admin-authenticated .side .jc-drawer-footer,body.member-authenticated .side .jc-drawer-footer{
  display:grid!important;flex:none!important;grid-template-columns:40px minmax(0,1fr)!important;
  align-items:center!important;gap:9px!important;
  width:100%!important;margin:auto 0 0!important;padding:13px 11px 10px!important;
  box-sizing:border-box!important;
  background:linear-gradient(140deg,#eef7ff,#f8fbff)!important;
  border:1px solid #d7e9f7!important;border-radius:14px!important;
  color:#183c59!important;box-shadow:0 3px 13px #164b7109!important
 }
 .jc-account-badge{
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:13px;
  background:linear-gradient(150deg,#1b68bc,#0d88c1);color:white;
  font-size:17px;font-weight:800;box-shadow:0 4px 12px #1273aa29
 }
 .jc-account-meta{display:grid;gap:4px;min-width:0}
 body.admin-authenticated .jc-drawer-footer .jc-account-meta strong,
 body.member-authenticated .jc-drawer-footer .jc-account-meta strong{
  display:block;font-size:12px!important;color:#173c61!important;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
 }
 .jc-account-meta>span{
  display:block!important;color:#647e96!important;font-size:10px!important;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
 }
 .jc-signout-button{
  grid-column:1/-1;display:flex;justify-content:center;align-items:center;
  width:100%;min-height:40px;margin-top:5px;padding:8px 10px;
  border:1px solid #c9e0f2;border-radius:10px;background:#fff;
  color:#1b5a8d;font-size:12px;font-weight:760;cursor:pointer
 }
 .jc-signout-button:disabled{opacity:.58;cursor:wait}
 .jc-signout-button:focus-visible,.jc-signout-button:hover{
  outline:2px solid #7bc1ef;outline-offset:2px
 }
 html.jc-session-restoring body::after{
  content:"Opening JanCares…";position:fixed;z-index:1500;inset:0;
  display:grid;place-items:center;padding:20px;text-align:center;
  font-size:15px;font-weight:750;letter-spacing:.015em;
  color:#1f5c8e;background:#f3f9ff
 }
}
html[data-jc-theme=dark] body.admin-authenticated .side,
html[data-jc-theme=dark] body.member-authenticated .side{
 background:#1e344c!important;border-color:#385874!important
}
html[data-jc-theme=dark] body.admin-authenticated .side .brand,
html[data-jc-theme=dark] body.member-authenticated .side .brand{
 background:linear-gradient(135deg,#1c4c7e,#216a91 65%,#19507c)!important;
 box-shadow:0 8px 20px #0e20332b!important
}
html[data-jc-theme=dark] body.admin-authenticated .side .nav button,
html[data-jc-theme=dark] body.member-authenticated .side .nav button{
 color:#d0dfed!important
}
html[data-jc-theme=dark] body.admin-authenticated .side .nav button.active,
html[data-jc-theme=dark] body.member-authenticated .side .nav button.active{
 background:#305573!important;border-color:#517d9f!important;color:#f5faff!important
}
html[data-jc-theme=dark] body.admin-authenticated .side .jc-drawer-footer,
html[data-jc-theme=dark] body.member-authenticated .side .jc-drawer-footer{
 background:linear-gradient(140deg,#294764,#243c55)!important;
 border-color:#41617c!important;box-shadow:none!important
}
html[data-jc-theme=dark] body.admin-authenticated .jc-drawer-footer .jc-account-meta strong,
html[data-jc-theme=dark] body.member-authenticated .jc-drawer-footer .jc-account-meta strong{color:#eff6ff!important}
html[data-jc-theme=dark] .jc-account-meta>span{color:#b2c9df!important}
html[data-jc-theme=dark] .jc-signout-button{color:#e1f2ff;border-color:#547692;background:#315371}
html[data-jc-theme=dark] body.admin-authenticated .main,
html[data-jc-theme=dark] body.member-authenticated .main{background:#142335!important}
html[data-jc-theme=dark] html.jc-session-restoring body::after,
html[data-jc-theme=dark].jc-session-restoring body::after{background:#142335;color:#b9ddf9}
@media(max-width:380px){
 body.admin-authenticated .side,body.member-authenticated .side,
 body.admin-authenticated .side.jc-expanded,body.member-authenticated .side.jc-expanded{width:80vw!important;max-width:80vw!important}
}
@media(prefers-reduced-motion:reduce){
 .jc-account-badge,.jc-signout-button{transition:none!important}
}
