.mobile-nav-toggle { display: none; }
.pwa-notice { margin: 12px auto; max-width: 1260px; padding: 14px 20px; border: 1px solid #e0b05a; border-radius: 12px; background: #fff5dc; color: #462d08; display: flex; align-items: center; gap: 16px; }
.pwa-notice p { flex: 1; margin: 0; }
#pwa-connection-status[hidden], #pwa-update-notice[hidden], [data-pwa-install][hidden], [data-pwa-installed][hidden] { display: none !important; }
.pwa-install-card { max-width: 960px; margin-inline: auto; }
.pwa-install-heading { display: flex; align-items: center; gap: 20px; }
.pwa-install-heading img { border-radius: 18px; }
.pwa-install-heading h2 { margin: 0; }
.pwa-install-instructions section { padding: 16px; border: 1px solid var(--border); border-radius: 16px; }
.pwa-install-instructions li { margin: 10px 0; line-height: 1.5; }
.pwa-home-link { display: inline-flex; margin-top: 12px; }
body.pwa-standalone .pwa-home-link { display: none !important; }
@media (display-mode: standalone) {
  .pwa-home-link { display: none !important; }
}

@media screen and (max-width: 760px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  body .topbar { position: relative !important; inset: auto !important; display: grid; grid-template-columns: minmax(0,1fr) 56px; gap: 12px; height: auto !important; min-height: 0 !important; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); }
  body .topbar { grid-template-areas: none; }
  body .topbar .brand { min-width: 0; grid-area: auto; align-items: flex-start; text-align: left; }
  body .topbar h1 { font-size: 22px; line-height: 1.2; }
  body .topbar .brand p { font-size: 12px; line-height: 1.4; }
  body .topbar .topbar-logo { grid-area: auto; position: static !important; transform: none !important; width: 52px !important; height: 52px !important; max-height: 52px; object-fit: contain; margin: 0 !important; }
  body .topbar.has-mobile-navigation { grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 10px; align-items: center; }
  body .topbar.has-mobile-navigation .topbar-logo { width: 44px !important; height: 44px !important; }
  body.pwa-ready .topbar .mobile-nav-toggle { display: flex; grid-column: 3; grid-row: 1; align-self: start; justify-self: end; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 10px; border-radius: 10px; border: 1px solid #dbe3ee !important; background: #fff !important; color: #17202c !important; box-shadow: none !important; transform: none !important; }
  .mobile-nav-icon { display: flex; flex-direction: column; gap: 5px; width: 22px; }
  .mobile-nav-icon > span { display: block; height: 2px; width: 100%; border-radius: 2px; background: currentColor; }
  body .topbar #main-navigation { grid-area: auto; grid-column: 1 / -1; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border: 1px solid #dbe3ee; border-radius: 14px; background: #fff; color: #17202c; text-align: right; }
  body.pwa-ready .topbar #main-navigation:not([data-mobile-open="true"]) { display: none !important; }
  body .topbar #main-navigation > a, body .topbar #main-navigation > details, body .topbar #main-navigation > label { width: 100%; margin: 0; }
  body .topbar #main-navigation a, body .topbar #main-navigation summary { display: flex; align-items: center; min-height: 44px; height: auto; width: 100%; justify-content: flex-end; text-align: right; gap: 10px; padding: 10px 12px; border: 0 !important; border-radius: 8px; background: transparent !important; color: #17202c !important; box-shadow: none !important; transform: none !important; font-size: 15px; line-height: 1.4; text-decoration: none; white-space: normal; }
  body .topbar #main-navigation a::after, body .topbar #main-navigation summary::after { display: none; }
  body .topbar #main-navigation a:hover, body .topbar #main-navigation summary:hover { background: #eef2f7 !important; }
  body .topbar #main-navigation summary::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
  body .topbar #main-navigation details[open] > summary::before { transform: rotate(225deg); margin-top: 4px; }
  body .topbar #main-navigation .nav-dropdown-menu { position: static; min-width: 0; width: auto; margin: 2px 16px 8px 0; padding: 0 12px 0 0; border: 0; border-right: 2px solid #dbe3ee; border-radius: 0; background: transparent; box-shadow: none; gap: 0; }
  body .topbar #main-navigation .nav-dropdown-menu a { font-weight: 500; font-size: 14px; }
  body .topbar #main-navigation .topbar-state-switcher { align-items: flex-end; color: #17202c; }
  body .topbar #main-navigation select { max-width: 100%; font-size: 16px; text-align: right; }
  body .topbar #main-navigation a:focus-visible, body .topbar #main-navigation summary:focus-visible, body .topbar .mobile-nav-toggle:focus-visible { outline: 2px solid #c8550b; outline-offset: 2px; }
  body .user-strip { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 10px 16px; font-size: 12px; }
  body .user-strip-theme, body .user-strip-timezone { display: none; }
  body main.container { width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 16px auto; padding: 0 12px; }
  body main .card { padding: 18px; max-width: 100%; min-width: 0; margin-bottom: 16px; border-radius: 18px; }
  body main .grid.two, body main .grid.three, body main .grid.four { grid-template-columns: minmax(0, 1fr); }
  body main .section-header { flex-wrap: wrap; gap: 12px; }
  body main input:not([type="checkbox"]):not([type="radio"]), body main select, body main textarea { font-size: 16px; max-width: 100%; min-width: 0; }
  body main button, body main .button, body main summary { min-height: 44px; }
  body main .form-actions, body main .button-stack, body main .login-secondary-action { flex-wrap: wrap; gap: 10px; }
  body main .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body main .summary-card { min-width: 0; overflow-wrap: anywhere; }
  body main .table-wrap { max-width: 100%; width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body main table.pwa-wide-table { min-width: 720px; table-layout: auto; }
  body main table th, body main table td { word-break: normal; overflow-wrap: normal; }
  body main .operations-module-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body main .operations-module-card { min-height: 0; padding: 20px; gap: 10px; grid-template-rows: auto; text-align: left; }
  body main .operations-module-card strong { min-height: 0; font-size: 23px; }
  body main .operations-module-card small { font-size: 14px; }
  body main .operations-module-icon, body main .operations-module-status { margin: 0; justify-self: start; }
  body main .operations-module-card:hover { transform: none; }
  body main .operations-hero h2 { font-size: 28px; line-height: 1.15; }
  body main .operations-hero .muted { font-size: 15px; }
  body .page-back-button { position: static !important; margin: 12px 12px 0; min-height: 44px; }
  .pwa-notice { margin: 12px; flex-wrap: wrap; }
  .pwa-install-heading { gap: 14px; }
  .pwa-install-heading img { width: 64px; height: 64px; }
  .pwa-install-instructions { gap: 12px; }
}
@media print { .mobile-nav-toggle, .pwa-notice, .pwa-home-link, .pwa-install-nav { display: none !important; } }
