/* Installed-app shell and connectivity UI; no stock data is stored offline. */
html { scroll-padding-top: 100px; }
body { min-height: 100dvh; }
.install-banner { display: flex; align-items: center; gap: 12px; margin: 20px 36px 0; padding: 14px 16px; background: #eaf1ff; border: 1px solid #d9e5ff; border-radius: 15px; }
.install-banner img, .device-panel img { border-radius: 12px; flex-shrink: 0; }
.install-banner > div { flex: 1; min-width: 0; }
.install-banner strong { display: block; color: #244783; font-size: 13px; }
.install-banner span { color: #5c7297; font-size: 11px; }
.install-banner > .icon-button { font-size: 23px; min-width: 32px; }
.connection-banner { display: flex; align-items: center; gap: 10px; padding: 12px 36px; background: #fff4df; color: #875216; border-bottom: 1px solid #f3dba8; font-size: 12px; line-height: 1.6; }
.connection-banner[data-tone=online] { background: #e9f7f1; color: #216b56; border-bottom-color: #c8e9dc; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.connection-message { flex: 1; }
.connection-banner button { min-height: 38px; border: 1px solid currentColor; border-radius: 8px; color: inherit; font-size: 11px; font-weight: 650; padding: 7px 12px; background: transparent; }
.device-features { display: grid; gap: 9px; margin-bottom: 20px; color: #45648c; font-size: 12px; }
.device-features span { padding-bottom: 9px; border-bottom: 1px solid #edf1f7; }
.install-help { text-align: center; }
.install-help > img { border-radius: 20px; margin-bottom: 18px; box-shadow: 0 6px 20px #315ce820; }
.install-help h3 { color: #264477; font-size: 18px; }
.install-help p { color: #647a9a; line-height: 1.8; font-size: 13px; }
.install-help ol { padding-left: 24px; margin: 23px 0 0; text-align: left; color: #526b90; font-size: 13px; }
.install-help li { padding-left: 5px; padding-bottom: 15px; line-height: 1.75; }
.install-help li::marker { color: #315ce8; font-weight: 750; }
.update-banner { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: white; border: 1px solid #d6e3fa; border-radius: 16px; box-shadow: 0 12px 45px #18326028; max-width: calc(100% - 32px); }
.update-banner > div { min-width: 0; }
.update-banner strong { display: block; font-size: 13px; color: #29497f; }
.update-banner span { display: block; white-space: nowrap; font-size: 11px; color: #627ba2; }
.update-banner .icon-button { min-width: 30px; font-size: 22px; }
.offline-app .online-dot { background: #d89b37; }
.mobile-nav button.active { color: #315ce8; background: #edf3ff; }
.standalone-app .auth-art-footer { visibility: hidden; }

@media (max-width: 900px) {
  html { scroll-padding-top: calc(90px + env(safe-area-inset-top)); }
  body { overscroll-behavior-y: none; }
  .app-shell { min-height: 100dvh; }
  .topbar { min-height: calc(70px + env(safe-area-inset-top)); height: auto; padding-top: env(safe-area-inset-top); padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }
  main { min-height: calc(100dvh - 150px); padding-bottom: 115px; padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }
  .app-footer { display: none; }
  .page-heading { margin-bottom: 20px; }
  .heading-eyebrow { letter-spacing: .7px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading .heading-actions { width: 100%; }
  .mobile-nav { min-height: calc(77px + env(safe-area-inset-bottom)); padding-left: max(8px,env(safe-area-inset-left)); padding-right: max(8px,env(safe-area-inset-right)); }
  .mobile-nav > a, .mobile-nav > button { min-height: 49px; }
  .icon-button { min-height: 44px; min-width: 44px; }
  .topbar-right > .icon-button { min-height: 44px; }
  .topbar-right > [data-action=refresh] { display: none; }
  .topbar-right > .notification-button { min-width: 42px; }
  .top-avatar { height: 36px; width: 36px; }
  .install-banner { margin: 17px 16px 0; padding: 13px 12px; gap: 9px; }
  .install-banner > img { width: 39px; height: 39px; border-radius: 10px; }
  .install-banner strong { font-size: 12px; }
  .install-banner span { font-size: 10px; display: block; line-height: 1.6; }
  .install-banner .btn { min-height: 41px; padding: 8px 11px; font-size: 11px; }
  .install-banner > .icon-button { min-width: 30px; padding: 0; }
  .connection-banner { padding: 11px 16px; gap: 8px; font-size: 11px; }
  .connection-banner button { min-height: 40px; padding: 7px 10px; }
  .modal { position: fixed; top: auto; right: 0; left: 0; bottom: var(--keyboard-inset,0px); width: 100%; max-width: 100%; margin: 0; max-height: calc(var(--visible-height,100dvh) - 16px - env(safe-area-inset-top)); border-radius: 23px 23px 0 0; overscroll-behavior: contain; }
  .modal-head { padding-top: 25px; }
  .modal-head::before { content: ''; position: absolute; top: 8px; left: calc(50% - 17px); width: 34px; height: 4px; background: #cfdbed; border-radius: 3px; }
  .modal-body { padding-left: max(20px,env(safe-area-inset-left)); padding-right: max(20px,env(safe-area-inset-right)); }
  .modal-footer { padding-bottom: max(16px,env(safe-area-inset-bottom)); }
  .modal-footer .btn { min-height: 48px; min-width: 0; white-space: normal; text-align: center; line-height: 1.4; }
  .keyboard-open .mobile-nav { visibility: hidden; pointer-events: none; }
  .keyboard-open .modal-footer { padding-bottom: 12px; }
  .toast-region { bottom: calc(94px + env(safe-area-inset-bottom) + var(--keyboard-inset,0px)); }
  .update-banner { bottom: calc(94px + env(safe-area-inset-bottom)); width: calc(100% - 32px); padding: 14px; gap: 8px; }
  .update-banner > div { flex: 1; }
  .update-banner span { white-space: normal; font-size: 10px; }
  .update-banner strong { font-size: 12px; }
  .update-banner .btn { min-height: 42px; font-size: 11px; }
  .auth-main { min-height: 100dvh; padding-top: calc(35px + env(safe-area-inset-top)); padding-bottom: calc(35px + env(safe-area-inset-bottom)); }
  .standalone-app .topbar { background: #fff; }
  .responsive-table.price-table .check-cell input { width: 24px; height: 24px; }
  .data-table a, .tab { -webkit-touch-callout: none; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .page-heading { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .heading-actions { flex: 0 1 auto; width: auto !important; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid > .panel:first-child, .recent-panel { grid-column: 1/-1; }
  .low-panel, .distribution-panel { grid-column: auto; }
  .modal { left: 50%; right: auto; width: 600px; transform: translateX(-50%); }
  .auth-form-wrap { max-width: 460px; }
}
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: mobile-sheet-in .18s ease-out; }
  @keyframes mobile-sheet-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
}
