/* Phone-specific safe areas and responsive fiscal/agenda flows. */
@media (max-width:680px) {
  .product-modal,.customer-modal{align-items:stretch;padding:8px 8px calc(78px + env(safe-area-inset-bottom))}
  .product-modal .product-modal-card,.customer-modal .customer-fiscal-form{max-height:calc(100dvh - 94px - env(safe-area-inset-bottom));padding-bottom:0;overscroll-behavior:contain}
  .product-modal-card .product-form-actions,.customer-fiscal-form .product-form-actions{position:sticky;z-index:8;bottom:0;grid-template-columns:1fr;margin:2px -14px 0;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #dbe5f0;background:rgba(255,255,255,.98);box-shadow:0 -10px 22px rgba(15,23,42,.08)}
  .product-modal-card .product-form-actions .btn,.customer-fiscal-form .product-form-actions .btn{min-height:48px}

  .agenda-pro-page{min-width:0;overflow-x:hidden}
  .agenda-pro-page:has(.agenda-workspace) .agenda-pro-hero,.agenda-day-panel>header,.agenda-report>header{padding:16px}
  .agenda-pro-page:has(.agenda-workspace) .agenda-pro-hero h1{font-size:25px}
  .agenda-pro-page:has(.agenda-workspace) .agenda-date-toolbar{gap:7px}
  .agenda-pro-page:has(.agenda-workspace) .agenda-date-toolbar div{min-width:0;flex:1}
  .agenda-date-toolbar .today{padding:0 8px}
  .agenda-pro-page:has(.agenda-workspace) .agenda-timeline{padding:6px 10px 16px}
  .agenda-compact-slot{grid-template-columns:46px minmax(0,1fr)}
  .agenda-compact-event{grid-template-columns:9px minmax(0,1fr) 28px;gap:5px;padding:5px 6px}
  .agenda-compact-event>*{min-width:0}
  .agenda-modal-backdrop{padding:8px 8px calc(76px + env(safe-area-inset-bottom))}
  .agenda-modal{width:100%;max-height:calc(100dvh - 92px - env(safe-area-inset-bottom))}
  .agenda-modal>header{padding:13px 15px}
  .agenda-pro-form{grid-template-columns:1fr;padding:14px}
  .agenda-pro-form .span-2,.agenda-pro-form footer{grid-column:1}
  .agenda-pro-form footer{position:sticky;bottom:0;z-index:4;margin:4px -14px -14px;padding:10px 14px;background:#fff}
  .agenda-pro-form footer .btn{width:100%;min-height:46px}

  .nfe-new-page,.nfe-detail-page,.nfe-list-panel{min-width:0}
  .nfe-form-tabs{display:flex;overflow-x:auto;overscroll-behavior-inline:contain}
  .nfe-form-tabs button{flex:0 0 auto;min-width:122px}
  .nfe-new-page .nfe55-form,.nfe-detail-page .nfe55-form{padding:10px}
  .nfe-new-page .nfe-tab-panel,.nfe-detail-page .nfe-tab-panel{grid-template-columns:1fr!important}
  .nfe-new-page .nfe-tab-panel>*,.nfe-detail-page .nfe-tab-panel>*{grid-column:1!important;min-width:0}
  .nfe-detail-actions{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}
