/* Phone polish for forms, dashboards and the install bar. Loaded last. */
.sv-install { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1085;
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; background: #fff; color: #1b2b3f;
  border: 1px solid rgba(27,43,63,.12); border-radius: 14px; box-shadow: 0 10px 30px rgba(15,30,50,.18); max-width: 520px; margin-inline: auto; }
.sv-install[hidden] { display: none; }
.sv-install span { flex: 1; font-size: .92rem; line-height: 1.3; }
.sv-install-close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; padding: .25rem .5rem; color: #5b6b7f; min-width: 44px; min-height: 44px; }

@media (max-width: 767.98px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); overflow-x: hidden; }
  img, video, iframe, table { max-width: 100%; }
  /* 16px inputs stop iOS zooming the page when a field is focused; 44px = comfortable thumb targets. */
  .sv-input, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
  input[type=url], input[type=date], input[type=datetime-local], select, textarea { font-size: 16px !important; min-height: 46px; }
  textarea { min-height: 110px; }
  .sv-btn, .sv-btn-sm, button[type=submit] { min-height: 44px; }
  .sv-btn-sm { padding-top: .55rem; padding-bottom: .55rem; }
  .sv-card, .sv-auth-card { padding: 1.1rem; border-radius: 14px; }
  .sv-card form[style*="max-width"], form.sv-card[style*="max-width"] { max-width: 100% !important; }
  .sv-container { padding-left: 16px; padding-right: 16px; }
  /* Forms: stack side-by-side fields, full-width primary actions */
  .row.g-3 > [class*="col-6"], .row.g-3 > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }
  form .sv-btn-primary[type=submit], form .sv-btn-block { width: 100%; }
  .d-flex.gap-2:not(.flex-nowrap):not(.sv-pills), .d-flex.gap-3:not(.flex-nowrap), .d-flex.justify-content-between { flex-wrap: wrap; }
  .d-flex.gap-2 > .sv-btn, .d-flex.gap-3 > .sv-btn { max-width: 100%; }
  /* Wizard step pills scroll sideways instead of wrapping into a tall block */
  .sv-wizard-steps, .sv-steps-nav, .sv-listing-steps, ol.sv-wizard, nav[aria-label*="step" i], .sv-pills { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: .5rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .25rem; }
  .sv-wizard-steps::-webkit-scrollbar, .sv-steps-nav::-webkit-scrollbar, .sv-listing-steps::-webkit-scrollbar { display: none; }
  .sv-wizard-steps > *, .sv-steps-nav > *, .sv-listing-steps > *, .sv-pills > * { flex: 0 0 auto; white-space: nowrap; }
  /* Tables become scrollable panels rather than breaking the page width */
  .sv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  h1 { font-size: 1.6rem; }
  .sv-page-header { padding-top: 1rem; }
}
