.app-tools-button { min-height:44px; border:1px solid #cfdbdf; border-radius:9px; padding:8px 12px; background:#fff; color:#173e4f; font:inherit; cursor:pointer; }
.app-settings { width:min(640px,calc(100vw - 24px)); max-height:90svh; border:1px solid #d3dfe2; border-radius:18px; padding:0; color:#17323c; background:#fff; box-shadow:0 24px 80px #09232b40; }
.app-settings::backdrop { background:#09232b70; }
.app-settings header { display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid #e2eaed; position:sticky; top:0; background:#fff; z-index:1; }
.app-settings h2,.app-settings h3 { margin:0; color:#17323c; }
.app-settings section { padding:22px 24px; border-bottom:1px solid #e2eaed; }
.app-settings p,.app-settings small { color:#587079; line-height:1.6; }
.app-settings button { min-height:44px; border-radius:8px; padding:9px 13px; font:inherit; cursor:pointer; }
.app-settings .primary { background:var(--primary,#173e4f); color:white; border:1px solid transparent; }
.app-settings .secondary { background:#fff; border:1px solid #cfdbdf; color:#173e4f; }
.app-settings .actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.app-settings > nav { padding:0 24px; }
.app-settings-embedded { width:100%; min-width:0; max-height:none; border:0; border-radius:0; background:transparent; box-shadow:none; }
.app-settings-embedded > nav { padding:0; margin-top:0; }
.app-settings-embedded section { padding:20px 0; }
.app-settings-embedded [role=status] { padding:0; }
.app-settings .device-row,.app-settings .inbox-row { border:1px solid #d9e4e7; border-radius:12px; margin:12px 0; padding:15px; }
.app-settings .inbox-row.unread { border-left:4px solid #197e83; background:#f4fafa; }
.app-settings input[type=text] { width:100%; min-height:44px; padding:9px; font:inherit; border:1px solid #c3d1d7; border-radius:8px; }
.app-settings label { display:flex; align-items:center; gap:10px; margin:12px 0; }
.app-settings input[type=checkbox] { width:20px; height:20px; accent-color:#197e83; }
.app-settings [role=status] { margin:0; padding:0 24px 12px; color:#8a3421; }
.app-install-card { position:fixed; z-index:1100; bottom:max(18px,env(safe-area-inset-bottom)); right:18px; width:min(340px,calc(100vw - 36px)); background:#fff; border:1px solid #c4d7dc; border-radius:16px; box-shadow:0 12px 40px #173e4f30; padding:20px; color:#17323c; }
.app-install-card p { line-height:1.5; color:#587079; }
.app-install-card button { min-height:44px; padding:8px 14px; margin-right:8px; border-radius:8px; }
.app-install-card button.primary { background:var(--primary,#173e4f); color:#fff; border:1px solid transparent; }
.app-install-card button.secondary { background:#fff; color:#173e4f; border:1px solid #cfdbdf; }
/* Belt and braces with the JS guard: never over the handover save bar. */
body:has(#jobView:not(.is-hidden)) .app-install-card { display:none; }
.app-settings .install-steps { display:grid; gap:12px; padding-left:24px; line-height:1.6; }
@media(max-width:600px) { .app-settings section,.app-settings header { padding:18px; } .app-settings-embedded section { padding:18px 0; } }
@media(max-width:760px) {
  body:has(#mobileMoreButton) .app-install-card { bottom:calc(12px + var(--staff-bottom-nav-height)); }
  body:has(#mobileMorePanel:not(.is-hidden)) .app-install-card { visibility:hidden; pointer-events:none; }
}
