/* FastUp mobile layout v3, 2026-11-20. Based on actual crm_app templates. */
@media (max-width: 800px) {
  /* Critical fix: city_reports uses .report-period-form, which was not matched by v1/v2. */
  .report-period-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
  }
  .report-period-form > label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .report-period-form > label > input[type="date"],
  .report-period-form input[type="date"] {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 7px;
    min-height: 48px;
    padding: 10px 12px !important;
    font-size: 16px !important;
    -webkit-appearance: auto;
    appearance: auto;
  }
  .report-period-form > .btn { width: 100%; max-width: 100%; justify-content: center; }
  /* Applies to date-range filters in statistics, masters and partners. */
  form.partner-filters:has(input[type="date"]),
  form.filters:has(input[type="date"]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100%;
    align-items: stretch;
  }
  form.partner-filters:has(input[type="date"]) > label,
  form.filters:has(input[type="date"]) > label {
    min-width: 0 !important; width: 100% !important; max-width: 100% !important; margin: 0;
  }
  form.partner-filters:has(input[type="date"]) > .btn,
  form.filters:has(input[type="date"]) > .btn {width:100%; justify-content:center;}
  .container, .card, .report-period-form, .table-wrap { min-width:0; box-sizing:border-box; }
  .card > .table-wrap { max-width:100%; overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
  .city-report-table { min-width:860px; }
  .nav-inner { flex-wrap:nowrap !important; }
  .nav-inner > .brand { flex:1 1 auto; }
  .fastup-mobile-menu { flex:0 0 auto; }
  .fastup-mobile-menu[open] > nav { box-sizing:border-box; }
}
@media (max-width: 400px) {
  .report-period-form input[type="date"] { font-size:16px !important; }
}
