/* Shared mobile layout; tables opt in through explicit, source-owned cell labels. */
img, video { max-width:100%; }
.panel, .section-body, .main-content, .form-fields > *, .inline-actions > * { min-width:0; }
.table-scroll, .calendar-month-scroll, .resource-calendar-scroll { max-width:100%; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.mobile-sidebar-close, .calendar-mobile-controls, .calendar-mobile-agenda { display:none; }
.weighing-spread-notice { display:block; line-height:1.7; }
.weighing-spread-notice > * { display:block; }
@media screen and (max-width:1024px) {
    .workspace { margin-left:0; width:100%; }
    .sidebar { width:min(310px,88vw); padding:18px; transform:translateX(-100%); visibility:hidden; transition:transform .2s ease,visibility .2s; z-index:101; padding-bottom:max(18px,env(safe-area-inset-bottom)); overscroll-behavior:contain; }
    .sidebar.is-open { transform:translateX(0); visibility:visible; }
    .sidebar-backdrop { display:block; position:fixed; inset:0; z-index:100; background:#0a243580; border:0; backdrop-filter:blur(2px); }
    body:has(.sidebar.is-open) { overflow:hidden; }
    .mobile-menu-toggle { display:inline-flex; width:44px; height:44px; }
    .mobile-sidebar-close { display:flex; margin:0 0 8px auto; color:#fff; width:44px; height:44px; }
    .topbar { height:auto; min-height:68px; padding:10px 18px; gap:8px; position:sticky; top:0; z-index:30; }
    .topbar-left { flex:0 0 auto; }
    .topbar-right { min-width:0; gap:10px; flex:1; justify-content:flex-end; }
    .topbar-title, .workspace-symbol { display:none; }
    .signed-in-user { min-width:0; max-width:180px; overflow-wrap:anywhere; }
    .signed-in-user small { display:none; }
    .main-content { padding:24px 20px; }
    .operations-grid, .job-form-grid, .planning-workspace { grid-template-columns:minmax(0,1fr); }
    .job-form-summary { position:static; }
}
@media screen and (max-width:760px) {
    :root { font-size:15px; }
    .main-content { padding:20px 14px; }
    .topbar { padding:8px 12px; flex-wrap:wrap; }
    .signed-in-user { max-width:120px; }
    .signed-in-user strong { font-size:12px; }
    .topbar-right { gap:8px; }
    .preview-role-switch > summary { min-height:44px; display:flex; align-items:center; }
    .preview-role-switch > div { position:fixed; top:74px; left:12px; right:12px; width:auto; max-width:none; max-height:70dvh; overflow:auto; }
    .preview-role-switch .button { flex:1 1 45%; }
    .button, .button-small, .icon-button, .list-tab, .filter-chip { min-height:44px; }
    .icon-button { min-width:44px; }
    .button { white-space:normal; text-align:center; justify-content:center; }
    input:not([type=checkbox]):not([type=radio]), select, textarea, .field input, .field select, .field textarea, .filter-field select, .search-field input, .mobile-cards input { font-size:16px; max-width:100%; min-height:44px; }
    input[type=checkbox], input[type=radio] { width:20px; height:20px; flex:0 0 20px; accent-color:var(--teal); }
    .parameter-option, .mobile-cards td > label { display:flex; align-items:center; gap:10px; min-height:44px; }
    input[type=file], .field input[type=file] { height:auto; overflow:hidden; width:100%; padding:8px; }
    input[type=file]::file-selector-button { min-height:44px; max-width:100%; }
    input[type=date], input[type=datetime-local] { min-width:0; width:100%; }
    textarea { width:100%; }
    .form-fields, .job-detail-fields, .operations-side, .bulk-parameter-grid, .parameter-grid, .management-stats, .management-breakdown, .analysis-entry-grid { grid-template-columns:minmax(0,1fr); }
    .form-fields { gap:18px; }
    .section-body, .section-heading, .personnel-calendar { padding:18px 14px; }
    .section-heading, .page-heading, .form-page-heading { flex-wrap:wrap; gap:12px; }
    .section-heading > div, .page-heading > div, .form-page-heading > div { min-width:0; }
    h1 { font-size:25px; overflow-wrap:anywhere; }
    h2 { overflow-wrap:anywhere; }
    p, .field-hint, .operation-details dd, .measurement-card strong { overflow-wrap:anywhere; }
    .inline-actions, .receipt-actions, .operation-toolbar, .calendar-toolbar, .calendar-period-controls, .field-form-tabs, .analysis-tabs, .measurement-breadcrumb { flex-wrap:wrap; max-width:100%; gap:8px; }
    .inline-actions .button, .receipt-actions .button { flex:1 1 140px; }
    .field-form-tabs .button, .analysis-tabs .button { flex:1 1 130px; }
    .field-form-tabs { padding:12px; }
    .operation-details > div, .timeline-heading { flex-direction:column; gap:5px; }
    .operation-details dd { text-align:left; }
    .operation-details dd .role-tags { justify-content:flex-start; }
    .alert { flex-wrap:wrap; padding:14px; line-height:1.6; }
    .alert > strong, .alert > span, .alert > ul { flex-basis:100%; }
    .sample-set-grid { grid-template-columns:minmax(0,1fr); }
    .sample-slot, .measurement-card { padding:16px; }
    .bulk-parameter-row { grid-template-columns:1fr 1fr; }
    .bulk-parameter-row > strong { grid-column:1/-1; }
    .pricing-line, .pricing-total { flex-wrap:wrap; gap:6px; }
    .pricing-line > *, .pricing-total > * { min-width:0; overflow-wrap:anywhere; }
    .app-footer { margin:0 14px; flex-wrap:wrap; line-height:1.7; padding-bottom:max(18px,env(safe-area-inset-bottom)); }
    .app-footer > span:last-child { text-align:left; max-width:none; }
    /* Keep table semantics and header labels while presenting each row as a card. */
    .mobile-cards { display:block; width:100%; min-width:0 !important; border:0; table-layout:auto; }
    .mobile-cards thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .mobile-cards tbody { display:block; padding:10px; }
    .mobile-cards tbody tr { display:grid; grid-template-columns:minmax(0,1fr); border:1px solid var(--line); border-radius:10px; margin-bottom:12px; padding:6px 14px; background:var(--surface); }
    .mobile-cards tbody td { display:block; width:auto; min-width:0; max-width:100%; white-space:normal !important; overflow-wrap:anywhere; text-align:left !important; padding:12px 0 !important; border:0; border-bottom:1px solid #edf1f3; }
    .mobile-cards tbody td:last-child { border-bottom:0; }
    .mobile-cards td[data-label]::before { content:attr(data-label); display:block; color:#617b88; font-size:12px; font-weight:600; margin-bottom:8px; }
    .mobile-cards .table-job-title { max-width:none; white-space:normal; }
    .mobile-cards input:not([type=checkbox]):not([type=radio]), .mobile-cards select, .mobile-cards textarea { width:100%; min-width:0; max-width:100%; padding:10px; border:1px solid #dce5e9; border-radius:6px; }
    .mobile-cards .job-row-actions { justify-content:flex-start; }
    .management-table { max-height:none; }
    .calendar-toolbar > *, .calendar-team-options { max-width:100%; }
    .calendar-period-controls { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; width:100%; }
    .calendar-period-controls .calendar-period { white-space:normal; text-align:center; }
    .calendar-period-controls > .button:last-child { grid-column:1/-1; }
    .calendar-team-chip { min-height:48px; max-width:100%; white-space:normal; }
    .calendar-mobile-controls { display:flex; gap:8px; margin:14px 0; }
    .calendar-mobile-controls .button { flex:1; }
    .calendar-mobile-agenda { display:grid; gap:12px; }
    .calendar-board:not(.mobile-grid) .calendar-month-scroll { display:none; }
    .calendar-board.mobile-grid .calendar-mobile-agenda { display:none; }
    .calendar-agenda-day { padding:14px; border:1px solid var(--line); border-radius:10px; min-width:0; }
    .calendar-agenda-day.calendar-grid-today { border-color:var(--teal); }
    .calendar-agenda-day h4 { margin-bottom:10px; font-size:15px; }
    .calendar-agenda-event { display:flex; flex-direction:column; gap:6px; text-align:left; width:100%; padding:14px; min-height:44px; margin:8px 0; border:1px solid #d4e2e8; border-radius:8px; background:var(--calendar-event-bg,#edf5f4); color:var(--calendar-event-fg,var(--text)); overflow-wrap:anywhere; }
    .calendar-agenda-day > .button { margin-top:10px; width:100%; }
    .calendar-draft-summary { flex-wrap:wrap; }
    .account-shell { min-height:100svh; }
    .account-intro { padding:24px; min-height:0; }
    .account-intro::after { display:none; }
    .account-intro-note { margin-top:16px; }
    .account-card { width:auto; margin:24px 18px; }
}
@media screen and (max-width:360px) {
    .signed-in-user { display:none; }
    .main-content { padding:18px 10px; }
    .section-body, .section-heading { padding:16px 12px; }
    .mobile-cards tbody { padding:6px; }
}
@media (prefers-reduced-motion:reduce) { .sidebar { transition:none; } }
@media screen and (max-width:640px) {
    .account-intro { padding:20px 24px; }
    .account-intro h1, .account-intro > p, .account-intro-note { display:none; }
    .account-intro .company-logo { max-width:230px; height:auto; }
    .account-intro .eyebrow { margin-top:12px; }
    .account-card { margin:20px 18px; padding:24px; }
}

/* Scientific field calculations and report preparation, v0.17 */
.calculation-panel{padding:18px;border:1px solid #ccdedd;border-radius:12px;background:#f4f9f8;min-width:0}.calculation-results{display:flex;flex-wrap:wrap;gap:12px 32px}.calculation-results strong{font-size:1.35rem;color:#126b63}.calculation-panel li{margin:8px 0}.report-preparation-section{border-top:1px solid #dfE8eb;min-width:0}.report-preparation-section>summary{padding:18px;cursor:pointer;font-weight:600;overflow-wrap:anywhere}.report-preparation-section .report-preparation-section{margin:0 16px}.field .report-input-missing{border:2px solid #d84b44;background:#fffafa}.report-preparation-section textarea{resize:vertical}
