/* ==========================================================================
   v1.2.0-fix315
   Admin-wide readable typography + compact mobile header/drawer.
   Loaded after app.css / staff-fix313.css / square-management.css.
   ========================================================================== */

/* ---- readability baseline ------------------------------------------------ */
.store-admin-body{
  font-size:16px;
  line-height:1.55;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
.store-admin-body .sub{
  font-size:14px;
  line-height:1.6;
}
.store-admin-body small{
  font-size:13px;
  line-height:1.55;
}
.store-admin-body .card p,
.store-admin-body .notice p,
.store-admin-body .notice span{
  line-height:1.6;
}
.store-admin-body .btn,
.store-admin-body .tab,
.store-admin-body .state-btn{
  font-size:14px;
  line-height:1.35;
}
.store-admin-body .btn,
.store-admin-body .tab,
.store-admin-body .state-btn,
.store-admin-body button{
  min-height:44px;
}

/* Headquarters home: the two role cards must explain themselves clearly. */
.store-admin-body .headquarters-single-dashboard small,
.store-admin-body .headquarters-single-dashboard p{
  font-size:14px;
  line-height:1.65;
}

/* ---- mobile menu button / shared drawer --------------------------------- */
.fix315-mobile-menu-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:92px;
  min-height:44px;
  padding:9px 12px;
  border:1px solid #4b4b4b;
  border-radius:12px;
  background:#222;
  color:#fff;
  font:inherit;
  font-size:14px;
  font-weight:900;
  cursor:pointer;
}
.fix315-mobile-menu-toggle-icon{
  font-size:19px;
  line-height:1;
}
.fix315-mobile-nav{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  grid-template-columns:minmax(0,1fr) min(390px,92vw);
  background:rgba(0,0,0,.52);
}
.fix315-mobile-nav[hidden]{
  display:none!important;
}
.fix315-mobile-nav-backdrop{
  min-width:0;
}
.fix315-mobile-nav-panel{
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100dvh;
  overflow:hidden;
  background:#f7f4ed;
  color:#171717;
  box-shadow:-18px 0 50px rgba(0,0,0,.24);
}
.fix315-mobile-nav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:62px;
  padding:9px 12px 9px 16px;
  border-bottom:1px solid #ded8cf;
  background:#fff;
}
.fix315-mobile-nav-head>div{
  display:grid;
  gap:1px;
}
.fix315-mobile-nav-head b{
  font-size:18px;
}
.fix315-mobile-nav-head small{
  color:#706a62;
  font-size:13px;
}
.fix315-mobile-nav-close{
  min-width:46px;
  min-height:46px;
  border:1px solid #ddd6cc;
  border-radius:12px;
  background:#f5f2ec;
  color:#171717;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}
.fix315-mobile-menu-content{
  flex:1;
  overflow:auto;
  padding:12px;
}
.fix315-mobile-menu-content>.top-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  width:100%!important;
  margin:0!important;
  gap:9px!important;
  align-items:stretch!important;
  justify-content:stretch!important;
}
.fix315-mobile-menu-content>.top-actions>*{
  width:100%!important;
  max-width:none!important;
  min-height:48px!important;
  margin:0!important;
}
.fix315-mobile-menu-content>.top-actions button,
.fix315-mobile-menu-content>.top-actions .btn,
.fix315-mobile-menu-content>.top-actions .tab,
.fix315-mobile-menu-content>.top-actions .state-btn{
  width:100%!important;
  min-height:48px!important;
  justify-content:center!important;
  text-align:center!important;
  font-size:15px!important;
}
body.fix315-nav-open{
  overflow:hidden;
}

/* ---- tablet -------------------------------------------------------------- */
@media(max-width:1024px){
  .store-admin-body .topbar .wrap{
    min-height:68px;
    gap:12px;
    padding-top:8px;
    padding-bottom:8px;
  }
  .store-admin-body .topbar .wrap::before{
    width:132px;
    height:46px;
    flex-basis:132px;
  }
  .store-admin-body main.wrap{
    padding-left:16px;
    padding-right:16px;
  }
  .store-admin-body .sub{
    font-size:14px;
  }
  .store-admin-body small{
    font-size:13px;
  }
}

/* ---- smartphone ---------------------------------------------------------- */
@media(max-width:760px){
  body.store-admin-body.platform-impersonation-active{
    --platform-banner-offset:44px;
  }
  .store-admin-body .platform-impersonation-banner{
    min-height:44px;
    gap:8px;
    padding:5px 8px;
  }
  .store-admin-body .platform-impersonation-banner>div{
    min-width:0;
  }
  .store-admin-body .platform-impersonation-banner b{
    font-size:12px;
    white-space:nowrap;
  }
  .store-admin-body .platform-impersonation-banner span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
  }
  .store-admin-body .platform-impersonation-banner button{
    min-height:36px;
    flex:0 0 auto;
    padding:7px 10px;
    font-size:11px;
  }

  .store-admin-body .topbar .wrap{
    min-height:58px;
    flex-direction:row!important;
    align-items:center!important;
    gap:8px!important;
    padding:6px 10px!important;
  }
  .store-admin-body .topbar .wrap::before{
    width:36px!important;
    height:36px!important;
    flex:0 0 36px!important;
    background-image:url('/assets/brand/misemaru-symbol.webp')!important;
  }
  .store-admin-body .topbar .wrap>*:first-child:not(.top-actions){
    min-width:0;
    flex:1 1 auto;
  }
  .store-admin-body .topbar .brand{
    font-size:17px;
  }
  .store-admin-body .topbar .sub{
    display:none;
  }
  .store-admin-body .topbar .store-switch-indicator{
    display:none!important;
  }

  /* The existing permission-aware controls are moved into the drawer on open.
     While closed, the huge wrapped menu must not consume viewport height. */
  .store-admin-body .topbar .wrap>.top-actions{
    display:none!important;
  }
  .store-admin-body .topbar .fix315-mobile-menu-toggle{
    display:inline-flex;
    flex:0 0 auto;
  }

  .store-admin-body main.wrap{
    padding:14px 12px 48px;
  }
  .store-admin-body .card{
    border-radius:16px;
  }
  .store-admin-body .btn,
  .store-admin-body .tab,
  .store-admin-body .state-btn{
    font-size:15px;
  }
  .store-admin-body input,
  .store-admin-body select,
  .store-admin-body textarea{
    font-size:16px!important;
  }
  .store-admin-body .headquarters-single-dashboard small,
  .store-admin-body .headquarters-single-dashboard p{
    font-size:15px;
  }

  /* Existing sticky subnavigation values assumed an ~80px header. */
  .store-admin-body .ops-tabs,
  .store-admin-body .menu-section-tabs{
    top:62px;
  }
}

@media(max-width:560px){
  .store-admin-body .platform-impersonation-banner span{
    display:none;
  }
  .store-admin-body .platform-impersonation-banner b{
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .fix315-mobile-nav{
    grid-template-columns:44px minmax(0,1fr);
  }
}

@media(prefers-reduced-motion:reduce){
  .fix315-mobile-nav,
  .fix315-mobile-nav *{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
