:root { --app-nav-height: calc(72px + env(safe-area-inset-bottom, 0px)); }
[hidden] { display: none !important; }
.app-destinations { position: fixed; z-index: 60; inset: auto 0 0; display: flex; justify-content: center; padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)); min-height: var(--app-nav-height); box-sizing: border-box; background: rgba(248,248,250,.96); border-top: 1px solid #d1d1d6; backdrop-filter: blur(20px); }
.app-destinations button { display: grid; place-content: center; gap: 4px; width: min(25%,160px); min-height: 48px; border: 0; border-radius: 12px; background: transparent; color: #636366; font: inherit; cursor: pointer; }
.app-destinations button span { font-size: 23px; }
.app-destinations button small { font-size: 12px; }
.app-destinations button[aria-current="page"], .app-destinations button.is-active { color: #0066d6; background: #007aff12; }
.app-destinations button:focus-visible { outline: 2px solid #007aff; outline-offset: -2px; }
.operational-shell { padding-bottom: var(--app-nav-height); }
.operational-shell .chat-view { height: calc(100dvh - 64px - var(--safe-top) - var(--app-nav-height)); }
.client-history-sheet, .client-profile-sheet, .client-chat-sheet { bottom: var(--app-nav-height); }
input, select, textarea { font-size: max(16px, 1em); }
.pwa-install { display: block; margin: 18px auto; padding: 12px 22px; min-height: 44px; border: 1px solid #c7c7cc; border-radius: 14px; color: #0066d6; background: #fff; font: 600 15px system-ui; cursor: pointer; }
.pwa-dialog { max-width: min(420px, calc(100vw - 48px)); padding: 24px; border: 0; border-radius: 22px; color: #1c1c1e; background: #fff; font: 16px/1.5 system-ui; box-sizing: border-box; }
.pwa-dialog::backdrop { background: #0005; }
.pwa-dialog button, .pwa-update button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 12px; background: #007aff; color: white; font: 600 15px system-ui; cursor: pointer; }
.pwa-update { position: fixed; z-index: 400; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(480px,calc(100% - 32px)); padding: 16px; box-sizing: border-box; background: #fff; color: #1c1c1e; border: 1px solid #d1d1d6; border-radius: 18px; box-shadow: 0 8px 40px #0003; font: 15px/1.4 system-ui; }
.pwa-update span { display: block; margin-bottom: 12px; }
.pwa-update button + button { margin-left: 8px; background: #f2f2f7; color: #0066d6; }
@media(min-width: 900px) {
  body { padding: 0; background: #f2f2f7; }
  .app-shell:has(.client-screen:not([hidden])) { width: 100%; max-width: 1440px; border-radius: 0; }
  .client-screen, .operational-shell { padding: 0 0 0 220px; min-height: 100dvh; }
  .app-destinations { inset: 0 auto 0 0; width: 220px; padding: 76px 12px 24px; flex-direction: column; justify-content: flex-start; gap: 8px; border-top: 0; border-right: 1px solid #d1d1d6; }
  .app-destinations::before { content: 'CrediUP'; position: absolute; top: 26px; left: 24px; color: #1c1c1e; font: 700 21px system-ui; }
  .app-destinations button { display: flex; justify-content: flex-start; align-items: center; width: 100%; gap: 12px; padding: 12px; text-align: left; }
  .app-destinations button small { font-size: 15px; }
  .client-content { max-width: 900px; padding: 24px; }
  .client-toolbar, .operational-toolbar { border-bottom: 1px solid #d1d1d6; padding-left: 24px; padding-right: 24px; }
  .client-history-sheet, .client-profile-sheet, .client-chat-sheet { left: 220px; right: 0; width: auto; max-width: 1220px; bottom: 0; transform: none; }
  .operational-shell .chat-view { height: calc(100dvh - 64px - var(--safe-top)); }
}
