/* ═══ Điện thoại: chuẩn hoá cỡ chữ / nút / biểu tượng theo iOS (nạp SAU CÙNG) ═══
   Thang cỡ: tiêu đề trang 22px · tiêu đề khối 15px · chữ thân 14px · chữ phụ 12px · số lớn 20px.
   Nút / chip cao 32px, ô nhập 36px (vùng chạm vẫn đủ nhờ khoảng cách), biểu tượng 18–20px. */
@media (max-width: 760px) {
  /* ── Thanh trên ── */
  .topbar { min-height: 52px !important; }
  .topbar h1 { font-size: 20px !important; letter-spacing: -.01em; }
  .topbar :is(button, .icon-btn, .tb-btn):not(.tab) { width: 34px !important; height: 34px !important; min-height: 0 !important; padding: 0 !important; }
  .topbar svg { width: 18px !important; height: 18px !important; }

  /* ── Menu (ngăn kéo bên trái) ── */
  .quick-mobile-header strong { font-size: 20px !important; }
  .quick-menu-item { min-height: 40px !important; padding-top: 0 !important; padding-bottom: 0 !important; }
  .quick-menu-item .quick-label { font-size: 15px !important; font-weight: 500 !important; }
  .quick-menu-item svg, .quick-icon-wrap svg { width: 18px !important; height: 18px !important; }
  .quick-submenu button { min-height: 36px !important; font-size: 14px !important; }
  .qg-btn { height: 44px !important; font-size: 10px !important; }
  .qg-btn svg { width: 18px !important; height: 18px !important; }
  .quick-urgent { padding: 10px 12px !important; }
  .quick-urgent span { font-size: 13.5px !important; }

  /* ── Thanh tab dưới ── */
  .tabbar .tab { min-height: 44px !important; font-size: 10px !important; }
  .tabbar .tab svg { width: 23px !important; height: 23px !important; }

  /* ── Orders: tab trạng thái, ô số liệu, tổng ── */
  #ordersView #statusTabs button { height: 30px !important; min-height: 0 !important; padding: 0 11px !important; font-size: 13px !important; }
  #ordersView #statusTabs button b { font-size: 12px !important; }
  #ordersView .sla-chip { height: 28px !important; font-size: 12px !important; }
  #ordersView .order-range-summary { gap: 8px !important; }
  #ordersView .order-range-summary .ops-card { padding: 9px 12px !important; border-radius: 12px !important; min-height: 0 !important; }
  #ordersView .order-range-summary .ops-card span { font-size: 12.5px !important; }
  #ordersView .order-range-summary .ops-card strong { font-size: 20px !important; }
  #ordersView .search-row { gap: 6px !important; }
  #ordersView .search-row input { height: 36px !important; font-size: 15px !important; }
  #ordersView .search-row .total { padding: 0 2px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 12.5px !important; color: #6e6e73; }
  #ordersView .filters > button, #ordersView .filters .ux-shop-filter, #ordersView .tb-menu-btn { height: 30px !important; font-size: 12px !important; }

  /* ── Báo cáo (Etsy Orders Cost…): thanh hành động thành 1 hàng chip cuộn ngang ── */
  #workspace#workspace .report-actionbar { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; margin: 0 -16px 12px !important; padding: 0 16px 2px !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #workspace#workspace .report-actionbar::-webkit-scrollbar { display: none; }
  #workspace#workspace .report-actionbar > button { flex: none !important; width: auto !important; height: 32px !important; min-height: 0 !important; padding: 0 12px !important; border-radius: 980px !important; font-size: 12.5px !important; font-weight: 600 !important; white-space: nowrap !important; }
  #workspace#workspace .report-actionbar > #reportDate { order: -1; background: #1d1d1f !important; border-color: #1d1d1f !important; color: #fff !important; }
  #workspace#workspace .report-actionbar > #importStatement { background: #0071e3 !important; border-color: #0071e3 !important; color: #fff !important; }
  /* Ô số liệu báo cáo: 2 cột gọn */
  #workspace#workspace .report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: start !important; gap: 6px !important; margin-bottom: 12px !important; }
  #workspace#workspace .report-metrics > .report-metric { min-height: 0 !important; padding: 8px 9px !important; border-radius: 12px !important; gap: 2px !important; }
  #workspace#workspace .report-metrics > .report-metric small { font-size: 11.5px !important; }
  #workspace#workspace .report-metrics > .report-metric strong { margin-top: 2px !important; font-size: 16px !important; line-height: 1.2 !important; }
  #workspace#workspace .report-metrics > .report-metric em, #workspace#workspace .report-metrics > .report-metric span:not(:first-child) { font-size: 11.5px !important; text-align: left !important; }
  /* Lãi lỗ theo kỳ: thẻ lướt ngang (như Ví của Apple) */
  #workspace#workspace .pr-cards { display: flex !important; gap: 10px !important; margin: 0 -16px !important; padding: 0 16px 4px !important; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  #workspace#workspace .pr-cards::-webkit-scrollbar { display: none; }
  #workspace#workspace .pr-card { flex: 0 0 78vw !important; scroll-snap-align: start; padding: 12px 14px !important; }
  #workspace#workspace .pr-card > strong { font-size: 22px !important; }
  #workspace#workspace .pr-card dl { font-size: 12.5px !important; }
  #workspace#workspace .report-tools { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  #workspace#workspace .report-tools > input { grid-column: 1 / -1; }
  #workspace#workspace .report-tools > * { height: 36px !important; min-height: 0 !important; font-size: 14px !important; }

  /* ── Chung: tiêu đề khối, nút trong trang ── */
  #workspace .workspace-head h3, #workspace h3 { font-size: 18px !important; }
  #workspace .workspace-head button, #workspace .push { height: 34px !important; min-height: 0 !important; padding: 0 14px !important; font-size: 13px !important; }
  #workspace .card .metric, #workspace .metric { font-size: 20px !important; }

  /* ── Hộp thoại / cài đặt ── */
  dialog.dialog header h3 { font-size: 17px !important; }
  dialog.dialog .qs-row .qs-txt b { font-size: 14.5px !important; }
  dialog.dialog .qs-row .qs-txt small { font-size: 12px !important; }
  dialog.dialog menu button { height: 40px !important; font-size: 15px !important; }
  .mk-pick label { padding: 8px 10px !important; }
  .mk-pick b { font-size: 13.5px !important; }

  /* Nút nổi (ghi chú nhanh) nhỏ lại */
  #quickCreate, .floating { width: 46px !important; height: 46px !important; font-size: 18px !important; }
}
@media (max-width: 760px) {
  #workspace#workspace .report-metrics > .report-metric > *, #workspace#workspace .report-metrics > .report-metric .cost-link { text-align: left !important; justify-content: flex-start !important; }
  #workspace#workspace .report-metrics > .report-metric strong * { font-size: inherit !important; }
  #workspace#workspace .report-metrics > .report-metric .cost-link { padding: 0 !important; font-size: 11.5px !important; line-height: 1.35 !important; }
}
