/* Seibrue v6 — document forms: TOOLBAR ONLY (screen). The A4 paper area (.page), print and html2pdf output are untouched.
   Pages add class "doc-toolbar" to their top .no-print bar and link this file. Revert: delete the class or the link. */
@media screen{
  .doc-toolbar{padding:12px 14px!important;gap:8px!important}
  .doc-toolbar>button,.doc-toolbar>a,.doc-toolbar>div>button{
    min-height:48px!important;min-width:48px!important;font-size:15px!important;
    display:inline-flex!important;align-items:center;justify-content:center;gap:4px}
  .doc-toolbar .doclang-btn{min-width:52px!important;font-weight:700}
}
/* 2026-10-28 UX audit — phone (≤600px): toolbar 2 rows (พิมพ์/PDF/บันทึก on row 1, small buttons on row 2) so labels are never cut,
   and the form fields stack label-above-value. Scoped to :not(.force-table-pdf) so the PDF saved to Drive keeps the A4 layout. */
@media screen and (max-width:600px){
  .doc-toolbar{padding:8px 10px!important;gap:6px!important}
  .doc-toolbar>button[data-i18n]{flex:1 1 30%!important;min-width:0!important;padding:8px 4px!important;font-size:14px!important;white-space:nowrap}
  .doc-toolbar>button:not([data-i18n]),.doc-toolbar>a,.doc-toolbar>div>button{flex:1 1 auto;min-height:44px!important;min-width:44px!important;padding:6px 10px!important}
  .page:not(.force-table-pdf){padding:16px 14px 96px!important}
  .page:not(.force-table-pdf) .meta-grid{grid-template-columns:1fr!important}
  .page:not(.force-table-pdf) .meta-grid>*{grid-column:1 / -1!important;border-right:none!important}
  .page:not(.force-table-pdf) .meta-grid>.meta-label,.page:not(.force-table-pdf) .meta-grid>.ml{border-bottom:none!important;padding:8px 10px 2px!important;background:#f7f7fb;font-size:12px!important;color:#555}
  .page:not(.force-table-pdf) .meta-grid>.meta-value,.page:not(.force-table-pdf) .meta-grid>.mv{padding:2px 10px 8px!important}
  .page:not(.force-table-pdf) .meta-grid select{min-height:40px;font-size:16px!important}
  .aw{padding-bottom:96px}
}
