/* Élite Mobile 18.24.14: presentation/camera shell only. No production state rules live here. */
:root{--elite-mobile-safe-top:env(safe-area-inset-top,0px);--elite-mobile-safe-right:env(safe-area-inset-right,0px);--elite-mobile-safe-bottom:env(safe-area-inset-bottom,0px);--elite-mobile-safe-left:env(safe-area-inset-left,0px)}
.elite-mobile-connectivity{position:fixed;z-index:100000;left:max(12px,var(--elite-mobile-safe-left));right:max(12px,var(--elite-mobile-safe-right));top:calc(10px + var(--elite-mobile-safe-top));padding:11px 14px;border-radius:12px;background:#8b1e24;color:#fff;font-weight:800;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.elite-camera-modal[hidden]{display:none!important}.elite-camera-modal{position:fixed;z-index:100001;inset:0;background:rgba(7,12,17,.96);padding:calc(12px + var(--elite-mobile-safe-top)) max(12px,var(--elite-mobile-safe-right)) calc(12px + var(--elite-mobile-safe-bottom)) max(12px,var(--elite-mobile-safe-left));display:grid;place-items:center}.elite-camera-dialog{width:min(100%,560px);max-height:100%;overflow:auto;background:#fff;border-radius:20px;padding:14px;box-shadow:0 24px 80px rgba(0,0,0,.45)}.elite-camera-head{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#111820}.elite-camera-head>div{display:grid;gap:2px}.elite-camera-head strong{font-size:18px}.elite-camera-head small{font-size:12px;color:#66717b;font-weight:700}.elite-camera-head>button{width:44px;height:44px;border:0;border-radius:50%;font-size:28px;background:#eef1f4;color:#111820}.elite-camera-stage{position:relative;overflow:hidden;border-radius:16px;background:#05080b;aspect-ratio:3/4;margin-top:10px}.elite-camera-stage video{width:100%;height:100%;object-fit:cover}.elite-camera-guide{position:absolute;left:7%;right:7%;top:37%;height:23%;border:3px solid #fff;border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.3)}.elite-camera-guide span{position:absolute;left:8%;right:8%;top:50%;height:2px;background:#fff;box-shadow:0 0 12px rgba(255,255,255,.9)}.elite-camera-dialog p{color:#4b5660;font-weight:700;min-height:24px;line-height:1.35}.elite-camera-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.elite-camera-actions button{min-height:48px}.elite-camera-open{overflow:hidden!important}
.elite-mobile-scan-tools{margin-top:10px}.elite-camera-button{width:100%;min-height:54px}.elite-mobile-install{margin:10px 14px calc(14px + var(--elite-mobile-safe-bottom));width:calc(100% - 28px);min-height:46px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-weight:800;padding:10px 12px}.elite-mobile-sidebar-extras{display:none}
@media(max-width:800px){
 html{scroll-padding-top:72px}.elite-front{padding-bottom:var(--elite-mobile-safe-bottom)}
 body.elite-menu-open{overflow:hidden}.elite-app{min-width:0}.elite-main,.elite-content{max-width:100%;min-width:0;overflow-x:hidden}
 .elite-content{padding-left:max(14px,var(--elite-mobile-safe-left))!important;padding-right:max(14px,var(--elite-mobile-safe-right))!important}
 .elite-card{border-radius:14px}.elite-module-head{gap:12px}.elite-module-head h1{font-size:clamp(28px,8vw,42px);line-height:1.02}.elite-module-head p{line-height:1.4}
 input,select,textarea,button{font-size:16px!important}.elite-primary-button,.elite-secondary-button{touch-action:manipulation}
 .elite-topbar{min-width:0;padding-left:max(10px,var(--elite-mobile-safe-left))!important;padding-right:max(10px,var(--elite-mobile-safe-right))!important;gap:9px!important}.elite-topbar .elite-search,.elite-topbar .elite-user,.elite-topbar>.elite-logout-link{display:none!important}.elite-topbar .elite-context-chip{margin-left:auto;max-width:46vw;min-width:0;padding:8px 10px!important}.elite-topbar .elite-context-chip span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.elite-breadcrumb{min-width:0;flex:1}.elite-breadcrumb a,.elite-breadcrumb b{display:none}.elite-breadcrumb strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .elite-sidebar{padding-bottom:var(--elite-mobile-safe-bottom)}.elite-sidebar nav{padding-bottom:8px}.elite-sidebar .elite-nav-link{min-height:52px}.elite-mobile-sidebar-extras{display:block;padding:0 14px 4px}.elite-mobile-sidebar-extras .elite-mobile-logout{display:flex!important;width:100%;justify-content:flex-start;min-height:48px}
 .elite-lite-header-fields,.elite-lite-line-grid{grid-template-columns:1fr!important}.elite-span-2{grid-column:auto!important}
 .elite-lite-lines-head,.elite-lite-submit{align-items:stretch!important;gap:12px!important}.elite-lite-lines-head{flex-direction:column}.elite-lite-lines-head button{width:100%}
 .elite-lite-submit{position:sticky;bottom:calc(8px + var(--elite-mobile-safe-bottom));z-index:20;background:rgba(255,255,255,.97);padding:12px;border:1px solid #dde2e7;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.12)}.elite-lite-submit .elite-primary-button{min-height:56px}
 .elite-piece-images-grid{grid-template-columns:1fr!important}.elite-piece-image-slots{grid-template-columns:1fr!important}.elite-piece-image-slot input[type=file]{max-width:100%}
 .elite-scanner-panel label [data-batch-input]{min-height:58px;font-size:20px!important;font-weight:800;letter-spacing:.03em}.elite-scanner-panel .elite-batch-area{line-height:1.35}.elite-mobile-scan-tools{position:sticky;top:calc(8px + var(--elite-mobile-safe-top));z-index:18;background:#fff;padding:7px 0}
 .elite-batch-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.elite-batch-chip{grid-template-columns:1fr auto!important}.elite-batch-chip code{font-size:15px;overflow-wrap:anywhere}.elite-batch-chip small{display:block;line-height:1.3}
 .elite-form-actions{display:grid!important;grid-template-columns:1fr!important}.elite-form-actions>*{width:100%!important;min-height:54px}.elite-scanner-panel .elite-form-actions{position:sticky;bottom:calc(8px + var(--elite-mobile-safe-bottom));z-index:17;background:rgba(255,255,255,.97);padding:10px;border:1px solid #dde2e7;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.1)}
 .elite-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.elite-table-wrap table{min-width:760px}
 .elite-camera-actions{grid-template-columns:1fr}
}
@media(max-width:420px){.elite-topbar .elite-context-chip{display:none}.elite-camera-dialog{border-radius:16px}.elite-camera-stage{aspect-ratio:4/5}.elite-summary-grid.elite-batch-summary{gap:8px!important}}
@media(display-mode:standalone){body.elite-front{overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}.elite-topbar{padding-top:calc(8px + var(--elite-mobile-safe-top))!important}.elite-sidebar{padding-top:var(--elite-mobile-safe-top)}}
/* Élite Mobile 18.24.15 — iOS/standalone scroll recovery.
 * Only the PWA presentation layer is affected; production/intake logic is untouched.
 */
@media(max-width:800px){
 html{height:auto!important;min-height:100%;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
 body.elite-front:not(.elite-menu-open):not(.elite-camera-open):not(.elite-drawer-open){
   position:static!important;
   height:auto!important;
   min-height:100%!important;
   overflow-y:auto!important;
   overflow-x:hidden!important;
   overscroll-behavior-y:auto!important;
   touch-action:pan-y pinch-zoom!important;
   -webkit-overflow-scrolling:touch!important;
 }
 .elite-app--front,.elite-app,.elite-main{
   height:auto!important;
   min-height:100dvh!important;
   max-height:none!important;
   overflow:visible!important;
 }
 .elite-content{
   height:auto!important;
   max-height:none!important;
   overflow-y:visible!important;
   touch-action:pan-y pinch-zoom!important;
   -webkit-overflow-scrolling:touch!important;
 }
}
@media(display-mode:standalone){
 html{height:auto!important;min-height:100%;overflow-y:auto!important;overscroll-behavior-y:auto!important}
 body.elite-front:not(.elite-menu-open):not(.elite-camera-open):not(.elite-drawer-open){
   position:static!important;
   height:auto!important;
   min-height:100%!important;
   overflow-y:auto!important;
   overscroll-behavior-y:auto!important;
   touch-action:pan-y pinch-zoom!important;
 }
 .elite-app--front,.elite-app,.elite-main{height:auto!important;min-height:100dvh!important;max-height:none!important}
}

/* Élite Mobile 18.24.16 — container polish only. Business logic remains untouched. */
@media(max-width:600px){
  .elite-content{padding:12px 10px calc(100px + var(--elite-mobile-safe-bottom))!important}
  .elite-module-head{margin-bottom:14px!important;padding:0 2px}
  .elite-module-head h1{font-size:26px!important;line-height:1.08!important;gap:8px!important}
  .elite-module-head>div>p:last-child{font-size:14px!important;line-height:1.4!important}
  .elite-card{
    padding:16px!important;
    border-radius:20px!important;
    border:1px solid #e0e4e8!important;
    box-shadow:0 5px 20px rgba(15,23,42,.055)!important;
    margin-bottom:12px!important;
  }
  .elite-card-title,.elite-front .elite-card-title{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:10px 12px!important;
    margin-bottom:14px!important;
  }
  .elite-card-title>div,.elite-front .elite-card-title>div{
    display:block!important;
    min-width:0!important;
  }
  .elite-card-title h2,.elite-front .elite-card-title h2{
    display:block!important;
    font-size:22px!important;
    line-height:1.12!important;
    letter-spacing:-.02em!important;
    margin:0!important;
  }
  .elite-card-title p,.elite-front .elite-card-title p{
    font-size:14px!important;
    line-height:1.42!important;
    margin:6px 0 0!important;
  }
  .elite-card-title>.elite-status-badge{grid-column:2;grid-row:1;align-self:start;white-space:nowrap;font-size:12px!important}
  .elite-inline-search{margin-top:12px!important;gap:10px!important}
  .elite-inline-search label>span{font-size:14px!important;font-weight:800!important;margin-bottom:6px!important;display:block}
  .elite-inline-search input,.elite-inline-search select{min-height:54px!important;border-radius:14px!important;padding:12px 14px!important}
  .elite-inline-search button{min-height:52px!important;border-radius:14px!important}
  .elite-lite-header-fields{gap:12px!important}
  .elite-lite-header-fields label>span,.elite-lite-line-grid label>span{font-size:14px!important}
  .elite-lite-header-fields input,.elite-lite-header-fields textarea,.elite-lite-line-grid input,.elite-lite-line-grid select,.elite-lite-line-grid textarea{border-radius:13px!important}
  .elite-lite-lines-head{margin-top:18px!important}
  .elite-lite-lines-head>div h2{font-size:22px!important;margin-bottom:4px!important}
  .elite-lite-line{padding:14px!important;border-radius:16px!important;background:#fff!important;box-shadow:0 2px 10px rgba(15,23,42,.035)}
  .elite-mobile-scan-tools{margin-top:10px!important}
  .elite-camera-button{border-radius:14px!important;min-height:52px!important}
  #elite-main-content[data-elite-current-module="consultations"] .elite-card{padding:16px!important}
  #elite-main-content[data-elite-current-module="consultations"] .elite-inline-search{display:grid!important;grid-template-columns:1fr!important}
  #elite-main-content[data-elite-current-module="consultations"] .elite-mobile-scan-tools{width:100%}
}


/* Élite Mobile 18.24.17 — production card layout + iOS camera compatibility UI.
 * Presentation only. No production workflow rules are changed here.
 */
@media(max-width:600px){
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:14px!important;
    width:100%!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title>div:first-child{
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    align-items:start!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title>div:first-child>svg{
    width:32px!important;
    height:32px!important;
    margin-top:2px!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title>div:first-child>div{
    display:block!important;
    min-width:0!important;
    width:100%!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title h2{
    font-size:25px!important;
    line-height:1.08!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-card-title p{
    font-size:14px!important;
    line-height:1.4!important;
    max-width:none!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-toolbar{
    position:static!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-guided-intro .elite-toolbar>a{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    margin:0!important;
    justify-content:center!important;
    white-space:normal!important;
    text-align:center!important;
    position:static!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-traffic-legend{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:4px!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-traffic{
    width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    line-height:1.3!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-form,
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-shortcuts,
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-summary{
    width:100%!important;
    min-width:0!important;
  }
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-form label,
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-form select,
  #elite-main-content[data-elite-current-module="production"] .elite-production-filter-form input{
    min-width:0!important;
    width:100%!important;
  }
  .elite-camera-dialog[data-fallback-ios] .elite-camera-head small:after{
    content:' · compatible con iPhone';
  }
}

/* Élite Mobile 18.24.18 — iOS Code128 reading aids only. */
.elite-camera-guide b{position:absolute;left:0;right:0;bottom:8px;text-align:center;color:#fff;font:800 12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;text-shadow:0 1px 3px rgba(0,0,0,.8)}
.elite-camera-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.elite-camera-actions [data-camera-deep]{background:#111820;color:#fff;border-color:#111820}
.elite-camera-actions button:disabled{opacity:.55}
@media(max-width:600px){
  .elite-camera-stage{aspect-ratio:4/5!important}
  .elite-camera-guide{left:4%!important;right:4%!important;top:34%!important;height:26%!important;border-width:2px!important}
  .elite-camera-guide span{left:5%!important;right:5%!important}
  .elite-camera-actions{grid-template-columns:1fr!important}
  .elite-camera-dialog p{font-size:13px!important;line-height:1.35!important;margin:10px 2px!important}
}
