/* Ajustes compartilhados das telas de celular e tablet. */
@media (max-width:980px){
 html{scroll-padding-top:16px}
 body:not(.barber-pdv){min-height:100dvh}
 body :is(.main-content,.panel,.auth-card,.public-card,.public-hero,.profile-card,.stat-card){min-width:0;max-width:100%}
 body .main-content{width:100%;margin-left:0;padding:20px 16px}
 body .topbar{align-items:flex-start;gap:14px;flex-wrap:wrap}
 body .topbar>div:first-child{flex:1;min-width:0}
 body .topbar h1{font-size:clamp(22px,4vw,28px);overflow-wrap:anywhere}
 body .profile-chip{min-width:0;max-width:100%}
 body .profile-chip>div:last-child{min-width:0}
 body .profile-chip strong{overflow-wrap:anywhere}
 body .sidebar{height:100dvh;overflow-y:auto;padding-bottom:max(24px,env(safe-area-inset-bottom));z-index:80}
 body.sidebar-open .sidebar{box-shadow:0 0 0 100vmax #0009}
 body .mobile-menu,body .icon-btn{min-width:44px;min-height:44px}
 body .toolbar,body .page-head,body .panel-head{gap:12px;flex-wrap:wrap}
 body :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px;min-height:44px;min-width:0;max-width:100%}
 body :is(button,a).btn{min-height:44px;white-space:normal;text-align:center}
 body .modal-backdrop{padding:12px;align-items:start;overflow-y:auto;overscroll-behavior:contain}
 body .modal{margin:auto;max-height:calc(100dvh - 24px);padding:18px;scrollbar-gutter:stable}
 body .modal-head h3{font-size:20px;overflow-wrap:anywhere}
 body .modal-actions{position:sticky;bottom:-18px;background:var(--panel,#111114);padding:14px 0;flex-wrap:wrap;z-index:2}
 body .modal-actions .btn{flex:1}
 body .public-page{padding:20px 14px max(24px,env(safe-area-inset-bottom))}
 body :is(.public-card,.public-hero){padding:22px}
 body .public-hero h1{font-size:clamp(26px,6vw,40px)}
 body .public-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .public-summary strong{overflow-wrap:anywhere}
 body .product-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;padding-bottom:6px}
 body .product-tabs button{min-height:44px;flex-shrink:0}
 body .product-filter-row,body .product-search,body .product-toolbar{min-width:0;flex-wrap:wrap;gap:10px}
 body .product-toolbar .btn{flex:1}
 body .date-nav input{width:100%;min-width:0}
 body :is(.booking-note,.appointment-title,.client-hero h2,.chip,code){overflow-wrap:anywhere}
}
@media (max-width:640px){
 body .main-content{padding:16px 12px}
 body .topbar .profile-chip{width:100%;padding-left:0}
 body .hero{padding:24px;gap:16px;flex-wrap:wrap}
 body .hero h2{font-size:30px;overflow-wrap:anywhere}
 body .hero>.btn{width:100%}
 body .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body .metric-card{padding:15px}
 body .metric-card strong{font-size:22px}
 body :is(.content-grid,.settings-grid,.form-grid,.cards-grid,.card-grid,.service-grid){grid-template-columns:minmax(0,1fr)}
 body .form-grid .full{grid-column:auto}
 body .search-form{width:100%;max-width:none;min-width:0}
 body .search-form input{min-width:0;width:100%}
 body .toolbar-agenda .date-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;width:100%}
 body .toolbar-agenda .date-nav input{max-width:none}
 body .agenda-filters{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
 body .service-card{align-items:flex-start;padding:16px;flex-wrap:wrap}
 body .service-card>div:nth-child(2){min-width:0}
 body .booking-card{grid-template-columns:54px minmax(0,1fr)}
 body .booking-top{flex-wrap:wrap;gap:8px}
 body .booking-footer .row-actions{display:flex;flex-wrap:wrap;gap:8px}
 body .booking-footer .row-actions .btn{flex:1}
 body .table-wrap:has(.mobile-cards){overflow:visible}
 body .produtos-page .table-wrap:has(.mobile-cards){max-height:none}
 body .product-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;align-items:end}
 body .product-filters label{width:100%;min-width:0!important;margin:0}
 body .product-filters label:first-child,body .product-filters .low-stock-filter,body .product-filters>.btn{grid-column:1/-1;min-width:0!important}
 body .product-filters>.btn{width:100%}
 body table.mobile-cards{display:block;min-width:0;width:100%;border:0}
 body table.mobile-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body table.mobile-cards tbody{display:grid;gap:12px;width:100%}
 body table.mobile-cards tbody tr{display:grid;grid-template-columns:minmax(0,1fr);width:100%;border:1px solid var(--line,#303036);border-radius:14px;background:var(--panel,#131316);padding:12px}
 body table.mobile-cards tbody td{display:block;padding:8px 4px;border:0;text-align:left!important;min-width:0;overflow-wrap:anywhere;font-size:14px}
 body table.mobile-cards tbody td::before{content:attr(data-label);display:block;margin-bottom:5px;color:var(--muted,#a1a1aa);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
 body table.mobile-cards tbody td[data-label=""]::before{display:none}
 body table.mobile-cards td .row-actions{justify-content:flex-start;flex-wrap:wrap}
 body table.mobile-cards td .row-actions select{max-width:100%;min-height:44px}
 body table.mobile-cards .empty-table{padding:20px!important}
 body .elo-products-table.mobile-cards tr[data-product-id].produto-row-selected{border-color:var(--gold,#c8a15a);background:#252015}
 body .mobile-table-tools{display:flex;align-items:center;gap:10px;padding:8px 0 14px;min-height:44px}
 body .mobile-table-tools input{width:20px;height:20px}
 body .product-photo-layout{grid-template-columns:minmax(0,1fr)}
 body .receipt{width:auto;margin:12px;padding:18px;max-width:100%}
 body .receipt table{min-width:0;table-layout:fixed}
 body .receipt td,body .receipt th{padding:8px 4px;overflow-wrap:anywhere;font-size:12px}
 body .receipt .actions{display:flex;flex-wrap:wrap;gap:8px}
}
@media (max-width:360px){body .metrics,body .public-summary{grid-template-columns:minmax(0,1fr)}body .auth-card{padding:20px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
