/* ZAKAZ v5 — presentation layer. Existing form and JS contracts are retained. */
:root{--bg:#f5f4f0;--surface:#fff;--soft:#faf9f6;--ink:#292d32;--text:#292d32;--muted:#606972;--line:#e1dfd8;--accent:#a3543e;--accent-text:#954b36;--accent-hover:#88422f;--accent-soft:#f5e8e2;--green:#30654d;--blue:#3f6188;--amber:#765516;--red:#a13731;--radius:12px;color-scheme:light}
body{color:var(--ink);font-family:'Segoe UI',system-ui,-apple-system,sans-serif;line-height:1.5}
button,input,select,textarea{font:inherit}a,button,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button,a,summary{touch-action:manipulation}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:10px 15px;border:1px solid #d9d7d0;border-radius:8px;background:#fff;color:var(--ink);font-size:13px;font-weight:600;line-height:1.35;text-decoration:none;box-shadow:none}
.btn:hover{background:#f3f1ec;border-color:#bab7ae;color:var(--ink)}.btn.btn-primary,button.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}
.btn.btn-secondary{background:#fff;color:var(--ink);border-color:#d9d7d0}.btn.btn-ghost{background:transparent;color:#4f5961;border-color:transparent}.btn.btn-danger,.btn.danger{background:#fcf0ee;color:#a13731;border-color:#dfb7b2}.btn.btn-danger:hover,.btn.danger:hover{background:#f6ded9;color:#842e29}.btn.btn-icon{padding:10px;width:42px;min-width:42px;color:#56616a}.btn svg{margin:0!important;flex-shrink:0}.btn:disabled,button:disabled{cursor:not-allowed}
:focus-visible{outline:3px solid #854531;outline-offset:3px}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #a3543e1c}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{border-color:#c9c9c2;background:#fff;color:var(--ink);min-height:42px;max-width:100%;border-radius:7px}input::placeholder,textarea::placeholder{color:#657079;opacity:1}input:disabled,select:disabled,textarea:disabled{background:#eeede8;color:#626a71}input[readonly]{background:#f6f5f1;color:#566068}input[type=checkbox],input[type=radio]{accent-color:var(--accent)}
label,.field>label,.form-grid>label{color:#434c54}.muted,.hint,.secondary-text,.cell-sub{color:var(--muted)}.hint,small,.text-small{line-height:1.6}code{overflow-wrap:anywhere}.table-wrap{position:relative;max-width:100%;overscroll-behavior-x:contain}
.sidebar{height:100dvh;color:var(--ink);background:#fbfaf7;z-index:80}.sidebar .nav-label{font-size:10px;color:#626a65;letter-spacing:1.15px}.sidebar .nav-link{min-height:44px;line-height:1.3;color:#56615d}.sidebar .nav-link.active{background:var(--accent-soft);color:var(--accent-text)}.sidebar .main-nav{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1}.sidebar .brand{margin-bottom:25px}.sidebar .workspace-switch{margin-bottom:22px}.sidebar-user{padding:12px 0}.sidebar-user .user-box{padding:4px 8px}.sidebar-user .user-box>span:last-child>span{font-size:11px}.sidebar-user .btn{color:#4f5961;min-height:40px}.sidebar-scrim.nav-scrim{z-index:75!important}.sidebar.open+.sidebar-scrim:not([hidden]){z-index:75!important}
.topbar{min-height:66px;background:#fffdf9;border-bottom:1px solid var(--line)}.topbar .breadcrumb{font-size:13px;min-width:0}.topbar-right{flex-shrink:0}.page.page-content{padding:30px 32px 60px;width:100%;max-width:1720px;margin:0 auto}.page-heading h1,.page-heading h2{font-weight:650;letter-spacing:-.7px;line-height:1.2;font-size:30px}.page-heading p,.page-subtitle{font-size:14px;line-height:1.6;color:var(--muted)}.base-heading~.page-heading{padding-right:300px;min-height:56px;margin-bottom:24px}
.section-card,.registry-card,.card:not(.schedule-card),.stat-card{border-color:var(--line);box-shadow:0 1px 2px #292d3204;border-radius:12px}.section-card{overflow:visible;margin-bottom:20px}.section-heading,.card-header{padding:18px 22px;gap:12px;border-bottom:1px solid var(--line)}.section-heading h3,.section-heading h2,.card-header h2{font-size:17px;line-height:1.35;margin:0 0 4px}.section-heading p,.card-header p{font-size:13px;line-height:1.5;margin:0;color:var(--muted)}.section-heading>div,.card-header>div{min-width:0}.section-heading .btn{flex-shrink:0}.section-index{background:var(--accent-soft);color:var(--accent-text);border-radius:7px;flex-shrink:0}.section-content,.card-body{padding:20px 22px}.zk-create.zk-collapsed .section-heading{border-bottom:0}.zk-create .section-heading[role=button]{min-height:76px;cursor:pointer}.zk-create .section-heading[role=button]:hover{background:#faf8f3;border-radius:12px}
.stats-grid,.kpi-grid.four{gap:14px;margin-bottom:24px}.stat-card,.kpi{padding:19px 20px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:none}.stat-label,.kpi-top{font-size:12px;color:#5b656e;font-weight:600}.stat-value,.kpi>strong{font-size:28px;font-weight:650;letter-spacing:-.8px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.stat-foot,.kpi>small{font-size:12px;color:var(--muted);line-height:1.6}.kpi-good{border-top:3px solid #39745c}.kpi-danger{border-top:3px solid #a13731}.kpi-warn{border-top:3px solid #87621f}
.period-line{gap:14px;align-items:center;flex-wrap:wrap;margin:0 0 24px}.date-range{gap:10px;min-width:0;display:flex;align-items:center}.date-range label{font-size:12px;display:flex;align-items:center;gap:8px}.date-range input{width:160px}.segmented{padding:4px;background:#eeece5;border:1px solid var(--line);border-radius:10px;display:inline-flex;gap:3px;max-width:100%}.segmented .seg,.segmented>a{min-height:38px;display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;color:#56616a;border-radius:7px;line-height:1.3}.segmented .seg.active{background:#fff;color:#803d2b;box-shadow:0 1px 3px #292d3210}.tab-bar{border:1px solid var(--line);border-radius:11px;background:#eeece6;padding:5px;margin-bottom:20px;gap:4px;display:flex;flex-wrap:wrap}.tab-bar .tab{min-height:44px;padding:12px 17px;border-radius:7px;color:#56616a;font-size:13px}.tab-bar .tab.active{background:#fff;color:var(--accent-text);border-bottom-color:var(--accent)}
.filter-bar,.filter-grid{gap:10px;min-width:0}.filter-bar{display:flex;flex-wrap:wrap;align-items:center}.filter-bar>input,.filter-bar>select{min-width:140px;flex:1 1 150px}.filter-bar>.search-wrap{flex:2 1 260px;min-width:0}.filter-bar .search-wrap input{min-width:0;width:100%}.filter-bar .selection-count{font-size:12px;color:var(--muted);white-space:nowrap}.search-wrap{min-width:0}.search-wrap:has(>input){position:relative}.filter-bar .debt-min-wrap{display:flex;align-items:center;gap:8px;font-size:12px}.filter-bar .btn{flex-shrink:0}.filter-bar+.hint{margin:14px 0;font-size:12px}
.data-table,.tbl{font-size:13px}.data-table th,.tbl th{background:#f8f7f3;color:#59635d;font-size:11px;font-weight:650;letter-spacing:.035em;padding:13px 16px;white-space:normal}.data-table td,.tbl td{padding:15px 16px;line-height:1.55;vertical-align:middle;border-bottom:1px solid #ebe9e3}.data-table tbody tr:hover>td,.tbl tbody tr:hover>td{background:#fcfaf6}.data-table .num,.data-table .numeric,.tbl .num{font-variant-numeric:tabular-nums}.data-table .order-link,.data-table a.order-number{color:var(--accent-text);font-weight:700}.data-table .cell-sub{font-size:12px;line-height:1.6}.row-actions{white-space:normal}.row-actions .btn{font-size:12px;padding:9px 11px;min-height:38px}.data-table input,.data-table select,.tbl input,.tbl select{font-size:13px}
.status-chip,.status-badge{max-width:100%;border-radius:5px;font-size:12px;line-height:1.4;min-height:28px;padding:4px 8px;color:#525e58;background:#f2f2ed}.status-chip .status-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-draft{color:#555e58;background:#f0f1ec}.status-collecting_docs{color:#795514;background:#fbf3e1}.status-in_progress,.status-confirmed{color:#3f6188;background:#eef2f8}.status-done,.status-paid{color:#30654d;background:#eef5f0}.status-cancelled,.status-error{color:#9e3832;background:#fcf0ee}.alert,.callout{line-height:1.6;font-size:13px}.alert.neutral{color:#71521b;background:#faf4e7;border-color:#e6d8b8}.alert.danger,.alert-danger,.field-error{color:#9e3832}.empty-state{padding:38px 20px;min-height:155px}.empty-state h3{font-size:17px}.empty-state p{font-size:13px;color:var(--muted);max-width:460px;margin:0 auto}.section-content:empty{display:none}
dialog{max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);overflow:auto;border-color:var(--line);border-radius:12px}dialog::backdrop{background:#24282066}dialog form{max-width:100%}
@media(min-width:721px) and (max-width:1000px){.sidebar{display:flex!important;visibility:visible!important;transform:none!important;width:74px}.workspace.app-main{margin-left:74px}.sidebar .nav-link{min-height:44px}.sidebar .main-nav{overflow-y:auto}.page.page-content{padding:24px 20px 60px}.base-heading~.page-heading{padding-right:0}}
@media(max-width:900px){.page-content:has(>.base-heading~.page-heading){display:flex;flex-direction:column}.page-content:has(>.base-heading~.page-heading)>.page-heading:not(.base-heading){order:-2;margin-bottom:16px;padding-right:0;min-height:0}.page-content:has(>.base-heading~.page-heading)>.base-heading{order:-1;position:static;align-self:stretch;margin:0 0 22px}.base-heading .page-actions{max-width:100%;gap:8px}.base-heading~.page-heading h2{font-size:28px}}
@media(max-width:720px){.sidebar{display:flex!important;position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:min(292px,calc(100vw - 52px))!important;height:100dvh!important;z-index:80!important;transform:translateX(-105%)!important;visibility:hidden!important;transition:transform .2s,visibility .2s;box-shadow:none}.sidebar.open,.nav-open .sidebar{transform:translateX(0)!important;visibility:visible!important;box-shadow:12px 0 40px #292d3226}.sidebar .brand-type,.sidebar .workspace-switch,.sidebar .nav-label,.sidebar .nav-link>span,.sidebar .sidebar-user .user-box>span:last-child,.sidebar .sidebar-user form{display:block}.sidebar .workspace-switch{display:flex}.sidebar .nav-link{justify-content:flex-start;font-size:14px;padding:12px}.sidebar .nav-label{font-size:10px;padding:16px 12px 6px;height:auto}.sidebar .brand{justify-content:flex-start;margin:0 10px 22px}.workspace.app-main{margin-left:0}.topbar{height:64px;min-height:64px;padding:0 16px}.nav-toggle{display:inline-flex!important}.topbar .btn-icon{width:44px;min-height:44px}.topbar-left{min-width:0}.page.page-content{padding:22px 16px 40px}.page-heading h1,.page-heading h2{font-size:27px}.page-heading p{font-size:14px;line-height:1.55}.section-heading,.card-header{padding:17px 16px;align-items:flex-start;flex-wrap:wrap}.section-heading h3{font-size:17px}.section-heading p{font-size:12px}.section-content,.card-body{padding:18px 16px}.section-heading>.status-chip{margin-left:38px}.section-card{margin-bottom:16px}.stats-grid,.kpi-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px}.stat-card,.kpi{padding:16px 13px;min-width:0}.stat-value,.kpi>strong{font-size:23px;letter-spacing:-.6px}.stat-label,.kpi-top{font-size:12px;line-height:1.4}.stat-foot,.kpi>small{font-size:11px}.period-line{gap:12px;margin-bottom:20px}.period-line .segmented{width:100%;display:flex}.period-line .segmented>*{flex:1;padding:11px 9px;min-height:44px;font-size:13px}.date-range{width:100%;gap:8px}.date-range label{flex:1;min-width:0;display:block}.date-range input{display:block;width:100%;margin-top:5px}.date-range>span{padding-top:20px}.tab-bar{gap:4px}.tab-bar .tab{flex:1 1 auto;text-align:center;justify-content:center;font-size:12px;min-height:44px;padding:12px 9px}.registry .tabs{gap:20px;padding:0 16px}.registry .tab{min-height:48px}.filter-bar,.filter-grid{gap:10px}.filter-bar>input,.filter-bar>select{flex:1 1 100%;min-width:0;width:100%}.filter-bar>.search-wrap{flex-basis:100%;width:100%}.filter-bar .debt-min-wrap{flex:1 1 100%;justify-content:space-between}.filter-bar .debt-min-wrap input{flex:1;min-width:0}.filter-bar .selection-count{margin-left:auto}.registry .filters{gap:10px;padding:16px}.registry .filters .search-field{flex-basis:100%;width:100%}.registry .filters-more{max-width:100%}.registry .filters-more>summary{font-size:13px;width:auto;min-height:44px;padding:10px 14px;gap:8px}.registry .filters-more[open]{flex:1 1 100%}.registry .filters-more[open] .filters-more-body{position:static;width:100%;min-width:0;grid-template-columns:1fr;margin-top:12px;padding:12px}.registry .filter-actions{flex-wrap:wrap}.registry .table-toolbar{padding:12px 16px}.registry .batch-actions{flex-wrap:wrap;gap:8px}.registry .batch-footer{padding:14px 16px;flex-wrap:wrap}.btn,.btn.btn-sm,.btn.btn-icon,.btn.btn-ghost,.row-actions .btn,.zk-table .row-actions .btn,.batch-actions .btn,button[type=submit],summary.btn{min-height:44px!important;line-height:1.4;font-size:13px;padding:10px 13px}.btn.btn-icon{min-width:44px;width:44px}.btn.btn-primary{color:#fff}.page-actions .btn{min-height:44px;font-size:13px}.btn,.page-actions a{white-space:normal;overflow-wrap:anywhere;max-width:100%}input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;min-height:44px;width:100%;max-width:100%}input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px}label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:44px;align-items:center}.data-table input,.data-table select,.tbl input,.tbl select{font-size:16px}.empty-state{padding:30px 16px;min-height:135px}.alert{overflow-wrap:anywhere}dialog{max-width:calc(100vw - 24px);padding:18px;max-height:calc(100dvh - 32px)}dialog .btn{min-height:44px}.section-content [style*="min-width"]{max-width:100%}.login-content{padding:28px 0}.login-content h1{font-size:28px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition-duration:0s!important;animation-duration:0s!important}}
@media print{.sidebar,.topbar{display:none!important}.workspace.app-main{margin:0!important}.page.page-content{display:block!important;padding:0!important}.section-card{box-shadow:none}.btn{display:none!important}}


/* ZAKAZ v5 · Order, schedule, staff and executor views.
   Scope wrappers keep these rules out of registries and shared table adapters. */
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page){min-width:0;max-width:100%;color:#292d32;--muted:#687078;--z5-line:#e5e2da;--z5-soft:#faf9f6;--z5-accent:#a3543e}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading{margin-bottom:24px}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading h2{font-size:28px;line-height:1.25;letter-spacing:-.6px;margin:0 0 8px}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading p{font-size:14px;line-height:1.6;color:#687078;margin:0}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-card{border:1px solid var(--z5-line);border-radius:12px;background:#fff;box-shadow:0 2px 4px #292d3203;margin:0 0 20px;min-width:0;max-width:100%}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading{display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid var(--z5-line);min-width:0;min-height:76px}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading>div{min-width:0}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading h3{font-size:16px;line-height:1.45;font-weight:650;margin:0;overflow-wrap:anywhere}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading p{font-size:12px;line-height:1.65;color:#687078;margin:4px 0 0}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-index{flex:0 0 auto;display:inline-grid;place-items:center;min-width:30px;height:30px;border-radius:8px;background:#f5e8e2;color:#954b36;font-size:12px;font-weight:650;margin:0}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-content{padding:24px;min-width:0;max-width:100%}
:is(.z5-order-page,.z5-staff-page) .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 22px;align-items:start}
:is(.z5-order-page,.z5-staff-page) .form-grid>label,:is(.z5-order-page,.z5-staff-page) .customer-box label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;min-width:0;color:#42474b;font-size:13px;line-height:1.6;font-weight:600}
:is(.z5-order-page,.z5-staff-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){width:100%;min-width:0;max-width:100%;min-height:44px;border:1px solid #c9cbc8;border-radius:7px;padding:10px 12px;background:#fff;color:#292d32;font-size:14px;font-weight:400;line-height:1.5}
:is(.z5-order-page,.z5-staff-page) :is(input,textarea)::placeholder{color:#6b7278;opacity:1}
:is(.z5-order-page,.z5-staff-page) input[readonly]{background:#f6f5f1;color:#535a60}
:is(.z5-order-page,.z5-staff-page) textarea{min-height:100px;resize:vertical}
:is(.z5-order-page,.z5-staff-page) :is(input,select,textarea):focus{border-color:#a3543e;box-shadow:0 0 0 3px #a3543e18;outline:0}
:is(.z5-order-page,.z5-staff-page) :is(label small,.field small,.readonly-note,.land-hint){font-size:12px!important;line-height:1.65!important;font-weight:400;overflow-wrap:anywhere}
:is(.z5-order-page,.z5-staff-page) .form-grid>label.toggle-row,:is(.z5-order-page,.z5-staff-page) .toggle-row{display:flex;flex-direction:row;align-items:flex-start;flex-wrap:wrap;gap:9px;min-height:44px;padding:10px 12px;border:1px solid #e5e2da;border-radius:8px;background:#faf9f6;font-weight:500;line-height:1.55}
:is(.z5-order-page,.z5-staff-page) .toggle-row small{flex-basis:100%;padding-left:27px;margin-top:-4px}
:is(.z5-order-page,.z5-staff-page) input[type=checkbox],:is(.z5-order-page,.z5-staff-page) input[type=radio]{flex:0 0 auto;width:18px;height:18px;min-height:18px;accent-color:#a3543e;margin:2px 0 0;box-shadow:none}
:is(.z5-order-page,.z5-staff-page) label:has(>input[type=checkbox]):not(.toggle-row){font-weight:500;line-height:1.6}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) .btn{min-height:44px;font-size:13px;line-height:1.45;white-space:normal;text-align:center;overflow-wrap:anywhere}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) .btn:not(.btn-primary):not(.btn-danger){color:#42474b}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) .btn-primary{background:#a3543e;color:#fff;border-color:#a3543e}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) .btn-primary:hover{background:#88422f;border-color:#88422f}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) :is(.btn,.time-slot,button,summary):focus-visible{outline:3px solid #a3543e;outline-offset:3px}
:is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) :is(.row,.filter-actions){flex-wrap:wrap;gap:10px;min-width:0}

/* Order composition and a readable, stable account summary. */
.z5-order-page .order-form{display:grid;grid-template-columns:minmax(0,1fr) 304px;gap:24px;align-items:start;width:100%;max-width:100%;margin-bottom:24px}
.z5-order-page .form-main{min-width:0;width:100%}
.z5-order-page .form-grid>label:has(>textarea[name=comment]),.z5-order-page .form-grid>label:has(>input[name=deceased_name]){grid-column:1/-1}
.z5-order-page .customer-box{padding:20px;margin:0;border:1px solid #dfddd5;border-radius:9px;background:#faf9f6;box-shadow:none;overflow:visible}
.z5-order-page .customer-box>div:first-child{gap:12px!important;margin-bottom:12px!important}
.z5-order-page .customer-box>p{font-size:12px!important;line-height:1.7!important;margin-bottom:16px!important;color:#687078}
.z5-order-page .customer-box>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px!important}
.z5-order-page .customer-box>div:last-child>label:first-child,.z5-order-page .customer-legal-only{grid-column:1/-1}
.z5-order-page .customer-legal-only{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px!important}
.z5-order-page .customer-legal-only>label:last-child{grid-column:1/-1}
.z5-order-page #cp-order-results{max-height:300px;overflow:auto;box-shadow:0 12px 28px #292d3212}
.z5-order-page .resource-box :is(.place-picker,[data-place-typeahead]){min-width:0;max-width:100%;grid-column:1/-1}
.z5-order-page .resource-box :is(.place-picker,[data-place-typeahead]) :is(input,select){min-width:0;max-width:100%}
.z5-order-page .time-slots{gap:8px;margin-top:4px}
.z5-order-page .time-slot{min-width:64px;min-height:44px;border-radius:7px;font-size:13px;padding:9px 12px}
.z5-order-page .time-slot.is-free{color:#205e43;background:#eef5f0;border-color:#bad1c3}
.z5-order-page .time-slot.is-busy{color:#87332c;background:#fcf0ee;opacity:1}
.z5-order-page .time-slot.is-selected{background:#f5e8e2;color:#954b36;border-color:#a3543e;outline-offset:1px}
.z5-order-page #resource-check{font-size:13px;line-height:1.7;border-radius:8px;padding:13px 15px}
.z5-order-page #loader-choices .toggle-row{padding:12px;align-items:flex-start;background:#fff;min-height:48px}
.z5-order-page #loader-choices .toggle-row>span{flex:1;min-width:0}
.z5-order-page .context-summary{position:sticky;top:88px;width:100%;margin:0;background:#fff;border:1px solid #dfddd5;border-top:3px solid #a3543e;border-radius:11px;box-shadow:0 4px 20px #292d3205;overflow:visible}
.z5-order-page .context-summary .summary-top{padding:18px 20px 16px;gap:10px;flex-wrap:wrap;border-bottom:1px solid #e5e2da}
.z5-order-page .context-summary .summary-top strong{font-size:16px;line-height:1.5}
.z5-order-page .summary-top .tag{color:#687078;background:#f5f4f0;border:1px solid #dedbd3;font-size:12px;max-width:100%;overflow-wrap:anywhere}
.z5-order-page .summary-facts{padding:16px 20px;gap:12px;line-height:1.6}
.z5-order-page .summary-facts :is(dt,dd){font-size:13px;min-width:0;overflow-wrap:anywhere}
.z5-order-page .summary-facts .fact-wide dd{margin-top:4px}
.z5-order-page .summary-list{padding:8px 20px;margin:0}
.z5-order-page .summary-row{margin:0;padding:12px 0;font-size:13px;line-height:1.6;align-items:baseline;border-bottom:1px solid #eeece7}
.z5-order-page .summary-row dd{max-width:58%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.z5-order-page .summary-row:has(#sum-rest){color:#954b36;font-weight:650}
.z5-order-page .summary-row:has(#sum-rest) dt{color:#954b36}
.z5-order-page .summary-total{display:block;margin:0;padding:18px 20px;background:#faf7f2;border-top:1px solid #e5e2da}
.z5-order-page .summary-total>div{display:flex;width:100%;justify-content:space-between;gap:12px;align-items:baseline}
.z5-order-page .context-summary .summary-total strong{font-size:27px;line-height:1.3;font-variant-numeric:tabular-nums;color:#292d32;overflow-wrap:anywhere;max-width:70%}
.z5-order-page .summary-actions{display:flex;flex-direction:column;padding:18px 20px;gap:9px;border-top:1px solid #e5e2da}
.z5-order-page .summary-actions>.btn{width:100%;min-height:44px;flex:auto}
.z5-order-page .summary-actions>small{font-size:12px;color:#687078;line-height:1.5}
.z5-order-page .cashier-alerts{margin:0;padding:0 16px 16px}
.z5-order-page .cashier-alerts-head{font-size:12px;letter-spacing:0;line-height:1.6;min-height:44px}
.z5-order-page .cashier-alert-list{list-style:none;margin:0}
.z5-order-page .cashier-alert summary{font-size:13px;min-height:44px;line-height:1.5}
.z5-order-page .cashier-alert p{font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.z5-order-page .form-main>.card[style*="opacity"]{opacity:1!important;padding:18px 20px;background:#f6f5f1;border:1px dashed #d9d5cb;box-shadow:none}
.z5-order-page .form-main>.card[style*="opacity"] h2{font-size:14px;margin-bottom:6px;color:#535a60}
.z5-order-page .form-main>.card[style*="opacity"] p{color:#687078;font-size:12px;margin:0;line-height:1.65}
.z5-order-page .order-items-scroll{min-width:0;max-width:100%;border:1px solid #e5e2da;border-radius:8px;margin-top:16px}
.z5-order-page #items-tbl{margin:0;font-size:13px}
.z5-order-page #items-tbl th{padding:12px;color:#535a60;background:#faf9f6;font-size:12px}
.z5-order-page #items-tbl td{padding:12px}
.z5-order-page :is(.btn-tpl,#btn-clear){min-height:44px;border-radius:7px;padding:10px 14px;font-size:13px;font-weight:600}
.z5-order-page #btn-clear{background:#fff;border:1px solid #d8ccc3;color:#954b36}
.z5-order-page .stock-context{padding:13px 16px;background:#faf4e7;border:1px solid #e7d9b8;border-radius:8px;font-size:13px;line-height:1.6;margin:0 0 20px}
.z5-order-page>#payment,.z5-order-page>#photo-upload-block,.z5-order-page>#pipeline,.z5-order-page>#order-chat,.z5-order-page>#epitaph-wizard,.z5-order-page>section.card:not(:has(>.card-header)){padding:24px;border-radius:12px;border:1px solid #e5e2da;margin:0 0 20px}
.z5-order-page>section.card>h2{font-size:18px;line-height:1.4;margin:0 0 18px}
.z5-order-page #payment>ul,.z5-order-page #pipeline>ol{padding-left:22px;line-height:1.8}
.z5-order-page #payment>ul:empty{display:none}
.z5-order-page #payment li{padding:8px 0;font-size:13px;overflow-wrap:anywhere}
.z5-order-page #payment details{margin-top:8px}
.z5-order-page #payment details>summary{padding:8px 0;min-height:44px;cursor:pointer;color:#954b36;font-size:13px}
.z5-order-page #payment-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end;margin:0}
.z5-order-page #payment-form>label,.z5-order-page #payment .row>label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;line-height:1.6;color:#42474b;font-weight:600;margin:0}
.z5-order-page :is(#payment,#photo-upload-block,#pipeline,#order-chat,.z5-send-executor) button:not(.btn){min-height:44px;padding:10px 16px;border:1px solid #a3543e;border-radius:7px;background:#a3543e;color:#fff;font-size:13px;font-weight:600;line-height:1.5;white-space:normal}
.z5-order-page #payment .row>label{flex:1 1 180px}
.z5-order-page #payment .row>button{flex:0 0 auto}
.z5-order-page #photo-upload-block form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.z5-order-page #photo-upload-block input{flex:1 1 260px}
.z5-order-page .z5-order-documents{display:flex;flex-wrap:wrap;gap:10px;background:#fff;border:1px solid #e5e2da;border-radius:12px;padding:18px;margin:0 0 20px}
.z5-order-page .z5-order-documents .btn{color:#954b36;border-color:#e4d5cc;background:#fff;flex:0 1 auto}
.z5-order-page .z5-order-documents #pay-rest{min-height:44px;padding:10px 14px;border-radius:7px;font-size:13px;border:1px solid #a3543e;background:#a3543e;color:#fff}
.z5-order-page .z5-send-executor{margin:12px 0 24px}
.z5-order-page #order-chat .chat-list{padding:0;list-style:none;margin:0 0 20px}
.z5-order-page #order-chat .chat-list li{padding:14px 16px;background:#faf9f6;border:1px solid #e5e2da;border-radius:8px;margin-bottom:8px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.z5-order-page #order-chat .row{align-items:flex-end}
.z5-order-page #order-chat .grow{flex:1 1 250px;font-size:13px;font-weight:600;display:flex;flex-direction:column;gap:7px;margin:0}
.z5-order-page #order-chat .row>button{min-width:120px}

/* Staff roles stay paired with their existing default-assignment checkbox. */
.z5-staff-page #staff-form{display:flex;flex-direction:column;gap:20px;max-width:1100px;width:100%}
.z5-staff-page #staff-form>.section-card{width:100%;margin:0}
.z5-staff-page #staff-form>.summary-actions{width:100%;border:1px solid #e5e2da;border-radius:10px;background:#fff;padding:16px 20px;align-items:flex-end}
.z5-staff-page #staff-form>.summary-actions .btn{width:auto;min-width:180px}
.z5-staff-page .section-content>.row:has(.z5-staff-role){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px!important}
.z5-staff-page .z5-staff-role{padding:14px;border:1px solid #e5e2da;background:#faf9f6;border-radius:9px;min-width:0}
.z5-staff-page .z5-staff-role>.toggle-row{border:0;border-radius:0;background:transparent;padding:4px 0;min-height:44px;margin:0!important;font-size:13px}
.z5-staff-page .z5-staff-role>.toggle-row:last-child{font-size:12px;color:#687078!important;border-top:1px solid #e5e2da;padding-top:12px;margin-top:6px!important}
.z5-staff-page .z5-staff-role .toggle-row small{font-size:12px;color:#687078;flex-basis:100%;padding-left:27px;margin:0}
.z5-staff-page .retained-disabled-role{font-size:13px;line-height:1.6;color:#535a60}
.z5-staff-page .retained-disabled-role small{display:block;color:#687078;font-size:12px;line-height:1.65;margin-top:5px}
.z5-staff-page input[type=file]{padding:7px}
.z5-staff-page input[type=file]::file-selector-button{min-height:32px;padding:5px 10px;margin-right:10px;border:1px solid #d9d4c9;border-radius:5px;background:#faf9f6;color:#42474b;font:inherit}
.z5-staff-page #dismiss-modal .nom-lightbox-card{max-height:calc(100dvh - 32px);overflow:auto;padding:24px;width:min(100% - 32px,580px)}
.z5-staff-page #dismiss-modal h3{font-size:20px;line-height:1.4;margin-bottom:12px}
.z5-staff-page #dismiss-modal .hint{position:static;font-size:13px;line-height:1.7}
.z5-staff-page #dismiss-form{gap:18px}
.z5-staff-page #dismiss-form .filter-actions{justify-content:flex-end}

/* Naryads and a calm, legible executor view. */
.z5-naryads-page{max-width:1120px}
.z5-naryads-page>.warn{padding:24px;border:1px solid #e5d8ba;background:#faf4e7;border-radius:12px;color:#76551c;font-size:14px;line-height:1.8;margin:0 0 22px}
.z5-naryads-page .section-content{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.z5-naryads-page .section-content>p{margin:0;font-size:14px;line-height:1.7}
.z5-naryads-page .section-content code{padding:4px 8px;background:#f5f4f0;border:1px solid #e5e2da;border-radius:5px;font-size:12px;color:#535a60;display:inline-block}
.z5-naryads-page .section-content .row{display:flex;gap:10px;flex-wrap:wrap}
.z5-naryads-page>.card[style*="opacity"]{opacity:1!important;background:#f6f5f1;border:1px dashed #d9d5cb;padding:22px 24px;color:#687078;border-radius:12px}
.z5-naryads-page>.card[style*="opacity"] h2{font-size:16px;line-height:1.5;color:#535a60;margin-bottom:7px}
.z5-naryads-page>.card[style*="opacity"] p{font-size:13px;line-height:1.7;margin:0}
.z5-mobile-page .mobile-order-page{max-width:720px;padding:0 0 100px;margin:0 auto}
.z5-mobile-page .mobile-order-top{gap:16px;align-items:flex-start;flex-wrap:wrap;margin-bottom:24px}
.z5-mobile-page .mobile-order-top h1{font-size:25px;line-height:1.3;overflow-wrap:anywhere;margin-top:7px}
.z5-mobile-page .eyebrow{font-size:12px;letter-spacing:.04em;color:#687078}
.z5-mobile-page .card{border:1px solid #e5e2da;border-radius:12px;margin-bottom:18px}
.z5-mobile-page :is(.card-header,.card-body){padding:20px 24px}
.z5-mobile-page .card-header{background:#faf9f6;border-bottom:1px solid #e5e2da}
.z5-mobile-page .card-header h3{margin:0;font-size:16px}
.z5-mobile-page .mobile-summary h2{font-size:21px;line-height:1.4;overflow-wrap:anywhere;margin:16px 0 7px}
.z5-mobile-page .mobile-summary p{font-size:14px;line-height:1.7;margin-bottom:18px}
.z5-mobile-page .chip-row{display:flex;gap:8px;flex-wrap:wrap}
.z5-mobile-page .tag{font-size:12px;line-height:1.5}
.z5-mobile-page .route-step{position:relative;padding:18px 0;gap:14px;align-items:flex-start}
.z5-mobile-page .route-step:first-child{padding-top:0}
.z5-mobile-page .route-step:last-child{padding-bottom:0}
.z5-mobile-page .route-no{width:32px;height:32px;background:#f5e8e2;color:#954b36;border-radius:9px;font-size:13px}
.z5-mobile-page .route-step>div{min-width:0}
.z5-mobile-page .route-step h3{font-size:15px;line-height:1.5;margin:3px 0 5px}
.z5-mobile-page .route-step p{font-size:13px;line-height:1.7;color:#687078;overflow-wrap:anywhere}
.z5-mobile-page .definition-list{gap:12px 24px}
.z5-mobile-page .definition-list dt{font-size:12px;color:#687078;line-height:1.5}
.z5-mobile-page .definition-list dd{font-size:14px;line-height:1.6;margin-top:6px;overflow-wrap:anywhere}
.z5-mobile-page .checklist{list-style:none;margin:0;padding:0}
.z5-mobile-page .checklist li{font-size:14px;line-height:1.7;padding:13px 0;border-bottom:1px solid #e5e2da;overflow-wrap:anywhere}
.z5-mobile-page .checklist li:last-child{border:0}
.z5-mobile-page .checklist li>span{color:#954b36;margin-right:6px}
.z5-mobile-page .readonly-note{font-size:13px;line-height:1.7;background:#faf9f6;border:1px solid #e5e2da;border-radius:8px;padding:15px 18px;color:#687078}
.z5-mobile-page .mobile-bottom{left:calc((100% + var(--sidebar,218px))/2);width:min(720px,calc(100% - var(--sidebar,218px)));border:1px solid #dedbd3;border-radius:12px 12px 0 0;padding:14px 20px max(14px,env(safe-area-inset-bottom));box-shadow:0 -4px 24px #292d3208}

/* Schedule retains the full operational DOM and target controls. */
.z5-schedule-page .period-line{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;background:#fff;border:1px solid #e5e2da;border-radius:12px;padding:16px 18px;margin:0 0 24px}
.z5-schedule-page .week-nav{display:flex;align-items:center;gap:10px;min-height:44px;flex:1 0 auto}
.z5-schedule-page .week-nav strong{font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
.z5-schedule-page .week-nav .btn{width:44px;min-width:44px;padding:8px;font-size:22px}
.z5-schedule-page .period-line>.segmented{display:flex;align-self:flex-end;gap:4px;border:1px solid #e5e2da;border-radius:8px;padding:4px;background:#faf9f6;max-width:100%}
.z5-schedule-page .period-line .seg{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 12px;color:#535a60;font-size:13px;line-height:1.4;white-space:normal;text-align:center}
.z5-schedule-page .period-line .seg.active{background:#a3543e;color:#fff;border-radius:5px}
.z5-schedule-page .period-line>label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;line-height:1.6;min-width:0;margin:0}
.z5-schedule-page .period-line input[type=date]{min-height:44px;padding:9px 12px;border:1px solid #c9cbc8;border-radius:7px;font-size:14px;background:#fff;color:#292d32;min-width:0;width:100%}
.z5-schedule-page .schedule-layout{grid-template-columns:minmax(230px,.65fr) minmax(0,1.9fr);gap:22px;align-items:start}
.z5-schedule-page .schedule-untimed{top:88px;max-height:calc(100dvh - 112px)}
.z5-schedule-page .schedule-untimed .section-heading{padding:18px;gap:10px}
.z5-schedule-page .schedule-untimed .section-heading>.status-chip{margin-left:auto;flex-shrink:0}
.z5-schedule-page .schedule-untimed .section-content{padding:10px 18px 18px}
.z5-schedule-page .untimed-list li{gap:5px;font-size:13px;line-height:1.6;padding:16px 0}
.z5-schedule-page .schedule-card-title a{color:#954b36;font-size:14px;font-weight:650;min-height:44px;display:inline-flex;align-items:center}
.z5-schedule-page .schedule-card-title .schedule-drag-handle{flex-shrink:0;color:#535a60}
.z5-schedule-page .schedule-work-type{font-size:12px;font-weight:600;line-height:1.6}
.z5-schedule-page .schedule-unschedule-target{min-height:44px;opacity:1;color:#687078;background:#faf9f6;border-color:#c9cbc8;line-height:1.5;font-size:13px}
.z5-schedule-page .schedule-board-wrap .section-heading{padding:18px 20px}
.z5-schedule-page .schedule-scroll{padding:16px;max-width:100%;max-height:min(760px,calc(100dvh - 210px));overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c9c5ba #faf9f6}
.z5-schedule-page .schedule-grid{min-width:860px;font-size:13px;border-spacing:0}
.z5-schedule-page .schedule-grid :is(th,td){border-color:#e5e2da}
.z5-schedule-page .schedule-grid thead th{padding:12px 8px;background:#f7f6f2;font-size:13px;line-height:1.5}
.z5-schedule-page .schedule-grid thead th span{font-size:12px;color:#687078;margin-bottom:4px}
.z5-schedule-page .schedule-grid .slot-col{width:68px;min-width:68px;background:#f7f6f2;padding:12px 8px;font-size:13px;line-height:1.5}
.z5-schedule-page .schedule-grid thead .slot-col{z-index:4}
.z5-schedule-page .schedule-grid .is-today{box-shadow:inset 0 -2px 0 #a3543e}
.z5-schedule-page .schedule-grid thead .is-today{background:#f5e8e2;color:#954b36}
.z5-schedule-page .sched-cell{min-width:112px;min-height:76px;height:76px}
.z5-schedule-page .sched-cell.is-free{background:#f5f8f4}
.z5-schedule-page .sched-cell.has-orders.kind-ritual{background:#fcf1eb}
.z5-schedule-page .sched-cell.has-orders.kind-landscaping{background:#edf3f7}
.z5-schedule-page .sched-card-shell{min-height:76px;gap:2px;grid-template-columns:minmax(0,1fr) 44px}
.z5-schedule-page .sched-hit{padding:9px 8px;gap:3px;min-height:76px;color:#292d32}
.z5-schedule-page .sched-count{font-size:12px;color:#687078}
.z5-schedule-page .sched-num{font-size:13px;line-height:1.5}
.z5-schedule-page .sched-type{font-size:12px;color:#687078;line-height:1.5}
.z5-schedule-page .schedule-drop-target{min-height:76px;color:#64786c;opacity:1;font-size:20px}
.z5-schedule-page .schedule-drop-target[aria-disabled=true]{color:#687a6e;opacity:.5}
.z5-schedule-page .schedule-drop-target.is-valid-target{color:#175f3b;opacity:1;background:#e8f5ec}
.z5-schedule-page .sched-panel{padding:16px;min-width:280px;max-width:340px;border:1px solid #d3c9bd;border-radius:10px;box-shadow:0 12px 32px #292d3220}
.z5-schedule-page .sched-panel-head{font-size:14px;line-height:1.6;margin-bottom:14px}
.z5-schedule-page .sched-panel li{font-size:13px;line-height:1.65;gap:6px;padding:12px 0;border-top:1px solid #e5e2da}
.z5-schedule-page .sched-panel li:first-child{border-top:0;padding-top:0}
.z5-schedule-page .sched-panel a{color:#954b36;min-height:30px;display:inline-flex;align-items:center}
.z5-schedule-page .z5-schedule-day-control{display:none}

@media(max-width:1199px){
  .z5-order-page .order-form{grid-template-columns:minmax(0,1fr) 278px;gap:18px}
  :is(.z5-order-page,.z5-staff-page) .section-heading{padding:18px 20px}
  :is(.z5-order-page,.z5-staff-page) .section-content{padding:20px}
  .z5-order-page .form-grid{gap:18px}
  .z5-order-page #payment-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .z5-order-page #payment-form>button{grid-column:1/-1;justify-self:start;min-width:180px}
  .z5-schedule-page .schedule-layout{grid-template-columns:230px minmax(0,1fr);gap:18px}
  .z5-schedule-page .period-line>.segmented{order:1}
  .z5-schedule-page .period-line>.week-nav{flex:1 1 250px}
}
@media(max-width:1000px){
  .z5-order-page .order-form{display:grid;grid-template-columns:1fr;gap:22px}
  .z5-order-page .context-summary{position:static!important;top:auto!important;order:2;margin-top:0;max-width:none}
  .z5-order-page .summary-top{border-radius:8px 8px 0 0}
  .z5-order-page .summary-actions{display:flex;flex-direction:row;flex-wrap:wrap}
  .z5-order-page .summary-actions .btn{width:auto;flex:1 1 170px}
  .z5-order-page .summary-actions>small{flex-basis:100%}
  .z5-schedule-page .schedule-layout{grid-template-columns:1fr}
  .z5-schedule-page .schedule-untimed{position:static;max-height:none}
  .z5-schedule-page .untimed-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}
  .z5-schedule-page .schedule-scroll{max-height:650px}
  .z5-mobile-page .mobile-bottom{left:50%;width:min(720px,100%)}
}
@media(max-width:799px){
  :is(.z5-order-page,.z5-staff-page) .form-grid,:is(.z5-order-page,.z5-staff-page) .form-grid.cols-3{grid-template-columns:1fr;gap:20px}
  :is(.z5-order-page,.z5-staff-page) .form-grid>.span-2,:is(.z5-order-page,.z5-staff-page) .form-grid>.span-3{grid-column:1/-1}
  .z5-order-page .customer-box>div:last-child,.z5-order-page .customer-legal-only{grid-template-columns:1fr}
  .z5-staff-page .section-content>.row:has(.z5-staff-role){grid-template-columns:1fr}
}
@media(max-width:640px){
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading{margin-bottom:20px}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading h2{font-size:24px;line-height:1.3}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .page-heading p{font-size:13px;line-height:1.7}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-card{border-radius:10px;margin-bottom:16px}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading{padding:16px;gap:10px;min-height:76px;align-items:flex-start}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading h3{font-size:15px}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-heading p{font-size:12px;line-height:1.65}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page) .section-content{padding:18px 16px}
  :is(.z5-order-page,.z5-staff-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-size:16px;min-height:46px;padding:10px 11px}
  :is(.z5-order-page,.z5-staff-page) .form-grid>label{font-size:13px;gap:8px}
  :is(.z5-order-page,.z5-staff-page) .toggle-row{padding:12px;min-height:48px}
  :is(.z5-order-page,.z5-schedule-page,.z5-naryads-page,.z5-staff-page,.z5-mobile-page) .btn{min-height:46px;max-width:100%;padding:11px 14px}
  .z5-order-page .order-form{gap:18px;margin-bottom:20px}
  .z5-order-page .customer-box{padding:16px;margin:0 -1px}
  .z5-order-page .customer-box>div:first-child{align-items:flex-start!important}
  .z5-order-page .customer-box>div:first-child>.btn{width:100%}
  .z5-order-page .customer-box>div:last-child{gap:20px!important}
  .z5-order-page .summary-top,.z5-order-page .summary-facts,.z5-order-page .summary-list,.z5-order-page .summary-total,.z5-order-page .summary-actions{padding-left:18px;padding-right:18px}
  .z5-order-page .summary-actions{flex-direction:column}
  .z5-order-page .summary-actions .btn{flex:auto;width:100%}
  .z5-order-page .summary-row{padding:12px 0}
  .z5-order-page .context-summary .summary-total strong{font-size:26px}
  .z5-order-page .cashier-alerts{padding:0 14px 14px}
  .z5-order-page .form-main>.card[style*="opacity"]{padding:16px}
  .z5-order-page>.card,.z5-order-page>#payment,.z5-order-page>#photo-upload-block,.z5-order-page>#pipeline,.z5-order-page>#order-chat,.z5-order-page>#epitaph-wizard,.z5-order-page>section.card:not(:has(>.card-header)){padding:20px 16px}
  .z5-order-page #shortages{padding:0}
  .z5-order-page #payment-form{grid-template-columns:1fr;gap:18px}
  .z5-order-page #payment-form>button{grid-column:auto;justify-self:stretch}
  .z5-order-page #payment .row>label,.z5-order-page #payment .row>button{width:100%;flex-basis:100%}
  .z5-order-page .z5-order-documents{padding:16px;display:grid;grid-template-columns:1fr;gap:10px}
  .z5-order-page .z5-order-documents .btn,.z5-order-page .z5-order-documents button{width:100%}
  .z5-order-page .z5-send-executor{display:flex;flex-direction:column;align-items:stretch}
  .z5-order-page #order-chat .row>button,.z5-order-page #order-chat .grow{width:100%;flex-basis:100%}
  .z5-order-page #photo-upload-block form>button{width:100%}
  .z5-order-page :is(.btn-tpl,#btn-clear){flex:1 1 125px}
  .z5-staff-page #staff-form{gap:16px}
  .z5-staff-page #staff-form>.summary-actions .btn{width:100%;min-width:0}
  .z5-staff-page .z5-staff-role{padding:13px}
  .z5-staff-page #dismiss-modal .nom-lightbox-card{padding:20px 16px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
  .z5-staff-page #dismiss-form .filter-actions{display:flex;flex-direction:column;align-items:stretch}
  .z5-staff-page #dismiss-form .filter-actions>.btn{width:100%}
  .z5-naryads-page>.warn{padding:20px 16px}
  .z5-naryads-page .section-content{gap:16px}
  .z5-naryads-page .section-content>.row{width:100%;flex-direction:column;align-items:stretch}
  .z5-naryads-page .section-content .row>.btn{width:100%}
  .z5-naryads-page>.card[style*="opacity"]{padding:20px 16px}
  .z5-mobile-page .mobile-order-top h1{font-size:23px}
  .z5-mobile-page .mobile-order-top{gap:12px;margin-bottom:20px}
  .z5-mobile-page .mobile-order-top>.status-chip{max-width:100%}
  .z5-mobile-page :is(.card-header,.card-body){padding:18px 16px}
  .z5-mobile-page .mobile-summary h2{font-size:20px}
  .z5-mobile-page .mobile-summary .btn{width:100%}
  .z5-mobile-page .definition-list{grid-template-columns:1fr;gap:6px}
  .z5-mobile-page .route-step{gap:12px;padding:18px 0}
  .z5-mobile-page .route-step h3{font-size:14px}
  .z5-mobile-page .mobile-bottom{left:0;right:0;transform:none;width:100%;border-radius:0;padding:12px 14px max(12px,env(safe-area-inset-bottom));gap:10px;grid-template-columns:1fr 1.4fr}
  .z5-mobile-page .mobile-bottom .btn{font-size:13px;padding:11px 8px}
  .z5-schedule-page .period-line{padding:14px;gap:12px;display:grid;grid-template-columns:1fr 1fr;margin-bottom:20px}
  .z5-schedule-page .period-line>.week-nav{grid-column:1/-1;display:flex;justify-content:space-between;gap:4px}
  .z5-schedule-page .week-nav strong{font-size:14px;white-space:normal;text-align:center}
  .z5-schedule-page .period-line>.segmented{grid-column:1/-1;order:0;display:grid;grid-template-columns:1fr 1fr 1fr;width:100%;gap:3px;padding:3px}
  .z5-schedule-page .period-line .seg{font-size:12px;padding:8px 6px;min-height:48px;line-height:1.5}
  .z5-schedule-page .period-line>label{grid-column:1/-1;grid-row:3;min-width:0;font-size:12px}
  .z5-schedule-page .period-line input[type=date]{font-size:16px;width:100%;min-height:46px}
  .z5-schedule-page .period-line>.btn{width:100%;min-width:0;max-width:none}
  .z5-schedule-page .schedule-layout{gap:18px}
  .z5-schedule-page .schedule-untimed .section-content{padding:4px 16px 16px}
  .z5-schedule-page .schedule-untimed .section-heading{padding:16px;align-items:center}
  .z5-schedule-page .untimed-list{display:block}
  .z5-schedule-page .untimed-list li{padding:15px 0}
  .z5-schedule-page .schedule-board-wrap .section-heading{padding:16px}
  .z5-schedule-page .schedule-scroll{padding:12px;max-height:72dvh;overflow:auto}
  .z5-schedule-page .sched-panel{position:fixed;inset:auto 12px 12px!important;width:calc(100vw - 24px);min-width:0;max-width:none;margin:0!important;max-height:70dvh;overflow:auto;z-index:50;box-shadow:0 -8px 40px #292d3226;padding:18px;border-radius:12px}
  .z5-schedule-page .sched-panel .sched-close{min-width:44px;min-height:44px;font-size:22px}
  .z5-schedule-page .schedule-grid.z5-day-cards{display:block;min-width:0;width:100%;border:0}
  .z5-schedule-page .z5-schedule-day-control{display:grid;gap:8px;padding:18px 16px;border-bottom:1px solid #e5e2da;background:#faf9f6}
  .z5-schedule-page .z5-schedule-day-control>label{font-size:12px;font-weight:600;line-height:1.5;margin:0;color:#42474b}
  .z5-schedule-page .z5-schedule-day-select{width:100%;min-width:0;min-height:46px;font-size:16px;border:1px solid #c9cbc8;border-radius:7px;background:#fff;padding:10px 12px;color:#292d32}
  .z5-schedule-page .z5-schedule-day-control>p{font-size:12px;line-height:1.7;color:#687078;margin:0}
  .z5-schedule-page .schedule-scroll:has(.z5-day-cards){max-height:none;padding:12px;background:#f5f4f0;overflow:visible}
  .z5-schedule-page .z5-day-cards>thead{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .z5-schedule-page .z5-day-cards>tbody{display:grid;gap:10px;min-width:0}
  .z5-schedule-page .z5-day-cards>tbody>tr{display:grid;grid-template-columns:64px minmax(0,1fr);border:1px solid #dedbd3;border-radius:9px;overflow:visible;background:#fff;min-width:0;min-height:76px}
  .z5-schedule-page .z5-day-cards>tbody>tr>th.slot-col{position:static!important;display:flex;align-items:center;justify-content:center;min-width:0!important;width:auto!important;padding:12px 7px;border:0;border-right:1px solid #e5e2da;border-radius:8px 0 0 8px;font-size:13px;white-space:normal;overflow-wrap:anywhere;background:#faf9f6}
  .z5-schedule-page .z5-day-cards>tbody>tr>td{display:none!important}
  .z5-schedule-page .z5-day-cards>tbody>tr>td.z5-active-day{display:block!important;min-width:0;min-height:76px;height:auto;border:0;border-radius:0 8px 8px 0;box-shadow:none}
  .z5-schedule-page .z5-day-cards>tbody>tr>td.z5-all-days{display:block!important;grid-column:1/-1;min-width:0;height:auto;border:0;border-radius:8px}
  .z5-schedule-page .z5-day-cards .sched-hit{padding:12px;min-height:76px}
  .z5-schedule-page .z5-day-cards .sched-card-shell{grid-template-columns:minmax(0,1fr) 44px;gap:4px;align-items:center;padding-right:9px}
  .z5-schedule-page .z5-day-cards .sched-num{font-size:14px;white-space:normal;overflow-wrap:anywhere}
  .z5-schedule-page .z5-day-cards .sched-type{white-space:normal}
  .z5-schedule-page .z5-day-cards .schedule-drop-target{min-height:76px;border-radius:0 8px 8px 0}
}
@media print{
  .z5-order-page .order-form,.z5-staff-page #staff-form{display:block}
  .z5-order-page .context-summary{position:static!important;max-width:none;break-inside:avoid}
  .z5-schedule-page .schedule-scroll{max-height:none;overflow:visible}
  .z5-schedule-page .z5-schedule-day-control{display:none!important}
  .z5-mobile-page .mobile-bottom{display:none!important}
}


/* ZAKAZ v5 — original tables become cards on small screens only.
   No display override on a table's wrapper: existing table/card view switches
   and .desktop-table + .mobile-cards pairs remain authoritative.
   .schedule-grid is handled separately by schedule-ui.js / forms.css. */
@media screen and (max-width:640px){
  .z5-table-wrap{width:100%;max-width:100%;min-width:0;overflow:visible}
  table.z5-mobile-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto;border-collapse:separate;border-spacing:0;background:transparent;position:relative;font-size:13px;overflow:visible}
  table.z5-mobile-table>colgroup,table.z5-mobile-table>col{display:none}
  table.z5-mobile-table>caption{display:block;width:100%;text-align:left;padding:12px 0;font-weight:600;color:#292d32}
  table.z5-mobile-table>tbody,table.z5-mobile-table>tfoot{display:block!important;width:100%;min-width:0;max-width:100%;border:0;background:transparent}
  /* Retain header semantics. display:none / visibility:hidden would remove
     column names from the accessibility tree in several browser/AT pairs. */
  table.z5-mobile-table>thead:not(.z5-heading-controls),
  table.z5-mobile-table>tbody>.z5-heading-row:not(.z5-heading-controls-row){display:block!important;position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;margin:-1px!important;padding:0!important;border:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
  table.z5-mobile-table>thead:not(.z5-heading-controls)>tr{display:table-row!important}
  table.z5-mobile-table>thead:not(.z5-heading-controls)>tr>th{display:table-cell!important;position:static!important}
  /* Header checkboxes and sorting/filtering controls stay available without
     cloning them or changing the form they belong to. */
  table.z5-mobile-table>thead.z5-heading-controls{display:block!important;position:static!important;width:100%!important;height:auto!important;margin:0 0 10px!important;padding:0!important;overflow:visible!important;clip:auto!important;clip-path:none!important;background:transparent;border:0}
  table.z5-mobile-table>thead.z5-heading-controls>tr,
  table.z5-mobile-table>tbody>.z5-heading-controls-row{display:flex!important;flex-wrap:wrap;align-items:center;gap:10px;position:relative;padding:4px 8px!important;border:0;background:transparent}
  table.z5-mobile-table .z5-heading-row>.z5-heading-control{display:flex!important;align-items:center;gap:10px;position:static!important;width:auto!important;min-width:0!important;height:auto!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;white-space:normal!important;text-align:left;font-size:12px;font-weight:500;color:#687078}
  table.z5-mobile-table .z5-heading-row>.z5-heading-control:has(input[type="checkbox"])::after{content:attr(data-z5-heading-label);font-size:12px;color:#687078}
  table.z5-mobile-table .z5-heading-controls-row>th:not(.z5-heading-control){display:table-cell!important;position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;margin:-1px!important;padding:0!important;border:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
  table.z5-mobile-table>tbody>.z5-card-row,
  table.z5-mobile-table>tfoot>.z5-card-row,
  table.z5-mobile-table>.z5-card-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:13px 16px;position:relative;margin:0 0 12px;padding:17px!important;width:100%!important;max-width:100%;min-width:0;box-sizing:border-box;border:1px solid #dedbd5!important;border-radius:12px;background:#fff;box-shadow:0 2px 5px #292d3203}
  table.z5-mobile-table>tbody>.z5-card-row:hover{background:#fff}
  table.z5-mobile-table>tbody>.z5-card-row.is-selected{background:#fbf0e9;border-color:#bc8878!important}
  table.z5-mobile-table>tbody>.z5-card-row>td,
  table.z5-mobile-table>tbody>.z5-card-row>th,
  table.z5-mobile-table>tfoot>.z5-card-row>td,
  table.z5-mobile-table>tfoot>.z5-card-row>th,
  table.z5-mobile-table>.z5-card-row>.z5-card-cell{display:block!important;position:static!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;z-index:auto!important;float:none!important;width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;white-space:normal!important;text-align:left;overflow:visible;overflow-wrap:anywhere;word-break:normal;line-height:1.55;font-size:13px;color:#292d32}
  table.z5-mobile-table .z5-card-cell::before{content:attr(data-z5-label);display:block;position:static!important;margin:0 0 5px;padding:0;font-size:10px;font-weight:500;line-height:1.5;letter-spacing:.01em;color:#687078;white-space:normal;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-card-cell:not([data-z5-label])::before,
  table.z5-mobile-table .z5-card-cell[data-z5-label=""]::before{display:none!important}
  table.z5-mobile-table .z5-primary-cell,
  table.z5-mobile-table .z5-wide-cell,
  table.z5-mobile-table .z5-span-cell,
  table.z5-mobile-table .z5-actions-cell,
  table.z5-mobile-table .z5-nested-cell{grid-column:1/-1}
  table.z5-mobile-table .z5-primary-cell>strong,
  table.z5-mobile-table .z5-primary-cell>b,
  table.z5-mobile-table .z5-primary-cell>.zk-main,
  table.z5-mobile-table .z5-primary-cell>.order-link{font-size:14px;line-height:1.5;max-width:100%;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-card-cell .cell-sub{font-size:11px;line-height:1.65;margin-top:4px;white-space:normal!important;color:#687078}
  table.z5-mobile-table .z5-card-cell .cell-ellipsis,
  table.z5-mobile-table .z5-card-cell .primary-text{display:block;max-width:100%;white-space:normal!important;text-overflow:clip;overflow:visible;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-card-cell.num,
  table.z5-mobile-table .z5-card-cell.numeric,
  table.z5-mobile-table .z5-card-cell.money,
  table.z5-mobile-table .z5-card-cell [data-line-total]{font-variant-numeric:tabular-nums;letter-spacing:0;text-align:left!important;font-weight:500}
  table.z5-mobile-table .z5-card-cell.money strong,
  table.z5-mobile-table .z5-card-cell.money b,
  table.z5-mobile-table .z5-card-cell [data-line-total]{font-size:14px}
  table.z5-mobile-table .z5-card-cell .status-chip{height:auto;min-height:26px;max-width:100%;white-space:normal;font-size:11px;padding:5px 8px;line-height:1.4}
  table.z5-mobile-table .z5-card-cell .status-text{white-space:normal!important;text-overflow:clip;overflow:visible;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-card-cell img{max-width:100%;object-fit:contain}
  table.z5-mobile-table .z5-card-cell .nom-name-wrap{display:block;max-width:100%;min-width:0}
  table.z5-mobile-table .z5-card-cell .nom-name-truncated{max-width:100%;white-space:normal!important;text-overflow:clip;overflow:visible;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-card-cell .nom-name-tooltip{box-sizing:border-box;max-width:min(280px,calc(100vw - 64px));left:0;right:auto;white-space:normal;overflow-wrap:anywhere}
  table.z5-mobile-table .z5-actions-cell{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid #eeece7!important;padding-top:12px!important;margin-top:1px!important}
  table.z5-mobile-table .z5-actions-cell::before{display:none!important}
  table.z5-mobile-table .z5-actions-cell form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0!important;max-width:100%}
  table.z5-mobile-table .z5-card-cell form,
  table.z5-mobile-table .z5-card-cell fieldset,
  table.z5-mobile-table .z5-card-cell details{min-width:0;max-width:100%;box-sizing:border-box}
  table.z5-mobile-table .z5-card-cell .inline-form,
  table.z5-mobile-table .zk-edit-row form{display:flex;flex-wrap:wrap;gap:10px;min-width:0}
  table.z5-mobile-table .zk-edit-row input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  table.z5-mobile-table .zk-edit-row select{flex:1 1 180px}
  table.z5-mobile-table .z5-card-cell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  table.z5-mobile-table .z5-card-cell select,
  table.z5-mobile-table .z5-card-cell textarea{box-sizing:border-box;min-width:0!important;width:100%;max-width:100%!important;min-height:44px;font-size:16px;line-height:1.4}
  table.z5-mobile-table .z5-card-cell input[readonly]{color:#292d32;background:#f5f4f0;opacity:1;font-variant-numeric:tabular-nums}
  table.z5-mobile-table .z5-card-cell input:disabled,
  table.z5-mobile-table .z5-card-cell select:disabled,
  table.z5-mobile-table .z5-card-cell textarea:disabled{opacity:1;color:#687078;background:#f5f4f0;-webkit-text-fill-color:#687078}
  table.z5-mobile-table .z5-card-cell button,
  table.z5-mobile-table .z5-card-cell a[href],
  table.z5-mobile-table .z5-card-cell summary,
  table.z5-mobile-table .z5-heading-control button,
  table.z5-mobile-table .z5-heading-control a[href]{min-height:44px;min-width:44px;max-width:100%;box-sizing:border-box;touch-action:manipulation}
  table.z5-mobile-table .z5-card-cell a[href]{display:inline-flex;align-items:center;overflow-wrap:anywhere;white-space:normal}
  table.z5-mobile-table .z5-card-cell button{padding:10px 12px;white-space:normal;line-height:1.4}
  table.z5-mobile-table .z5-card-cell summary{display:flex;align-items:center;gap:8px;font-size:12px;color:#954b36}
  table.z5-mobile-table .z5-card-cell input[type="checkbox"],
  table.z5-mobile-table .z5-card-cell input[type="radio"],
  table.z5-mobile-table .z5-heading-control input[type="checkbox"],
  table.z5-mobile-table .z5-heading-control input[type="radio"]{box-sizing:border-box;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;flex:0 0 44px;accent-color:#a3543e;cursor:pointer}
  table.z5-mobile-table .z5-choice-cell{grid-column:1/-1;display:flex!important;align-items:center;gap:8px;min-height:44px}
  table.z5-mobile-table .z5-choice-cell::before{margin:0;font-size:11px}
  table.z5-mobile-table .z5-full-row{grid-template-columns:minmax(0,1fr);gap:0}
  table.z5-mobile-table .z5-full-row>.z5-card-cell::before{display:none!important}
  table.z5-mobile-table .zk-edit-row{background:#f8f5f0;border-color:#d9b7a7!important;margin-top:-6px;border-radius:0 0 12px 12px}
  table.z5-mobile-table .z5-group-row{background:#eceae4;border-color:#dedbd5!important;box-shadow:none;margin-bottom:8px;padding:12px 16px!important;gap:10px}
  table.z5-mobile-table .z5-group-row>.z5-card-cell{font-weight:600;color:#4c433d;font-size:12px}
  table.z5-mobile-table .z5-group-row>.z5-card-cell::before{display:none!important}
  table.z5-mobile-table .z5-summary-row{background:#f5e8e2;border-color:#d6afa0!important}
  table.z5-mobile-table .z5-span-continuation[data-z5-context]::before{content:attr(data-z5-context);display:block;grid-column:1/-1;color:#687078;background:#f5f4f0;padding:9px 11px;margin:-3px -3px 0;border-radius:7px;font-size:11px;line-height:1.6;overflow-wrap:anywhere}
  table.z5-mobile-table .payroll-detail-row{margin-top:-7px;background:#f9f8f5;border-top:0!important;border-radius:0 0 12px 12px}
  table.z5-mobile-table .payroll-work-list{padding:0;max-width:100%;list-style:none}
  table.z5-mobile-table .payroll-work-list>li{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:10px 0;white-space:normal;border-bottom:1px solid #e8e4dd}
  table.z5-mobile-table .z5-nested-cell>table.z5-mobile-table{margin-top:12px}
  table.z5-mobile-table.z5-nested-table>tbody>.z5-card-row{padding:13px!important;background:#f8f7f3;border-color:#e5e1d9!important;box-shadow:none}
  /* Hidden states and user-selected columns are business/UI state, not an
     opportunity for the card layout to force a row/control back on screen. */
  table.z5-mobile-table[hidden],
  table.z5-mobile-table>tbody[hidden],
  table.z5-mobile-table>tfoot[hidden],
  table.z5-mobile-table>tbody>tr[hidden],
  table.z5-mobile-table>tfoot>tr[hidden],
  table.z5-mobile-table>.z5-card-row[hidden],
  table.z5-mobile-table .z5-card-cell[hidden],
  table.z5-mobile-table .z5-card-cell.col-hidden,
  table.z5-mobile-table .z5-heading-row>.col-hidden,
  table.z5-mobile-table .z5-card-cell.z5-empty-cell{display:none!important}
}

/* Existing standalone employee pages. Missing /static/worker/* production
   assets are not recreated here. These rules never reveal inactive screens. */
body.z5-worker-legacy{margin:0;background:#f5f4f0;color:#292d32;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.6}
body.z5-worker-legacy .wrap{box-sizing:border-box;max-width:700px;padding:30px 24px 48px;margin:0 auto}
body.z5-worker-legacy .top{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:24px}
body.z5-worker-legacy h1{font-size:25px;font-weight:600;letter-spacing:-.04em;margin:0;flex:1 1 100%}
body.z5-worker-legacy .top>span{color:#687078;font-size:12px;flex:1}
body.z5-worker-legacy .card{border:1px solid #dedbd5;border-radius:12px;padding:21px;background:#fff;box-shadow:0 3px 12px #292d3204;margin:14px 0;overflow-wrap:anywhere}
body.z5-worker-legacy .num{font-size:19px;font-weight:650;color:#954b36;letter-spacing:-.02em;margin-bottom:9px;font-variant-numeric:tabular-nums}
body.z5-worker-legacy .st{display:inline-flex;max-width:100%;padding:5px 9px;border-radius:6px;background:#f5e8e2;color:#954b36;font-size:11px;font-weight:600;margin-top:15px;white-space:normal}
body.z5-worker-legacy button{box-sizing:border-box;min-height:44px;min-width:44px;max-width:100%;border:1px solid #a3543e;border-radius:8px;background:#a3543e;color:#fff;font-size:13px;font-weight:600;padding:12px 17px;cursor:pointer;white-space:normal;line-height:1.5;touch-action:manipulation}
body.z5-worker-legacy button.done{background:#45644c;border-color:#45644c}
body.z5-worker-legacy button.ghost{background:#fff;border-color:#d7d2ca;color:#4e4842}
body.z5-worker-legacy button:focus-visible{outline:3px solid #c7866d;outline-offset:3px}
body.z5-worker-legacy .msg{background:#fff6df;color:#745720;border:1px solid #e1cf9d;border-radius:9px;padding:12px 15px;font-size:12px;overflow-wrap:anywhere}
body.z5-worker-legacy .msg.err{background:#f9e8e4;border-color:#dcb4a9;color:#8d4033}
@media screen and (max-width:640px){
  body.z5-worker-legacy .wrap{padding:22px 16px max(28px,env(safe-area-inset-bottom))}
  body.z5-worker-legacy .card{padding:18px}
  body.z5-worker-legacy .top{gap:10px;margin-bottom:20px}
  body.z5-worker-legacy h1{font-size:24px}
  .login-body .login-left,.login-body .login-content,.login-body .login-form{box-sizing:border-box;min-width:0;max-width:100%}
  .login-body .login-form input:not([type="hidden"]){width:100%;min-width:0;max-width:100%;min-height:48px;font-size:16px}
  .login-body .login-form button{min-height:44px;min-width:44px}
  .login-body .login-foot{gap:9px;flex-wrap:wrap;line-height:1.6}
  .mobile-order-page{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .mobile-order-page .mobile-order-top{flex-wrap:wrap;gap:12px}
  .mobile-order-page .route-step>div,.mobile-order-page .definition-list>div{min-width:0}
  .mobile-order-page .route-step p,.mobile-order-page dd{white-space:normal;overflow-wrap:anywhere}
  .mobile-order-page .btn,.mobile-bottom .btn{min-height:44px;min-width:44px;white-space:normal}
  .mobile-bottom{box-sizing:border-box;max-width:100%;gap:10px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  #app>.screen{max-width:100%;min-width:0;box-sizing:border-box}
  #app>.screen .input-wrap,#app>.screen .field{max-width:100%;min-width:0;box-sizing:border-box}
  #app>.screen input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]){min-height:44px;min-width:0;max-width:100%;font-size:16px;box-sizing:border-box}
  #app>.screen button,#app>.bottom-nav button{min-height:44px;min-width:44px;touch-action:manipulation}
  #app>.screen .topbar-copy{min-width:0;overflow-wrap:anywhere}
  #app>.screen .tabs{max-width:100%;flex-wrap:wrap}
}


/* Regression fixes from the local browser pass. */
#epitaph-options.hint{position:static!important;display:flex;flex-wrap:wrap;gap:8px;inset:auto!important;width:auto!important;max-width:100%;margin-top:14px;padding:12px;border:1px solid var(--line);box-shadow:none;background:#f8f7f3}
#epitaph-options button{background:#fff;color:var(--accent-text);border:1px solid #c8b3a8;border-radius:7px;white-space:normal;min-height:44px}
@media(max-width:720px){button:not([hidden]){min-height:44px!important}.view-toggle{height:auto;min-height:44px}.view-toggle button{min-width:44px;height:44px!important}}
@media(max-width:640px){.z5-table-wrap:not(.desktop-table):not(.supply-board-desktop):not(.registry .table-wrap):not([hidden]){display:block}}
.page-content:has(>#nom-results){display:flex;flex-direction:column}
.page-content:has(>#nom-results)>.page-heading:not(.base-heading){order:-4}
.page-content:has(>#nom-results)>.base-heading{order:-3}
.page-content:has(>#nom-results)>details[data-filters]{order:-2;margin-bottom:20px}
.page-content:has(>#nom-results)>#nom-results{order:-1;margin-bottom:24px}
.z5-schedule-page>.page-heading h2{display:none}
@media(max-width:720px){body:has(.z5-order-page) .base-heading button[form="order-form"]{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));left:16px;right:16px;width:calc(100% - 32px);z-index:45;box-shadow:0 5px 24px #292d3233;min-height:48px!important}.z5-order-page{padding-bottom:84px}.apps-cats>a.status-chip{min-height:44px;padding:10px 12px}}
@media(max-width:720px){button:not([hidden]),a.btn{min-width:44px}}
@media(min-width:1001px){.page-content:has(>#nom-results) .nom-filter-grid{display:grid;grid-template-columns:minmax(240px,2fr) repeat(2,minmax(150px,1fr));gap:14px 16px;align-items:end;padding:20px 22px}.page-content:has(>#nom-results) .nom-filter-grid>.search-field{grid-column:auto}.page-content:has(>#nom-results) .nom-filter-grid>.check-row{grid-column:1;align-self:center}.page-content:has(>#nom-results) .nom-filter-grid>.filter-actions{grid-column:2/-1;display:flex;justify-content:flex-end;align-items:center}}


/* Tablet schedule detail: the absolute opens-up panel can be clipped by the
   scroll container and leave its close button behind the section heading.
   Use the same viewport-based sheet model as the phone layout at 641–1023px.
   Existing panel nodes, hidden state, handlers and desktop grid are retained. */
@media screen and (min-width:641px) and (max-width:1023px){
  .z5-schedule-page .sched-panel,
  .z5-schedule-page .sched-panel.opens-up{
    position:fixed;
    inset:auto 24px 24px!important;
    width:min(560px,calc(100vw - 48px));
    min-width:0;
    max-width:none;
    max-height:calc(100dvh - 120px);
    margin:0 auto!important;
    overflow:auto;
    overscroll-behavior:contain;
    box-sizing:border-box;
    z-index:60;
    box-shadow:0 14px 56px #292d3233;
  }
  .z5-schedule-page .sched-panel .sched-close{min-width:44px;min-height:44px;flex-shrink:0;font-size:22px}
}


/* Targeted text contrast corrections measured against rendered surfaces. */
.login-body #main .brand-type{color:#292d32}
.sidebar .sidebar-user .user-box .avatar{color:#76604e}
.z5-order-page button.btn-tpl{background:#fff;color:#954b36;border-color:#cbb7ad}
#main>section.card>form>button:not(.btn),#main>form.card>button:not(.btn){background:#a3543e;color:#fff;border-color:#a3543e}
.company-status .company-status-meta,.money-split small,.order-card-meta>div>span,.template-card>span,.field label .optional,.page-overline{color:#606972}
.upload-zone.muted{opacity:1;color:#606972}
.login-body .login-art>p{color:#50533f}
.login-body .login-foot{color:#606554}
.sidebar .workspace-switch .workspace-icon{color:#60594c}
.zk-settings-tabs a.tab{color:#5c665b}
.tabs .tab .tab-count{color:#58604f}
.tag.tag-accent{color:#954b36}
.tag[style*="#9b6418"]{color:#805310!important}
.z5-schedule-page .schedule-grid th.is-today>span,.z5-schedule-page .sched-cell .sched-count,.z5-schedule-page .sched-cell .sched-type{color:#58636d}
