/* Dedicated staff phone shell. Loaded only by the admin / sales mobile entries. */
body.staff-mobile-layout{
  --staff-frame-h:100dvh;
  --staff-frame-w:100vw;
  min-width:0;
  min-height:100dvh;
  margin:0;
  background:#eee9e4;
  overflow:hidden;
}
body.staff-mobile-layout #app{
  position:relative;
  display:flex;
  width:100vw;
  height:100dvh;
  min-height:0;
  margin:0 auto;
  overflow:hidden;
  background:var(--cream,#f8f5f0);
  isolation:isolate;
  transform:translateZ(0);
}
body.staff-mobile-layout .page-loading,
body.staff-mobile-layout .login-page,
body.staff-mobile-layout .login-shell{
  width:100%;
  min-height:100%;
  padding:calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}
body.staff-mobile-layout .staff-shell.automation-shell{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:calc(56px + env(safe-area-inset-top)) minmax(0,1fr) calc(64px + env(safe-area-inset-bottom));
  width:100%;
  min-width:0;
  height:100%;
  min-height:0;
  padding:0;
  overflow:hidden;
  background:var(--cream,#f8f5f0);
}
body.staff-mobile-layout .staff-nav{display:none}
body.staff-mobile-layout .staff-mobile-head{
  position:relative;
  top:auto;
  z-index:22;
  display:flex;
  height:auto;
  min-width:0;
  padding:env(safe-area-inset-top) 14px 0;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:rgba(255,253,250,.98);
  backdrop-filter:blur(12px);
}
body.staff-mobile-layout .staff-mobile-head .brand{display:flex;min-width:0;align-items:center;gap:7px;font-size:0}
body.staff-mobile-layout .staff-mobile-head .brand-logo{width:82px;max-height:22px}
body.staff-mobile-layout .staff-mobile-head .brand small{font:11px Arial,sans-serif;letter-spacing:.08em;color:var(--muted)}
body.staff-mobile-layout .staff-mobile-head>div:last-child{display:flex;min-width:0;align-items:center;gap:7px;font-size:12px}
body.staff-mobile-layout .staff-mobile-head>div:last-child>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.staff-mobile-layout .staff-mobile-head .text-button,
body.staff-mobile-layout .staff-mobile-head [data-action="staff-route"][data-route="more"]{min-width:44px;min-height:44px;padding:8px;color:var(--wine)}
body.staff-mobile-layout .staff-main{
  width:100%;
  min-width:0;
  max-width:none;
  min-height:0;
  margin:0;
  padding:14px 14px 22px;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
body.staff-mobile-layout .staff-heading{align-items:flex-start;gap:10px;margin:0 0 12px}
body.staff-mobile-layout .staff-heading h1{margin:2px 0;font-size:24px;line-height:1.18}
body.staff-mobile-layout .staff-heading p{margin:4px 0 0;font-size:12px;line-height:1.42}
body.staff-mobile-layout .staff-heading .button{flex:0 0 auto;min-height:44px;padding:9px 11px;white-space:nowrap}
body.staff-mobile-layout .staff-mobile-nav{
  position:relative;
  right:auto;
  bottom:auto;
  left:auto;
  z-index:25;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  height:auto;
  min-height:64px;
  padding:0 4px env(safe-area-inset-bottom);
  border-top:1px solid var(--line);
  background:rgba(255,253,250,.98);
}
body.staff-mobile-layout .staff-mobile-nav.sales-readonly-nav{grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:34px}
body.staff-mobile-layout .staff-mobile-nav button{
  display:grid;
  min-width:0;
  min-height:44px;
  padding:7px 2px 5px;
  place-content:center;
  gap:3px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  line-height:1.15;
}
body.staff-mobile-layout .staff-mobile-nav button.active{color:var(--wine);font-weight:600}
body.staff-mobile-layout .staff-mobile-nav button svg{width:22px;height:22px;margin:auto}
body.staff-mobile-layout .staff-mobile-nav button span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.staff-mobile-layout .staff-section-tabs{display:none}
body.staff-mobile-layout .staff-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.staff-mobile-layout .staff-more-tile{
  display:grid;
  min-height:126px;
  padding:14px;
  align-content:start;
  gap:7px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
  text-align:left;
}
body.staff-mobile-layout .staff-more-tile svg{width:24px;height:24px;color:var(--wine)}
body.staff-mobile-layout .staff-more-tile strong{font-size:15px;font-weight:500}
body.staff-mobile-layout .staff-more-tile small{color:var(--muted);font-size:11px;line-height:1.4}
body.staff-mobile-layout .staff-more-tile:focus-visible,
body.staff-mobile-layout button:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
body.staff-mobile-layout .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:10px}
body.staff-mobile-layout .toolbar .form-field{min-width:0}
body.staff-mobile-layout .staff-search{width:100%;min-width:0;min-height:44px;font-size:16px}
body.staff-mobile-layout input,
body.staff-mobile-layout select,
body.staff-mobile-layout textarea{font-size:16px}
body.staff-mobile-layout button,
body.staff-mobile-layout .button,
body.staff-mobile-layout .link-button{touch-action:manipulation}
body.staff-mobile-layout .button,
body.staff-mobile-layout .staff-card-actions button,
body.staff-mobile-layout .toolbar button{min-height:44px}
body.staff-mobile-layout .automation-metrics{position:static;gap:7px;margin:0 0 10px}
body.staff-mobile-layout .automation-metrics>div{min-width:0;padding:8px}
body.staff-mobile-layout .automation-metrics strong{font-size:18px}
body.staff-mobile-layout .staff-mobile-list{display:grid;gap:9px}
body.staff-mobile-layout .staff-mobile-card{gap:9px;padding:12px}
body.staff-mobile-layout .staff-mobile-card h3{font-size:16px;line-height:1.35}
body.staff-mobile-layout .staff-card-actions{gap:7px}
body.staff-mobile-layout .staff-card-actions button{font-size:12px}
body.staff-mobile-layout .automation-customer{padding:11px 12px}
body.staff-mobile-layout .staff-grid.staff-media-grid,
body.staff-mobile-layout .staff-main[data-staff-view="photo-templates"] .staff-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-bottom:72px}
body.staff-mobile-layout .staff-media-grid .staff-card{height:242px;min-height:0;padding:8px}
body.staff-mobile-layout .staff-media-grid .staff-card>img,
body.staff-mobile-layout .staff-media-grid .staff-card>.media-empty{height:124px;aspect-ratio:auto;object-fit:contain}
body.staff-mobile-layout .staff-media-grid .staff-card h3{min-height:32px;margin:6px 0 2px;font-size:13px;line-height:1.3}
body.staff-mobile-layout .staff-media-grid .staff-card p{font-size:11px}
body.staff-mobile-layout .staff-media-grid .link-button{min-height:40px;font-size:12px}
body.staff-mobile-layout .sales-customer-list{grid-template-columns:1fr;gap:9px}
body.staff-mobile-layout .sales-customer-card{padding:11px}
body.staff-mobile-layout .sales-customer-photos img{height:112px;object-fit:contain}
body.staff-mobile-layout .automation-shell .staff-mobile-list.outfit-row-list{gap:0;border-radius:10px}
body.staff-mobile-layout .automation-shell .staff-mobile-card.outfit-row{grid-template-columns:minmax(0,.9fr) minmax(0,1.05fr) 100px;gap:7px;padding:11px 8px}
body.staff-mobile-layout .outfit-row h3{font-size:12px}
body.staff-mobile-layout .outfit-row .outfit-spu-link{min-height:44px;padding:6px 3px}
body.staff-mobile-layout .outfit-row .outfit-photo-thumb img,
body.staff-mobile-layout .outfit-row .outfit-photo-thumb .media-empty{height:120px;object-fit:contain}
body.staff-mobile-layout .outfit-row .outfit-photo-empty{min-height:120px}
body.staff-mobile-layout .outfit-spu-thumb img{height:78px;object-fit:contain}
body.staff-mobile-layout .outfit-spu-gallery.has-one .outfit-spu-thumb img{height:122px}
body.staff-mobile-layout .drawer.staff-drawer,
body.staff-mobile-layout .staff-spu-overlay,
body.staff-mobile-layout .photo-lightbox{
  position:fixed;
  inset:auto;
  top:50%;
  left:50%;
  width:var(--staff-frame-w);
  height:var(--staff-frame-h);
  max-height:none;
  transform:translate(-50%,-50%);
}
body.staff-mobile-layout .drawer.staff-drawer{
  z-index:50;
  padding:calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  overflow:auto;
  border:0;
  box-shadow:none;
  scroll-padding-bottom:84px;
}
body.staff-mobile-layout .drawer.staff-drawer .drawer-head{top:calc(-14px - env(safe-area-inset-top));margin:calc(-14px - env(safe-area-inset-top)) -14px 13px;padding:calc(14px + env(safe-area-inset-top)) 14px 12px}
body.staff-mobile-layout .drawer.staff-drawer .drawer-head .icon-button,
body.staff-mobile-layout .photo-lightbox .icon-button,
body.staff-mobile-layout .staff-spu-head .icon-button{display:grid;width:44px;height:44px;min-width:44px;min-height:44px;place-items:center}
body.staff-mobile-layout .drawer.staff-drawer .drawer-form{gap:12px}
body.staff-mobile-layout .drawer-primary{bottom:0;min-height:48px}
body.staff-mobile-layout .staff-spu-overlay{
  z-index:60;
  display:grid;
  padding:0;
  place-items:stretch;
  background:var(--paper);
  overflow:hidden;
}
body.staff-mobile-layout .staff-spu-dialog,
body.staff-mobile-layout .staff-outfit-dialog{width:100%;height:100%;max-height:none;min-height:0;border-radius:0;box-shadow:none}
body.staff-mobile-layout .staff-spu-head{position:sticky;top:0;z-index:2;padding:calc(14px + env(safe-area-inset-top)) 14px 12px;background:var(--paper)}
body.staff-mobile-layout .staff-spu-head h2{font-size:19px}
body.staff-mobile-layout .staff-spu-body{grid-template-columns:1fr;flex:1 1 auto;min-height:0;gap:15px;padding:14px;overflow:auto}
body.staff-mobile-layout .staff-spu-image{height:220px}
body.staff-mobile-layout .staff-outfit-photo-body{flex:1 1 auto;min-height:0;padding:12px 14px calc(18px + env(safe-area-inset-bottom));overflow:auto}
body.staff-mobile-layout .staff-outfit-photo-body img{height:auto;max-height:none;object-fit:contain}
body.staff-mobile-layout .photo-lightbox{z-index:70;padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));place-items:center}
body.staff-mobile-layout .photo-lightbox img{max-width:100%;max-height:100%;object-fit:contain}
body.staff-mobile-layout .photo-lightbox .icon-button{top:calc(8px + env(safe-area-inset-top));right:8px}
body.staff-mobile-layout .toast{
  position:fixed;
  z-index:80;
  top:50%;
  right:auto;
  bottom:auto;
  left:50%;
  width:calc(var(--staff-frame-w) - 28px);
  max-width:calc(var(--staff-frame-w) - 28px);
  transform:translate(-50%,calc(-50% + (var(--staff-frame-h) * .5) - 76px));
}
body.staff-mobile-layout.staff-spu-open .staff-main{overflow:hidden}
@media (min-width:761px){
  body.staff-mobile-layout{
    --staff-frame-h:min(844px,calc(100dvh - 40px));
    --staff-frame-w:calc(var(--staff-frame-h) * .5625);
    display:grid;
    place-items:center;
    padding:20px;
  }
  body.staff-mobile-layout #app{
    width:var(--staff-frame-w);
    height:var(--staff-frame-h);
    border:1px solid rgba(48,24,25,.16);
    border-radius:28px;
    box-shadow:0 20px 56px rgba(48,24,25,.18);
  }
}
@media (max-width:360px), (max-height:690px){
  body.staff-mobile-layout .staff-main{padding-top:10px}
  body.staff-mobile-layout .staff-heading{margin-bottom:8px}
  body.staff-mobile-layout .staff-heading h1{font-size:21px}
  body.staff-mobile-layout .staff-heading p{display:none}
  body.staff-mobile-layout .staff-mobile-nav{min-height:58px}
  body.staff-mobile-layout .staff-mobile-nav button{padding-top:4px;padding-bottom:3px}
  body.staff-mobile-layout .staff-media-grid .staff-card{height:218px}
  body.staff-mobile-layout .staff-media-grid .staff-card>img,
  body.staff-mobile-layout .staff-media-grid .staff-card>.media-empty{height:104px}
  body.staff-mobile-layout .automation-shell .staff-mobile-card.outfit-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 84px;gap:4px;padding:9px 6px}
  body.staff-mobile-layout .outfit-row .outfit-photo-thumb img,
  body.staff-mobile-layout .outfit-row .outfit-photo-thumb .media-empty{height:108px}
}

/* Preserve section identity and every template action in the compact phone layout. */
body.staff-mobile-layout .staff-main[data-staff-view="outfits"] .staff-heading>div:first-child{display:block}
body.staff-mobile-layout .staff-grid.staff-media-grid{padding-bottom:20px}
body.staff-mobile-layout .staff-media-grid .staff-card{height:auto;display:flex;flex-direction:column;min-width:0}
body.staff-mobile-layout .staff-media-grid .staff-card>img{height:110px}
body.staff-mobile-layout .staff-media-grid .staff-card p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.staff-mobile-layout .staff-media-grid .staff-card-footer{margin-top:auto}
body.staff-mobile-layout .staff-mobile-back{flex:0 0 44px;font-size:26px}
body.staff-mobile-layout .staff-layout-switch{display:block;margin-top:18px;color:var(--wine);font-size:12px;min-height:44px;line-height:44px;text-align:center}
@media(max-width:350px){body.staff-mobile-layout .staff-mobile-head .brand small{display:none}}

body.staff-mobile-layout .page-loading #login-form{width:100%!important;max-width:360px}
