/* Phone-only layout fixes. Desktop styles remain unchanged. */
@media (max-width: 767px) {
  html, body, #root { box-sizing:border-box; width:100%; max-width:100%; overflow-x:hidden; }
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  #root > div { height:100dvh!important; min-height:100dvh!important; }
  #root aside { height:100dvh!important; width:min(19rem,calc(100vw - 44px))!important; max-width:calc(100vw - 44px); }
  #root > div > div > header { min-height:64px!important; padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left))!important; }
  #root > div > div > main { max-width:100vw; padding-bottom:env(safe-area-inset-bottom); overflow-x:hidden; }
  #root main :is(.p-8,.p-10) { padding:1rem!important; }
  #root main :is(.px-8,.px-10) { padding-right:1rem!important; padding-left:1rem!important; }
  #root main :is(.py-8,.py-10) { padding-top:1rem!important; padding-bottom:1rem!important; }
  #root main :is(.gap-8,.gap-10) { gap:1rem!important; }
  #root main input:not([type="checkbox"]):not([type="radio"]),
  #root main select,
  #root main textarea { max-width:100%; font-size:16px!important; }
  #root main button { min-height:44px; }

  .smtp-tabs-v67 { margin-bottom:16px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
  .smtp-tabs-v67 button { min-height:44px; scroll-snap-align:start; }
  .smtp-groups-toolbar-v132 { box-sizing:border-box; gap:10px; padding:12px; }
  .smtp-groups-search-v132,.smtp-groups-filter-v132 { box-sizing:border-box; width:100%; min-width:0; }
  .smtp-groups-actions-v132 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .smtp-groups-actions-v132 .smtp-groups-btn-v132 { width:100%; min-width:0; white-space:normal; }
  .smtp-groups-table-wrap-v132 { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .smtp-groups-table-v132 { min-width:760px; }
  .smtp-groups-modal-v132 { box-sizing:border-box; padding:10px; }
  .smtp-groups-dialog-v132 { max-height:calc(100dvh - 20px); overflow:auto; border-radius:15px; }
  .smtp-groups-dialog-head-v132,.smtp-groups-dialog-body-v132 { padding:16px; }
  .smtp-groups-dialog-actions-v132 { align-items:stretch; flex-direction:column-reverse; }
  .smtp-groups-dialog-actions-v132 button { width:100%; }
  .smtp-groups-toast-v132 { right:10px; bottom:max(10px,env(safe-area-inset-bottom)); left:10px; max-width:none; }

  html body #root #smtp-bulk-v111 { box-sizing:border-box; margin-bottom:16px; padding:16px; border-radius:16px; }
  html body #root #smtp-bulk-v111 .smtp-bulk-form-v111 { grid-template-columns:minmax(0,1fr); gap:16px; }
  html body #root #smtp-bulk-v111 .smtp-bulk-head-v111 { align-items:flex-start; gap:10px; margin-bottom:16px; }
  html body #root #smtp-bulk-v111 .smtp-bulk-actions-v111 { align-items:stretch; flex-direction:column; }
  html body #root #smtp-bulk-v111 .smtp-bulk-actions-v111 button { width:100%; }
  html body #root .smtp-account-form-v239 { grid-template-columns:minmax(0,1fr); gap:18px; }
  html body #root .smtp-form-actions-v239 { align-items:stretch; flex-direction:column; }
  html body #root .smtp-form-actions-v239 > div,html body #root .smtp-form-actions-v239 button { width:100%; }

  .office-smtp-root-v65 { margin-top:16px; border-radius:18px; }
  .office-smtp-head-v65 { gap:12px; padding:18px 16px; }
  .office-smtp-head-v65 h2 { font-size:19px; }
  .office-smtp-grid-v65 { gap:12px; padding:12px; }
  .office-smtp-grid-v65 > section,.office-smtp-servers-v65 { padding:14px; border-radius:14px; }
  .office-smtp-servers-v65 { margin:0 12px 14px; }
  .office-smtp-ip-v65 { display:grid; grid-template-columns:minmax(0,1fr); }
  .office-smtp-ip-v65 label { box-sizing:border-box; width:100%; min-height:44px; }
  .office-smtp-card-v65 { padding:11px; }
  .office-smtp-actions-v65 { gap:8px; padding:12px; }
  .office-smtp-actions-v65 button { width:100%; min-height:46px; }
  .office-smtp-modal-backdrop-v65 { padding:10px; }
  .office-smtp-modal-v65 { box-sizing:border-box; width:100%; max-height:calc(100dvh - 20px); overflow:auto; padding:18px; border-radius:16px; }
  .office-smtp-modal-v65 > div { align-items:stretch; flex-direction:column-reverse; }
  .office-smtp-modal-v65 button { width:100%; }

  .wz-overlay-v236 { box-sizing:border-box; align-items:center; padding:10px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
  .wz-dialog-v236 { width:100%; max-height:calc(100dvh - 20px); padding:16px; border-radius:16px; }
  .wz-dialog-v236 header { align-items:flex-start; }
  .wz-dialog-v236 h2 { font-size:21px; }
  .wz-dialog-v236 section { padding:13px; margin:12px 0; }
  .wz-dialog-v236 footer { align-items:stretch; flex-direction:column-reverse; }
  .wz-dialog-v236 footer button { width:100%; }
  .wz-table-v236 { max-width:100%; -webkit-overflow-scrolling:touch; }

  [data-smtp-ipv6-manager-v181],
  [data-smtp-bounce-manager-v178],
  [data-vmta-configurator-v178],
  [data-smtp-block-monitor-v178] { box-sizing:border-box; max-width:100vw!important; padding:1rem!important; }
  [data-smtp-antigravity-design-v180] [data-smtp-antigravity-header-v180] { grid-template-columns:minmax(0,1fr)!important; padding:1rem!important; }
  [data-smtp-antigravity-design-v180] [data-smtp-antigravity-header-v180] > span { display:none!important; }
  [data-smtp-vmta-manager-v222="true"] #smtp-vmta-tabs-v222 { -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; }
  [data-smtp-vmta-manager-v222="true"] #smtp-vmta-tabs-v222 > button { min-width:150px; scroll-snap-align:start; }

  html body .marlaine-confirm-backdrop-v238 { padding:10px; }
  html body .marlaine-confirm-dialog-v238 { max-height:calc(100dvh - 20px); padding:20px 16px; border-radius:16px; }
  html body .marlaine-confirm-dialog-v238 footer { align-items:stretch; flex-direction:column-reverse; }
  html body .marlaine-confirm-dialog-v238 button { width:100%; min-height:46px; }
}

@media (max-width: 480px) {
  #root > div > div > header > div:first-child > div:last-child { display:none!important; }
  #root > div > div > header { gap:8px!important; }
  #root > div > div > header > div:last-child { gap:6px!important; padding-left:0!important; }
  .smtp-groups-actions-v132 { grid-template-columns:minmax(0,1fr); }
  .office-smtp-tools-v65 { grid-template-columns:minmax(0,1fr); }
  .office-smtp-tools-v65 input { grid-column:auto; }
}
