/* Folding phones (Owner 30/10/2026: "mày ra lại toàn bộ dự án, điều chỉnh lại màn hình cho điện thoại gập luôn nha";
   PLAN-DIEN-THOAI-GAP-001, "ok gập 001"). Linked last on the phone's page, so it wins over the sheets before it. The browser
   applies it by the screen's width at every moment: a phone opened switches at once, folded switches back, nothing reloads.
   The inner screen (600 px and more): the page takes the width, up to 960 px, instead of a column of 480–560 px; the main
   screen's bars two a row, KHÁC four; a list of two or more cards two a row, the cards of a row as tall as each other. A page
   of one thing (a quote, a phiếu, a car) stays one column. The cover screen (360 px and less): the bottom bar's words on one
   line. An ordinary phone (361–599 px) is as it was. */
@media (min-width:600px){
  main{max-width:1000px}
  [data-mobile-home]{max-width:960px}
  body.workshop-mode [data-mobile-home],body.office-mode:has(#home-panel:not([hidden])>#home-hero:not([hidden])) [data-mobile-home]{max-width:960px}
  [data-mobile-home] #home-bottom{width:min(100%,960px)}
  /* The main screen: the bars two a row, KHÁC four a row; HÔM NAY keeps its own height (the bars two a row leave it room it
     would otherwise grow into, tall empty boxes). */
  #home-tasks.workshop-bars{grid-template-columns:repeat(2,minmax(0,1fr))}
  #home-tasks.workshop-bars>:not(.workshop-bar){grid-column:1/-1}
  #home-tasks .office-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
  :is(.workshop-head,.workshop-today,.workshop-stats){flex-grow:0}
  /* Lists: two cards a row once there are two. */
  :is(.service-phone-bars,.workshop-cars,.mobile-list-items,.service-phone-visits,.work-list):has(>:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr))}
  #module-panel .quote-phone .qp-list:has(>:nth-child(2)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  /* Đợt 2 (PLAN-QLDV-DIEN-THOAI-004): Xuất vật tư, Danh sách xe, Kho hàng; the phiếu of a lệnh and a car's visits stay one column. */
  .sp-list:not(.pp-docs,.vp-visits):has(>:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr))}
  .work-list:has(>:nth-child(2)){align-items:stretch}
  .work-card.work-row>.work-row-open{height:100%;align-content:space-between}
}
/* The cover screen: Trang chính, Tiếp nhận, Nhân sự, Tài khoản each on one line. */
@media (max-width:360px){
  [data-mobile-home] #home-bottom button{padding:8px 2px;font-size:10.5px;white-space:nowrap}
}
