[hidden] { display: none !important; }
.mobile-menu-toggle,.mobile-menu-close,.mobile-bottom-nav,.mobile-customer-cards,.mobile-import-cards,.mobile-folder-toggle { display:none; }
.mobile-menu-backdrop { position:fixed; inset:0; z-index:95; border:0; background:#14213d99; }
.mobile-network-status { position:fixed; top:0; left:0; right:0; z-index:150; margin:0; padding:12px; text-align:center; background:#fff1d6; color:#754810; }
.mobile-welcome { padding:24px; border-radius:18px; color:white; background:linear-gradient(115deg,#14213d,#245fe5); }
.mobile-welcome p { margin:0; opacity:.8; }.mobile-welcome h2 { margin:10px 0; font-size:24px; }.mobile-welcome span { opacity:.85; }
.mobile-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0; }
.mobile-stat-grid a { padding:16px 8px; text-align:center; border:1px solid #e5e9f0; border-radius:12px; background:white; }
.mobile-stat-grid strong { display:block; font-size:27px; color:#245fe5; }.mobile-stat-grid span { color:#697386; font-size:12px; }
.mobile-customer-search { display:flex; gap:8px; margin:18px 0; }.mobile-customer-search input { min-width:0; flex:1; padding:12px; border:1px solid #dfe4ec; border-radius:10px; font:inherit; }
.mobile-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.mobile-shortcuts a { display:grid; justify-items:center; gap:8px; padding:18px 5px; border-radius:14px; background:white; border:1px solid #e5e9f0; font-size:13px; }
.mobile-shortcuts b { display:grid; place-items:center; width:42px; height:42px; color:#245fe5; background:#edf3ff; border-radius:13px; font-size:25px; }
.mobile-task-item { display:grid; gap:5px; padding:16px 20px; border-bottom:1px solid #edf0f5; }.mobile-task-item:last-child { border:0; }.mobile-task-item span,.mobile-task-item small { color:#697386; }.mobile-task-item strong { overflow-wrap:anywhere; }
.mobile-footer-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:20px 0; color:#245fe5; }
.mobile-install-link { display:block; text-align:center; margin-top:24px; color:#245fe5; font-size:14px; }
.login-tabs { display:flex; gap:8px; margin:24px 0 8px; }.login-tabs button { margin:0; background:#edf3ff; color:#245fe5; }.login-tabs [aria-pressed=true] { background:#245fe5; color:white; }
.qr-image { max-width:280px; margin:18px auto; padding:10px; background:white; border-radius:12px; }.qr-image svg { display:block; width:100%; height:auto; }
.qr-match-code { color:#245fe5; font-size:24px; font-weight:750; letter-spacing:3px; text-align:center; }
#qr-login { font-size:14px; line-height:1.7; color:#52617a; text-align:center; }#qr-login button { margin-top:10px; }
.qr-device { display:grid; grid-template-columns:90px 1fr; gap:10px; background:#f2f5fa; padding:16px; border-radius:10px; }.qr-device dd { margin:0; }.qr-device dt { color:#64748b; }
button.qr-cancel { margin-top:10px; color:#245fe5; background:#edf3ff; }.mobile-url { overflow-wrap:anywhere; color:#245fe5; }.mobile-instructions { padding-left:22px; font-size:14px; line-height:1.8; }.mobile-instructions li { margin-bottom:12px; }
.mobile-scanner { max-width:600px; margin:auto; padding:22px; }.mobile-scanner h2 { font-size:20px; }.mobile-scanner video { width:100%; max-height:50dvh; border-radius:12px; background:#14213d; margin-bottom:16px; }.mobile-scanner label { display:block; margin:20px 0 8px; }.mobile-scanner input { max-width:100%; }
.mobile-scanner .button { margin-bottom:8px; }.mobile-public-card a { color:#245fe5; }
@media(max-width:760px) {
  html { scroll-padding-bottom:90px; }
  body .app-shell { display:block !important; min-height:100dvh; }
  body .main-content { margin:0 !important; padding:16px 12px calc(90px + env(safe-area-inset-bottom)) !important; width:auto !important; }
  body .sidebar { display:none !important; }
  body.mobile-menu-open { overflow:hidden; }
  body.mobile-menu-open .sidebar { display:flex !important; position:fixed !important; inset:0 auto 0 0 !important; z-index:100; width:min(310px,86vw) !important; height:100dvh !important; overflow-y:auto !important; padding:16px !important; }
  body.mobile-menu-open .sidebar .brand { display:flex !important; }
  body.mobile-menu-open .sidebar .brand strong,body.mobile-menu-open .sidebar .brand small { display:block !important; }
  body.mobile-menu-open .sidebar .main-nav { display:grid !important; grid-template-columns:1fr !important; }
  body.mobile-menu-open .sidebar .main-nav a { display:flex !important; flex-direction:row !important; justify-content:flex-start !important; font-size:14px !important; min-height:44px; }
  body.mobile-menu-open .sidebar .main-nav a span { display:inline !important; }
  body.mobile-menu-open .sidebar .sidebar-bottom { display:grid !important; }
  body.mobile-menu-open .sidebar .user-chip > span { display:inline-block !important; }
  body.mobile-menu-open .sidebar .sidebar-bottom .button { font-size:14px !important; min-height:44px; }
  body.mobile-menu-open .sidebar .sidebar-menu-area { max-height:none; }
  .mobile-menu-close { display:block; margin-bottom:18px; flex-shrink:0; }
  .mobile-menu-toggle { display:inline-flex; }
  body .topbar { display:flex !important; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:16px; }
  body .topbar h1 { font-size:21px; }.topbar .eyebrow { display:none; }.topbar-actions { margin-left:auto; flex-wrap:wrap; gap:8px; }
  .mobile-bottom-nav { position:fixed; bottom:0; left:0; right:0; z-index:80; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); padding:6px 6px calc(6px + env(safe-area-inset-bottom)); border-top:1px solid #e5e9f0; background:#fffffff5; backdrop-filter:blur(12px); }
  .mobile-bottom-nav a,.mobile-bottom-nav button { display:grid; gap:2px; place-content:center; min-height:50px; color:#697386; border:0; background:transparent; padding:4px 0; font:inherit; font-size:19px; text-align:center; border-radius:9px; margin:0; width:auto; }
  .mobile-bottom-nav span { font-size:11px; }.mobile-bottom-nav [aria-current=page] { color:#245fe5; background:#edf3ff; }
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea { font-size:16px !important; max-width:100%; min-height:44px; }
  .button { min-height:44px; }.form-actions { bottom:calc(74px + env(safe-area-inset-bottom)); flex-wrap:wrap; gap:8px; }
  .form-actions .button { flex:1; }.business-form,.form-panel,.form-section,.form-grid > * { min-width:0; }
  .customer-create .create-actions,.customer-edit .edit-actions { bottom:calc(74px + env(safe-area-inset-bottom)) !important; }
  .customer-create { grid-template-columns:minmax(0,1fr); max-width:100%; }
  .customer-create .create-columns { grid-template-columns:minmax(0,1fr); }
  .customer-create .create-company,.contact-phone-country,.contact-phone-number { min-width:0; }
  .contact-phone-row { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) 44px !important; }
  .contact-phone-actions { flex-direction:column; }.contact-phone-actions button { width:44px; height:44px; }
  .customer-create .create-actions { margin-left:0 !important; margin-right:0 !important; min-width:0; max-width:100%; padding:12px 8px !important; gap:6px; }
  .customer-create .create-actions .button { min-width:0; padding:10px 8px !important; }
  .main-content p,.main-content strong,.detail-main,.detail-side { overflow-wrap:anywhere; }
  .detail-grid,.detail-side,.card-layout { grid-template-columns:minmax(0,1fr) !important; }
  .customer-hero,.email-heading,.batch-summary { max-width:100%; }
  .mobile-welcome { padding:20px; }.mobile-welcome h2 { font-size:21px; }.mobile-welcome span { font-size:12px; }
  .mobile-shortcuts { gap:8px; }.mobile-shortcuts a { font-size:12px; }
  .mobile-task-panel .panel-heading { flex-direction:row; align-items:center; }
  /* The full customer table stays available on desktop; mobile uses the same filtered rows. */
  body.customer-list-page .customer-global-header,body.customer-list-page .customer-module-nav { display:none; }
  body.customer-list-page .topbar { display:flex !important; }
  body.customer-list-page .customer-workspace { margin:0 !important; border-radius:12px; width:100%; height:auto; padding:0; }
  body.customer-list-page .customer-workspace-body[data-customer-workspace] { display:block; overflow:visible; }
  body.customer-list-page .customer-groups { max-height:190px; border-right:0; border-bottom:1px solid #e5e9f0; }
  body.customer-list-page .customer-group-scroll { max-height:125px; }
  .group-pane-resize,.group-pane-toggle { display:none; }
  .customer-workspace-heading { flex-wrap:wrap; padding:14px !important; gap:10px !important; }
  .customer-workspace-heading h1 { display:none; }.customer-scope-tabs { margin:0 !important; }.new-customer { margin-left:auto !important; }
  .customer-results-tools { flex-wrap:wrap; gap:8px !important; }.customer-results-tools > strong { flex-basis:100%; }
  .customer-inline-search { display:grid !important; grid-template-columns:minmax(0,1fr) 44px; width:100%; max-width:none !important; height:auto !important; min-height:90px; }
  .customer-inline-search select { grid-column:1 / -1; width:100% !important; min-width:0; border-bottom:1px solid #e5e9f0; }
  .customer-inline-search .customer-choice-picker { grid-column:1; width:100%; min-width:0; }
  .customer-inline-search .customer-choice-picker > input:not([type=hidden]) { width:100% !important; min-width:0 !important; }
  .customer-inline-search > button[type=submit] { grid-column:2; grid-row:2; min-width:44px; }
  body.customer-list-page .bulk-customer-form .table-wrap,body.customer-list-page .customer-bulk-toolbar { display:none; }
  .mobile-customer-cards { display:grid; gap:10px; padding:10px; }
  .mobile-customer-card { border:1px solid #e5e9f0; border-radius:12px; padding:14px; background:white; display:grid; gap:6px; }
  .mobile-customer-card > a { display:grid; gap:6px; }.mobile-customer-card strong { color:#245fe5; font-size:16px; }.mobile-customer-card small { color:#697386; }
  .mobile-customer-card footer { display:flex; gap:10px; flex-wrap:wrap; padding-top:8px; border-top:1px solid #edf0f5; }
  .mobile-customer-card footer a { padding:8px 5px; color:#245fe5; }
  .customer-pagination { flex-wrap:wrap; justify-content:center; }.customer-pagination span { flex-basis:100%; text-align:center; }
  /* Keep folders accessible above messages instead of squeezing two columns. */
  body.email-workspace .mail-search-header { margin:0 !important; padding:10px; flex-wrap:wrap; height:auto; }
  .mail-search-header .workspace-search { width:100%; min-width:0; }.mail-workspace-layout { grid-template-columns:minmax(0,1fr) !important; }
  .workspace-folders { max-height:200px; overflow:auto; border-right:0; border-bottom:1px solid #e5e9f0; }
  .workspace-mails { min-width:0; padding:0 8px !important; }.workspace-toolbar { flex-wrap:wrap; height:auto; min-height:50px; padding:8px 0; }
  .workspace-mail-row { display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px; padding:12px 0; }
  .workspace-sender { width:calc(100% - 32px) !important; }.workspace-subject { flex-basis:100%; min-width:0; padding-left:26px; }.workspace-subject strong { white-space:normal; }
  .workspace-categories { overflow-x:auto; }.workspace-categories a { white-space:nowrap; }
  .mail-workspace-layout.reading-open { height:auto; min-height:0; overflow:visible; }
  .reading-open .workspace-folders { height:auto; overflow:auto; }.reading-open .workspace-reading-pane { height:auto; overflow:visible; }
  .mobile-folder-toggle { display:inline-flex; margin:8px 0; }
  .email-workspace .workspace-folders { display:none; }
  .email-workspace.mobile-folders-open .workspace-folders { display:block; }
  .reading-scroll { overflow:visible; padding:0 12px; }.reading-toolbar { flex-wrap:wrap; height:auto; min-height:56px; gap:8px; padding:10px; }
  .reading-title-row h1 { white-space:normal; }.reading-body { overflow-x:auto; }
  .email-detail-grid,.email-context-panel { grid-template-columns:minmax(0,1fr) !important; }.email-body { overflow-x:auto; max-width:100%; }
  .card-review,.card-photo-panel { min-width:0; }.card-photo-panel { padding:16px; }.card-review textarea { width:100%; }
  .import-preview-table .table-wrap { display:none; }.mobile-import-cards { display:grid; gap:12px; padding:12px; }
  .mobile-import-card { padding:14px; border:1px solid #e5e9f0; border-radius:12px; min-width:0; }
  .mobile-import-card h3 { margin:10px 0; }.mobile-import-card p { margin:8px 0; }
  .mobile-import-card dl { display:grid; grid-template-columns:76px minmax(0,1fr); gap:8px; }
  .mobile-import-card dt { color:#697386; }.mobile-import-card dd { margin:0; overflow-wrap:anywhere; }
  .import-review-page .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .import-review-page .metric-card { min-height:105px; padding:16px; }.import-review-page .metric-card strong { font-size:27px; }
}
