/* Shared sizing keeps long content inside its panel without hiding it. */
.grid>* , .page-title>div, .check-row>div, .finish>div, nav, label{min-width:0}
img{max-width:100%}
input,select,textarea{max-width:100%;min-width:0}
input[type=checkbox]{width:20px;height:20px;vertical-align:middle;flex-shrink:0}
.toggle{white-space:normal;line-height:1.6}
.actions,.add-check{flex-wrap:wrap}
.button{min-height:44px}
.page-title h1,.page-title p,.notice,.check-name,.check-row p,.finish p,td{overflow-wrap:anywhere}
.table-wrap,.calendar-scroll{max-width:100%;overscroll-behavior-x:contain}
.inventory-table table{min-width:1000px}
.inventory-table td:first-child{min-width:160px}
.table-wrap td .actions select{min-width:150px}
.nav-toggle,.mobile-cell-label,.calendar-scroll-hint{display:none}
.camera-upload{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid #e1e7eb}
.handover-reminder{max-height:calc(100dvh - 32px);overflow:auto}
.handover-reminder .actions{align-items:center}
.handover-reminder .actions label{margin:8px 0;line-height:1.6}
.admin-menu summary{min-height:44px;display:list-item;align-content:center}
@media(max-width:850px){
    main{padding-top:26px!important;padding-bottom:40px!important}
    .form-card,.admin-section{padding:20px}
    .calendar-controls{flex-wrap:wrap;gap:12px}
    .calendar-scroll-hint{display:block}
    .editor-heading,.editor-item,.add-check{align-items:flex-end}
    .add-check>label{flex:1 1 180px}
    .branch-filter-actions>label{flex:1 1 180px}
    .check-actions{white-space:normal}
}
@media(max-width:600px){
    .wrap{padding-left:14px;padding-right:14px}
    .nav.responsive-nav{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 16px;padding-top:0;padding-bottom:8px}
    .responsive-nav .brand{justify-self:start}
    .responsive-nav .brand img{width:132px}
    .responsive-nav .brand small{font-size:8px;margin-top:-8px}
    .nav-toggle{display:inline-flex}
    .responsive-nav nav{display:none;grid-column:1/-1;width:100%;gap:4px;padding-top:8px;border-top:1px solid #e1e7eb}
    .responsive-nav nav.nav-open{display:flex;flex-direction:column;align-items:stretch}
    nav>a,nav>span,nav>form,nav>.admin-menu{width:100%;padding:4px 12px}
    nav>a,nav .text-button{min-height:44px;display:flex;align-items:center}
    .admin-menu-links{position:static;min-width:0;box-shadow:none;margin-bottom:8px}
    .page-title{gap:16px;margin-bottom:20px}
    .page-title>.button{width:100%}
    .form-card,.admin-section,.finish{padding:18px}
    input:not([type=checkbox]),select,textarea{font-size:16px}
    .branch-filter-actions>label,.add-check>label,.editor-heading>label,.editor-item>label{flex:1 1 100%;width:100%}
    .branch-filter-actions>.button{flex:1 1 100%}
    .actions{gap:12px}
    .actions>.button,.finish>.button{width:100%}
    .summary{padding:14px;margin-bottom:20px}
    .summary>div{padding:10px}
    .check-row{padding:16px;gap:12px}
    .check-actions{gap:12px;width:100%}
    .check-actions a,.text-button{min-height:44px;display:inline-flex;align-items:center}
    .required{display:inline-block;margin:4px 0;white-space:normal}
    .responsive-table,.inventory-table .responsive-table{display:block;min-width:0}
    .responsive-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
    .responsive-table tbody{display:block}
    .responsive-table tbody tr{display:block;padding:12px 16px;border-bottom:2px solid #dce6df}
    .responsive-table tbody tr:last-child{border-bottom:0}
    .responsive-table tbody td,.inventory-table .responsive-table td:first-child,.inventory-table .responsive-table td:last-child{display:block;min-width:0;width:100%;padding:8px 0;border:0;white-space:normal;overflow-wrap:anywhere}
    .mobile-cell-label{display:block;font-size:11px;font-weight:800;color:#64717c;letter-spacing:.05em;text-transform:uppercase;margin-bottom:5px}
    .responsive-table td small{margin-top:4px}
    .responsive-table td form{margin-top:4px}
    .responsive-table td label{margin-bottom:10px}
    .responsive-table td .actions{align-items:stretch}
    .responsive-table td .actions select{min-width:0;flex:1 1 100%}
    .responsive-table td.empty{padding:16px 0}
    .handover-reminder{padding:20px;width:calc(100vw - 24px)}
    .handover-reminder ul{padding-left:18px;max-height:50dvh}
    .calendar-controls a{min-height:44px;display:inline-flex;align-items:center}
}
.orders-table th{text-align:left}
main.wrap:has(.orders-table){max-width:1800px;width:100%}
.orders-table{overflow-x:auto}
.orders-table th,.orders-table td{white-space:nowrap;overflow-wrap:normal;word-break:normal}
@media(min-width:601px){.orders-table table{table-layout:auto;width:100%;min-width:1400px}.orders-table .actions{flex-wrap:nowrap}}
@media(max-width:600px){.orders-table .responsive-table tbody td{white-space:nowrap;overflow-wrap:normal;overflow-x:auto}}
.orders-table td:first-child strong,.orders-table td:first-child small{white-space:nowrap;overflow-wrap:normal}
@media(min-width:601px){.orders-table th:first-child,.orders-table td:first-child{min-width:250px;white-space:nowrap;overflow-wrap:normal}}
@media(max-width:600px){.orders-table .responsive-table td:first-child{overflow-x:auto}}
.button.workflow-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:112px;min-width:112px;min-height:44px;white-space:nowrap;flex-shrink:0;text-align:center}
@media(max-width:600px){.actions>.button.workflow-button{width:100%;min-width:0}}
