/**
 * Hydra mobile — route Yêu cầu khách (restyle only, desktop ≥901px unchanged)
 */
@media (max-width: 900px) {
  body.use-new-ui.route-storefront-inquiries {
    --sf-inq-mo-gap: 8px;
    --sf-inq-mo-pad: 12px;
  }

  body.use-new-ui.route-storefront-inquiries #contentScroll.content-scroll,
  body.use-new-ui.route-storefront-inquiries .content-scroll {
    /* TASK-615: shared non-FAB clearance — do not re-add env(safe-area) (already in token / TASK-614) */
    padding-bottom: var(--mobile-scroll-bottom-clearance, var(--hydra-mo-scroll-bottom-pad)) !important;
  }

  body.use-new-ui.route-storefront-inquiries .route-storefront-inquiries {
    display: flex;
    flex-direction: column;
    gap: var(--sf-inq-mo-gap, 8px);
    padding: 0 0 8px;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-page {
    display: flex;
    flex-direction: column;
    gap: var(--sf-inq-mo-gap, 8px);
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  /* A. Filter card */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-filter-card {
    margin: 6px 0 0;
    padding: 10px 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--hydra-border-soft);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-sticky {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-search--mobile {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-reload {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    background: var(--hydra-bg-warm-soft);
    color: var(--hydra-text-secondary);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  }

  /* B. Status chips — scroll ngang */
  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile::-webkit-scrollbar {
    display: none;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile .sf-inq-filter-chip {
    flex: 0 0 auto;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    color: var(--hydra-text-secondary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile .sf-inq-filter-chip.is-active {
    border-color: transparent;
    background: var(--hydra-gradient, linear-gradient(155deg, #fb923c 0%, #f97316 42%, #ea580c 100%));
    color: #fff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.24);
  }

  /* C. KPI — thanh ngang 40px */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    margin: 0;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hydra-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar__val {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 800;
    color: var(--hydra-orange-700);
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  /* Legacy KPI card — hidden when bar is used */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-row {
    display: none;
  }

  /* D. Inquiry list */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    padding: 0 0 6px;
    margin: 0;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card {
    border-radius: 16px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    gap: 4px !important;
    margin-bottom: 0 !important;
    min-width: 0;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card.is-expanded {
    border-color: var(--hydra-border-strong);
    box-shadow: var(--hydra-shadow-md);
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-row--head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__who {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__name {
    display: block;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    color: var(--hydra-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__status-slot {
    flex-shrink: 0;
    max-width: 34%;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__status-slot .sf-inq-chip,
  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__status-slot [class*="sf-inq-chip"] {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.25;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-row--meta-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.2;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-row--meta-line .hydra-inq-code {
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 700;
    color: var(--hydra-orange-700);
    background: var(--hydra-bg-warm-soft);
    border: 1px solid var(--hydra-border-soft);
    padding: 1px 5px;
    border-radius: 5px;
    white-space: nowrap;
    line-height: 1.35;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta-dot {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--hydra-text-muted);
    opacity: 0.55;
    line-height: 1;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__phone {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--hydra-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__updated {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--hydra-text-muted);
    margin-left: auto;
    white-space: nowrap;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-row--value {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-width: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__amount {
    flex: 0 0 auto;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--hydra-orange-700);
    margin: 0 !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.05 !important;
    white-space: nowrap;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__lines {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.15 !important;
    color: var(--hydra-text-secondary);
    margin: 0 !important;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-row--note {
    min-width: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__note-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--hydra-text-secondary);
    padding: 2px 7px;
    min-height: 20px;
    border-radius: 999px;
    background: var(--hydra-bg-warm-soft);
    border: 1px solid var(--hydra-border-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    margin: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta::-webkit-scrollbar {
    display: none;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta .sf-inq-pay-stack {
    display: contents;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta .sf-inq-mobile-card__note-chip {
    flex: 0 0 auto;
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    min-height: 20px;
    max-height: 22px;
    line-height: 1.25;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__meta .sf-inq-chip {
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    min-height: 20px;
    max-height: 22px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__quick {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 6px;
    margin-top: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 6px;
    border-radius: 12px;
    font-size: 13px !important;
    font-weight: 700;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    color: var(--hydra-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn--call {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    flex-shrink: 0;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn__icon {
    font-size: 15px;
    line-height: 1;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn__text {
    display: none;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn--more {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn--primary {
    border: none;
    background: var(--hydra-gradient, linear-gradient(155deg, #fb923c 0%, #f97316 42%, #ea580c 100%));
    color: #fff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.22);
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-detail {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--hydra-border-soft);
  }

  /* E. Empty state */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 28px 16px;
    min-height: 0;
    max-height: none;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--hydra-border-soft);
    box-shadow: var(--hydra-shadow);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--hydra-text-muted);
    line-height: 1.4;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-empty-card::before {
    content: "📩";
    font-size: 24px;
    line-height: 1;
    opacity: 0.55;
  }

  /* F. Pagination / bulk bar */
  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-pager-card,
  body.use-new-ui.route-storefront-inquiries .sf-inq-bulk-bar-host.is-visible {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--hydra-border-soft);
    box-shadow: var(--hydra-shadow);
  }

  body.use-new-ui.route-storefront-inquiries .hydra-currency-unit {
    font-size: 0.58em;
    font-weight: 700;
    margin-left: 1px;
    opacity: 0.88;
    vertical-align: baseline;
  }

  body.dark.use-new-ui.route-storefront-inquiries .sf-inq-mo-filter-card,
  body.dark.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card,
  body.dark.use-new-ui.route-storefront-inquiries .sf-inq-mo-empty-card,
  body.dark.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
  }
}

/* iPhone / PWA — compact thêm ~25% */
@media (max-width: 430px) {
  body.use-new-ui.route-storefront-inquiries {
    --sf-inq-mo-gap: 6px;
  }

  body.use-new-ui.route-storefront-inquiries .route-storefront-inquiries,
  body.use-new-ui.route-storefront-inquiries .sf-inq-page {
    gap: 6px !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-filter-card {
    margin: 4px 0 0;
    padding: 8px 10px;
    border-radius: 16px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-search-wrap {
    gap: 6px;
    margin-bottom: 6px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-search--mobile {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 0 10px;
    font-size: 14px;
    border-radius: 11px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-reload {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    border-radius: 11px;
    font-size: 16px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile .sf-inq-filter-chip {
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 10px;
    border-radius: 11px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mo-kpi-bar__val {
    font-size: 17px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-list {
    gap: 10px !important;
    padding-bottom: 4px;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card {
    padding: 12px !important;
    border-radius: 18px !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__name,
  body.use-new-ui.route-storefront-inquiries .storefront-inquiries-page .sf-inq-mobile-card__name {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__amount,
  body.use-new-ui.route-storefront-inquiries .storefront-inquiries-page .sf-inq-mobile-card__amount {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mob-btn {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 13px !important;
    border-radius: 12px !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-mobile-card__quick {
    gap: 6px !important;
  }

  body.use-new-ui.route-storefront-inquiries .sf-inq-filter-chips--mobile {
    padding: 0 !important;
  }
}
