@media (max-width: 640px) {
  html, body { max-width: 100%; overflow-x: hidden; overscroll-behavior-y: none; }
  body { -webkit-text-size-adjust: 100%; }
  input, select, textarea { font-size: 16px !important; }
  .modal-backdrop, .password-modal-backdrop { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 16px 12px; }
  .modal, .password-modal { width: 100%; max-width: 100%; min-width: 0; margin: 10px 0 24px; transform: none !important; animation: none !important; }
  .form-grid, .form-grid.two, .field { min-width: 0; max-width: 100%; }
  .field input, .field select, .field input[type="date"] { width: 100%; min-width: 0; max-width: 100%; }
  /* Yeni şantiye formunda iOS tarih seçicisinin kendi genişliği satırı taşırmasın. */
  #projectForm input[type="date"],
  #extraWorkForm input[type="date"],
  #agreementForm input[type="date"],
  #alibabaEntryForm input[type="date"],
  #cashEntryForm input[type="date"] {
    display: block;
    width: min(100%, 188px) !important;
    inline-size: min(100%, 188px) !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    max-width: calc(100vw - 78px) !important;
    max-inline-size: calc(100vw - 78px) !important;
    box-sizing: border-box;
  }
  #projectForm .field:has(input[type="date"]),
  #extraWorkForm .field:has(input[type="date"]),
  #agreementForm .field:has(input[type="date"]),
  #alibabaEntryForm .field:has(input[type="date"]),
  #cashEntryForm .field:has(input[type="date"]) { min-width: 0; overflow: hidden; }
  #cashEntryForm .form-grid.two { grid-template-columns: minmax(0, 158px) minmax(0, 1fr); }
  #cashEntryForm input[type="date"] { width: 158px !important; inline-size: 158px !important; max-width: 100% !important; max-inline-size: 100% !important; }
  #cashEntryForm .field:has(input[type="date"]) { max-width: 158px; }
  .modal-actions { position: sticky; bottom: -1px; padding-top: 12px; background: #1b211e; }
  .primary-btn:hover, .project-card:hover, .unlock-btn:hover { transform: none; }
  .core-bars i, .smart-signal i, .status-dot, .assistant-pulse { animation: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .smart-bottom-bar { min-height: 48px; }
  .smart-bottom-bar b { display: block !important; flex: 1; color: #c9d8ce; font-size: 11px; line-height: 1.4; }
  .vault-gate, .smart-home { min-height: 100svh; }
}
