/* Mobile-first interaction layer shared by customer, admin and store operation. */
.stage-nav{display:none}
html,body{max-width:100%;overflow-x:clip}.storefront .product,.storefront .product-body,.storefront .section-head>*{min-width:0}.storefront .product h3,.storefront .product p,.storefront footer{overflow-wrap:anywhere}.storefront dialog{max-width:calc(100vw - 24px)}

@media(min-width:761px) and (max-width:980px){.storefront .topbar{padding-inline:22px}.storefront .hero,.storefront .highlights,.storefront .menu{width:calc(100% - 32px);max-width:860px}.storefront .product{grid-template-columns:minmax(0,1fr) 160px}.storefront .brand-promise{margin-inline:16px}.storefront footer{padding-inline:24px}}

@media(max-width:760px){
  html{scroll-padding-top:72px}
  button,a,input,select,textarea{touch-action:manipulation}
  input,select,textarea{font-size:16px}

  /* Customer storefront */
  .storefront{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
  .storefront .topbar{height:62px;padding:0 16px}
  .storefront .cart-button#openCart{position:fixed;z-index:29;right:14px;bottom:calc(10px + env(safe-area-inset-bottom));left:14px;width:auto;min-height:54px;justify-content:space-between;padding:12px 18px;border:1px solid #856478;border-radius:14px;background:#65485a;color:#fff;box-shadow:0 12px 34px rgba(57,43,50,.3);font-size:14px;font-weight:700}
  .storefront .cart-button#openCart span{width:28px;height:28px;background:#f3e4b7}
  .storefront .hero{gap:20px;padding:25px 16px 24px}
  .storefront .hero h1{margin:14px 0;font-size:clamp(39px,12vw,48px);line-height:1.02}
  .storefront .hero-copy>p{line-height:1.55}
  .hero-actions{margin-top:18px}.hero-actions>span{display:none}
  .hero-actions .primary-button{min-height:48px;width:100%;justify-content:space-between}
  .storefront .hero-image{aspect-ratio:1.35;border-radius:42px 6px 6px 6px}
  .storefront .hero-image figcaption{padding:10px 12px}.storefront .hero-image figcaption>span{display:none}
  .hero-seal{width:66px;height:66px;top:10px;right:-2px}.hero-seal em{font-size:14px}
  .craft-strip{overflow:hidden;justify-content:flex-start;white-space:nowrap}
  .storefront .menu{padding:30px 16px 18px}
  .storefront .section-head{gap:16px;margin-bottom:18px}
  .storefront .menu h2{margin:8px 0 4px;font-size:31px}
  .storefront .search{height:46px}
  .storefront .filters{position:sticky;z-index:8;top:61px;margin-inline:-16px;padding:10px 16px 11px;background:rgba(250,247,242,.96);backdrop-filter:blur(10px);scrollbar-width:none}
  .storefront .filters::-webkit-scrollbar{display:none}
  .storefront .filter{min-height:42px;padding:9px 16px}
  .storefront .product-grid{grid-template-columns:1fr;gap:12px}
  .storefront .product{display:grid;grid-template-columns:112px minmax(0,1fr);min-height:142px;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
  .storefront .product-photo{height:100%;min-height:142px;aspect-ratio:auto;border-radius:0}
  .storefront .product-body{min-width:0;padding:14px 13px}
  .storefront .category{font-size:7px}.storefront .product h3{margin:5px 0;font-size:20px}
  .storefront .product p{display:-webkit-box;min-height:0;overflow:hidden;font-size:10px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .storefront .product-bottom{flex-direction:row;align-items:center;margin-top:auto;padding-top:10px;gap:8px}
  .storefront .add-button{width:auto;min-width:90px;min-height:42px;justify-content:center;padding:9px 10px}
  .storefront .quantity{margin-left:auto}.storefront .quantity button{width:34px;height:34px}
  .storefront .tag{top:8px;left:8px}
  .storefront .brand-promise{margin:18px 16px 30px}.storefront .brand-promise>img{height:210px}.storefront .brand-promise>div{padding:24px 20px}
  .storefront footer{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .storefront .drawer{height:100dvh}.storefront .cart-footer{padding:16px 18px calc(16px + env(safe-area-inset-bottom))}
  .storefront #checkoutDialog{inset:0;width:100%;height:100dvh;max-height:none;margin:0;border-radius:0;padding:24px 18px calc(24px + env(safe-area-inset-bottom))}
  .storefront #checkoutDialog h2{padding-right:42px;font-size:28px}
  .storefront #checkoutDialog form{padding-bottom:90px}
  .storefront #checkoutDialog .address-grid{grid-template-columns:1fr}
  .storefront #checkoutDialog input,.storefront #checkoutDialog select,.storefront #checkoutDialog textarea{min-height:48px}
  .storefront #checkoutDialog button[type="submit"]{position:fixed;z-index:2;right:16px;bottom:calc(12px + env(safe-area-inset-bottom));left:16px;width:auto;min-height:52px;box-shadow:0 10px 30px rgba(57,43,50,.24)}
  .storefront .builder-visual{height:110px}.builder-content{min-height:calc(100dvh - 110px);padding-top:20px}
  .storefront .builder-dialog .dialog-close{top:10px;right:10px}
  .storefront .builder-content>h2{font-size:26px}.builder-progress{margin:14px 0 18px}.builder-steps{min-height:255px}
  .storefront .builder-option>span{min-height:54px}.builder-summary{margin-bottom:0}

  /* Administration: daily work first, dashboard available as a tab. */
  .admin-page{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  .admin-page .topbar{height:60px;padding:0 14px}.admin-page .brand-mark{width:36px;height:36px}.admin-page .brand strong{font-size:18px}.admin-page .topbar .cart-button{padding:9px 11px;font-size:11px}
  .admin{padding:18px 12px 24px}
  .admin-header{align-items:center!important;flex-direction:row!important;justify-content:space-between;gap:10px}.admin-header>div{min-width:0}.admin-header h1{margin:4px 0;font-size:24px;white-space:nowrap}.admin-header p{display:none}.admin-header .section-label{font-size:7px}.admin-header #refresh{width:auto;min-width:88px;min-height:44px;padding:10px}
  .admin-page .login{padding:18px}.admin-page .login input,.admin-page .login button{min-height:48px}
  #dashboard:not(.summary-active)>.overview-heading,#dashboard:not(.summary-active)>.metrics,#dashboard:not(.summary-active)>.finance-grid,#dashboard:not(.summary-active)>.metric-note,#dashboard:not(.summary-active)>.insights{display:none}
  #dashboard.summary-active>.overview-heading,#dashboard.summary-active>.metrics,#dashboard.summary-active>.finance-grid,#dashboard.summary-active>.metric-note,#dashboard.summary-active>.insights{display:grid}
  #dashboard.summary-active>.overview-heading{display:flex;margin-top:14px;padding:18px;border-radius:17px}
  #dashboard.summary-active>.overview-heading h2{font-size:25px}
  #dashboard.summary-active>.metrics,#dashboard.summary-active>.finance-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  #dashboard.summary-active>.metrics{margin:10px 0}
  #dashboard.summary-active .metric,#dashboard.summary-active .finance-card,#dashboard.summary-active .insight-card{padding:14px;border-radius:14px}
  #dashboard.summary-active .metric strong,#dashboard.summary-active .finance-card strong{font-size:22px}
  .admin-page .view-tabs{position:fixed;z-index:40;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(7,minmax(48px,1fr));gap:0;margin:0;padding:6px 4px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #ded2d8;background:rgba(255,253,249,.97);box-shadow:0 -8px 28px rgba(63,40,56,.12);backdrop-filter:blur(12px);overflow-x:auto}
  .admin-page .view-tab{display:grid;min-width:0;min-height:48px;place-items:center;padding:6px 2px;border-radius:9px;font-size:0;white-space:normal}
  .admin-page .view-tab::before{display:block;font-size:18px;line-height:1}.admin-page .view-tab::after{display:block;font-size:9px;line-height:1.2}
  .admin-page .view-tab[data-view="ordersView"]::before{content:"▤"}.admin-page .view-tab[data-view="ordersView"]::after{content:"Pedidos"}
  .admin-page .view-tab[data-view="summaryView"]::before{content:"⌁"}.admin-page .view-tab[data-view="summaryView"]::after{content:"Resumo"}
  .admin-page .view-tab[data-view="crmView"]::before{content:"♙"}.admin-page .view-tab[data-view="crmView"]::after{content:"Clientes"}
  .admin-page .view-tab[data-view="loyaltyView"]::before{content:"☆"}.admin-page .view-tab[data-view="loyaltyView"]::after{content:"Pontos"}
  .admin-page .view-tab[data-view="couponsView"]::before{content:"%"}.admin-page .view-tab[data-view="couponsView"]::after{content:"Cupons"}
  .admin-page .view-tab[data-view="settingsView"]::before{content:"◇"}.admin-page .view-tab[data-view="settingsView"]::after{content:"Produto"}
  .admin-page .view-tab[data-view="devicesView"]::before{content:"▣"}.admin-page .view-tab[data-view="devicesView"]::after{content:"Aparelhos"}
  .admin-page .view-tab.active{background:#644257;color:#fff}
  .admin-page .toolbar{position:sticky;z-index:9;top:60px;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px -12px 12px;padding:10px 12px;background:rgba(247,243,239,.96);backdrop-filter:blur(10px)}
  .admin-page .toolbar input{grid-column:1/-1;min-width:0}.admin-page .toolbar select{min-width:0;width:100%}.admin-page .toolbar input,.admin-page .toolbar select{min-height:44px;font-size:14px}
  .admin-page .orders,.admin-page .crm-grid{gap:10px}
  .admin-page .order,.admin-page .crm-card{padding:15px;border-radius:14px}
  .admin-page .order h2{font-size:17px}.admin-page .order-head{align-items:flex-start;gap:8px}.admin-page .badge{font-size:10px;white-space:nowrap}
  .admin-page .order-bottom{align-items:center}.admin-page .order-bottom select{min-height:46px;max-width:170px}
  .admin-page .payment-line{align-items:stretch}.admin-page .receipt-button{min-height:44px}
  .admin-page .device-layout,.admin-page .settings-grid{grid-template-columns:1fr}.admin-page .settings-card{padding:18px;border-radius:15px}.admin-page .settings-card input,.admin-page .settings-card select,.admin-page .settings-card textarea,.admin-page .settings-card button{min-height:48px}
  .admin-page .crm-loyalty,.admin-page .device-row{align-items:stretch;flex-direction:column}.admin-page .reward-actions{justify-content:stretch}.admin-page .reward-actions button{width:100%}

  /* Store operation */
  .operation-page main{padding:14px 0 20px}.operation-page #workspace>.op-title{padding-inline:14px;margin-bottom:12px}.operation-page .op-title h1{font-size:26px}.operation-page .op-title p{max-width:230px;font-size:11px}.operation-page .summary{min-width:78px;padding:10px 8px;border-radius:14px}.operation-page .summary strong{font-size:24px}
  .operation-page .stage-nav{position:sticky;z-index:8;top:64px;display:flex;gap:7px;overflow:auto;padding:9px 12px;background:rgba(243,239,235,.96);backdrop-filter:blur(10px);scrollbar-width:none}.operation-page .stage-nav::-webkit-scrollbar{display:none}
  .operation-page .stage-nav button{display:flex;min-height:42px;align-items:center;gap:8px;white-space:nowrap;border:1px solid #dacdc8;border-radius:999px;background:#fff;color:#55404b;padding:8px 12px;font:700 11px inherit}.operation-page .stage-nav b{display:grid;width:22px;height:22px;place-items:center;border-radius:50%;background:#eee3e9;color:#644257}
  .operation-page .board{grid-template-columns:repeat(4,calc(100vw - 28px));gap:10px;padding:0 14px 25px;scroll-padding-inline:14px}
  .operation-page .column{min-height:calc(100dvh - 220px);border-radius:17px}.operation-page .ticket{padding:15px}.operation-page .advance{min-height:48px;min-width:130px}.operation-page .ticket-foot{align-items:stretch}.operation-page .toast{right:14px;bottom:14px;left:14px;text-align:center}

  /* Pairing */
  .pair-page main{display:grid;min-height:100dvh;place-items:center;padding:18px}.pair-page .access{width:100%;margin:0;padding:26px 20px;border-radius:20px}.pair-page .access h1{font-size:31px}.pair-page .access form input,.pair-page .access form button{min-height:50px}

  /* Loyalty card */
  .loyalty-page header{position:sticky;z-index:10;top:0;height:62px;padding:8px 14px}.loyalty-page header img{width:40px;height:40px}.loyalty-page header strong{font-size:17px}.loyalty-page header small{font-size:8px}.loyalty-page header>a:last-child{min-height:42px;padding:10px 2px}
  .loyalty-page main{padding:28px 14px calc(42px + env(safe-area-inset-bottom))}.loyalty-page .intro{margin-bottom:22px}.loyalty-page .intro h1{font-size:38px}.loyalty-page .intro p{font-size:13px;line-height:1.55}
  .loyalty-page .loyalty-card{padding:20px;border-radius:20px}.loyalty-page .card-top h2{font-size:25px}.loyalty-page .card-top img{width:56px}.loyalty-page .points-balance{margin:20px 0 8px}.loyalty-page .points-balance strong{font-size:50px}.loyalty-page .points-rule{font-size:12px;line-height:1.5}
  .loyalty-page .rewards{gap:10px;margin-top:10px}.loyalty-page .reward-card{padding:18px;border-radius:17px}.loyalty-page .reward-card p{min-height:0}.loyalty-page .terms{padding:20px;border-radius:17px}.loyalty-page .card{padding:25px 20px;border-radius:20px}.loyalty-page .button{min-height:48px}
}

@media(max-width:380px){
  .storefront .product{grid-template-columns:100px minmax(0,1fr)}
  .storefront .product-photo{min-height:136px}
  .admin-page .view-tab::after{font-size:8px}
}

@media(max-width:480px){.storefront .hero h1{font-size:clamp(38px,10.5vw,44px);letter-spacing:-1.5px}.storefront .hero h1 em{display:block}}
