/* Mobile layout shared by capture, deliveries and production. */
.hl-back{display:none}
#capture-details{border:1px solid #dacaba;border-radius:12px;margin:0 0 18px;background:#fffdf9}
#capture-details>summary,.production-capture-details>summary{padding:14px 16px;font-weight:600;cursor:pointer;line-height:1.4}
#capture-details .hap-fields{padding:16px;margin:0}
.production-capture-details{margin:18px 0;border:1px solid #dacaba;border-radius:12px}
.production-capture-details #production-form{padding:0 16px 16px}
#production-paper>.chef-report{margin:16px 0}
#chef-tomorrow-results .chef-pending-table th:first-child{width:34%}
#chef-tomorrow-results .chef-pending-table th:nth-child(2){width:21%}
#chef-tomorrow-results .chef-pending-table th:nth-child(n+3){width:15%}
@media(max-width:760px){
  html{scroll-padding-bottom:100px}
  body{padding:10px 10px calc(96px + env(safe-area-inset-bottom));background:#f3ece3;color:#38291e}
  #hap-connected{filter:none}
  #session-bar{margin:0 4px 10px;min-height:32px;font-size:12px;color:#725d49}
  #session-email{max-width:calc(100% - 65px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #logout{min-height:36px;padding:6px 12px;font-size:13px}
  #hap-connected>nav{position:fixed;z-index:40;bottom:0;left:0;right:0;display:flex;gap:4px;flex-wrap:nowrap;padding:8px 8px calc(8px + env(safe-area-inset-bottom));margin:0;background:#fffdf9;border-top:1px solid #dacaba;box-shadow:0 -4px 18px #38291e0b}
  #hap-connected>nav button{flex:1;min-width:0;min-height:54px;padding:8px 4px;border:0;border-radius:10px;background:transparent;color:#6b5947;font-size:12px;line-height:1.25}
  #hap-connected>nav button[aria-pressed=true]{background:#f0e0cf;color:#653a24;font-weight:700}
  #hap-demo,#hap-lookup,#production-paper,.schedule-paper{padding:16px!important;border-radius:16px!important;margin:0;background:#fffdf9!important;min-width:0}
  #hap-demo header,#hap-lookup header,#production-paper header,.schedule-paper header{padding:0!important;gap:12px;margin:0 0 12px;flex-wrap:nowrap;align-items:center}
  #hap-demo header img.brand-logo,#hap-lookup header img.brand-logo,#production-paper header img.brand-logo,.schedule-paper header img.brand-logo{width:58px!important;height:44px!important;object-fit:contain;margin:0;flex:none}
  #hap-demo header>div{display:flex;align-items:center;gap:12px}
  #hap-demo header span,#production-paper h2,.schedule-paper h2{font-size:21px!important;margin:0!important;font-weight:650;line-height:1.2}
  #hap-lookup header{display:none}
  #hap-lookup h2{margin:0 0 16px;font-size:21px;font-weight:650}
  #hap-demo #hap-products{height:auto!important;max-height:360px;grid-auto-rows:minmax(78px,auto);grid-template-columns:repeat(2,minmax(0,1fr));padding-right:0;gap:8px}
  #hap-demo #hap-products .hap-product{height:auto;min-height:78px;padding:10px}
  #hap-demo #hap-products .hap-product span{font-size:13px;-webkit-line-clamp:3;line-height:1.3}
  #hap-demo #hap-products .hap-product small{font-size:12px}
  #hap-demo #hap-products.is-category-list{display:grid;max-height:360px;height:auto!important;grid-auto-rows:minmax(60px,auto);overflow-x:hidden;overflow-y:auto;padding-bottom:4px}
  #hap-demo #hap-products.is-category-list .hap-category-card{min-height:60px;height:auto}
  #hap-demo #hap-products.is-category-list .hap-category-card small{display:none}
  #hap-demo #hap-products.is-category-list .hap-category-card span{font:500 13px system-ui,sans-serif}
  #hap-demo #hap-catalog-navigation{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
  #hap-demo #hap-catalog-navigation button{min-height:38px;font-size:13px;padding:8px 10px}
  #hap-demo main{display:flex;flex-direction:column;gap:18px}
  #hap-demo main>section,#hap-demo main>aside{width:100%}
  #hap-demo main>aside{padding:14px;background:#fbf6ef;border-radius:12px}
  #hap-demo main>aside h3{font-size:17px;margin-bottom:8px}
  #hap-demo main>aside::before{display:none}
  #hap-demo .hap-search input{border:1px solid #bca58d;border-radius:10px}
  #hap-demo .hap-line{padding:12px 0;font-size:14px}
  #hap-demo .hap-qty input{width:58px;min-height:44px}
  #hap-demo .hap-qty button{min-height:44px}
  #hap-demo .hap-total{padding:14px 0;font-size:21px}
  #hap-demo .hap-fields{gap:14px}
  #hap-demo #capture-details{margin-bottom:14px}
  #hap-demo #capture-details>summary{font-size:14px;overflow-wrap:anywhere}
  #hap-demo #capture-details .hap-fields{padding:12px}
  #hap-demo #hap-save,#hap-demo #hap-close{min-height:48px;font-size:15px}
  #hap-lookup .hl-layout{display:block;margin-top:14px}
  #hl-results{max-height:none;overflow:visible}
  #hap-lookup .hl-result{padding:14px;gap:6px;border-radius:12px}
  #hap-lookup .hl-result-top strong{font-weight:650}
  #hap-lookup:not(.has-order-detail) #hl-detail{display:none}
  #hap-lookup.has-order-detail .hap-find,#hap-lookup.has-order-detail .hl-layout>section{display:none}
  #hap-lookup #hl-detail{padding:0;border:0;background:transparent}
  #hap-lookup .hl-back{display:block;border:0;background:#f2e9dd;min-height:44px;padding:10px 14px;margin-bottom:18px;font-size:14px}
  #hap-lookup .hl-item{font-size:15px}
  #production-paper .chef-report{padding:14px;margin:14px 0;border-radius:12px}
  #production-paper .chef-report h3{font-size:18px;margin:0 0 10px}
  #production-paper .chef-report p{font-size:14px;line-height:1.5}
  #production-paper .chef-report button{width:100%;font-size:14px}
  #production-paper>p{font-size:14px;line-height:1.5}
  #production-paper #production-form{display:grid;gap:14px}
  .production-capture-details>p,.production-capture-details>.production-day-heading,.production-capture-details>#production-history{margin:12px 14px}
  #production-paper #production-form input,#production-paper #production-form select{width:100%;max-width:100%;min-height:46px;font-size:16px}
  #chef-tomorrow-results{overflow:visible}
  #chef-tomorrow-results .chef-pending-table{display:block;min-width:0;table-layout:auto}
  #chef-tomorrow-results .chef-pending-table thead{display:none}
  #chef-tomorrow-results .chef-pending-table tbody{display:grid;gap:12px}
  #chef-tomorrow-results .chef-pending-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #dacaba;border-radius:12px;padding:12px;background:#fff}
  #chef-tomorrow-results .chef-pending-table td{display:block;width:auto;padding:8px 4px;border:0;text-align:center;font-size:19px;min-width:0}
  #chef-tomorrow-results .chef-pending-table td:first-child{grid-column:1/-1;text-align:left;font-size:15px;font-weight:650;padding:0 0 6px;min-width:0}
  #chef-tomorrow-results .chef-pending-table td:nth-child(2){grid-column:1/-1;text-align:left;font-size:12px;color:#7d6956;padding:0 0 10px}
  #chef-tomorrow-results .chef-pending-table td:nth-child(n+3)::before{display:block;font-size:11px;font-weight:400;color:#7d6956;margin-bottom:6px}
  #chef-tomorrow-results .chef-pending-table td:nth-child(3)::before{content:'Pedidos'}
  #chef-tomorrow-results .chef-pending-table td:nth-child(4)::before{content:'Para mostrador'}
  #chef-tomorrow-results .chef-pending-table td:nth-child(5)::before{content:'Total a producir'}
  #chef-tomorrow-results .chef-pending-table td:last-child{background:#f2e9dd;border-radius:8px;color:#653a24}
  .schedule-paper>p{font-size:14px;margin:12px 0;line-height:1.45}
  .schedule-date-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:18px 0}
  .schedule-date-row label{font-size:13px;gap:6px}
  .schedule-date-row button{align-self:end;padding:12px;font-size:13px}
  #schedule-version{grid-column:1/-1;font-size:12px}
  .schedule-paper .schedule-list-heading{display:none!important}
  .schedule-paper .schedule-products{max-height:none;overflow:visible;border:0;display:grid;gap:10px}
  .schedule-paper .schedule-product{display:grid!important;grid-template-columns:minmax(0,1fr) 78px!important;gap:8px 14px;border:1px solid #e2d8cb;border-radius:12px;padding:12px}
  .schedule-product>span{grid-column:1;grid-row:1;font-size:14px;line-height:1.4}
  .schedule-product small{font-size:11px}
  .schedule-product input{grid-column:2;grid-row:1/3;align-self:center;min-height:48px;font-size:19px}
  .schedule-product>button{grid-column:1;grid-row:2;justify-self:start;border:0;padding:4px 0;min-height:30px;font-size:12px;color:#85664d}
  .schedule-footer{position:static;background:#fffdf9;margin:16px -4px 0;padding:12px 4px;gap:10px;border-top:1px solid #eee5db}
  .schedule-footer strong{font-size:13px}
  .schedule-footer button{font-size:14px;min-height:48px}
  #schedule-picker{position:fixed;top:calc(var(--mobile-visible-top,0px) + 12px);bottom:auto;left:12px;right:12px;max-height:min(78vh,calc(var(--mobile-visible-height,100vh) - 24px));overflow:auto;padding:16px;box-shadow:0 0 0 100vmax #38291e44,0 12px 32px #38291e33}
  #schedule-matches{max-height:min(54vh,calc(var(--mobile-visible-height,100vh) - 190px))}
  #schedule-matches button{min-height:48px;font-size:14px}
  #global-status{font-size:13px;margin:10px}
}
.weekly-product{padding:16px;border:1px solid #e2d8cb;border-radius:12px;background:#fffdf9;margin:10px 0}.weekly-product-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.weekly-product-header strong{font-size:15px}.weekly-product-header button{min-height:36px;padding:6px 10px;font-size:12px}.weekly-quantities{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.weekly-quantities label{display:grid;text-align:center;gap:7px;font-size:12px}.weekly-quantities input{width:100%;min-width:0;padding:10px 3px;text-align:center;font-size:16px}.weekly-quantities input:disabled{background:#eee8df;color:#827464}.schedule-paper #schedule-products{max-height:none;overflow:visible;border:0}.schedule-paper .schedule-products{display:block}@media(max-width:760px){.weekly-product{padding:12px}.weekly-quantities{gap:4px}.weekly-quantities input{padding:10px 0}.weekly-quantities label{font-size:11px}.weekly-product-header{margin-bottom:12px}}@media(max-width:380px){.weekly-quantities{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 6px}}
