:root {
  --bg: #f3f4f2;
  --surface: #ffffff;
  --surface-muted: #f8f9f7;
  --text: #202421;
  --muted: #707670;
  --border: #dfe3de;
  --border-strong: #cbd1cb;
  --accent: #43564a;
  --accent-soft: #e9eeea;
  --danger: #8a4747;
  --danger-soft: #f6eaea;
  --warning: #7c6538;
  --warning-soft: #f5f0e5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(25, 35, 28, .04);
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
html.modal-open, body.modal-open { overflow: hidden; overscroll-behavior: none; }
body.modal-open .timesheet-wrap { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(1.45rem, 2vw, 1.8rem); letter-spacing: -.025em; }
h2 { margin-bottom: 3px; font-size: 1.05rem; }
small { display: block; color: var(--muted); font-size: .79rem; font-weight: 400; }
.muted { color: var(--muted); }
.strong { font-weight: 650; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-shell { min-height: 100vh; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.94); box-shadow: 0 1px 8px rgba(25,35,28,.04); backdrop-filter: blur(10px); }
.site-header-inner { width: min(1800px, 100%); height: 64px; display: flex; align-items: center; gap: 24px; margin: 0 auto; padding: 0 30px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; }
.brand-mark { width: 36px; height: 36px; display: block; flex: 0 0 auto; overflow: hidden; border-radius: 9px; background: #e7e9e7; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand b { display: block; color: var(--text); font-size: .98rem; }
.brand small { color: var(--muted); font-size: .68rem; }
.top-navigation { display: flex; align-items: center; gap: 3px; }
.top-navigation > a { padding: 8px 11px; border-radius: 8px; color: #515953; font-size: .86rem; white-space: nowrap; }
.top-navigation > a:hover { color: var(--text); background: var(--surface-muted); }
.top-navigation > a.active { color: #26372c; background: var(--accent-soft); font-weight: 700; }
.mobile-account-links { display: none; }
.header-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin-left: auto; }
.cabinet-switch-form { flex: 0 0 auto; margin: 0; }
.cabinet-switch-button { min-height: 36px; display: inline-flex; align-items: center; flex: 0 0 auto; gap: 7px; padding: 7px 12px; border: 1px solid #43564a; border-radius: 9px; color: #fff; background: #43564a; font-size: .76rem; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.cabinet-switch-button:hover { border-color: #34463b; background: #34463b; transform: translateY(-1px); }
.cabinet-switch-button:focus-visible { outline: 3px solid rgba(67,86,74,.18); outline-offset: 2px; }
.cabinet-switch-logistics { border-color: #405964; background: #405964; }
.cabinet-switch-logistics:hover { border-color: #304a55; background: #304a55; }
.cabinet-switch-icon { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.cabinet-switch-short { display: none; }
.user-menu { position: relative; flex: 0 0 auto; }
.user-menu summary { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: .84rem; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { color: var(--text); background: var(--surface-muted); }
.user-dropdown { position: absolute; top: calc(100% + 9px); right: 0; width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 35px rgba(20,28,22,.14); }
.user-dropdown a, .user-dropdown .link-button { width: 100%; display: block; padding: 9px 10px; border: 0; border-radius: 7px; color: #4e5650; background: transparent; text-align: left; cursor: pointer; font-size: .84rem; }
.user-dropdown a:hover, .user-dropdown .link-button:hover { color: var(--text); background: var(--surface-muted); }
.user-dropdown form { margin: 0; }
.main { min-width: 0; }
.menu-button { display: none; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 1.15rem; cursor: pointer; }
.content { width: min(1800px, 100%); margin: 0 auto; padding: 28px 30px 50px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head p, .panel-head p { margin: 0; color: var(--muted); }
.title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.title-line h1 { margin: 0; }
.button, button.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; }
.button:hover { border-color: #aeb6af; background: var(--surface-muted); }
.button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.button.active:hover { border-color: #35463c; background: #35463c; }
.button.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.button.primary:hover { background: #35463c; }
.button.ghost { border-color: transparent; background: transparent; }
.button.danger { color: #fff; border-color: var(--danger); background: var(--danger); }
.button.danger:hover { border-color: #733737; background: #733737; }
.button.danger.ghost { color: var(--danger); border-color: transparent; background: transparent; }
.button[hidden] { display: none; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: .82rem; }
.button.wide { width: 100%; }
.button:disabled { opacity: .45; cursor: not-allowed; }
[data-payroll-print][aria-busy="true"] { opacity: .62; pointer-events: none; cursor: wait; }
.button-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.text-link { color: var(--accent); font-weight: 650; }
.panel { margin-bottom: 18px; padding: 20px; border: 1px solid #e5e9e5; border-radius: 14px; background: var(--surface); box-shadow: 0 5px 22px rgba(28,38,31,.045); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-head h2 { margin-bottom: 2px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.payroll-money-summary { display: contents; }
.metric { min-height: 112px; display: flex; flex-direction: column; justify-content: center; padding: 18px; border: 1px solid #e4e8e4; border-radius: 12px; background: var(--surface); transition: border-color .15s ease, background .15s ease; }
.metric span { color: var(--muted); font-size: .84rem; }
.metric strong { margin: 4px 0 1px; font-size: 1.55rem; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric:hover { border-color: #bbc5bd; background: #fbfcfb; }
.metric.featured { background: #29312c; color: #fff; border-color: #29312c; }
.metric.featured span, .metric.featured small { color: #bdc6bf; }
.cash-metric { gap: 7px; justify-content: center; border-color: #bfd6c5; background: #edf6ef; }
.cash-metric:hover { border-color: #99bca3; background: #e7f2e9; }
.cash-metric.has-error { border-color: #bfd6c5; background: #edf6ef; }
.cash-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cash-summary > div { min-width: 0; padding: 6px 4px; border: 1px solid #cfe0d3; border-radius: 8px; background: rgba(255,255,255,.82); text-align: center; }
.cash-summary b { display: block; font-size: 1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cash-summary small { margin-top: 2px; font-size: .63rem; white-space: nowrap; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.section-panel { padding: 0; overflow: hidden; }
.section-panel > .panel-head { min-height: 70px; margin: 0; padding: 14px 18px; border-bottom: 1px solid #e8ece8; background: #fbfcfb; }
.section-panel > .summary-list, .section-panel > .trend-chart, .section-panel > .rank-list { padding: 5px 18px 16px; }
.section-panel > .period-callout { padding: 18px; }
.summary-list { display: grid; }
.summary-list > div { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #edf0ed; }
.summary-list > div:last-child { border: 0; }
.summary-list.large > div { padding: 14px 0; }
.summary-list > .summary-total { margin-top: 2px; border-top: 1px solid #d8dfd9; font-size: 1.05rem; }
.period-callout { min-height: 120px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.period-callout p { margin: 10px 0 0; color: var(--muted); }
.status-badge, .quiet-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 20px; background: #eef0ee; color: #59605b; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.status-open { background: var(--warning-soft); color: var(--warning); }
.status-planned { background: #eef0ee; color: #707670; }
.status-review { background: #eceef4; color: #535e78; }
.status-closed, .status-prepared { background: var(--accent-soft); color: var(--accent); }
.status-paid { background: #e7eee9; color: #31563e; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel-head { min-height: 70px; margin: 0; padding: 14px 16px; border-bottom: 1px solid #e8ece8; background: #fbfcfb; }
.table-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.table-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; border-bottom: 1px solid #e8ece8; background: #fbfcfb; }
.table-toolbar.compact-toolbar { min-height: 64px; }
.toolbar-search { width: min(360px, 100%); display: grid; gap: 5px; }
.toolbar-search span, .toolbar-field span { color: var(--muted); font-size: .72rem; font-weight: 650; }
.toolbar-search input { height: 38px; border-color: #d8ddd8; background: rgba(255,255,255,.85); }
.toolbar-controls { display: flex; align-items: end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toolbar-field { width: 190px; display: grid; gap: 5px; }
.toolbar-copy { display: grid; gap: 2px; }
.toolbar-copy b { font-size: .9rem; }
.toolbar-copy span, .toolbar-count { color: var(--muted); font-size: .76rem; }
.toolbar-count { white-space: nowrap; }
.status-key { display: flex; align-items: center; justify-content: flex-end; gap: 15px; color: #626a64; font-size: .76rem; }
.status-key span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #c9ceca; }
.status-dot.open { background: #b19559; }.status-dot.closed { background: #65786b; }.status-dot.planned { background: #cfd4d0; }
.simple-table-wrap { overflow-x: auto; scrollbar-color: #c8cec9 transparent; scrollbar-width: thin; }
.simple-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.simple-table th { position: relative; padding: 11px 13px; color: #68706a; background: #f8faf8; border-bottom: 1px solid #e2e7e2; text-align: left; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.simple-table th.numeric { text-align: right; }
.simple-table td { position: relative; height: 58px; padding: 10px 13px; border: 0; vertical-align: middle; }
.simple-table th:not(:last-child)::after, .simple-table td:not(:last-child)::after { content: ""; position: absolute; top: 20%; right: 0; width: 1px; height: 60%; background: #edf0ed; pointer-events: none; }
.simple-table tbody tr:hover > td { background: #fafcfa; }
.simple-table em { display: block; color: var(--danger); font-size: .75rem; font-style: normal; }
.simple-table tfoot th { padding: 12px 13px; border-top: 1px solid #dfe5df; background: #f6f8f6; }
.simple-table tfoot small { white-space: nowrap; }
.data-table { min-width: 760px; }
.data-table .number-cell { width: 68px; min-width: 68px; text-align: center; font-variant-numeric: tabular-nums; }
.data-table .action-cell { width: 96px; min-width: 96px; text-align: center; }
.employee-toolbar { margin-bottom: 10px; border-bottom: 0; }
.employee-table th .table-sort { width: 100%; justify-content: space-between; color: #68706a; }
.employee-table th.number-cell .table-sort { position: relative; justify-content: center; }
.employee-table th.number-cell .table-sort span { position: absolute; right: 0; }
.employee-table td:nth-child(3) { width: 190px; }
.employee-table td:nth-child(4) { width: 230px; }
.employee-table tbody tr.employee-rate-missing > td { background: #fff8f8; }
.employee-table tbody tr.employee-rate-missing:hover > td { background: #fff3f3; }
.employee-table tbody tr.employee-rate-missing > td:first-child { box-shadow: inset 3px 0 #b45b5b; }
.missing-rate-badge { width: fit-content; display: block; margin-top: 4px; padding: 3px 7px; border-radius: 12px; color: #914646; background: #f8e8e8; font-size: .62rem; font-weight: 750; line-height: 1.15; white-space: nowrap; }
.quick-rate-button, .quick-position-button, .quick-warehouse-button, .quick-status-button { min-width: 130px; max-width: 100%; display: grid; gap: 1px; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.quick-rate-button:hover, .quick-position-button:hover, .quick-warehouse-button:hover, .quick-status-button:hover { border-color: #dbe2dc; background: #f5f8f5; }
.quick-rate-button b, .quick-position-button b, .quick-warehouse-button b, .quick-status-button b { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-rate-button b { font-variant-numeric: tabular-nums; }
.quick-rate-button small, .quick-position-button small, .quick-warehouse-button small, .quick-status-button small { color: #778079; font-size: .68rem; }
.quick-rate-button.unset b { color: var(--warning); }
.quick-position-button.unset b { color: #737b75; }
.quick-status-button b { width: fit-content; padding: 3px 8px; border-radius: 14px; color: #465d4d; background: #edf2ee; font-size: .75rem; }
.quick-status-button.status-on_leave b { color: #78622f; background: #f5f0e3; }
.quick-status-button.status-dismissed b { color: #844848; background: #f6eaea; }
.row-action { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 10px; border: 1px solid #e0e5e0; border-radius: 7px; color: #46564b; background: #f8faf8; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.row-action:hover { border-color: #b8c2ba; background: #f2f6f2; }
.description-cell { min-width: 250px; }
.empty-state { padding: 35px 15px; color: var(--muted); text-align: center; }
.empty-state.compact { padding: 22px 0; text-align: left; }
.filter-row, .inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
input, select, textarea { width: 100%; min-height: 39px; padding: 8px 10px; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; }
input[type="checkbox"] { width: 17px; min-height: 17px; padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #7c8c81; box-shadow: 0 0 0 3px rgba(67,86,74,.1); }
.filter-row input[type="search"] { max-width: 350px; }
.filter-row select { width: 190px; }
.narrow-panel { max-width: 920px; }
.model-form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.form-grid label, .stack-form label, .model-form label { display: grid; gap: 6px; color: #474d48; font-size: .84rem; font-weight: 650; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid em, .model-form em, .stack-form em { color: var(--danger); font-size: .77rem; font-style: normal; }
.form-actions { display: flex; gap: 9px; padding-top: 4px; }
.stack-form { display: grid; gap: 15px; }
.stack-form p { display: grid; gap: 5px; margin: 0; }
.form-panel { padding: 0; overflow: hidden; }
.form-panel-head { padding: 16px 18px; border-bottom: 1px solid #e8ece8; background: #fbfcfb; }
.form-panel-head h2 { margin-bottom: 2px; }.form-panel-head p { margin: 0; color: var(--muted); font-size: .8rem; }
.employee-system-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e7ebe7; color: var(--muted); font-size: .74rem; }
.employee-system-meta span { display: flex; align-items: baseline; gap: 5px; }
.employee-system-meta b { color: var(--text); font-size: .78rem; font-variant-numeric: tabular-nums; }
.form-panel > .model-form, .form-panel > .stack-form { padding: 18px; }
.record-form-page { width: min(1180px, 100%); margin: 0 auto; }
.record-form-card { padding: 0; overflow: hidden; }
.record-form-header { padding: 20px 24px 18px; border-bottom: 1px solid #e4e8e4; background: #fafbfa; }
.record-back { width: fit-content; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: #566159; font-size: .78rem; font-weight: 700; }
.record-back span { font-size: 1rem; line-height: 1; }
.record-back:hover { color: var(--text); }
.record-form-heading h1 { margin: 0 0 4px; }
.record-form-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: .84rem; }
.record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #e6eae6; }
.record-meta > div { display: grid; gap: 1px; }
.record-meta span { color: var(--muted); font-size: .67rem; font-weight: 650; }
.record-meta b { font-size: .82rem; font-variant-numeric: tabular-nums; }
.record-form { padding: 22px 24px 0; }
.record-section-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.record-section-head h2 { margin-bottom: 2px; }
.record-section-head p { margin: 0; color: var(--muted); font-size: .76rem; }
.record-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 17px 20px; }
.record-form-grid .span-2 { grid-column: 1 / -1; }
.record-field { min-width: 0; display: grid; align-content: start; gap: 6px; color: #414943; font-size: .8rem; font-weight: 700; }
.record-field > input:not([type="checkbox"]):not([type="file"]), .record-field > select { height: 44px; min-height: 44px; padding: 9px 12px; border-radius: 8px; background: #fff; }
.record-field > textarea { min-height: 96px; padding: 10px 12px; border-radius: 8px; line-height: 1.45; }
.record-textarea-wide > textarea { min-height: 92px; }
.record-field small { margin-top: -1px; font-size: .7rem; }
.record-field em { color: var(--danger); font-size: .73rem; font-style: normal; font-weight: 500; }
.record-auto-field { min-height: 70px; display: grid; align-content: center; gap: 2px; padding: 10px 12px; border: 1px solid #e0e5e0; border-radius: 8px; background: #f8faf8; }
.record-auto-field > span { color: #59615b; font-size: .8rem; font-weight: 700; }
.record-auto-field b { font-size: .86rem; }
.record-auto-field small { font-size: .68rem; }
.record-form-footer { display: flex; align-items: center; gap: 10px; margin: 24px -24px 0; padding: 16px 24px; border-top: 1px solid #e5e9e5; background: #fafbfa; }
.record-form-footer .button.primary { min-width: 178px; }
.details-panel summary { position: relative; padding-right: 35px; cursor: pointer; font-weight: 650; list-style: none; }
.details-panel summary::-webkit-details-marker { display: none; }
.details-panel summary::after { content: "+"; position: absolute; top: 50%; right: 0; color: #748078; font-size: 1.1rem; transform: translateY(-50%); }
.details-panel[open] summary::after { content: "−"; }
.details-panel[open] summary { margin-bottom: 18px; }
.details-panel .inline-form { margin-top: 16px; }
.details-panel input[type="file"] { max-width: 430px; }
.utility-panel { padding: 0; overflow: hidden; }
.utility-panel > summary { display: grid; gap: 2px; padding: 15px 52px 15px 18px; background: #fbfcfb; }
.utility-panel > summary::after { right: 18px; }
.utility-panel > summary small { font-size: .72rem; }
.utility-panel[open] > summary { margin: 0; border-bottom: 1px solid #e8ece8; }
.utility-panel > form { margin: 0; padding: 18px; }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.message.success { color: #31563e; border-color: #cfdcd2; background: #eff4f0; }
.message.error { color: var(--danger); border-color: #e7cccc; background: var(--danger-soft); }
.warning-text { color: var(--warning); }
.timesheet-toolbar { min-height: 68px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0; padding: 10px 14px 11px; border-bottom: 1px solid #e8ece8; background: #fbfcfb; }
.timesheet-search { display: grid; width: min(340px, 100%); gap: 5px; }
.timesheet-search span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.timesheet-search input { height: 38px; border-color: #d8ddd8; background: rgba(255,255,255,.82); box-shadow: 0 1px 2px rgba(25,35,28,.025); }
.legend { align-self: center; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; margin: 0; color: #5f6761; font-size: .9rem; font-weight: 550; }
.legend span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #dde0dd; }
.dot.present { background: #758b7c; }.dot.half-shift { background: #4f7895; }.dot.extra { background: #65786b; box-shadow: 0 0 0 2px #dce5de; }.dot.late { background: #b19559; }.dot.absent { background: #b27070; }.dot.sick { background: #685d91; }
.timesheet-panel { padding: 0; overflow: hidden; border-color: #e5e9e5; border-radius: 14px; box-shadow: 0 5px 22px rgba(28,38,31,.055); }
.timesheet-wrap { overflow: auto; max-height: calc(100vh - 230px); background: #fff; scrollbar-color: #c8cec9 transparent; scrollbar-width: thin; }
.timesheet-table { width: 100%; min-width: 1295px; border-collapse: separate; border-spacing: 0; }
.timesheet-table th { position: sticky; top: 0; z-index: 4; min-width: 118px; padding: 9px 6px; background: #f8faf8; border-bottom: 1px solid #e2e7e2; text-align: center; }
.timesheet-table th > span { display: block; color: #858c86; font-size: .62rem; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }
.timesheet-table th b { font-size: .79rem; font-variant-numeric: tabular-nums; }
.timesheet-table th.weekend { background: #f3f6f3; }
.day-bulk-button { position: relative; width: 100%; display: grid; place-items: center; gap: 1px; padding: 2px 18px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.day-bulk-button:hover { background: #edf2ed; }
.day-bulk-button span { display: block; color: #7e857f; font-size: .62rem; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }
.day-bulk-button b { font-size: .79rem; font-variant-numeric: tabular-nums; }
.day-bulk-button i { position: absolute; top: 50%; right: 5px; color: #7f9485; font-size: .85rem; font-style: normal; line-height: 1; transform: translateY(-50%); }
.timesheet-table td { position: relative; height: 38px; padding: 2px 4px; }
.timesheet-table th:not(:last-child)::after, .timesheet-table td:not(:last-child)::after { content: ""; position: absolute; top: 18%; right: 0; width: 1px; height: 64%; background: #edf0ed; pointer-events: none; }
.timesheet-table tr[hidden] { display: none; }
.timesheet-table td.weekend-cell { background: #fafbfa; }
.timesheet-table .number-col { position: sticky; left: 0; z-index: 3; width: 50px; min-width: 50px; padding: 4px 6px; background: #fbfcfb; text-align: center; }
.timesheet-table td.number-col { color: #69716b; font-size: .74rem; font-variant-numeric: tabular-nums; }
.timesheet-table th.number-col { z-index: 6; background: #f6f8f6; }
.timesheet-table th.number-col .table-sort { position: relative; width: 100%; justify-content: center; gap: 0; }
.timesheet-table th.number-col .table-sort span { position: absolute; right: 0; }
.timesheet-table .warehouse-col { position: sticky; left: 50px; z-index: 3; width: 72px; min-width: 72px; padding: 4px 6px; overflow: hidden; background: #fcfdfc; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.timesheet-table td.warehouse-col { color: #737b75; font-size: .68rem; font-weight: 650; }
.timesheet-table th.warehouse-col { z-index: 6; background: #f7f9f7; }
.timesheet-table th.warehouse-col .table-sort { width: 100%; justify-content: center; gap: 4px; }
.timesheet-table .employee-col { position: sticky; left: 122px; z-index: 3; width: 200px; min-width: 200px; padding: 4px 10px; background: #fff; text-align: left; }
.timesheet-table td.employee-col b { font-size: .8rem; font-weight: 700; }
.timesheet-table th.employee-col { z-index: 6; background: #f8faf8; }
.timesheet-table .position-col { position: sticky; left: 322px; z-index: 3; width: 145px; min-width: 145px; padding: 4px 9px; overflow: hidden; background: #fcfdfc; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.timesheet-table td.position-col { color: #8a908b; font-size: .67rem; }
.timesheet-table th.position-col { z-index: 6; background: #f5f8f5; }
.timesheet-table tbody tr:hover > .number-col, .timesheet-table tbody tr:hover > .warehouse-col, .timesheet-table tbody tr:hover > .employee-col { background: #fafcfa; }
.timesheet-table tbody tr:hover > .position-col { background: #f8faf8; }
.table-sort { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--text); background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.table-sort span { min-width: 12px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.shift-cell { width: 100%; height: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 5px; border: 1px solid transparent; border-radius: 6px; color: var(--text); background: transparent; cursor: pointer; text-align: center; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.shift-cell:hover { border-color: #d8ded9; background: #f7f9f7; box-shadow: 0 1px 3px rgba(25,35,28,.04); }
.shift-cell:disabled { cursor: default; opacity: .72; }
.shift-cell:disabled:hover { border-color: transparent; box-shadow: none; }
.shift-mark { display: block; font-size: .8rem; font-weight: 750; line-height: 1.05; }
.shift-mark.unmarked { color: #707771; }
.shift-details { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin-top: 2px; color: var(--muted); font-size: .55rem; line-height: 1; text-align: center; }
.shift-details small, .shift-meta { color: var(--muted); font-size: .55rem; line-height: 1; }
.shift-details .late-meta { color: var(--warning); font-weight: 650; }
.shift-meta { width: 100%; display: block; margin-top: 2px; text-align: center; }
.shift-cell.state-present { border-color: transparent; color: #fff; background: #397451; }
.shift-cell.state-half_shift { border-color: transparent; color: #fff; background: #4f7895; }
.shift-cell.state-present.has-late { border-color: transparent; color: #fff; background: #a4731e; }
.shift-cell.state-absent { border-color: transparent; color: #fff; background: #a94f4f; }
.shift-cell.state-sick { border-color: transparent; color: #fff; background: #685d91; }
.shift-cell.state-vacation { border-color: transparent; color: #fff; background: #477984; }
.shift-cell.state-day_off { border-color: transparent; color: #fff; background: #657069; }
.weekend-cell .shift-cell.state-present { border-color: transparent; color: #fff; background: #3e707b; }
.weekend-cell .shift-cell.state-present.has-late { border-color: transparent; color: #fff; background: #a4731e; }
.shift-cell.state-present:hover, .shift-cell.state-half_shift:hover, .shift-cell.state-absent:hover, .shift-cell.state-sick:hover, .shift-cell.state-vacation:hover, .shift-cell.state-day_off:hover { border-color: transparent; filter: brightness(.95); }
.shift-cell.state-present .shift-details .late-meta { color: rgba(255,255,255,.88); }
.shift-cell.schedule-default { background: transparent; }
.shift-cell.schedule-default .shift-mark { color: #c0c6c1; font-size: .82rem; font-weight: 500; }
.shift-cell .schedule-note { color: #b0b6b1; font-size: .51rem; }
.shift-cell.weekend-default { background: transparent; }
.shift-cell.weekend-default .shift-mark { color: #747c76; font-size: .69rem; font-weight: 650; }
.shift-cell .extra-shift-note { color: #779080; font-size: .5rem; font-weight: 600; opacity: 0; transition: opacity .15s ease; }
.shift-cell.weekend-default:hover .extra-shift-note { opacity: 1; }
.mobile-shift-heading, .mobile-shift-mark, .mobile-employee-meta { display: none; }
.add-mark { margin: auto; font-size: 1.15rem !important; color: #a4aaa5 !important; }
.dialog { width: min(440px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 38px rgba(15,25,18,.22); }
.dialog::backdrop { background: rgba(20,27,22,.48); }
.dialog-form { padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.dialog-head h2 { font-size: 1.25rem; }.dialog-head p { margin: 2px 0 0; color: var(--muted); text-transform: capitalize; }
.dialog-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-muted); cursor: pointer; font-size: 1.4rem; }
.quick-attendance-form { display: grid; gap: 14px; }
.quick-attendance-form label { width: 100%; max-width: none; }
.quick-work-fields { display: grid; gap: 14px; }
.quick-work-fields[hidden] { display: none; }
.lateness-field { display: grid; gap: 7px; color: #474d48; font-size: .8rem; font-weight: 650; }
.lateness-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lateness-inputs label { display: grid; gap: 5px; }
.lateness-inputs label > span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.lateness-inputs input { min-width: 0; font-variant-numeric: tabular-nums; }
.dialog-form > .form-actions { margin-top: 22px; padding-top: 0; }
.rate-field { display: grid; gap: 6px; color: #474d48; font-size: .82rem; font-weight: 650; }
.rate-field input, .rate-field select { height: 44px; font-size: 1rem; font-weight: 650; }
.rate-field input { font-variant-numeric: tabular-nums; }
.rate-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rate-date-picker { position: relative; min-width: 0; height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 11px 0 13px; overflow: hidden; border: 1px solid #cdd4ce; border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.rate-date-picker:hover { border-color: #879a8d; background: #fbfcfb; }
.rate-date-picker:focus-within { border-color: #58705f; box-shadow: 0 0 0 3px rgba(88,112,95,.12); }
.rate-date-picker.invalid { border-color: #b65353; background: #fffafa; box-shadow: 0 0 0 3px rgba(182,83,83,.12); }
.rate-date-picker input[type="date"] { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.rate-date-picker b { min-width: 0; overflow: hidden; color: #667169; font-size: .9rem; font-weight: 650; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.rate-date-picker small { padding: 5px 8px; border-radius: 6px; color: #425749; background: #edf3ee; font-size: .68rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.rate-date-picker.selected b { color: var(--text); font-variant-numeric: tabular-nums; }
.rate-date-error { color: #a24747; font-size: .72rem; font-style: normal; font-weight: 700; line-height: 1.3; }
.rate-date-error[hidden] { display: none; }
.rate-confirmation { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; color: #657068; background: #f5f7f5; font-size: .76rem; }
.rate-confirmation b { color: var(--text); font-variant-numeric: tabular-nums; }
.rate-confirmation.rate-confirmation-pending b { color: #8a7060; }
.employee-status-confirmation { min-height: 54px; align-items: flex-start; line-height: 1.45; }
.bonus-dialog { width: min(520px, calc(100vw - 30px)); }
.bonus-form-fields { display: grid; gap: 13px; }
.bonus-form-fields label { display: grid; gap: 6px; color: #474d48; font-size: .82rem; font-weight: 650; }
.bonus-form-fields em { color: var(--danger); font-size: .75rem; font-style: normal; }
.dialog-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; color: #657068; background: #f5f7f5; font-size: .76rem; }
.dialog-note.warning { color: #705c35; background: #f7f2e8; }
.payout-confirmation { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 18px; padding: 14px; border: 1px solid #dfe5df; border-radius: 10px; background: #f8faf8; }
.payout-confirmation span { color: var(--muted); font-size: .75rem; }
.payout-confirmation b { text-align: right; font-size: .88rem; }
.payout-confirmation strong { text-align: right; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.delete-mark-button { margin-left: auto; }
.delete-confirmation { display: grid; gap: 4px; padding: 14px; border: 1px solid #e1caca; border-radius: 9px; background: #fbf3f3; }
.delete-confirmation strong { font-size: 1rem; }
.delete-confirmation span { color: var(--muted); font-size: .82rem; }
.delete-confirmation p { margin: 10px 0 0; color: #6f5555; font-size: .78rem; line-height: 1.45; }
.bulk-dialog { width: min(680px, calc(100vw - 30px)); }
.bulk-mark-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bulk-mark-fields label { display: grid; gap: 5px; color: #474d48; font-size: .8rem; font-weight: 650; }
.bulk-employee-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.bulk-employee-toolbar input { width: min(300px, 100%); }
.bulk-employee-toolbar > div { display: flex; gap: 12px; }
.text-link-button { padding: 3px 0; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.text-link-button:hover { text-decoration: underline; }
.bulk-employee-list { max-height: 310px; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint style; touch-action: pan-y; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.bulk-employee { min-height: 48px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 11px; border-bottom: 1px solid #eef1ee; cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 48px; }
.bulk-employee:last-child { border-bottom: 0; }
.bulk-employee:hover { background: #f8faf8; }
.bulk-employee.is-disabled { cursor: default; opacity: .55; }
.bulk-employee.is-disabled:hover { background: transparent; }
.bulk-employee[hidden] { display: none; }
.bulk-employee input[type="checkbox"] { width: 16px; min-height: 16px; margin: 0; accent-color: var(--accent); }
.bulk-employee b { display: block; font-size: .82rem; }
.bulk-employee small { font-size: .68rem; }
.bulk-employee em { color: var(--warning); font-size: .67rem; font-style: normal; font-weight: 650; white-space: nowrap; }
.bulk-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 14px; }
.bulk-footer > span { color: var(--muted); font-size: .78rem; font-weight: 650; }
.bulk-footer .form-actions { padding: 0; }
.week-picker-dialog { width: min(620px, calc(100vw - 30px)); }
.week-picker-step { display: block; margin-bottom: 7px; color: #7a817b; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.week-picker-years { display: flex; gap: 8px; padding-bottom: 2px; overflow-x: auto; overscroll-behavior-x: contain; }
.week-year { min-width: 108px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid #dfe4df; border-radius: 9px; color: #4c534e; background: #f8faf8; cursor: pointer; }
.week-year:hover { border-color: #aeb8af; background: #f4f7f4; }
.week-year b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.week-year span { color: var(--muted); font-size: .62rem; font-weight: 650; }
.week-year.selected { color: #fff; border-color: var(--accent); background: var(--accent); }
.week-year.selected span { color: rgba(255,255,255,.75); }
.week-picker-panels { margin-top: 16px; padding-top: 15px; border-top: 1px solid #e8ece8; }
.week-year-panel[hidden] { display: none; }
.week-picker-months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding-bottom: 3px; overflow: visible; }
.week-month { width: 100%; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 1px solid #e0e4e0; border-radius: 8px; color: #555d57; background: #fff; cursor: pointer; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.week-month:hover { border-color: #aeb8af; background: #f7f9f7; }
.week-month.selected { color: #fff; border-color: var(--accent); background: var(--accent); }
.week-month i { color: #8aa294; font-size: .9rem; font-style: normal; line-height: 1; }
.week-month.selected i { color: #c9d7cd; }
.week-month-panels { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0ed; }
.week-month-panel[hidden] { display: none; }
.week-picker-list { max-height: min(360px, calc(100vh - 310px)); display: grid; grid-template-columns: 1fr; gap: 7px; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; contain: layout paint style; touch-action: pan-y; scrollbar-color: #c8cec9 transparent; scrollbar-width: thin; }
.week-option { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid #e1e5e1; border-radius: 9px; background: #fff; transition: border-color .15s ease, background .15s ease; }
.week-option:hover { border-color: #aeb8af; background: #f7f9f7; }
.week-option > div { min-width: 0; }
.week-option b { display: block; font-size: .83rem; font-variant-numeric: tabular-nums; }
.week-option small { margin-top: 2px; font-size: .65rem; font-variant-numeric: tabular-nums; }
.week-option span { min-height: 20px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: #516257; font-size: .66rem; font-weight: 700; }
.week-option em { padding: 2px 6px; border-radius: 10px; color: #506157; background: #e9eeea; font-size: .62rem; font-style: normal; }
.week-option.selected { border-color: #84988a; background: #edf3ee; }
.week-option.selected:hover { background: #e8f0e9; }
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #e1e6e1; border-radius: 12px; background: #fbfcfb; }
.action-bar p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.payroll-back-button { color: #405447; border-color: #d5ddd7; background: #f7faf8; }
.payroll-back-button:hover { color: #293d31; border-color: #aebbb1; background: #eef4ef; }
.workflow-bar form, .workflow-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.workflow-bar b { font-size: .88rem; }
.payout-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.payroll-list-table .paid-total-column { width: 145px; min-width: 145px; }
.payroll-paid-summary { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.payroll-paid-summary b { color: var(--text); font-size: .82rem; }
.payroll-paid-summary small { font-size: .64rem; font-weight: 650; }
.payroll-paid-summary.has-pending b, .payroll-paid-summary.has-pending small { color: #8a642b; }
.payroll-paid-summary.complete b, .payroll-paid-summary.complete small { color: #315b3e; }
.row-error { background: transparent !important; }
.row-error > td:first-child { background: #fdf8f8; box-shadow: inset 3px 0 #c58a8a; }
.payroll-table { min-width: 1460px; }
.payroll-table-head { gap: 18px; }
.payroll-table .payroll-warehouse-column { width: 88px; min-width: 88px; color: #5f6861; }
.payroll-table .payroll-position-column { width: 150px; min-width: 150px; color: #5f6861; }
.payroll-table .shifts-column { width: 94px; min-width: 94px; text-align: left; font-variant-numeric: tabular-nums; }
.shift-progress-dots { display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; white-space: nowrap; }
.shift-progress-dots i { width: 8px; height: 8px; flex: 0 0 8px; border: 1px solid #aeb8b0; border-radius: 50%; background: #fff; }
.shift-progress-dots i.full { border-color: #55705e; background: #55705e; }
.shift-progress-dots i.half { border-color: #55705e; background: linear-gradient(90deg, #55705e 50%, #fff 50%); }
.shift-progress-dots em { margin-left: 2px; color: #3e5b48; font-size: .64rem; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.shift-progress-mobile { display: none; }
.payroll-table .lateness-column { width: 92px; min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }
.payroll-table .mistakes-column { width: 78px; min-width: 78px; text-align: center; font-variant-numeric: tabular-nums; }
.payroll-table .lateness-column b { font-size: .92rem; }
.payroll-table .lateness-column small, .payroll-table .mistakes-column small { margin-top: 2px; font-size: .64rem; white-space: nowrap; }
.lateness-value { color: #8a5d2d; font-weight: 800; }
.mistakes-value { color: #8a4747; font-weight: 800; }
.record-tooltip-wrap { display: inline-flex; }
.record-tooltip-trigger { min-width: 48px; display: grid; justify-items: center; gap: 0; padding: 4px 6px; border: 0; border-radius: 7px; background: transparent; cursor: help; }
.record-tooltip-trigger:hover, .record-tooltip-trigger:focus-visible { background: #f4f6f4; outline: none; }
.record-tooltip-trigger b { font-size: .92rem; }
.record-tooltip-popover { position: fixed; z-index: 100; width: min(360px, calc(100vw - 16px)); max-height: min(340px, calc(100dvh - 16px)); padding: 12px; overflow-y: auto; visibility: hidden; opacity: 0; border: 1px solid #d5ddd7; border-radius: 11px; background: #fff; box-shadow: 0 14px 34px rgba(20,28,22,.18); transform: translateY(-3px); transition: opacity .1s ease, transform .1s ease, visibility .1s; pointer-events: none; }
.record-tooltip-popover.visible { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
.record-tooltip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid #e6eae6; }
.record-tooltip-head b { font-size: .83rem; }
.record-tooltip-head span { min-width: 24px; padding: 2px 7px; border-radius: 12px; color: #42584a; background: #edf3ee; font-size: .7rem; font-weight: 800; text-align: center; }
.record-tooltip-list { display: grid; }
.record-tooltip-list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 9px; padding: 9px 0; border-bottom: 1px solid #edf0ed; }
.record-tooltip-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.record-tooltip-list time { color: #737b75; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.record-tooltip-list p { margin: 0; color: #313833; font-size: .76rem; line-height: 1.4; overflow-wrap: anywhere; }
.payroll-table .issue-column { width: 215px; min-width: 215px; }
.payroll-table .bonus-column, .payroll-table .fine-column { width: 118px; min-width: 118px; padding: 6px 8px; }
.payroll-table .debt-column { width: 105px; min-width: 105px; }
.debt-balance-link { color: #8a4f31; font-weight: 800; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.debt-balance-link:hover, .debt-balance-link:focus-visible { color: #66331f; text-decoration: underline; }
.payroll-table th, .payroll-table td, .payroll-table th.numeric, .payroll-table td.numeric { text-align: left !important; }
.payroll-table .record-tooltip-trigger, .payroll-table .row-bonus-button { justify-items: start !important; text-align: left !important; }
.payroll-table .issue-state { justify-items: start; text-align: left; }
.individual-payment-note { max-width: 420px; display: grid; gap: 6px; margin-top: 7px; padding: 8px 9px; border-left: 3px solid #6f8a77; border-radius: 0 7px 7px 0; color: #415247; background: #f2f6f3; line-height: 1.25; }
.individual-payment-note strong { color: #31513c; font-size: .66rem; text-transform: uppercase; letter-spacing: .035em; }
.individual-payment-note small { color: #6b756e; font-size: .62rem; }
.individual-payment-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #dce7df; border-radius: 6px; background: #fff; }
.individual-payment-stats > div { min-width: 0; display: grid; align-content: center; gap: 1px; padding: 6px 7px; border-right: 1px solid #e1e9e3; }
.individual-payment-stats > div:last-child { border-right: 0; }
.individual-payment-stats small { overflow: hidden; font-size: .54rem; font-weight: 700; letter-spacing: .025em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.individual-payment-stats b { color: #243a2b; font-size: .71rem; line-height: 1.1; white-space: nowrap; }
.individual-payment-stats em { color: #637269; font-size: .5rem; font-style: normal; line-height: 1.1; white-space: nowrap; }
.individual-payment-stats .individual-payment-received b { color: #2f6642; }
.individual-payment-rule { line-height: 1.2; }
.individual-accrual-label { display: block; margin-top: 2px; color: #7d857f; font-size: .61rem; white-space: nowrap; }
.bonus-value { color: #536b5b; font-weight: 700; }
.fine-value { color: #8a4b4b; font-weight: 700; }
.employee-debts-page { display: grid; gap: 18px; }
.debts-page-head { position: relative; align-items: flex-start; margin-bottom: 0; }
.debt-create-dialog { width: min(560px, calc(100vw - 30px)); }
.debt-create-form { display: block; }
.debt-create-fields { display: grid; gap: 12px; }
.debt-create-form label, .debt-repayment-form label, .debt-filters label { min-width: 0; display: grid; gap: 5px; }
.debt-create-form label > span, .debt-repayment-form label > span, .debt-filters label > span { color: #5f6861; font-size: .7rem; font-weight: 700; }
.debt-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.debt-create-form .errorlist, .debt-repayment-form .errorlist { margin: 0; padding: 0; color: #a13f3f; font-size: .68rem; list-style: none; }
.debt-create-actions { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.debt-create-actions .button:first-child { min-width: 190px; }
.debt-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.debt-metrics .metric { min-height: 122px; }
.debt-metrics .metric:first-child { border-color: #eadbd1; }
.debt-metrics .metric:first-child strong { color: #7a432c; }
.debts-panel { overflow: hidden; }
.debt-filters { display: grid; grid-template-columns: minmax(260px, 1fr) 220px auto; align-items: end; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #e4e8e4; }
.debt-filters .button { min-height: 42px; }
.debt-list { max-height: clamp(520px, 64vh, 820px); overflow-y: auto; }
.debt-list-head, .debt-row { display: grid; grid-template-columns: minmax(180px, 1.15fr) minmax(210px, 1.35fr) minmax(190px, 1.15fr) minmax(125px, .75fr) minmax(165px, 1fr) 132px; align-items: center; }
.debt-list-head { position: sticky; z-index: 3; top: 0; min-width: 1080px; min-height: 40px; padding: 0 14px; border-bottom: 1px solid #dfe4e0; color: #737b75; background: #f8faf8; font-size: .64rem; font-weight: 750; text-transform: uppercase; }
.debt-list-head span { min-width: 0; padding: 0 10px; }
.debt-row { min-width: 1080px; border-bottom: 1px solid #e4e8e4; background: #fff; }
.debt-row:last-child { border-bottom: 0; }
.debt-row.is-closed { background: #fbfcfb; }
.debt-row > div { min-width: 0; min-height: 76px; display: grid; align-content: center; gap: 4px; padding: 10px 12px; border-right: 1px solid #edf0ed; }
.debt-row > div:nth-of-type(6) { border-right: 0; }
.debt-row b, .debt-row strong { font-variant-numeric: tabular-nums; }
.debt-row small { min-width: 0; overflow: hidden; color: #7b837d; font-size: .64rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.debt-row-employee > b { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.debt-row-principal > b { font-size: .86rem; }
.debt-row-principal > small { color: #656e67; }
.debt-row-progress > div:first-child { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.debt-row-progress b { font-size: .78rem; }
.debt-row-progress span { color: #7b837d; font-size: .62rem; }
.debt-row-progress em { margin-left: auto; color: #51665a; font-size: .62rem; font-style: normal; font-weight: 800; }
.debt-progress-track { height: 6px; overflow: hidden; border-radius: 6px; background: #edf0ed; }
.debt-progress-track i { height: 100%; display: block; border-radius: inherit; background: #6d8a76; }
.debt-row-balance strong { color: #78432d; font-size: .94rem; white-space: nowrap; }
.debt-state { width: max-content; padding: 3px 7px; border-radius: 12px; color: #814a31; background: #f8eee8; font-size: .58rem; font-weight: 800; white-space: nowrap; }
.debt-state.closed { color: #376047; background: #e9f3ec; }
.debt-row.is-closed .debt-row-balance strong { color: #376047; }
.debt-row-latest b { font-size: .76rem; }
.debt-row-latest time { color: #556159; font-size: .65rem; font-weight: 750; }
.debt-row-latest > span { color: #939994; font-size: .68rem; }
.debt-row-action { justify-items: stretch; }
.debt-repayment-open { min-height: 36px; justify-content: center; padding: 7px 9px; color: #365540; border-color: #cbd8ce; background: #f5f8f5; font-size: .7rem; }
.debt-closed-mark { color: #3c684c; font-size: .7rem; font-weight: 800; text-align: center; }
.debt-row-history { grid-column: 1 / -1; min-width: 0; border-top: 1px solid #edf0ed; background: #fafbfa; }
.debt-row-history > summary { padding: 8px 14px; color: #486050; font-size: .68rem; font-weight: 800; list-style: none; cursor: pointer; }
.debt-row-history > summary::-webkit-details-marker { display: none; }
.debt-row-history[open] > summary { border-bottom: 1px solid #e5e9e6; background: #f5f8f5; }
.debt-history-list { max-height: 210px; overflow-y: auto; }
.debt-history-list > div { display: grid; grid-template-columns: 86px 110px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 15px; border-bottom: 1px solid #edf0ed; }
.debt-history-list > div:last-child { border-bottom: 0; }
.debt-history-list time, .debt-history-list small { color: #7a827c; font-size: .63rem; white-space: nowrap; }
.debt-history-list b { font-size: .74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.debt-history-list p { margin: 0; font-size: .7rem; overflow-wrap: anywhere; }
.debt-repayment-dialog { width: min(560px, calc(100vw - 30px)); }
.debt-repayment-form { display: block; }
.debt-repayment-fields { display: grid; gap: 11px; margin-top: 14px; }
.debt-repayment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e1e6e2; border-radius: 9px; }
.debt-repayment-summary > div { min-width: 0; display: grid; gap: 3px; padding: 10px; border-right: 1px solid #e1e6e2; }
.debt-repayment-summary > div:last-child { border-right: 0; background: #fff8f4; }
.debt-repayment-summary span { color: #7a827c; font-size: .59rem; font-weight: 750; text-transform: uppercase; }
.debt-repayment-summary b, .debt-repayment-summary strong { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.debt-repayment-summary strong { color: #78432d; }
.row-bonus-button { width: 100%; min-height: 42px; display: grid; align-content: center; justify-items: end; gap: 1px; padding: 5px 8px; border: 1px solid #e0e5e1; border-radius: 8px; color: #69716b; background: #fbfcfb; text-align: right; cursor: pointer; }
.row-bonus-button:hover { border-color: #aebbb1; color: #31483a; background: #f4f8f5; }
.row-bonus-button b { font-size: .8rem; font-variant-numeric: tabular-nums; }
.row-bonus-button small { color: #8a918c; font-size: .63rem; font-weight: 600; }
.row-bonus-button.has-value { border-color: #cad8cd; color: #31543d; background: #f1f6f2; }
.row-bonus-button.has-value small { color: #67806d; }
.row-fine-button.has-value { border-color: #e1caca; color: #804747; background: #fbf4f4; }
.row-fine-button.has-value small { color: #956565; }
.early-payment-deduction { display: block; margin-top: 3px; color: #65786a; font-size: .62rem; font-weight: 650; white-space: nowrap; }
.bonus-form-actions { flex-wrap: wrap; }
.bonus-delete-button { margin-left: auto; }
.issue-action { width: 100%; display: grid; gap: 2px; padding: 7px 9px; border: 1px solid #d7e0d8; border-radius: 8px; color: #395442; background: #f3f7f4; text-align: left; cursor: pointer; }
.issue-action:hover { border-color: #9eafa1; background: #ecf3ee; }
.early-payment-action { border-color: #d9d2bc; color: #6d582b; background: #faf8f1; }
.early-payment-action:hover { border-color: #b9a878; background: #f7f2e4; }
.early-payment-action.has-value { border-color: #bfd4c4; color: #315b3e; background: #eef6f0; }
.early-payment-confirmation strong.is-error { color: #9a3f3f; }
.issue-action span, .issue-state span { display: flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 750; }
.issue-action i, .issue-state.pending i { width: 8px; height: 8px; flex: 0 0 8px; border: 1px solid #8b998e; border-radius: 50%; background: #fff; }
.issue-action small, .issue-state small { margin-top: 1px; font-size: .66rem; }
.issue-state { display: grid; gap: 2px; padding: 6px 3px; }
.issue-state.pending { color: #59625b; }
.issue-state.paid { color: #315b3e; }
.issue-state.paid span { font-size: .8rem; }
.issue-cell-controls { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 6px; }
.issue-select-control { min-width: 22px; display: grid; place-items: center; cursor: pointer; }
.issue-select-control input { width: 17px; min-height: 17px; margin: 0; }
.issue-select-control span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.payout-review-dialog { width: min(560px, calc(100vw - 30px)); }
.payout-review-list { max-height: min(310px, calc(100vh - 390px)); margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e0e5e1; border-radius: 9px; scrollbar-color: #c8cec9 transparent; scrollbar-width: thin; }
.payout-review-list > div { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 11px; border-bottom: 1px solid #edf0ed; }
.payout-review-list > div:last-child { border-bottom: 0; }
.payout-review-list span { min-width: 0; overflow: hidden; color: #414942; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.payout-review-list b { flex: 0 0 auto; font-size: .78rem; font-variant-numeric: tabular-nums; }
.payroll-create-form p { display: grid; gap: 4px; margin: 0; }
.payroll-create-form select, .payroll-create-form input { min-width: 160px; }
.payroll-period-picker { display: grid; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #edf0ed; background: #fbfcfb; }
.payroll-period-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 12px; }
.payroll-period-row > span { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.payroll-period-row .link-segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.payroll-months a { min-width: 82px; }
.mobile-payroll-period-form { display: none; }
.analytics-filters { position: relative; min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 12px; overflow: visible; background: #fbfcfb; }
.analytics-filters label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.analytics-filters select { width: 210px; }
.analytics-period-controls { display: flex; align-items: center; gap: 6px; }
.analytics-custom-period { position: relative; }
.analytics-custom-period summary { list-style: none; }
.analytics-custom-period summary::-webkit-details-marker { display: none; }
.analytics-custom-period summary::after { content: "⌄"; margin-left: 6px; font-size: .8rem; }
.analytics-custom-popover { position: absolute; top: calc(100% + 9px); left: 0; z-index: 20; width: min(390px, calc(100vw - 40px)); display: grid; gap: 12px; padding: 15px; border: 1px solid #d9dfda; border-radius: 11px; background: #fff; box-shadow: 0 14px 32px rgba(28,38,31,.11); }
.analytics-custom-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.analytics-custom-fields label { display: grid; align-items: initial; gap: 5px; }
.analytics-custom-fields input { width: 100%; }
.analytics-custom-fields label.is-invalid input[type="text"] { border-color: #b96b6b; box-shadow: 0 0 0 3px rgba(138,71,71,.1); }
.analytics-custom-popover .button { width: 100%; }
.rate-history-panel, .analytics-history-panel { margin-top: 18px; }
.analytics-history-tabs { display: flex; align-items: center; gap: 7px; padding: 11px 14px; overflow-x: auto; border-bottom: 1px solid #e5e9e6; background: #f8faf8; scrollbar-width: thin; }
.analytics-history-tab { min-height: 38px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border: 1px solid #dce2dd; border-radius: 9px; color: #505952; background: #fff; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 750; white-space: nowrap; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.analytics-history-tab:hover { border-color: #aab6ad; background: #f3f7f4; }
.analytics-history-tab.active { border-color: var(--accent); color: #fff; background: var(--accent); }
.analytics-history-tab span { min-width: 22px; padding: 2px 6px; border-radius: 999px; color: #667068; background: #edf1ee; font-size: .66rem; line-height: 1.35; text-align: center; font-variant-numeric: tabular-nums; }
.analytics-history-tab.active span { color: var(--accent); background: #fff; }
.analytics-history-view[hidden] { display: none; }
.rate-history-toolbar { min-height: 78px; }
.rate-history-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 14px; }
.rate-history-controls .toolbar-search { width: 300px; }
.rate-history-table { min-width: 980px; }
.rate-history-table td:first-child { width: 132px; font-variant-numeric: tabular-nums; }
.lateness-history-table { min-width: 850px; }
.incident-analytics-table { min-width: 1180px; }
.incident-analytics-table .description-cell { max-width: 280px; }
.rate-history-scroll, .analytics-history-scroll { max-height: 420px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rate-history-scroll .rate-history-table thead th, .analytics-history-scroll thead th { position: sticky; top: 0; z-index: 2; }
.segmented { display: flex; gap: 6px; padding: 0; background: transparent; }
.segmented button, .segmented a, .link-segmented a, .analytics-custom-period summary { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 11px; border: 1px solid #dfe4df; border-radius: 8px; color: #555d57; background: #fff; cursor: pointer; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.segmented button:hover, .segmented a:hover, .link-segmented a:hover, .analytics-custom-period summary:hover { border-color: #aeb8af; background: #f7f9f7; }
.segmented button.active, .segmented a.active, .link-segmented a.active, .analytics-custom-period summary.active, .analytics-custom-period[open] summary { color: #fff; border-color: var(--accent); background: var(--accent); }
.analytics-columns { align-items: stretch; }
.analytics-columns > .section-panel { display: flex; flex-direction: column; }
.analytics-columns > .section-panel > .summary-list, .analytics-columns > .section-panel > .trend-chart { flex: 1; }
.trend-chart { min-height: 246px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.trend-chart-svg { width: 100%; height: auto; min-height: 230px; overflow: visible; }
.trend-grid-line { stroke: #e4e9e5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-y-label, .trend-x-label { fill: #6b746d; font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
.trend-y-label { text-anchor: end; }
.trend-x-label { text-anchor: middle; }
.trend-gradient-start { stop-color: #8fab99; stop-opacity: .34; }
.trend-gradient-end { stop-color: #eef4f0; stop-opacity: .12; }
.trend-area { fill: url(#trend-area-gradient); animation: trend-area-in .45s ease-out both; }
.trend-line { fill: none; stroke: #3f6351; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1600; animation: trend-line-in .65s ease-out both; }
.trend-dot-halo { fill: #dfeae3; opacity: .72; transition: opacity .15s ease; }
.trend-dot { fill: #fff; stroke: #3f6351; stroke-width: 3; vector-effect: non-scaling-stroke; transition: fill .15s ease, stroke-width .15s ease; }
.trend-point { cursor: help; outline: none; }
.trend-point:hover .trend-dot, .trend-point:focus .trend-dot { fill: #3f6351; stroke-width: 4; }
.trend-point:hover .trend-dot-halo, .trend-point:focus .trend-dot-halo { opacity: 1; }
@keyframes trend-line-in { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes trend-area-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .trend-line, .trend-area { animation: none; } }
.rank-list { display: grid; }
.rank-list > div { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf0ed; }
.rank-list > div:last-child { border: 0; }
.rank-list strong { font-variant-numeric: tabular-nums; }
.issue-period-filter { min-height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 14px; }
.issue-period-filter > div { display: grid; gap: 1px; margin-right: auto; }
.issue-period-filter > div b { font-size: .88rem; }
.issue-period-filter > div span { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.issue-period-filter label { width: 170px; display: grid; gap: 4px; }
.issue-period-filter label > span { color: var(--muted); font-size: .69rem; font-weight: 700; }
.issue-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.warehouse-issues-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .65fr); align-items: stretch; gap: 18px; }
.warehouse-issues-layout > .panel { min-width: 0; height: clamp(430px, calc(100dvh - 430px), 980px); display: flex; flex-direction: column; }
.warehouse-issues-journal .table-panel-head { min-height: 78px; }
.warehouse-issues-journal .toolbar-search { width: min(310px, 100%); }
.issue-journal-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.issue-journal-table { min-width: 950px; }
.issue-journal-table thead th { position: sticky; top: 0; z-index: 2; }
.issue-journal-table th:first-child { width: 118px; }
.issue-journal-table th:nth-child(2) { width: 250px; }
.issue-journal-table th:nth-child(3) { width: 90px; }
.issue-journal-table th:last-child { width: 120px; }
.issue-journal-table .description-cell { min-width: 320px; max-width: 560px; overflow-wrap: anywhere; }
.issue-leaderboard-panel { margin-bottom: 18px; }
.issue-leaderboard-panel > .panel-head { min-height: 78px; flex: 0 0 auto; }
.issue-leaderboard { min-height: 0; flex: 1 1 auto; display: grid; align-content: start; padding: 7px 14px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.issue-leaderboard > button { width: 100%; min-height: 58px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 4px; border: 0; border-bottom: 1px solid #edf0ed; background: transparent; text-align: left; cursor: pointer; }
.issue-leaderboard > button:last-child { border-bottom: 0; }
.issue-leaderboard > button:hover { background: #fafcfa; }
.issue-rank { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #667168; background: #edf1ee; font-size: .69rem; font-weight: 800; }
.issue-rank-person { min-width: 0; }
.issue-rank-person b { display: block; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.issue-rank-person small { margin-top: 1px; overflow: hidden; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.issue-leaderboard > button > strong { min-width: 29px; padding: 4px 7px; border-radius: 9px; color: #7b4545; background: #f5ecec; font-size: .78rem; text-align: center; font-variant-numeric: tabular-nums; }
.warehouse-issue-dialog { width: min(620px, calc(100vw - 30px)); }
.issue-form-errors { display: grid; gap: 3px; margin: -7px 0 12px; padding: 9px 11px; border-radius: 8px; color: var(--danger); background: var(--danger-soft); font-size: .75rem; }
.issue-selected-employee { display: grid; gap: 1px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #dce4de; border-radius: 9px; background: #f3f7f4; }
.issue-selected-employee > span, .issue-dialog-search > span, .issue-description-field > span { color: #6f7771; font-size: .69rem; font-weight: 700; }
.issue-selected-employee b { font-size: .87rem; }
.issue-selected-employee small { font-size: .67rem; }
.issue-dialog-search, .issue-description-field { display: grid; gap: 5px; }
.issue-employee-list { max-height: 235px; display: grid; margin: 10px 0 14px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e0e5e1; border-radius: 9px; scrollbar-gutter: stable; }
.issue-employee-list > button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 10px; border: 0; border-bottom: 1px solid #edf0ed; background: #fff; text-align: left; cursor: pointer; }
.issue-employee-list > button:last-of-type { border-bottom: 0; }
.issue-employee-list > button:hover { background: #f8faf8; }
.issue-employee-list > button.selected { background: #edf4ef; box-shadow: inset 3px 0 #58705f; }
.issue-employee-list > button > span { min-width: 0; }
.issue-employee-list > button b { display: block; overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.issue-employee-list > button small { margin-top: 1px; overflow: hidden; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.issue-employee-list > button em { flex: 0 0 auto; color: #69736c; font-size: .65rem; font-style: normal; font-weight: 700; }
.issue-description-field textarea { min-height: 92px; }
.issue-description-field > small { font-size: .67rem; }
.cabinet-select-page { width: min(980px, 100%); min-height: calc(100dvh - 180px); display: grid; align-content: center; gap: 28px; margin: 0 auto; }
.cabinet-select-heading { max-width: 680px; margin: 0 auto; text-align: center; }
.cabinet-select-heading h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cabinet-select-heading p { margin: 0; color: var(--muted); }
.cabinet-select-kicker { display: block; margin-bottom: 7px; color: #68766c; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cabinet-select-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cabinet-choice-card { min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 16px; padding: 24px; border: 1px solid #dce3dd; border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(26,37,29,.06); }
.cabinet-choice-card:hover { border-color: #aebdb2; }
.cabinet-choice-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: #43564a; font-size: 1.3rem; font-weight: 850; }
.cabinet-choice-card.logistics-choice .cabinet-choice-mark { background: #425b66; }
.cabinet-choice-copy { min-width: 0; }
.cabinet-choice-copy b { display: block; margin-bottom: 3px; font-size: 1.03rem; }
.cabinet-choice-copy small { line-height: 1.4; }
.cabinet-choice-card .button { grid-column: 1 / -1; width: 100%; margin-top: 5px; }
.cabinet-access-summary { display: grid; gap: 6px; }
.cabinet-badges, .access-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.cabinet-badges b { padding: 4px 8px; border-radius: 8px; color: #fff; background: #43564a; font-size: .68rem; }
.cabinet-badges b:nth-child(2) { background: #425b66; }
.admin-page-access-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-page-access-columns .page-access-grid { grid-template-columns: 1fr; }
.cabinet-access-fieldset .page-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-access-fieldset input:disabled + span { opacity: .42; }

.logistics-period-filter { min-height: 84px; display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px; align-items: center; gap: 10px; padding: 12px 14px; }
.logistics-period-copy { min-width: 0; display: grid; align-content: center; gap: 3px; }
.logistics-period-copy b { font-size: .9rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.logistics-period-copy span { color: var(--muted); font-size: .7rem; line-height: 1.25; }
.logistics-period-filter label { width: 180px; display: grid; gap: 4px; }
.logistics-period-filter label > span { color: var(--muted); font-size: .69rem; font-weight: 700; }
.logistics-dashboard-columns { align-items: stretch; }
.logistics-salary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.logistics-salary-metrics .metric { min-height: 126px; }
.logistics-salary-metrics .metric strong { font-size: 1.72rem; }
.logistics-salary-metrics .salary-completed { border-color: #d3e1d6; background: #f3f8f4; }
.logistics-salary-metrics .salary-pending { border-color: #e5dfcf; background: #faf8f2; }
.logistics-salary-metrics .metric,
.logistics-expense-metrics .metric,
.logistics-metrics .metric,
.logistics-salary-metrics .metric.featured,
.logistics-expense-metrics .metric.featured,
.logistics-metrics .metric.featured { color: var(--text); border-color: #e1e6e2; background: #fff; }
.logistics-salary-metrics .metric.featured span,
.logistics-salary-metrics .metric.featured small,
.logistics-expense-metrics .metric.featured span,
.logistics-expense-metrics .metric.featured small,
.logistics-metrics .metric.featured span,
.logistics-metrics .metric.featured small { color: var(--muted); }
.logistics-salary-metrics .metric:hover,
.logistics-expense-metrics .metric:hover,
.logistics-metrics .metric:hover { border-color: #cdd5cf; background: #fff; }
.logistics-salary-controls { flex: 1 1 auto; flex-wrap: nowrap; }
.logistics-salary-controls .logistics-driver-filter { width: 230px; }
.logistics-salary-controls .toolbar-search { width: min(320px, 100%); }
.logistics-salary-personal-head { min-height: 78px; }
.logistics-salary-table { min-width: 980px; }
.logistics-salary-table th:nth-child(4) { width: 260px; }
.salary-trip-link { display: grid; justify-items: start; gap: 2px; color: inherit; }
.salary-trip-link:hover b { color: #405f4c; }
.salary-trip-link span { color: #567260; font-size: .64rem; font-weight: 750; }
.salary-calculation-cell { padding: 6px 9px !important; }
.salary-offer { min-width: 218px; min-height: 52px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid transparent; border-radius: 10px; }
.salary-offer-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: .88rem; font-weight: 850; }
.salary-offer-copy { min-width: 0; display: grid; gap: 1px; }
.salary-offer-copy strong { color: #182119; font-size: .93rem; line-height: 1.1; white-space: nowrap; }
.salary-offer-copy small { margin: 0 !important; font-size: .61rem !important; font-weight: 700; line-height: 1.2; }
.salary-offer-earned { border-color: #79ad88; background: #edf7f0; box-shadow: inset 0 0 0 1px rgba(66,112,82,.08); }
.salary-offer-earned .salary-offer-icon { color: #fff; background: #427052; }
.salary-offer-earned small { color: #356445 !important; }
.salary-offer-locked { grid-template-columns: 30px minmax(0, 1fr) auto; border-color: #d88f8f; color: inherit; background: #fff3f3; box-shadow: inset 0 0 0 1px rgba(159,69,69,.06); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.salary-offer-locked:hover { border-color: #b85f5f; background: #ffebeb; transform: translateY(-1px); }
.salary-offer-locked .salary-offer-icon { color: #8a3d3d; background: #f3d7d7; }
.salary-offer-locked small { color: #8a4242 !important; }
.salary-offer-action { padding-left: 8px; border-left: 1px solid #e3b4b4; color: #833d3d; font-size: .64rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.salary-offer-action b { font-size: .82rem; }
.salary-accrued-cell > b { white-space: nowrap; }
.salary-accrued-cell > small { color: #8a6e25 !important; }
.logistics-dashboard-columns > .panel { min-width: 0; height: 470px; }
.logistics-dashboard-scroll { max-height: 397px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.logistics-analytics-filter { min-height: 64px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 10px 12px; overflow: visible; }
.analytics-period-tabs { display: flex; align-items: center; gap: 5px; }
.analytics-period-tabs a, .logistics-analytics-custom-period summary { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid #dce2dd; border-radius: 9px; color: #566059; background: #fff; font-size: .78rem; font-weight: 750; }
.analytics-period-tabs a:hover, .logistics-analytics-custom-period summary:hover { border-color: #bcc8bf; color: #26372b; }
.analytics-period-tabs a.active, .logistics-analytics-custom-period summary.active, .logistics-analytics-custom-period[open] summary { border-color: #435b4b; color: #fff; background: #435b4b; }
.logistics-analytics-custom-period summary::after { margin-left: 6px; }
.analytics-period-summary { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 0 4px; }
.analytics-period-summary span, .analytics-period-controls label > span { color: #79817b; font-size: .63rem; font-weight: 750; text-transform: uppercase; }
.analytics-period-summary b { font-size: .92rem; font-variant-numeric: tabular-nums; }
.analytics-period-summary small { font-size: .66rem; }
.analytics-period-controls { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.analytics-period-controls label { width: 160px; display: grid; gap: 4px; }
.analytics-period-controls input, .analytics-period-controls select { min-height: 40px; }
.analytics-period-controls .button { min-height: 40px; }
.analytics-period-error { width: 100%; margin: 0; padding: 8px 10px; border-radius: 8px; color: #8a3d3d; background: #fff2f2; font-size: .72rem; }
.logistics-analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.logistics-analytics-card { min-width: 0; min-height: 410px; display: flex; flex-direction: column; overflow: hidden; }
.analytics-card-head { min-height: 92px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 17px 18px 14px; border-bottom: 1px solid #e7ebe7; }
.analytics-card-head > div { min-width: 0; display: grid; gap: 4px; }
.analytics-card-head span { color: #687169; font-size: .72rem; font-weight: 750; }
.analytics-card-head strong { overflow: hidden; font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.analytics-card-head > small { max-width: 190px; color: var(--muted); font-size: .67rem; line-height: 1.35; text-align: right; }
.analytics-mini-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 18px; }
.analytics-mini-metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-mini-metrics > div { min-width: 0; display: grid; align-content: center; gap: 3px; min-height: 58px; padding: 9px 10px; border: 1px solid #e6eae6; border-radius: 9px; background: #fff; }
.analytics-mini-metrics span { color: #7a827c; font-size: .61rem; font-weight: 750; text-transform: uppercase; }
.analytics-mini-metrics b { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 18px 7px; border-top: 1px solid #edf0ed; }
.analytics-list-head b { font-size: .8rem; }
.analytics-list-head span { color: var(--muted); font-size: .62rem; }
.analytics-ranking, .analytics-compact-list { min-height: 0; display: grid; align-content: start; gap: 0; padding: 0 18px 14px; }
.analytics-ranking-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid #edf0ed; }
.analytics-ranking-row:last-child { border-bottom: 0; }
.analytics-ranking-row > div { min-width: 0; display: contents; }
.analytics-ranking-row b { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-ranking-row strong { font-size: .73rem; white-space: nowrap; }
.analytics-ranking-row progress { width: 100%; height: 5px; grid-column: 1; overflow: hidden; border: 0; border-radius: 99px; background: #edf1ee; }
.analytics-ranking-row progress::-webkit-progress-bar { border-radius: 99px; background: #edf1ee; }
.analytics-ranking-row progress::-webkit-progress-value { border-radius: 99px; background: #617c69; }
.analytics-ranking-row progress::-moz-progress-bar { border-radius: 99px; background: #617c69; }
.analytics-ranking-row > small { grid-column: 2; grid-row: 2; color: var(--muted); font-size: .57rem; white-space: nowrap; }
.analytics-compact-list > div { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #edf0ed; }
.analytics-compact-list > div:last-child { border-bottom: 0; }
.analytics-compact-list > div > span { min-width: 0; }
.analytics-compact-list > div > span:last-child { display: grid; justify-items: end; gap: 1px; text-align: right; }
.analytics-compact-list b { display: block; overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-compact-list strong { font-size: .75rem; white-space: nowrap; }
.analytics-compact-list small { color: var(--muted); font-size: .58rem; white-space: nowrap; }
.analytics-empty { margin: 10px 0; padding: 16px; border: 1px dashed #dde3de; border-radius: 9px; color: var(--muted); font-size: .72rem; text-align: center; }
.logistics-compact-table { min-width: 670px; }
.logistics-attention-panel { display: flex; flex-direction: column; }
.logistics-attention-list { min-height: 0; flex: 1 1 auto; padding: 7px 16px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.logistics-attention-list > a { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 2px; border-bottom: 1px solid #edf0ed; }
.logistics-attention-list > a:last-child { border-bottom: 0; }
.logistics-attention-list > a:hover { background: #fafcfa; }
.logistics-attention-list > a > span:first-child { min-width: 0; }
.logistics-attention-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logistics-list-toolbar { margin: 0; }
.logistics-trip-list .logistics-driver-filter { width: 230px; }
.logistics-table-scroll { max-height: calc(100dvh - 330px); min-height: 280px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.logistics-data-table { min-width: 1180px; }
.logistics-data-table thead th, .logistics-compact-table thead th { position: sticky; top: 0; z-index: 2; }
.logistics-data-table td { height: 62px; }
.logistics-trip-table { min-width: 1430px; }
.logistics-trip-list-driver .logistics-trip-table { min-width: 940px; }
.logistics-trip-table th:nth-child(1) { width: 205px; }
.logistics-trip-table th:nth-child(2) { width: 230px; }
.logistics-trip-table th:nth-child(3) { width: 190px; }
.logistics-trip-table th:nth-child(4) { width: 180px; }
.logistics-trip-table th:nth-child(5), .logistics-trip-table th:nth-child(7) { width: 105px; }
.logistics-trip-table th:nth-child(6) { width: 150px; }
.logistics-trip-table th:nth-child(8) { width: 150px; }
.logistics-trip-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; line-height: 1.25; }
.trip-period-value { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trip-distance-fact { display: flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-distance-fact span, .trip-distance-plan span, .trip-distance-deviation span { margin-right: 4px; color: #7a837c; font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.trip-distance-plan, .trip-distance-deviation { font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-distance-deviation.over { color: #9a4c4c; font-weight: 750; }
.trip-distance-deviation.under { color: #476d55; font-weight: 750; }
.trip-distance-deviation.exact { color: #536159; font-weight: 750; }
.trip-distance-pending { white-space: nowrap; }
.logistics-trip-row.trip-state-planned { background: #fff; }
.logistics-trip-row.trip-state-planned > td { background: #fff; }
.logistics-trip-row.trip-state-in_progress { background: #fff; }
.logistics-trip-row.trip-state-in_progress > td { background: #fff; }
.logistics-trip-row.trip-state-overdue { background: #fff0f0; }
.logistics-trip-row.trip-state-overdue > td { background: #fff0f0; }
.logistics-trip-row.trip-state-overdue > td:first-child { box-shadow: inset 3px 0 #b96565; }
.logistics-trip-row.trip-state-completed { background: #f1f8f3; }
.logistics-trip-row.trip-state-completed > td { background: #f1f8f3; }
.logistics-trip-row.trip-state-completed > td:first-child { box-shadow: inset 3px 0 #688371; }
.logistics-trip-row.trip-state-in_progress > td:first-child,
.logistics-trip-row.trip-state-planned > td:first-child,
.logistics-trip-row.trip-state-cancelled > td:first-child { box-shadow: none; }
.logistics-trip-row.trip-state-cancelled { background: #fff; }
.logistics-trip-row.trip-state-cancelled > td { background: #fff; }
.trip-driver-alert { display: none; }
.log-status-overdue { color: #833939; background: #f4dddd; }
.trip-action-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 250px; }
.trip-review-action { min-width: 122px; }
.trip-report-action { min-width: 112px; }
.trip-report-action.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.trip-report-action.primary:hover { border-color: #35463c; background: #35463c; }
.driver-rate-trigger { display: grid; gap: 1px; padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.driver-rate-trigger:hover { border-color: #d8e1da; background: #f4f7f5; }
.driver-rate-trigger b { font-size: .8rem; }
.driver-rate-trigger small { color: var(--muted); font-size: .6rem; }
.driver-rate-dialog { width: min(450px, calc(100vw - 30px)); }
.logistics-schedule-head { align-items: flex-end; }
.schedule-period-mobile, .schedule-mobile-view { display: none; }
.schedule-week-navigation { width: auto; flex-wrap: nowrap; }
.schedule-nav-mobile { display: none; }
.schedule-driver-label { display: none; }
.schedule-date-jump { margin: 0; }
.schedule-date-jump label { min-width: 155px; display: grid; gap: 3px; }
.schedule-date-jump label > span { color: var(--muted); font-size: .64rem; font-weight: 700; }
.schedule-date-jump input { height: 38px; min-height: 38px; }
.logistics-schedule-panel { padding: 0; overflow: hidden; }
.schedule-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; border-bottom: 1px solid #e5e9e5; background: #fbfcfb; }
.schedule-selection-bar { min-height: 58px; display: grid; grid-template-columns: minmax(230px, auto) 1fr auto; align-items: center; gap: 16px; padding: 9px 14px; border-bottom: 1px solid #cddbd1; background: #eef5f0; }
.schedule-selection-bar[hidden] { display: none; }
.schedule-selection-bar > div:first-child { display: grid; gap: 2px; }
.schedule-selection-bar b { font-size: .8rem; }
.schedule-selection-bar span { color: #526158; font-size: .7rem; font-variant-numeric: tabular-nums; }
.schedule-selection-bar p { margin: 0; color: #6d766f; font-size: .69rem; }
.schedule-legend { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 13px; color: #606963; font-size: .72rem; }
.schedule-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.schedule-legend-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; }
.schedule-table-wrap { max-height: calc(100dvh - 245px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.schedule-week-section + .schedule-week-section { border-top: 8px solid #eef1ee; }
.schedule-week-title { min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 7px 13px; border-bottom: 1px solid #e5e9e5; background: #f4f7f5; }
.schedule-week-title b { font-size: .75rem; }
.schedule-week-title span { color: var(--muted); font-size: .69rem; font-variant-numeric: tabular-nums; }
.driver-schedule-table { width: 100%; min-width: 1320px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.driver-schedule-fortnight { min-width: 0; }
.driver-schedule-week { min-width: 0; }
.driver-schedule-table th { position: sticky; top: 0; z-index: 3; height: 54px; padding: 7px 8px; border-bottom: 1px solid #dfe5e0; border-right: 1px solid #edf0ed; background: #f8faf8; text-align: center; }
.driver-schedule-table .schedule-week-band th { top: 0; height: 31px; padding: 5px 8px; color: #667069; background: #f2f5f3; font-size: .67rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.driver-schedule-table .schedule-day-header th { top: 31px; height: 52px; padding-right: 3px; padding-left: 3px; }
.driver-schedule-table .schedule-week-band .schedule-driver-column { top: 0; height: 83px; color: var(--text); background: #f8faf8; font-size: .82rem; }
.driver-schedule-table th > span { display: block; color: #7b837d; font-size: .61rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.driver-schedule-table th > b { display: block; margin-top: 2px; font-size: .76rem; font-variant-numeric: tabular-nums; }
.driver-schedule-table th.today { background: #edf4ef; }
.driver-schedule-table .schedule-driver-column { left: 0; z-index: 5; width: 168px; text-align: left; }
.driver-schedule-table td { height: 130px; padding: 4px; vertical-align: top; border-bottom: 1px solid #edf0ed; border-right: 1px solid #edf0ed; background: #fff; }
.driver-schedule-table tbody tr + tr > td { border-top: 2px solid #dfe5e0; }
.driver-schedule-table td.today { background: #fbfdfb; }
.schedule-driver-cell { position: sticky; left: 0; z-index: 2; width: 168px; padding: 14px 10px !important; vertical-align: middle !important; background: #fbfcfb !important; text-align: left; }
.schedule-driver-cell b { display: block; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-driver-cell small { margin-top: 3px; overflow: hidden; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-day-cell { position: relative; }
.schedule-day-cell[data-schedule-select-cell] { cursor: cell; transition: background-color .12s ease, box-shadow .12s ease; }
.driver-schedule-table td.schedule-has-entry { padding: 0; }
.driver-schedule-table td.schedule-cell-kind-internal { color: #36586a; background: #e8f1f6; }
.driver-schedule-table td.schedule-cell-kind-intercity { color: #554d70; background: #efecf7; }
.driver-schedule-table td.schedule-cell-kind-absence { color: #626963; background: #ecefed; }
.driver-schedule-table td.schedule-cell-kind-mixed { color: #46556c; background: linear-gradient(135deg, #e8f1f6 0 49%, #efecf7 51% 100%); }
.driver-schedule-table td.schedule-cell-state-completed { color: #2f5c3d; background: #e1f0e5; }
.driver-schedule-table td.schedule-cell-state-overdue { color: #7a3737; background: #f7e4e4; }
.driver-schedule-table td.schedule-merge-start { z-index: 2; overflow: visible; }
.driver-schedule-table td.schedule-merge-open-right { border-right-color: transparent; }
.schedule-merge-start > .schedule-cell-actions { position: relative; z-index: 4; pointer-events: none; }
.schedule-merge-start > .schedule-entry-list { position: absolute; z-index: 3; top: 26px; bottom: 0; left: 0; pointer-events: none; }
.schedule-merge-start .schedule-add-button, .schedule-merge-start .schedule-entry-edit, .schedule-merge-start .schedule-entry-report { pointer-events: auto; }
.schedule-merge-span-2 > .schedule-cell-actions, .schedule-merge-span-2 > .schedule-entry-list { width: 200%; }
.schedule-merge-span-3 > .schedule-cell-actions, .schedule-merge-span-3 > .schedule-entry-list { width: 300%; }
.schedule-merge-span-4 > .schedule-cell-actions, .schedule-merge-span-4 > .schedule-entry-list { width: 400%; }
.schedule-merge-span-5 > .schedule-cell-actions, .schedule-merge-span-5 > .schedule-entry-list { width: 500%; }
.schedule-merge-span-6 > .schedule-cell-actions, .schedule-merge-span-6 > .schedule-entry-list { width: 600%; }
.schedule-merge-span-7 > .schedule-cell-actions, .schedule-merge-span-7 > .schedule-entry-list { width: 700%; }
.schedule-merge-continuation > .schedule-cell-actions, .schedule-merge-continuation > .schedule-entry-list { visibility: hidden; pointer-events: none; }
.driver-schedule-table td.schedule-day-cell.schedule-range-selected { background: #dcece1; box-shadow: inset 0 2px #6a8b76, inset 0 -2px #6a8b76; }
.schedule-day-cell.schedule-range-start { box-shadow: inset 2px 0 #496654, inset 0 2px #6a8b76, inset 0 -2px #6a8b76; }
.schedule-day-cell.schedule-range-end { box-shadow: inset -2px 0 #496654, inset 0 2px #6a8b76, inset 0 -2px #6a8b76; }
.schedule-day-cell.schedule-range-start.schedule-range-end { box-shadow: inset 2px 0 #496654, inset -2px 0 #496654, inset 0 2px #6a8b76, inset 0 -2px #6a8b76; }
.driver-schedule-table .schedule-week-boundary { border-left: 4px solid #dfe6e1; }
.schedule-cell-actions { min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.schedule-cell-action-copy { min-width: 0; display: flex; align-items: center; gap: 5px; }
.schedule-cell-status { max-width: 100%; display: inline-flex; align-items: center; padding: 3px 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.58); font-size: .58rem; font-style: normal; font-weight: 800; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.schedule-mobile-date { display: none; }
.schedule-add-button { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 6px; color: #61776a; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; }
.schedule-add-button:hover { border-color: #cbd8cf; color: #31493a; background: #edf4ef; }
.schedule-entry-list { display: grid; gap: 4px; }
.schedule-entry { position: relative; width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: start; gap: 3px; padding: 6px 3px 6px 5px; overflow: hidden; border: 1px solid transparent; border-radius: 7px; background: #f0f3f1; text-align: left; cursor: cell; }
.schedule-has-entry .schedule-cell-actions { min-height: 26px; margin: 0; padding: 2px 4px 0; }
.schedule-has-entry .schedule-entry-list { min-height: 103px; display: flex; flex-direction: column; gap: 0; }
.schedule-has-entry .schedule-entry { flex: 1 1 0; align-items: stretch; padding: 8px 7px 9px 10px; border: 0; border-radius: 0; color: inherit; background: transparent; }
.schedule-has-entry .schedule-entry + .schedule-entry { border-top: 1px solid rgba(52, 69, 58, .14); }
.schedule-entry:hover { filter: brightness(.975); border-color: rgba(55,70,60,.18); }
.schedule-entry-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.schedule-entry-edit { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; color: currentColor; background: rgba(255,255,255,.48); cursor: pointer; font-size: .7rem; line-height: 1; opacity: .72; }
.schedule-entry-edit:hover { background: rgba(255,255,255,.85); opacity: 1; }
.schedule-entry-title { width: 100%; display: block; padding-right: 2px; overflow: hidden; font-size: .86rem; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.schedule-entry-period { display: block; margin-top: 3px; color: inherit; opacity: .72; font-size: .63rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.schedule-entry-carry { display: none; }
.schedule-entry-status { flex: 0 0 auto; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.55); font-size: .54rem; font-style: normal; font-weight: 750; white-space: nowrap; }
.driver-schedule-readonly .schedule-entry { grid-template-columns: minmax(0, 1fr); }
.schedule-entry-report { width: 100%; min-height: 25px; display: flex; align-items: center; justify-content: center; margin-top: 6px; padding: 4px 7px; border: 1px solid rgba(48,77,58,.22); border-radius: 6px; color: #284b35; background: rgba(255,255,255,.62); font-size: .61rem; font-weight: 800; text-decoration: none; }
.schedule-entry-report:hover { border-color: rgba(48,77,58,.38); background: rgba(255,255,255,.9); }
@media (min-width: 761px) {
  .schedule-merge-start > .schedule-cell-actions {
    justify-content: center;
    padding-right: 30px;
    padding-left: 30px;
  }
  .schedule-merge-start > .schedule-cell-actions .schedule-cell-action-copy {
    width: 100%;
    justify-content: center;
  }
  .schedule-merge-start > .schedule-cell-actions .schedule-add-button {
    position: absolute;
    top: 2px;
    right: 4px;
  }
  .schedule-merge-start .schedule-entry-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 34px 8px;
    text-align: center;
  }
  .schedule-merge-start .schedule-entry {
    grid-template-columns: minmax(0, 1fr);
  }
  .schedule-merge-start .schedule-entry-edit {
    position: absolute;
    top: 8px;
    right: 7px;
  }
  .schedule-merge-start .schedule-entry-title {
    width: auto;
    max-width: 100%;
    font-size: .98rem;
    line-height: 1.18;
    text-align: center;
    white-space: normal;
  }
  .schedule-merge-start .schedule-entry-period {
    margin-top: 3px;
    padding: 0;
    background: transparent;
    font-size: .69rem;
    text-align: center;
  }
}
.assignment-status-label-completed { color: #315d40; background: #dceadf; }
.assignment-status-label-in_progress { color: #315d70; background: #dceaf0; }
.assignment-status-label-cancelled { color: #626963; background: #e2e6e3; }
.assignment-status-label-overdue { color: #833939; background: #f0cece; }
.assignment-kind-interwarehouse { color: #345643; background: #e6f0e9; }
.assignment-kind-ozon { color: #315b70; background: #e5f0f5; }
.assignment-kind-baikal { color: #70592e; background: #f4eddd; }
.assignment-kind-route { color: #554d70; background: #ece9f4; }
.assignment-kind-internal { color: #36586a; background: #dfeaf0; }
.assignment-kind-intercity { color: #554d70; background: #e5e0f0; }
.assignment-kind-absence { color: #626963; background: #ecefed; }
.schedule-entry.assignment-status-in_progress { box-shadow: inset 3px 0 #4f7895; }
.schedule-entry.assignment-status-completed { box-shadow: inset 3px 0 #55705e; }
.schedule-entry.assignment-status-cancelled { opacity: .52; text-decoration: line-through; }
.schedule-empty-mark { display: block; padding: 4px 2px; color: #b0b6b1; font-size: .62rem; text-align: center; }
.schedule-dialog { width: min(620px, calc(100vw - 30px)); }
.schedule-kind-picker { display: grid; gap: 7px; margin-bottom: 15px; }
.schedule-kind-picker > span { color: #4a524c; font-size: .78rem; font-weight: 700; }
.schedule-kind-picker > div { display: flex; flex-wrap: wrap; gap: 7px; }
.schedule-kind-picker button { min-height: 34px; padding: 6px 10px; border: 1px solid #d9dfda; border-radius: 8px; color: #56605a; background: #f8faf8; cursor: pointer; font-size: .74rem; font-weight: 650; }
.schedule-kind-picker button:hover { border-color: #bfcac2; background: #f0f5f1; }
.schedule-kind-picker button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.schedule-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.schedule-form-grid label { min-width: 0; display: grid; align-content: start; gap: 5px; color: #4a524c; font-size: .78rem; font-weight: 700; }
.schedule-form-grid label[hidden] { display: none !important; }
.schedule-form-grid label.span-2 { grid-column: 1 / -1; }
.schedule-form-grid textarea { min-height: 76px; }
.schedule-form-grid .errorlist { margin: 0; padding: 0; color: var(--danger); font-size: .68rem; font-weight: 500; list-style: none; }
.schedule-form-actions { align-items: center; }
.schedule-form-actions [data-schedule-delete-open] { margin-left: auto; }
.schedule-delete-list { max-height: 300px; display: grid; gap: 6px; overflow-y: auto; overscroll-behavior: contain; }
.schedule-delete-list > div { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid #e2e6e2; border-radius: 8px; background: #fafbfa; }
.schedule-delete-list b { font-size: .76rem; }
.schedule-delete-list span { color: var(--muted); font-size: .67rem; }
.log-status, .log-expense-category { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; color: #606862; background: #edf0ee; font-size: .71rem; font-weight: 750; white-space: nowrap; }
.log-status-planned, .log-workday-planned { color: #6d613c; background: #f4f0e5; }
.log-status-in_progress { color: #345d6d; background: #e8f1f4; }
.log-status-completed { color: #405a47; background: #eaf1ec; }
.log-status-approved, .log-driver-active, .log-vehicle-active, .log-workday-worked { color: #2f5f40; background: #e6f0e9; }
.log-status-cancelled, .log-driver-dismissed, .log-vehicle-archived, .log-workday-cancelled { color: #824848; background: #f5eaea; }
.log-review-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .69rem; font-weight: 750; white-space: nowrap; }
.log-review-pending { color: #775e2e; background: #f5efe1; }
.log-review-approved { color: #2f5f40; background: #e6f0e9; }
.log-review-no_report { color: #656c67; background: #ecefed; }
.log-driver-on_leave, .log-vehicle-repair { color: #775e2e; background: #f5efe1; }
.log-expense-fuel { color: #365c6a; background: #e8f1f4; }
.log-expense-wash { color: #496273; background: #edf2f5; }
.log-expense-parking { color: #665d3a; background: #f3f0e6; }
.log-expense-market_ticket { color: #66506d; background: #f2ebf4; }
.logistics-form-page { max-width: 1180px; }
.logistics-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.logistics-form-note { margin-top: 18px; }
.form-error-summary { display: grid; gap: 4px; margin-bottom: 18px; padding: 11px 13px; border: 1px solid #e7caca; border-radius: 9px; color: #7f4242; background: #fbf1f1; }
.logistics-expense-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.warehouse-uniform-page { height: calc(100dvh - 140px); min-height: 680px; display: flex; flex-direction: column; }
.warehouse-uniform-page > .page-head,
.warehouse-uniform-page > .issue-period-filter,
.warehouse-uniform-page > .issue-metrics,
.warehouse-uniform-page > .analytics-filters { flex: 0 0 auto; }
.warehouse-fixed-journal { min-height: 0; height: auto; flex: 1 1 auto; display: flex; flex-direction: column; margin-bottom: 0; }
.warehouse-fixed-journal > .table-toolbar,
.warehouse-fixed-journal > .payroll-period-picker { flex: 0 0 auto; }
.warehouse-fixed-journal > .warehouse-fixed-scroll { min-height: 0; max-height: none; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.warehouse-uniform-issues > .warehouse-issues-layout { min-height: 0; flex: 1 1 auto; }
.warehouse-uniform-issues .warehouse-issues-layout > .panel { min-height: 0; height: auto; margin-bottom: 0; }
.warehouse-uniform-analytics > .analytics-columns { min-height: 316px; flex: 0 0 36%; }
.warehouse-uniform-analytics .analytics-columns > .section-panel { min-height: 0; margin-bottom: 0; }
.warehouse-uniform-analytics > .analytics-history-panel { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; margin: 18px 0 0; }
.warehouse-uniform-analytics .analytics-history-tabs { flex: 0 0 auto; }
.warehouse-uniform-analytics .analytics-history-view { min-height: 0; flex: 1 1 auto; flex-direction: column; }
.warehouse-uniform-analytics .analytics-history-view:not([hidden]) { display: flex; }
.warehouse-uniform-analytics .analytics-history-view > .table-toolbar { flex: 0 0 auto; }
.warehouse-uniform-analytics .analytics-history-scroll { min-height: 0; max-height: none; flex: 1 1 auto; }
.warehouse-uniform-admin > .admin-users-panel { min-height: 0; flex: 1 1 52%; display: flex; flex-direction: column; margin-bottom: 18px; }
.warehouse-uniform-admin .admin-users-scroll { min-height: 0; height: auto; max-height: none; flex: 1 1 auto; }
.warehouse-uniform-admin > .admin-directories-grid { min-height: 0; flex: 1 1 48%; }
.warehouse-uniform-admin .admin-directories-grid > .panel { min-height: 0; height: 100%; display: flex; flex-direction: column; margin-bottom: 0; }
.warehouse-uniform-admin .directory-add-form { flex: 0 0 auto; }
.warehouse-uniform-admin .admin-directory-scroll { min-height: 0; height: auto; max-height: none; flex: 1 1 auto; }
.logistics-fixed-journal { height: clamp(420px, 58vh, 620px); display: flex; flex-direction: column; }
.logistics-fixed-journal > .table-toolbar { flex: 0 0 auto; }
.logistics-fixed-journal > .logistics-fixed-journal-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.logistics-uniform-page { height: calc(100dvh - 114px); min-height: 680px; display: flex; flex-direction: column; }
.logistics-uniform-page > .page-head,
.logistics-uniform-page > .logistics-period-filter,
.logistics-uniform-page > .metrics-grid { flex: 0 0 auto; }
.logistics-uniform-page > .logistics-fixed-journal { min-height: 0; height: auto; flex: 1 1 auto; margin-bottom: 0; }
.logistics-uniform-page > .logistics-analytics-grid { min-height: 0; height: auto; flex: 1 1 auto; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.logistics-uniform-analytics .logistics-analytics-card { min-height: 0; margin-bottom: 0; }
.logistics-uniform-analytics .analytics-ranking,
.logistics-uniform-analytics .analytics-compact-list { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.assignment-report-page-head { align-items: flex-end; }
.assignment-report-summary { display: grid; grid-template-columns: 1.25fr 1fr .75fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.assignment-report-summary > div { min-width: 0; display: grid; align-content: center; gap: 5px; min-height: 88px; padding: 14px 18px; border-right: 1px solid #e5e9e5; }
.assignment-report-summary > div:last-child { border-right: 0; }
.assignment-report-summary span { color: var(--muted); font-size: .68rem; font-weight: 700; }
.assignment-report-summary b { overflow-wrap: anywhere; font-size: .92rem; }
.assignment-report-summary .log-status { width: fit-content; font-size: .7rem; }
.assignment-report-locked { margin-bottom: 18px; }
.required-mark { margin-left: 3px; color: #a14f4f; font-style: normal; }
.trip-review-panel { margin-top: 18px; padding: 0; overflow: hidden; }
.trip-review-panel > .panel-head { min-height: 72px; margin: 0; padding: 14px 18px; border-bottom: 1px solid #e5e9e5; background: #fbfcfb; }
.trip-review-body { display: grid; gap: 14px; padding: 16px 18px 18px; }
.trip-review-error { margin: 0; }
.trip-review-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.trip-review-checks > div { min-width: 0; display: grid; align-content: center; gap: 4px; min-height: 66px; padding: 10px 12px; border: 1px solid #dfe5e0; border-radius: 9px; background: #f8faf8; }
.trip-review-checks > div.is-ok { border-color: #d6e5d9; background: #f1f7f2; }
.trip-review-checks > div.is-problem { border-color: #e8caca; background: #fcf2f2; }
.trip-review-checks span { color: var(--muted); font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.trip-review-checks b { overflow-wrap: anywhere; font-size: .78rem; line-height: 1.3; }
.trip-review-problems { padding: 11px 13px; border: 1px solid #e6c8c8; border-radius: 9px; color: #7f4242; background: #fcf2f2; }
.trip-review-problems > b { font-size: .78rem; }
.trip-review-problems ul { display: grid; gap: 4px; margin: 7px 0 0; padding-left: 18px; font-size: .72rem; }
.trip-review-problems p { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid #ebd4d4; font-size: .7rem; line-height: 1.4; }
.trip-review-waiting { display: grid; gap: 5px; padding: 14px 15px; border: 1px solid #e6c8c8; border-radius: 9px; color: #7f4242; background: #fcf2f2; }
.trip-review-waiting span { font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.trip-review-waiting b { font-size: .9rem; }
.trip-review-waiting p { margin: 0; color: #8b6060; font-size: .72rem; line-height: 1.4; }
.trip-review-expenses { overflow: hidden; border: 1px solid #e0e5e1; border-radius: 9px; }
.trip-review-expenses-head, .trip-review-expense { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; }
.trip-review-expenses-head { border-bottom: 1px solid #e4e8e4; background: #f5f7f5; }
.trip-review-expenses-head b { font-size: .76rem; }
.trip-review-expenses-head span { color: var(--muted); font-size: .66rem; }
.trip-review-expense + .trip-review-expense { border-top: 1px solid #e9ece9; }
.trip-review-expense > span { min-width: 0; display: grid; gap: 2px; }
.trip-review-expense b { font-size: .74rem; }
.trip-review-expense small { overflow-wrap: anywhere; font-size: .65rem; }
.trip-review-expense a { flex: 0 0 auto; color: #31513c; font-size: .69rem; font-weight: 750; }
.trip-review-expense strong { flex: 0 0 auto; color: #944747; font-size: .69rem; }
.trip-review-expense.missing-receipt { background: #fff5f5; }
.trip-review-no-expenses { margin: 0; }
.trip-review-open { justify-self: end; min-width: 190px; }
.trip-review-open:disabled { border-color: #dde2de; color: #969e98; background: #f0f2f0; cursor: not-allowed; opacity: 1; }
.trip-review-approved-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 9px; background: #eef5f0; }
.trip-review-approved-meta span { color: var(--muted); font-size: .65rem; font-weight: 700; }
.trip-review-approved-meta b { font-size: .76rem; }
.trip-review-dialog { width: min(530px, calc(100vw - 30px)); }
.trip-review-no-expenses-confirm { margin-top: 12px; }
.trip-review-cell { min-width: 104px; }
.trip-review-cell small { margin-top: 4px; }
.assignment-report-form { display: grid; gap: 18px; margin-top: 18px; }
.assignment-report-workspace { display: grid; grid-template-columns: 1fr; align-items: start; gap: 14px; }
.assignment-report-main, .assignment-expenses-panel { padding: 0; overflow: hidden; }
.assignment-report-main > .panel-head, .assignment-expenses-panel > .panel-head { min-height: 68px; margin: 0; padding: 12px 16px; border-bottom: 1px solid #e8ece8; }
.assignment-expenses-panel > .panel-head { min-height: 0; padding-block: 11px 16px; }
.assignment-expenses-panel > .panel-head > div { width: 100%; min-width: 0; }
.assignment-report-fields { display: grid; align-items: end; gap: 12px; padding: 14px 16px 16px; }
.assignment-report-fields.is-internal { grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, .72fr)); }
.assignment-report-fields.is-intercity { grid-template-columns: minmax(240px, 1.45fr) repeat(4, minmax(135px, .7fr)); }
.assignment-report-fields .span-2, .assignment-comment-field { grid-column: 1 / -1; }
.assignment-route-kind { align-self: center; padding: 5px 9px; border-radius: 999px; color: #3e5a48; background: #edf3ee; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.assignment-distance-preview { min-height: 40px; display: grid; align-content: center; justify-items: center; gap: 1px; margin: 0; padding: 5px 10px; border: 1px solid #d7e2da; border-radius: 8px; color: #31513c; background: #edf4ef; text-align: center; }
.assignment-distance-preview span { color: #617067; font-size: .6rem; font-weight: 750; text-transform: uppercase; }
.assignment-distance-preview b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.assignment-weight-field { padding: 0; border: 0; background: transparent; }
.assignment-comment-field textarea { min-height: 58px; max-height: 86px; resize: vertical; }
.assignment-expense-list { display: grid; gap: 9px; padding: 10px 16px 9px; }
.assignment-expense-add { padding: 0 16px 14px; }
.assignment-expense-add .button { width: 100%; min-height: 44px; }
.assignment-expense-row { overflow: hidden; border: 1px solid #dfe5e0; border-radius: 10px; background: #fff; }
.assignment-expense-row[hidden] { display: none; }
.assignment-expense-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 7px 11px; border-bottom: 1px solid #e8ece8; background: #f7f9f7; }
.assignment-expense-head > div { display: grid; gap: 1px; }
.assignment-expense-head span { color: var(--muted); font-size: .59rem; font-weight: 700; text-transform: uppercase; }
.assignment-expense-head b { font-size: .8rem; }
.assignment-expense-remove { padding: 5px 8px; border: 1px solid #ead7d7; border-radius: 7px; color: #8a4747; background: #fffafa; cursor: pointer; font-size: .66rem; font-weight: 700; }
.assignment-expense-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 10px 12px; padding: 11px 12px 12px; }
.assignment-expense-category { grid-column: span 3; }
.assignment-expense-amount { grid-column: span 3; }
.assignment-expense-amount[hidden], .record-field[hidden] { display: none !important; }
.assignment-fuel-fields { grid-column: span 9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.assignment-fuel-fields[hidden] { display: none; }
.assignment-fuel-total { min-height: 40px; display: grid; align-content: center; gap: 2px; padding: 5px 10px; border: 1px solid #d7e2da; border-radius: 8px; background: #edf4ef; }
.assignment-fuel-total span { color: var(--muted); font-size: .61rem; font-weight: 700; }
.assignment-fuel-total b { font-size: .88rem; font-variant-numeric: tabular-nums; }
.assignment-expense-note { grid-column: span 7; }
.assignment-expense-receipt { grid-column: span 5; }
.assignment-expense-receipt input[type="file"] { min-height: 40px; padding: 5px; border-style: dashed; background: #fbfcfb; }
.assignment-expense-receipt input[type="file"]::file-selector-button { min-height: 28px; margin-right: 9px; padding: 5px 9px; border: 1px solid #d8dfd9; border-radius: 6px; color: #405248; background: #f2f5f3; cursor: pointer; font: inherit; font-weight: 700; }
.assignment-expense-receipt small a { color: #31513c; font-weight: 700; }
.assignment-report-footer { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px; border: 1px solid #dfe5e0; border-radius: 11px; background: rgba(255,255,255,.96); box-shadow: 0 8px 26px rgba(28,38,31,.1); backdrop-filter: blur(8px); }
.assignment-report-footer > span { color: var(--muted); font-size: .7rem; }
.assignment-report-footer > div { display: flex; gap: 8px; }

/* Review/archive is a compact read-only document, never a second edit form. */
.trip-review-overview { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, .9fr); gap: 12px; }
.trip-review-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e0e5e1; border-radius: 10px; }
.trip-review-facts > div { min-width: 0; display: grid; align-content: center; gap: 3px; min-height: 68px; padding: 10px 12px; border-right: 1px solid #e8ebe8; border-bottom: 1px solid #e8ebe8; }
.trip-review-facts > div:nth-child(3n) { border-right: 0; }
.trip-review-facts > div:nth-last-child(-n+3) { border-bottom: 0; }
.trip-review-facts span, .trip-review-note > span { color: var(--muted); font-size: .6rem; font-weight: 750; text-transform: uppercase; }
.trip-review-facts b { overflow-wrap: anywhere; font-size: .78rem; line-height: 1.25; }
.trip-review-facts small { color: var(--muted); font-size: .62rem; }
.trip-review-distance-deviation b { font-variant-numeric: tabular-nums; }
.trip-review-distance-deviation.is-over b { color: #a44b48; }
.trip-review-distance-deviation.is-under b { color: #3f6880; }
.trip-review-distance-deviation.is-exact b { color: #38694b; }
@media (min-width: 761px) {
  .trip-review-facts.is-intercity { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .trip-review-facts.is-intercity > div,
  .trip-review-facts.is-intercity > div:nth-child(3n) { border-right: 1px solid #e8ebe8; border-bottom: 1px solid #e8ebe8; }
  .trip-review-facts.is-intercity > div:nth-child(5n) { border-right: 0; }
  .trip-review-facts.is-intercity > div:nth-last-child(-n+5) { border-bottom: 0; }
}
.trip-review-note { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 13px 14px; border: 1px solid #e0e5e1; border-radius: 10px; background: #fafbfa; }
.trip-review-note p { margin: 0; overflow-wrap: anywhere; font-size: .74rem; line-height: 1.5; }
.trip-review-expenses-section { overflow: hidden; border: 1px solid #dfe5e0; border-radius: 11px; }
.trip-review-expenses-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border-bottom: 1px solid #e4e8e4; background: #f7f9f7; }
.trip-review-expenses-title h3 { margin: 0 0 2px; font-size: .84rem; }
.trip-review-expenses-title p { margin: 0; color: var(--muted); font-size: .65rem; }
.trip-review-expenses-title > b { font-size: .94rem; font-variant-numeric: tabular-nums; }
.trip-review-expense-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 9px; padding: 9px; overflow: visible; }
.trip-review-expense-cards.has-overflow { max-height: 315px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.trip-review-expense-card { min-width: 0; overflow: hidden; border: 1px solid #e0e5e1; border-radius: 10px; background: #fff; }
.trip-review-expense-card.missing-receipt { border-color: #e5c2c2; background: #fffafa; }
.trip-review-expense-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border-bottom: 1px solid #e7ebe7; background: #fafbfa; }
.trip-review-expense-card-head span { color: var(--muted); font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.trip-review-expense-card-head h4 { margin: 2px 0 0; font-size: .78rem; }
.trip-review-expense-card-head > b { font-size: .83rem; white-space: nowrap; }
.trip-review-expense-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-bottom: 1px solid #e7ebe7; }
.trip-review-expense-data > div { min-width: 0; display: grid; gap: 2px; padding: 6px 8px; border-right: 1px solid #e8ebe8; }
.trip-review-expense-data > div:last-child { border-right: 0; }
.trip-review-expense-data > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.trip-review-expense-data dt { color: var(--muted); font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.trip-review-expense-data dd { margin: 0; overflow-wrap: anywhere; font-size: .7rem; }
.trip-review-receipt-preview { display: grid; gap: 5px; padding: 7px 8px 8px; }
.trip-review-receipt-preview > span { color: var(--muted); font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.trip-review-receipt-preview img, .trip-review-receipt-preview object { width: 100%; height: 145px; display: block; border: 1px solid #e3e7e3; border-radius: 7px; background: #f4f6f4; object-fit: contain; }
.trip-review-receipt-button, .trip-review-receipt-media { position: relative; min-width: 0; display: block; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: #f4f6f4; }
.trip-review-receipt-button { width: 100%; cursor: zoom-in; }
.trip-review-receipt-button > span, .trip-review-receipt-expand { position: absolute; right: 7px; bottom: 7px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.64); border-radius: 7px; color: #fff; background: rgba(32,45,36,.82); box-shadow: 0 2px 8px rgba(20,28,22,.16); font-size: .6rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.trip-review-receipt-expand { cursor: pointer; }
.trip-receipt-lightbox { width: calc(100vw - 24px); max-width: none; height: calc(100dvh - 24px); max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; color: #fff; background: #171c18; box-shadow: 0 24px 80px rgba(0,0,0,.46); }
.trip-receipt-lightbox::backdrop { background: rgba(8,11,9,.86); backdrop-filter: blur(3px); }
.trip-receipt-lightbox-head { height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.trip-receipt-lightbox-head b { min-width: 0; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.trip-receipt-lightbox-close { width: 38px; height: 38px; display: grid; flex: 0 0 38px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; font-size: 1.55rem; line-height: 1; }
.trip-receipt-lightbox-stage { position: relative; width: 100%; height: calc(100% - 54px); min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.trip-receipt-lightbox-stage img { width: 100%; height: 100%; min-width: 0; min-height: 0; display: block; object-fit: contain; }
.trip-receipt-lightbox-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.trip-review-preview-unavailable, .trip-review-receipt-missing { display: grid; place-items: center; min-height: 100px; padding: 12px; color: var(--muted); font-size: .68rem; text-align: center; }
.trip-review-receipt-missing { color: #8c4b4b; }
.admin-user-table { min-width: 1050px; }
.admin-user-table th:nth-child(1) { width: 230px; }
.admin-user-table th:nth-child(2) { width: 120px; }
.admin-user-table th:nth-child(4) { width: 155px; }
.admin-user-table .action-cell { width: 175px; min-width: 175px; }
.row-action-group { display: flex; align-items: center; justify-content: center; gap: 6px; }
button.row-action { cursor: pointer; }
.row-action.danger-text { color: var(--danger); }
.protected-account-note { margin-top: 4px; font-size: .62rem; white-space: nowrap; }
.access-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.access-badges span { padding: 3px 7px; border-radius: 10px; color: #496051; background: #edf3ee; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.access-badges em { color: var(--muted); }
.muted-value { color: var(--muted); font-size: .76rem; }
.admin-dialog { width: min(650px, calc(100vw - 30px)); }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form-grid label, .admin-field { display: grid; gap: 6px; color: #474d48; font-size: .82rem; font-weight: 650; }
.admin-field { margin-top: 15px; }
.admin-field > small { line-height: 1.45; }
.password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.password-control input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; letter-spacing: .025em; }
.page-access-fieldset { margin: 17px 0 0; padding: 13px; border: 1px solid #e0e5e0; border-radius: 10px; }
.page-access-fieldset legend { padding: 0 5px; color: #474d48; font-size: .8rem; font-weight: 700; }
.page-access-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.page-access-grid label { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid #e6eae6; border-radius: 8px; color: #505852; background: #fafbfa; cursor: pointer; font-size: .76rem; font-weight: 650; }
.page-access-grid label:has(input:checked) { border-color: #b8c7bb; color: #31483a; background: #eef4ef; }
.admin-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 10px 11px; border-radius: 9px; background: #f7f9f7; cursor: pointer; }
.admin-check input { flex: 0 0 auto; margin-top: 2px; }
.admin-check b { display: block; font-size: .79rem; }.admin-check small { margin-top: 1px; font-size: .7rem; }
.directory-add-form { display: flex; align-items: flex-end; gap: 9px; margin: 0 0 12px; padding: 12px; border: 1px solid #e6eae6; border-radius: 10px; background: #fafbfa; }
.directory-add-form label { width: min(430px, 100%); display: grid; gap: 5px; color: #555d57; font-size: .76rem; font-weight: 650; }
.admin-directories-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.admin-directories-grid > .panel { min-width: 0; }
.admin-scroll-region { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.admin-scroll-region thead th { position: sticky; top: 0; z-index: 2; }
.admin-users-scroll { height: 360px; max-height: 360px; }
.admin-directory-scroll { height: 310px; max-height: 310px; }
.position-directory-table, .warehouse-directory-table { min-width: 680px; }
.position-directory-table .action-cell, .warehouse-directory-table .action-cell { width: 175px; min-width: 175px; }
.no-access-panel { width: min(560px, 100%); margin: 80px auto 0; padding: 40px; text-align: center; }
.no-access-mark { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #6b5935; background: var(--warning-soft); font-size: 1.2rem; font-weight: 800; }
.no-access-panel p { max-width: 430px; margin: 0 auto 20px; color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(420px, 100%); overflow: hidden; border: 1px solid #e1e6e1; border-radius: 15px; background: #fff; box-shadow: 0 14px 45px rgba(20,27,22,.08); }
.login-brand { padding: 18px 22px; border-bottom: 1px solid #e8ece8; color: var(--text); background: #fbfcfb; }
.login-brand .brand-mark { width: 44px; height: 44px; }.login-brand b { color: var(--text); }.login-brand small { color: var(--muted); }
.login-heading { padding: 22px 22px 0; }.login-heading h1 { margin-bottom: 4px; }.login-heading p { margin: 0; }
.login-card > .message { margin: 16px 22px 0; }
.login-card > .stack-form { padding: 20px 22px 24px; }
@media (max-width: 1050px) {
  .assignment-report-workspace { grid-template-columns: 1fr; }
  .trip-review-overview { grid-template-columns: 1fr; }
  .trip-review-expense-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-directories-grid { grid-template-columns: 1fr; }
  .warehouse-issues-layout { grid-template-columns: 1fr; }
  .warehouse-uniform-page { height: auto; min-height: 0; display: block; }
  .warehouse-uniform-page > .warehouse-fixed-journal { height: clamp(420px, 58vh, 620px); }
  .warehouse-uniform-analytics > .analytics-columns { min-height: 0; }
  .warehouse-uniform-analytics > .analytics-history-panel { display: block; margin-top: 18px; }
  .warehouse-uniform-analytics .analytics-history-view:not([hidden]) { display: block; }
  .warehouse-uniform-analytics .analytics-history-scroll { max-height: 420px; }
  .warehouse-uniform-admin > .admin-users-panel { display: block; }
  .warehouse-uniform-admin .admin-users-scroll { height: 360px; max-height: 360px; }
  .warehouse-uniform-admin .admin-directories-grid > .panel { height: auto; display: block; margin-bottom: 18px; }
  .warehouse-uniform-admin .admin-directory-scroll { height: 310px; max-height: 310px; }
  .logistics-dashboard-columns > .panel { height: auto; }
  .logistics-dashboard-scroll, .logistics-attention-list { max-height: 430px; }
  .logistics-uniform-page { height: auto; min-height: 0; display: block; }
  .logistics-uniform-page > .logistics-fixed-journal { height: clamp(420px, 58vh, 620px); }
  .logistics-uniform-page > .logistics-analytics-grid { height: auto; grid-template-rows: none; }
  .logistics-uniform-analytics .logistics-analytics-card { min-height: 410px; }
  .logistics-analytics-grid { grid-template-columns: 1fr; }
  .logistics-analytics-card { min-height: 0; }
  .warehouse-issues-layout > .panel { height: auto; }
  .issue-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .issue-journal-scroll { max-height: 540px; }
  .issue-leaderboard { max-height: 420px; }
  .site-header-inner { padding: 0 20px; }
  .header-actions { gap: 7px; }
  .menu-button { display: block; }
  .top-navigation { position: absolute; top: 64px; left: 0; right: 0; display: none; align-items: stretch; flex-direction: column; gap: 3px; max-height: calc(100vh - 64px); padding: 10px 20px 16px; overflow-y: auto; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.98); box-shadow: 0 14px 30px rgba(20,28,22,.1); }
  .top-navigation.open { display: flex; }
  .top-navigation > a { width: 100%; padding: 10px 12px; }
  .mobile-account-links { display: grid; gap: 3px; margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
  .mobile-account-links a, .mobile-account-links .link-button { width: 100%; display: block; padding: 10px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
  .mobile-account-links a:hover, .mobile-account-links .link-button:hover { color: var(--text); background: var(--surface-muted); }
  .mobile-account-links form { margin: 0; }
  .user-menu { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .review-desktop-only, .trip-review-filter, .logistics-trip-table .trip-review-cell { display: none !important; }
  html, body, .app-shell, .main, .content { max-width: 100%; overflow-x: hidden; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  select,
  textarea { font-size: 16px !important; }
  .logistics-analytics-filter { display: block; padding: 11px; }
  .analytics-period-tabs { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .analytics-period-tabs a { width: 100%; min-height: 42px; padding: 8px 5px; }
  .analytics-period-tabs .logistics-analytics-custom-period { width: auto; grid-column: auto; }
  .logistics-analytics-custom-period summary { width: 100%; min-height: 42px; padding: 8px 5px; }
  .logistics-analytics-custom-period .analytics-custom-popover { right: 0; left: auto; }
  .analytics-period-summary { min-height: 54px; padding: 2px 3px; }
  .analytics-period-summary b { font-size: .98rem; }
  .analytics-period-controls { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px; }
  .analytics-period-controls label { width: 100%; }
  .analytics-period-controls label:only-of-type, .analytics-period-controls .button { grid-column: 1 / -1; width: 100%; }
  .logistics-analytics-grid { gap: 12px; }
  .logistics-uniform-page > .logistics-fixed-journal { height: auto; display: block; }
  .warehouse-uniform-page > .warehouse-fixed-journal { height: auto; display: block; }
  .warehouse-fixed-journal > .warehouse-fixed-scroll { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .logistics-uniform-analytics .logistics-analytics-card { min-height: 0; border-radius: 12px; }
  .logistics-uniform-analytics .analytics-ranking,
  .logistics-uniform-analytics .analytics-compact-list { overflow: visible; scrollbar-gutter: auto; }
  .analytics-card-head { min-height: 82px; align-items: center; padding: 14px; }
  .analytics-card-head strong { font-size: 1.42rem; }
  .analytics-card-head > small { max-width: 130px; font-size: .63rem; }
  .analytics-mini-metrics { padding: 10px 12px; }
  .analytics-mini-metrics-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-mini-metrics-three > div:last-child { grid-column: 1 / -1; }
  .analytics-mini-metrics > div { min-height: 54px; padding: 8px; }
  .analytics-list-head { padding: 8px 13px 7px; }
  .analytics-ranking, .analytics-compact-list { padding: 0 13px 12px; }
  .analytics-ranking-row { padding: 9px 0; }
  .analytics-ranking-row b { white-space: normal; }
  .analytics-compact-list > div { gap: 9px; }
  .analytics-compact-list > div > span:first-child { max-width: 45%; }
  .analytics-compact-list small { white-space: normal; }
  .site-header-inner { padding: 0 14px; }
  .site-header-inner { height: 58px; gap: 10px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand b { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { display: none; }
  .header-actions { min-width: 0; gap: 6px; }
  .cabinet-switch-button { min-height: 36px; padding: 7px 10px; }
  .menu-button { flex: 0 0 auto; margin-left: 0; }
  .top-navigation { top: 58px; max-height: calc(100dvh - 58px); padding: 9px 12px 14px; }
  .content { padding: 16px 10px 34px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head { gap: 13px; margin-bottom: 15px; }
  .page-head > div, .page-head h1, .page-head p { min-width: 0; max-width: 100%; }
  .page-head > .button, .page-head > .button-group { width: 100%; }
  .page-head > .button-group .button { flex: 1 1 auto; }
  .button-group, .week-navigation { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .button-group .button, .week-navigation .button { width: 100%; min-width: 0; padding-right: 9px; padding-left: 9px; }
  .week-navigation > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .week-navigation .button { flex: 1 1 calc(50% - 7px); }
  .week-picker-list { grid-template-columns: 1fr; }
  .timesheet-toolbar { align-items: stretch; flex-direction: column; }.timesheet-search { width: 100%; }.legend { justify-content: flex-start; }
  .bulk-mark-fields { grid-template-columns: 1fr; }.bulk-employee-toolbar, .bulk-footer { align-items: stretch; flex-direction: column; }.bulk-employee-toolbar input { width: 100%; }.bulk-footer .form-actions { margin-top: 0; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .cash-metric { grid-column: 1 / -1; }
  .metric { min-height: 105px; padding: 14px; }.metric strong { font-size: 1.35rem; }
  .panel { max-width: 100%; padding: 14px; border-radius: 12px; }
  .table-panel, .section-panel, .form-panel, .utility-panel { padding: 0; }
  .table-toolbar, .table-toolbar.compact-toolbar { align-items: stretch; flex-direction: column; min-height: 0; }
  .table-toolbar, .table-toolbar.compact-toolbar { gap: 12px; padding: 12px; }
  .toolbar-search { width: 100%; }
  .toolbar-controls { width: 100%; justify-content: flex-start; }
  .toolbar-field { width: 100%; }
  .table-panel-head { align-items: flex-start; flex-direction: column; }
  .table-head-actions { width: 100%; justify-content: space-between; }
  .status-key { justify-content: flex-start; flex-wrap: wrap; }
  .workflow-bar { align-items: stretch; flex-direction: column; }
  .workflow-bar form, .workflow-actions { width: 100%; display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .workflow-bar .button, .workflow-actions .button { width: 100%; }
  .payout-selection-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .payout-selection-actions .button { width: 100%; min-width: 0; padding-right: 8px; padding-left: 8px; }
  .payout-selection-actions .button:first-child, .payout-selection-actions .button:last-child { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }.form-grid .span-2 { grid-column: auto; }
  .record-form-card { border-radius: 12px; }
  .record-form-header { padding: 18px 17px 16px; }
  .record-form { padding: 18px 17px 0; }
  .record-form-grid { grid-template-columns: 1fr; gap: 15px; }
  .record-form-grid .span-2 { grid-column: auto; }
  .record-form-footer { margin: 22px -17px 0; padding: 14px 17px; }
  .record-form-footer .button.primary { min-width: 0; flex: 1; }
  .record-form-footer, .form-actions { flex-wrap: wrap; }
  .filter-row, .inline-form { align-items: stretch; flex-direction: column; }
  .filter-row input[type="search"], .filter-row select, .inline-form input, .inline-form select, .inline-form .button { width: 100%; max-width: none; }
  .analytics-filters { align-items: stretch; flex-direction: column; }
  .segmented, .analytics-history-tabs, .week-picker-years, .week-picker-months { flex-wrap: wrap; overflow: visible; }
  .segmented > *, .analytics-history-tab { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .analytics-period-controls { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
  .analytics-preset-links { display: contents; }
  .analytics-preset-links > a { width: 100%; min-width: 0; }
  .analytics-custom-period { width: 100%; grid-column: 1 / -1; }
  .analytics-custom-period summary { width: 100%; }
  .analytics-custom-popover { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .analytics-custom-fields { grid-template-columns: 1fr; }
  .rate-edit-fields { grid-template-columns: 1fr; }
  .analytics-filters label { align-items: stretch; flex-direction: column; }.analytics-filters select { width: 100%; }
  .rate-history-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .rate-history-controls .toolbar-search { width: 100%; }
  .admin-form-grid, .page-access-grid { grid-template-columns: 1fr; }
  .password-control { grid-template-columns: 1fr 1fr; }.password-control input { grid-column: 1 / -1; }
  .directory-add-form { align-items: stretch; flex-direction: column; }.directory-add-form label, .directory-add-form .button { width: 100%; }
  .trend-chart { min-height: 190px; overflow: hidden; }
  .trend-chart-svg { width: 100%; min-width: 0; min-height: 0; height: auto; }
  .rank-list > div { grid-template-columns: 1fr auto; }.rank-list > div > span { display: none; }

  /* Every regular table becomes a vertical card list on a phone. */
  .simple-table-wrap { max-width: 100%; overflow: visible; }
  .data-table { width: 100%; min-width: 0 !important; display: block; }
  .data-table thead { display: none; }
  .data-table tbody { width: 100%; display: grid; gap: 10px; padding: 10px; }
  .data-table tbody tr { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid #e1e6e1; border-radius: 11px; background: #fff; }
  .data-table tbody tr[hidden] { display: none !important; }
  .data-table tbody td { width: auto !important; min-width: 0 !important; height: auto; min-height: 42px; display: grid; grid-template-columns: minmax(88px, 32%) minmax(0, 1fr); align-items: center; gap: 7px 12px; padding: 8px 10px; border-bottom: 1px solid #edf0ed; background: transparent !important; text-align: right !important; white-space: normal; }
  .data-table tbody td:last-child { border-bottom: 0; }
  .data-table tbody td::before { content: attr(data-mobile-label); min-width: 0; grid-column: 1; grid-row: 1 / span 20; align-self: center; color: #7a817b; font-size: .68rem; font-weight: 700; line-height: 1.25; text-align: left; }
  .data-table tbody td::after { display: none; }
  .data-table tbody td > * { min-width: 0; max-width: 100%; grid-column: 2; justify-self: end; }
  .data-table tbody td > a:not(.button) { overflow-wrap: anywhere; }
  .data-table tbody td small, .data-table tbody td em { text-align: right; }
  .data-table tbody td[colspan] { display: block; padding: 0; border: 0; text-align: center !important; }
  .data-table tbody td[colspan]::before { display: none; }
  .data-table .number-cell, .data-table .action-cell, .data-table .paid-total-column, .data-table .payroll-position-column, .data-table .shifts-column, .data-table .lateness-column, .data-table .mistakes-column, .data-table .rate-column, .data-table .issue-column, .data-table .bonus-column { width: auto; min-width: 0; }
  .data-table .action-cell .row-action, .data-table .row-action-group { width: 100%; }
  .data-table .row-action-group { justify-content: flex-end; flex-wrap: wrap; }
  .data-table .description-cell { min-width: 0; overflow-wrap: anywhere; }
  .data-table .access-badges { justify-content: flex-end; }
  .protected-account-note { white-space: normal; }
  .quick-rate-button, .quick-position-button, .quick-warehouse-button, .quick-status-button { width: min(220px, 100%); min-width: 0; justify-self: end; text-align: right; }
  .quick-rate-button b, .quick-position-button b, .quick-warehouse-button b, .quick-status-button b { justify-self: end; max-width: 100%; }
  .quick-rate-button small, .quick-position-button small, .quick-warehouse-button small, .quick-status-button small { justify-self: end; }
  .quick-status-button b { width: auto; }
  .payroll-paid-summary, .row-bonus-button { justify-items: end; }
  .issue-cell-controls { width: 100%; max-width: 230px; justify-self: end; }

  .warehouse-issues-head { align-items: stretch; }
  .warehouse-issues-head .button { width: 100%; }
  .issue-period-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .issue-period-filter > div { grid-column: 1 / -1; margin-right: 0; }
  .issue-period-filter label { width: 100%; }
  .issue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-issues-journal .table-panel-head { align-items: stretch; }
  .warehouse-issues-journal .toolbar-search { width: 100%; }
  .issue-journal-scroll { max-height: 540px; overflow-x: hidden; }
  .issue-journal-table tbody { gap: 8px; padding: 8px; }
  .issue-journal-table tbody tr { gap: 6px; padding: 10px; }
  .issue-journal-table tbody td { min-height: 0; }
  .issue-journal-table tbody td:nth-child(1), .issue-journal-table tbody td:nth-child(3), .issue-journal-table tbody td:nth-child(5) { grid-template-columns: 85px minmax(0, 1fr); }
  .issue-journal-table .description-cell { min-width: 0; max-width: none; text-align: left !important; overflow-wrap: anywhere; }
  .issue-journal-table .description-cell::before { margin-bottom: 5px; }
  .issue-journal-table .description-cell { display: block; }
  .issue-journal-table .description-cell::before { content: attr(data-mobile-label); display: block; }
  .issue-leaderboard { max-height: 420px; }
  .warehouse-issue-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .cabinet-select-page { min-height: 0; align-content: start; gap: 20px; }
  .cabinet-select-heading { text-align: left; }
  .cabinet-select-grid { grid-template-columns: 1fr; }
  .cabinet-choice-card { grid-template-columns: 44px minmax(0, 1fr); padding: 17px; }
  .cabinet-choice-mark { width: 44px; height: 44px; border-radius: 11px; }
  .admin-page-access-columns { grid-template-columns: 1fr; }
  .logistics-metrics, .logistics-expense-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-salary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-salary-metrics .metric:first-child { grid-column: 1 / -1; }
  .logistics-salary-controls { width: 100%; display: grid; grid-template-columns: 1fr; }
  .logistics-salary-controls .logistics-driver-filter, .logistics-salary-controls .toolbar-search, .logistics-salary-controls .button { width: 100%; }
  .logistics-salary-table tbody td.salary-calculation-cell { grid-template-columns: 1fr; padding: 8px !important; }
  .logistics-salary-table tbody td.salary-calculation-cell::before { display: none; }
  .logistics-salary-table .salary-offer { width: 100%; min-width: 0; max-width: none; grid-column: 1 / -1; justify-self: stretch; text-align: left; }
  .logistics-salary-table .salary-offer-copy, .logistics-salary-table .salary-offer-copy small { justify-self: stretch; text-align: left; }
  .logistics-salary-table .salary-offer-copy strong { font-size: 1.08rem; }
  .logistics-salary-table .salary-offer-action { font-size: .7rem; }
  .logistics-period-filter { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
  .logistics-period-copy { grid-column: 1 / -1; min-height: 48px; }
  .logistics-period-filter label { width: 100%; }
  .logistics-list-toolbar { align-items: stretch; flex-direction: column; }
  .logistics-list-toolbar .toolbar-search, .logistics-list-toolbar .toolbar-controls, .logistics-list-toolbar .toolbar-field, .logistics-list-toolbar > .button { width: 100%; }
  .logistics-list-toolbar .toolbar-controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  .logistics-table-scroll { min-height: 0; max-height: none; overflow: visible; }
  .logistics-fixed-journal { height: auto; display: block; }
  .logistics-fixed-journal > .logistics-fixed-journal-scroll { max-height: none; overflow: visible; }
  .logistics-data-table tbody { padding: 8px; }
  .logistics-data-table tbody td { text-align: left !important; }
  .logistics-data-table tbody td > * { justify-self: start; text-align: left; }
  .logistics-data-table tbody td small { text-align: left; }
  .logistics-data-table .action-cell .row-action { width: 100%; }
  .logistics-trip-list .logistics-list-toolbar { gap: 10px; }
  .logistics-trip-list .logistics-list-toolbar .toolbar-controls { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .logistics-trip-list .logistics-list-toolbar .toolbar-controls .button { min-height: 42px; }
  .logistics-trip-list .logistics-list-toolbar .toolbar-controls > .button { width: 100%; grid-column: 1 / -1; }
  .logistics-trip-table tbody { gap: 12px; padding: 9px; }
  .logistics-trip-table tbody tr { position: relative; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 8px; padding: 13px; border-radius: 13px; box-shadow: 0 5px 16px rgba(31,43,34,.045); }
  .logistics-trip-table tbody tr.trip-state-planned { background: #fff; }
  .logistics-trip-table tbody tr.trip-state-in_progress { background: #fff; }
  .logistics-trip-table tbody tr.trip-state-completed { background: #f1f8f3; }
  .logistics-trip-table tbody tr.trip-state-overdue { border-color: #e5bcbc; background: #fff0f0; box-shadow: 0 6px 18px rgba(121,52,52,.09); }
  .logistics-trip-table tbody tr.trip-state-cancelled { background: #fff; }
  .logistics-trip-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .logistics-trip-table tbody tr > td:first-child { box-shadow: none !important; }
  .logistics-trip-table tbody td::before { position: static; display: block; margin-bottom: 3px; color: #858d87; font-size: .59rem; font-weight: 750; line-height: 1.15; text-transform: uppercase; }
  .logistics-trip-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; text-align: left; }
  .logistics-trip-table .trip-route-cell { grid-column: 1 / 5; grid-row: 1; padding: 1px 0 8px; }
  .logistics-trip-table .trip-route-cell::before { display: none; }
  .logistics-trip-table .trip-route-cell b { display: block; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.2; }
  .logistics-trip-table .trip-route-cell small { margin-top: 4px; font-size: .67rem; }
  .logistics-trip-table .trip-status-cell { grid-column: 5 / 7; grid-row: 1; align-self: start; padding: 0 0 8px; text-align: right !important; }
  .logistics-trip-table .trip-status-cell::before { display: none; }
  .logistics-trip-table .trip-status-cell > * { margin-left: auto; text-align: right; }
  .logistics-trip-table .trip-status-cell small { max-width: 118px; margin-top: 4px; font-size: .6rem; }
  .logistics-trip-table .trip-period-cell { grid-column: 1 / 7; grid-row: 2; padding: 9px 0; border-top: 1px solid rgba(92,108,97,.13); }
  .logistics-trip-table .trip-period-cell::before { content: "Период маршрута"; }
  .logistics-trip-table .trip-period-cell b { font-size: .87rem; font-variant-numeric: tabular-nums; }
  .logistics-trip-table .trip-driver-cell, .logistics-trip-table .trip-vehicle-cell { grid-column: 1 / 7; padding: 8px 0; border-top: 1px solid rgba(92,108,97,.11); }
  .logistics-trip-table .trip-driver-cell { grid-row: 3; }
  .logistics-trip-table .trip-vehicle-cell { grid-row: 4; }
  .logistics-trip-table .trip-driver-cell b, .logistics-trip-table .trip-vehicle-cell b { font-size: .85rem; }
  .logistics-trip-table .trip-tonnage-cell, .logistics-trip-table .trip-distance-cell, .logistics-trip-table .trip-expense-cell { min-width: 0; min-height: 70px; margin-top: 6px; padding: 9px 8px; overflow: hidden; border: 1px solid #e7ebe7; border-radius: 9px; background: #fafbfa !important; overflow-wrap: anywhere; }
  .logistics-trip-table tbody tr[class*="trip-state-"] .trip-tonnage-cell, .logistics-trip-table tbody tr[class*="trip-state-"] .trip-distance-cell, .logistics-trip-table tbody tr[class*="trip-state-"] .trip-expense-cell { background: rgba(255,255,255,.48) !important; }
  .logistics-trip-table .trip-tonnage-cell { grid-column: 1 / 3; grid-row: 5; }
  .logistics-trip-table .trip-distance-cell { grid-column: 3 / 5; grid-row: 5; }
  .logistics-trip-table .trip-expense-cell { grid-column: 5 / 7; grid-row: 5; }
  .logistics-trip-table .trip-tonnage-cell::before, .logistics-trip-table .trip-distance-cell::before, .logistics-trip-table .trip-expense-cell::before { font-size: .54rem; }
  .logistics-trip-table .trip-tonnage-cell b, .logistics-trip-table .trip-distance-cell b, .logistics-trip-table .trip-expense-cell b { font-size: .79rem; line-height: 1.22; }
  .logistics-trip-table .trip-tonnage-cell small, .logistics-trip-table .trip-distance-cell small, .logistics-trip-table .trip-expense-cell small, .logistics-trip-table .trip-tonnage-cell .muted, .logistics-trip-table .trip-distance-cell .muted, .logistics-trip-table .trip-expense-cell .muted { font-size: .65rem; line-height: 1.25; }
  .logistics-trip-table .trip-action-cell { grid-column: 1 / 7; grid-row: 6; margin-top: 11px; }
  .logistics-trip-table .trip-action-cell::before { display: none; }
  .logistics-trip-table .trip-action-buttons { min-width: 0; display: grid; grid-template-columns: 1fr; }
  .logistics-trip-table .trip-action-cell .trip-report-action { min-height: 48px; border-radius: 9px; font-size: .86rem; }
  .logistics-trip-list-driver .trip-route-cell { grid-column: 1 / 5; }
  .logistics-trip-list-driver .trip-status-cell { display: block; }
  .logistics-trip-list-driver .trip-driver-cell { display: block; grid-row: 3; }
  .logistics-trip-list-driver .trip-vehicle-cell { grid-row: 4; }
  .logistics-trip-list-driver .trip-tonnage-cell, .logistics-trip-list-driver .trip-distance-cell, .logistics-trip-list-driver .trip-expense-cell { display: none; }
  .logistics-trip-list-driver .trip-action-cell { grid-row: 5; }
  .logistics-trip-list-driver .trip-driver-alert { grid-column: 1 / 7; grid-row: 1; min-height: 0; display: grid; gap: 5px; margin: -2px -2px 12px; padding: 14px; border: 1px solid #dca7a7; border-radius: 11px; color: #762f2f; background: #f8dada !important; text-align: left !important; }
  .logistics-trip-list-driver .trip-driver-alert::before { display: none; }
  .logistics-trip-list-driver .trip-driver-alert strong { font-size: 1.18rem; line-height: 1.15; }
  .logistics-trip-list-driver .trip-driver-alert span { font-size: .82rem; font-weight: 750; line-height: 1.4; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-route-cell { grid-column: 1 / 5; grid-row: 2; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-status-cell { display: block; grid-row: 2; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-period-cell { grid-row: 3; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-driver-cell { grid-row: 4; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-vehicle-cell { grid-row: 5; }
  .logistics-trip-list-driver .trip-driver-overdue .trip-action-cell { grid-row: 6; }
  .logistics-dashboard-scroll { max-height: none; overflow: visible; }
  .logistics-compact-table { min-width: 0; }
  .logistics-attention-list { max-height: 380px; }
  .logistics-form-grid { grid-template-columns: 1fr; }
  .logistics-form-grid .span-2 { grid-column: 1; }
  .logistics-schedule-head { align-items: stretch; }
  .schedule-period-desktop, .schedule-desktop-view { display: none; }
  .schedule-period-mobile { display: block; font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .schedule-mobile-view { display: block; }
  .schedule-week-navigation { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-week-navigation [data-week-picker-open] { grid-column: 1 / -1; width: 100%; }
  .schedule-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .schedule-selection-bar { grid-template-columns: 1fr; gap: 8px; padding: 11px; }
  .schedule-selection-bar p { display: none; }
  .schedule-selection-bar .button-group { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-selection-bar .button { width: 100%; }
  .schedule-selection-bar [data-schedule-selection-clear] { grid-column: 1 / -1; }
  .schedule-toolbar .toolbar-search { width: 100%; }
  .schedule-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 8px 12px; }
  .schedule-table-wrap { max-height: none; padding: 8px; overflow: visible; }
  .schedule-week-section { overflow: hidden; border: 1px solid #e2e7e3; border-radius: 11px; }
  .schedule-week-section + .schedule-week-section { margin-top: 12px; border-top: 1px solid #e2e7e3; }
  .schedule-week-title { justify-content: space-between; }
  .schedule-week-title b { font-size: .78rem; }
  .schedule-week-title span { font-size: .82rem; font-weight: 700; white-space: nowrap; }
  .driver-schedule-table { min-width: 0; display: block; }
  .driver-schedule-table thead { display: none; }
  .driver-schedule-table tbody { display: grid; gap: 18px; }
  .driver-schedule-table tbody tr { position: relative; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 9px; border: 1px solid #e1e6e2; border-radius: 11px; background: #fff; }
  .driver-schedule-table tbody tr + tr::before { content: ""; position: absolute; top: -10px; right: 14px; left: 14px; height: 1px; background: #d8dfd9; }
  .driver-schedule-table td { width: auto; height: auto; min-height: 102px; display: block; padding: 7px; border: 1px solid #e8ece8; border-radius: 9px; background: #fbfcfb; }
  .driver-schedule-table tbody tr + tr > td { border-top: 1px solid #e8ece8; }
  .driver-schedule-table td.schedule-has-entry { padding: 0; }
  .driver-schedule-table td.schedule-mobile-full { grid-column: 1 / -1; }
  .driver-schedule-table .schedule-driver-cell { position: static; width: auto; min-height: 44px; display: flex; grid-column: 1 / -1; align-items: center; justify-content: flex-start; padding: 6px 3px 10px !important; border: 0; border-bottom: 1px solid #e7ebe7; border-radius: 0; background: #fff !important; text-align: left; }
  .schedule-driver-cell b, .schedule-driver-cell small { overflow: visible; text-overflow: clip; white-space: normal; }
  .schedule-driver-cell b { font-size: .88rem; }
  .schedule-cell-actions { align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .schedule-has-entry .schedule-cell-actions { min-height: 31px; margin: 0; padding: 5px 7px 0; }
  .schedule-has-entry .schedule-entry-list { min-height: 92px; }
  .schedule-has-entry .schedule-entry { padding: 9px; }
  .schedule-merge-start > .schedule-cell-actions, .schedule-merge-start > .schedule-entry-list { width: 100%; position: static; pointer-events: auto; }
  .schedule-merge-start .schedule-entry { pointer-events: auto; }
  .driver-schedule-table td.schedule-merge-continuation { display: none; }
  .schedule-mobile-date { display: block; color: #69726b; font-size: .72rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; white-space: nowrap; }
  .schedule-mobile-route { min-height: 132px !important; overflow: visible; border-color: rgba(70,91,77,.16) !important; }
  .schedule-mobile-route .schedule-cell-actions { position: relative; min-height: 52px; padding: 7px 36px 3px; }
  .schedule-mobile-route .schedule-cell-action-copy { width: 100%; min-width: 0; display: flex; align-items: center; flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 4px; }
  .schedule-mobile-route .schedule-mobile-date { max-width: 100%; overflow: visible; font-size: clamp(.66rem, 2.55vw, .78rem); font-variant-numeric: tabular-nums; text-overflow: clip; white-space: nowrap; }
  .schedule-mobile-route .schedule-cell-status { flex: 0 0 auto; overflow: visible; font-size: .61rem; text-overflow: clip; white-space: normal; }
  .schedule-mobile-route .schedule-add-button { position: absolute; top: 7px; right: 7px; }
  .schedule-mobile-route .schedule-entry-list { min-height: 96px; }
  .schedule-mobile-route .schedule-entry { min-height: 96px; grid-template-columns: minmax(0, 1fr) 26px; align-items: stretch; padding: 8px 10px 10px; }
  .schedule-mobile-route .schedule-entry-copy { align-items: center; justify-content: center; padding: 1px 4px; text-align: center; }
  .schedule-mobile-route .schedule-entry-title { width: auto; max-width: 100%; overflow: visible; font-size: 1.04rem; line-height: 1.18; text-align: center; text-overflow: initial; white-space: normal; }
  .schedule-mobile-route .schedule-entry-period { margin-top: 4px; font-size: .7rem; text-align: center; }
  .schedule-mobile-route .schedule-entry-carry { display: inline-flex; align-items: center; justify-content: center; margin-top: 7px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.58); font-size: .61rem; font-weight: 800; line-height: 1.15; }
  .schedule-mobile-route .schedule-entry-edit { width: 26px; height: 26px; justify-self: end; border-radius: 7px; background: rgba(255,255,255,.68); }
  .schedule-mobile-route.schedule-range-selected { outline: 2px solid #55745f; outline-offset: -2px; }
  .schedule-add-button { border-color: #dce4de; background: #f4f7f5; }
  .driver-schedule-table .schedule-week-boundary { border-left: 1px solid #e8ece8; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-actions { position: relative; min-height: 54px; align-items: flex-start; padding: 7px 34px 4px 8px; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-action-copy { width: 100%; display: grid; align-items: start; justify-items: start; gap: 5px; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-add-button { position: absolute; top: 7px; right: 7px; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-status { width: fit-content; max-width: 100%; overflow: visible; font-size: .56rem; text-overflow: clip; white-space: normal; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry-list { min-height: 108px; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry { min-height: 108px; align-items: stretch; padding: 8px; overflow: visible; }
  .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry-copy { min-width: 0; }
  .schedule-entry-title { overflow: visible; font-size: .88rem; line-height: 1.22; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .schedule-has-entry .schedule-entry-period { display: none; }
  .schedule-empty-mark { padding-top: 16px; }
  .schedule-form-grid { grid-template-columns: 1fr; }
  .schedule-form-grid label.span-2 { grid-column: 1; }
  .schedule-kind-picker > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-kind-picker button { width: 100%; }
  .assignment-report-page-head .button { width: 100%; }
  .assignment-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assignment-report-summary > div { min-height: 72px; padding: 11px 12px; border-bottom: 1px solid #e5e9e5; }
  .assignment-report-summary > div:nth-child(2n) { border-right: 0; }
  .assignment-report-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
  .assignment-report-main > .panel-head, .assignment-expenses-panel > .panel-head { align-items: stretch; }
  .assignment-expenses-panel > .panel-head { padding: 11px 13px 9px; }
  .assignment-report-form { gap: 12px; margin-top: 12px; padding-bottom: 76px; }
  .assignment-report-summary { border-radius: 12px; }
  .assignment-report-summary b { font-size: .84rem; }
  .assignment-report-fields, .assignment-report-fields.is-internal, .assignment-report-fields.is-intercity { grid-template-columns: 1fr; padding: 13px; }
  .assignment-report-fields .span-2 { grid-column: 1; }
  .assignment-report-fields input, .assignment-report-fields select, .assignment-report-fields textarea { min-height: 48px; font-size: 1rem; }
  .assignment-odometer-fields { grid-template-columns: 1fr; }
  .assignment-distance-preview { min-height: 54px; margin: 0; }
  .assignment-expense-list { padding: 10px 10px 8px; }
  .assignment-expense-add { padding: 0 10px 10px; }
  .assignment-expense-grid { grid-template-columns: 1fr; padding: 11px; }
  .assignment-expense-category, .assignment-expense-amount, .assignment-fuel-fields, .assignment-expense-note, .assignment-expense-receipt { grid-column: 1; }
  .assignment-fuel-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assignment-expense-grid input, .assignment-expense-grid select { min-height: 48px; font-size: .95rem; }
  .assignment-expense-receipt input[type="file"] { min-height: 52px; }
  .assignment-expense-head { min-height: 54px; }
  .assignment-expense-remove { min-height: 36px; padding: 8px 11px; }
  .assignment-report-footer { position: fixed; right: 10px; bottom: 8px; left: 10px; display: grid; grid-template-columns: 1fr; padding: 8px; }
  .assignment-report-footer > span { display: none; }
  .assignment-report-footer > div { display: grid; grid-template-columns: 1fr; }
  .assignment-report-footer .button { width: 100%; min-height: 49px; font-size: .87rem; }
  .assignment-report-footer .button.ghost { display: none; }
  .trip-review-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-review-facts > div, .trip-review-facts > div:nth-child(3n) { border-right: 1px solid #e8ebe8; border-bottom: 1px solid #e8ebe8; }
  .trip-review-facts > div:nth-child(2n) { border-right: 0; }
  .trip-review-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
  .trip-review-facts.is-internal > div:nth-last-child(2) { border-bottom: 1px solid #e8ebe8; }
  .trip-review-facts.is-internal > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .trip-review-expense-cards { grid-template-columns: 1fr; max-height: 520px; padding: 9px; }
  .trip-review-receipt-preview img, .trip-review-receipt-preview object { height: 230px; }

  /* Sorting remains available above employee cards without widening the page. */
  .employee-table thead { display: block; padding: 10px 10px 0; }
  .employee-table thead tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .employee-table thead th { width: auto !important; min-width: 0 !important; display: block; padding: 7px 5px; border: 1px solid #e3e7e3; border-radius: 7px; background: #f8faf8; text-align: center; white-space: normal; }
  .employee-table thead th::after { display: none; }
  .employee-table thead th.action-cell { display: none; }
  .employee-table th .table-sort, .employee-table th.number-cell .table-sort { position: static; width: 100%; justify-content: center; gap: 4px; font-size: .7rem; line-height: 1.2; }
  .employee-table th.number-cell .table-sort span { position: static; }

  /* The weekly sheet becomes employee cards with two compact day tiles per row. */
  .timesheet-panel { overflow: visible; }
  .timesheet-wrap { max-width: 100%; max-height: none; overflow: visible; }
  .timesheet-table { width: 100%; min-width: 0; display: block; }
  .timesheet-table thead { display: block; padding: 10px 10px 0; }
  .timesheet-table thead tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .timesheet-table thead th { position: static; width: auto; min-width: 0; padding: 4px; border: 1px solid #e2e7e2; border-radius: 8px; }
  .timesheet-table thead th:nth-child(-n+4) { display: none; }
  .timesheet-table thead th::after { display: none !important; }
  .day-bulk-button { min-height: 48px; padding: 4px 20px 4px 6px; }
  .timesheet-table tbody { width: 100%; display: grid; gap: 10px; padding: 10px; }
  .timesheet-table tbody tr { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: 10px; overflow: hidden; border: 1px solid #dfe5df; border-radius: 11px; background: #fff; }
  .timesheet-table tbody tr[hidden] { display: none !important; }
  .timesheet-table tbody td { position: static; width: auto !important; min-width: 0 !important; height: auto; padding: 0; background: transparent !important; }
  .timesheet-table tbody td::after { display: none !important; }
  .timesheet-table tbody td.number-col, .timesheet-table tbody td.warehouse-col, .timesheet-table tbody td.employee-col, .timesheet-table tbody td.position-col { position: static; left: auto; z-index: auto; min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; align-items: start; gap: 2px; padding: 7px 8px; overflow: hidden; border: 1px solid #e8ece8; border-radius: 8px; background: #f8faf8 !important; text-align: left; text-overflow: initial; white-space: normal; }
  .timesheet-table tbody td.number-col::before, .timesheet-table tbody td.warehouse-col::before, .timesheet-table tbody td.position-col::before { content: attr(data-mobile-label); color: #89908a; font-size: .57rem; font-weight: 750; line-height: 1.1; text-transform: uppercase; }
  .timesheet-table tbody td.employee-col { grid-column: 1 / -1; grid-row: 1; min-height: 0; padding: 1px 3px 9px; overflow: visible; border: 0; border-bottom: 1px solid #e7ebe7; border-radius: 0; background: transparent !important; }
  .timesheet-table tbody td.employee-col::before { display: none; }
  .timesheet-table tbody td.employee-col b { overflow-wrap: anywhere; font-size: 1rem; line-height: 1.25; }
  .timesheet-table tbody td.number-col { grid-column: 1 / 3; grid-row: 2; color: #4f5d54; font-size: .78rem; font-weight: 750; }
  .timesheet-table tbody td.warehouse-col { grid-column: 3 / 6; grid-row: 2; color: #4f5d54; font-size: .78rem; font-weight: 750; }
  .timesheet-table tbody td.position-col { grid-column: 6 / 13; grid-row: 2; color: #4f5d54; font-size: .76rem; font-weight: 650; }
  .timesheet-table tbody td:nth-child(n+5) { grid-column: span 6; display: grid; align-content: start; gap: 5px; padding: 6px; border: 1px solid #e8ece8; border-radius: 8px; background: #fbfcfb !important; }
  .timesheet-table tbody td:nth-child(n+5)::before { content: attr(data-mobile-label); min-height: 26px; display: flex; align-items: center; justify-content: center; color: #707871; font-size: .59rem; font-weight: 700; line-height: 1.15; text-align: center; }
  .timesheet-table tbody td[colspan] { grid-column: 1 / -1; display: block; padding: 0; border: 0; }
  .timesheet-table tbody td[colspan]::before { display: none; }
  .shift-cell { height: auto; min-height: 51px; padding: 5px 4px; }
  .shift-mark { font-size: .74rem; }
  .shift-details, .shift-details small, .shift-meta { font-size: .53rem; line-height: 1.15; }

  /* Dialogs and their actions stay inside the viewport. */
  .dialog, .bulk-dialog, .week-picker-dialog, .admin-dialog, .bonus-dialog, .payout-review-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); margin: auto; overflow-x: hidden; overflow-y: auto; border-radius: 12px; }
  .dialog-form { width: 100%; padding: 17px; }
  .dialog-head { gap: 10px; margin-bottom: 16px; }
  .dialog-head > div { min-width: 0; }
  .dialog-head h2 { font-size: 1.12rem; }
  .dialog-head p { overflow-wrap: anywhere; font-size: .8rem; }
  .dialog-close { flex: 0 0 32px; }
  .dialog-form > .form-actions, .bonus-form-actions { width: 100%; display: grid; grid-template-columns: 1fr; gap: 7px; }
  .dialog-form > .form-actions .button { width: 100%; margin-left: 0; }
  .bulk-employee-toolbar > div { width: 100%; justify-content: space-between; }
  .bulk-employee { grid-template-columns: 18px minmax(0, 1fr); }
  .bulk-employee em { grid-column: 2; white-space: normal; }
  .bulk-footer .form-actions { width: 100%; }
  .week-year { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .week-picker-months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-month { flex: 1 1 calc(33.333% - 6px); justify-content: center; min-width: 0; }
  .week-picker-list { max-height: min(320px, calc(100dvh - 370px)); padding-right: 0; }
  .week-option { min-width: 0; }
  .week-option b, .week-option small { white-space: normal; }
  .payout-confirmation { grid-template-columns: minmax(0, 1fr) auto; }
  .payout-review-list { max-height: min(280px, calc(100dvh - 350px)); }

  /* Period selectors and fixed-height admin/history areas only scroll vertically. */
  .payroll-period-picker { padding: 12px; }
  .payroll-period-row { grid-template-columns: 1fr; gap: 6px; }
  .payroll-period-row .link-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payroll-period-row .link-segmented a { min-width: 0; text-align: center; }
  .cash-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-scroll-region, .rate-history-scroll, .analytics-history-scroll { max-width: 100%; overflow-x: hidden; overflow-y: auto; }
  .admin-users-scroll, .admin-directory-scroll { height: auto; max-height: 520px; }
  .analytics-history-tabs { padding: 10px; }
  .analytics-history-tab { white-space: normal; text-align: center; }
  .section-panel > .panel-head { align-items: flex-start; flex-direction: column; min-height: 0; padding: 13px 14px; }
  .section-panel > .summary-list, .section-panel > .trend-chart, .section-panel > .rank-list { padding-right: 12px; padding-left: 12px; }
  .no-access-panel { margin-top: 35px; padding: 24px 18px; }
  .login-page { padding: 10px; }
  .login-card > .message { margin-right: 16px; margin-left: 16px; }

  /* Employees: one compact editable card instead of a stack of table fields. */
  .employee-toolbar .toolbar-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .employee-table thead { display: none; }
  .employee-table tbody { gap: 8px; padding: 8px; }
  .employee-table tbody tr { position: relative; grid-template-columns: 34px repeat(2, minmax(0, 1fr)) 34px; gap: 7px; padding: 10px; }
  .employee-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .employee-table tbody td::before { display: none; }
  .employee-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; }
  .employee-table tbody .number-cell { position: static; width: 34px !important; min-width: 34px !important; height: 34px; display: flex; grid-column: 1; grid-row: 1; align-items: center; justify-content: center; border-radius: 8px; color: #536159; background: #edf2ee !important; font-size: .72rem; font-weight: 750; line-height: 1; }
  .employee-table tbody .number-cell span { position: static; display: block; width: 100%; grid-column: auto; color: inherit; line-height: 34px; text-align: center; }
  .employee-table .employee-name-cell { grid-column: 2 / 5; grid-row: 1; min-height: 39px; padding: 3px 0 9px; border-bottom: 1px solid #edf0ed; }
  .employee-table .employee-name-cell a { display: block; font-size: .94rem; line-height: 1.25; }
  .employee-table .employee-name-cell small { margin-top: 2px; text-align: left; }
  .employee-table .employee-warehouse-cell, .employee-table .employee-rate-cell { grid-column: 1 / 3; }
  .employee-table .employee-position-cell, .employee-table .employee-status-cell { grid-column: 3 / 5; }
  .employee-table .employee-warehouse-cell, .employee-table .employee-position-cell, .employee-table .employee-rate-cell, .employee-table .employee-status-cell { min-width: 0; padding: 7px 8px; border: 1px solid #e8ece8; border-radius: 8px; background: #fafbfa !important; }
  .employee-table .employee-warehouse-cell::before, .employee-table .employee-position-cell::before, .employee-table .employee-rate-cell::before, .employee-table .employee-status-cell::before { display: block; margin-bottom: 3px; color: #89908a; font-size: .59rem; font-weight: 750; line-height: 1.1; text-transform: uppercase; }
  .employee-table .employee-warehouse-cell::before { content: "Склад"; }
  .employee-table .employee-position-cell::before { content: "Должность"; }
  .employee-table .employee-rate-cell::before { content: "Ставка"; }
  .employee-table .employee-status-cell::before { content: "Статус"; }
  .employee-table tbody tr:not(:has(.employee-rate-cell)) .employee-status-cell { grid-column: 1 / 5; }
  .employee-table .quick-rate-button, .employee-table .quick-position-button, .employee-table .quick-warehouse-button, .employee-table .quick-status-button { width: 100%; min-height: 27px; display: flex; align-items: center; justify-content: flex-start; padding: 0; border: 0; border-radius: 0; text-align: left; }
  .employee-table .quick-rate-button b, .employee-table .quick-position-button b, .employee-table .quick-warehouse-button b, .employee-table .quick-status-button b { justify-self: auto; overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
  .employee-table .quick-rate-button small, .employee-table .quick-position-button small, .employee-table .quick-warehouse-button small, .employee-table .quick-status-button small { display: none; }
  .employee-table .quick-status-button b { padding: 3px 7px; }
  .employee-table .action-cell { grid-column: 1 / 5; }
  .employee-table .action-cell .row-action { min-height: 34px; }

  /* Payroll month list: selectors and four short week cards. */
  .mobile-payroll-period-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-payroll-period-form label { min-width: 0; display: grid; gap: 4px; }
  .mobile-payroll-period-form label span { color: var(--muted); font-size: .68rem; font-weight: 700; }
  .payroll-period-picker > .payroll-period-row { display: none; }
  .payroll-list-table tbody { gap: 8px; padding: 8px; }
  .payroll-list-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 11px; }
  .payroll-list-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .payroll-list-table tbody td::before { position: static; display: block; margin-bottom: 2px; color: #89908a; font-size: .6rem; font-weight: 700; line-height: 1.15; }
  .payroll-list-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; }
  .payroll-list-table .payroll-period-cell { align-self: center; font-size: .92rem; font-variant-numeric: tabular-nums; }
  .payroll-list-table .payroll-period-cell::before, .payroll-list-table .payroll-status-cell::before, .payroll-list-table .action-cell::before { display: none; }
  .payroll-list-table .payroll-status-cell { width: 100%; justify-self: stretch; text-align: left !important; }
  .payroll-list-table .payroll-status-cell .status-badge { width: 100%; min-height: 30px; justify-content: center; border-radius: 8px; }
  .payroll-list-table .payroll-date-cell::before { content: "Выплата"; }
  .payroll-list-table .payroll-employee-count-cell::before { content: "Сотрудников"; }
  .payroll-list-table .payroll-due-cell, .payroll-list-table .paid-total-column { padding: 8px 9px; border-radius: 8px; background: #f6f8f6 !important; }
  .payroll-list-table .payroll-due-cell::before { content: "К выдаче"; }
  .payroll-list-table .paid-total-column::before { content: "Выдано"; }
  .payroll-list-table .payroll-due-cell { font-size: .92rem; font-weight: 800; }
  .payroll-list-table .payroll-paid-summary { justify-items: start; text-align: left; }
  .payroll-list-table .payroll-paid-summary small { text-align: left; white-space: normal; }
  .payroll-list-table .action-cell { grid-column: 1 / -1; }
  .payroll-list-table .action-cell .row-action { min-height: 35px; }

  /* Payroll detail: essential figures are grouped, not stretched into nine rows. */
  .payroll-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payroll-metrics .metric { min-height: 88px; padding: 10px; }
  .payroll-metrics .metric span { font-size: .68rem; }
  .payroll-metrics .metric strong { font-size: clamp(.92rem, 4vw, 1.18rem); overflow-wrap: anywhere; }
  .payroll-metrics .metric > small { font-size: .61rem; }
  .payroll-metrics .cash-metric { min-height: 0; padding: 12px; }
  .payroll-metrics .cash-summary { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .payroll-table tbody { gap: 8px; padding: 8px; }
  .payroll-table tbody tr { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px 6px; padding: 11px; }
  .payroll-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .payroll-table tbody td::before { position: static; display: block; margin-bottom: 2px; color: #89908a; font-size: .59rem; font-weight: 750; line-height: 1.15; text-transform: uppercase; }
  .payroll-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; }
  .payroll-table tbody td:nth-child(1) { grid-column: 1 / 13; grid-row: 1; align-self: end; padding: 2px 3px 8px; border-bottom: 1px solid #edf0ed; font-size: .94rem; line-height: 1.25; }
  .payroll-table tbody td:nth-child(1)::before { display: none; }
  .payroll-table tbody td:nth-child(1) b { overflow-wrap: anywhere; }
  .payroll-table tbody td:nth-child(2), .payroll-table tbody td:nth-child(3) { grid-row: 2; align-self: stretch; padding: 7px 8px; border: 1px solid #e9ece9; border-radius: 8px; color: #5f6861; background: #fafbfa !important; font-size: .69rem; line-height: 1.25; }
  .payroll-table tbody td:nth-child(2) { grid-column: 1 / 7; }
  .payroll-table tbody td:nth-child(3) { grid-column: 7 / 13; }
  .payroll-table tbody td:nth-child(2)::before { content: "Склад"; }
  .payroll-table tbody td:nth-child(3)::before { content: "Должность"; }
  .payroll-table tbody td:nth-child(4), .payroll-table tbody td:nth-child(5), .payroll-table tbody td:nth-child(6), .payroll-table tbody td:nth-child(7), .payroll-table tbody td:nth-child(8), .payroll-table tbody td:nth-child(9) { padding: 7px 8px; border: 1px solid #e9ece9; border-radius: 8px; background: #fafbfa !important; }
  .payroll-table tbody td:nth-child(4), .payroll-table tbody td:nth-child(5), .payroll-table tbody td:nth-child(6) { grid-row: 3; grid-column: span 4; }
  .payroll-table tbody td:nth-child(7), .payroll-table tbody td:nth-child(8), .payroll-table tbody td:nth-child(9) { grid-row: 4; grid-column: span 4; }
  .payroll-table tbody td:nth-child(4)::before { content: "Смены"; }
  .payroll-table tbody td:nth-child(5)::before { content: "Опоздания"; }
  .payroll-table tbody td:nth-child(6)::before { content: "Косяки"; }
  .payroll-table tbody td:nth-child(7)::before { content: "Основная"; }
  .payroll-table tbody td:nth-child(8)::before { content: "Премия"; }
  .payroll-table tbody td:nth-child(9)::before { content: "Штрафы"; }
  .payroll-table tbody td:nth-child(10) { width: 100% !important; min-height: 36px; grid-column: 1 / 13; grid-row: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid #eadbd1; border-radius: 9px; background: #fffaf7 !important; }
  .payroll-table tbody td:nth-child(10)::before { content: "Долги"; margin: 0; color: #896f60; font-size: .62rem; white-space: nowrap; }
  .payroll-table tbody td:nth-child(10) > * { justify-self: end; white-space: nowrap; }
  .payroll-table tbody td:nth-child(11) { width: 100% !important; height: auto; min-height: 42px; grid-column: 1 / 13; grid-row: 6; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; align-content: center; gap: 10px; padding: 9px 11px; border: 1px solid #bcd4c2; border-radius: 9px; color: #294b36; background: #eef6f0 !important; text-align: left !important; }
  .payroll-table tbody td:nth-child(11)::before { content: "К выдаче"; grid-column: 1; grid-row: 1; align-self: center; margin: 0; color: #617a68; font-size: .62rem; text-align: left; white-space: nowrap; }
  .payroll-table tbody td:nth-child(11) > b { grid-column: 2; grid-row: 1; align-self: center; color: #244c31; font-size: 1.02rem; line-height: 1; text-align: right; white-space: nowrap; }
  .payroll-table tbody td:nth-child(11) .early-payment-deduction { grid-column: 1 / -1; grid-row: 2; margin: 0; text-align: left; }
  .payroll-table tbody td:nth-child(12) { grid-column: 1 / 13; grid-row: 7; padding-top: 8px; border-top: 1px solid #edf0ed; }
  .payroll-table tbody td:nth-child(12)::before { display: none; }
  .payroll-table .record-tooltip-trigger { justify-items: start; padding: 0; text-align: left; }
  .payroll-table .row-bonus-button { min-height: 36px; justify-items: start; text-align: left; }
  .payroll-table .issue-cell-controls { max-width: none; grid-template-columns: 30px minmax(0, 1fr); }
  .payroll-table .issue-action { text-align: left; }
  .payroll-table .issue-state { justify-items: start; }
  .payroll-table .individual-payment-note { width: 100%; max-width: none; margin-top: 7px; }

  /* Analytics history: purpose-built compact cards for each data set. */
  .analytics-history-panel .data-table tbody { gap: 8px; padding: 8px; }
  .analytics-history-panel .data-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; padding: 10px; }
  .analytics-history-panel .data-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .analytics-history-panel .data-table tbody td::before { position: static; display: block; margin-bottom: 2px; color: #8a918b; font-size: .58rem; font-weight: 750; line-height: 1.15; text-transform: uppercase; }
  .analytics-history-panel .data-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; }
  .analytics-history-panel .data-table tbody td small { text-align: left; }
  .analytics-history-panel .data-table tbody td[colspan] { grid-column: 1 / -1; }
  .rate-history-table tbody td:nth-child(1)::before, .rate-history-table tbody td:nth-child(3)::before { display: none; }
  .rate-history-table tbody td:nth-child(1) { grid-column: 1; color: var(--muted); font-size: .73rem; }
  .rate-history-table tbody td:nth-child(1) b { color: var(--text); }
  .rate-history-table tbody td:nth-child(2) { grid-column: 2; justify-self: end; padding: 3px 7px; border-radius: 7px; color: #59645d; background: #f0f3f0 !important; font-size: .7rem; line-height: 1.2; text-align: right !important; white-space: nowrap; }
  .rate-history-table tbody td:nth-child(2)::before { content: "№"; display: inline; margin: 0 3px 0 0; color: #879088; font-size: .62rem; }
  .rate-history-table tbody td:nth-child(3) { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid #edf0ed; }
  .rate-history-table tbody td:nth-child(4), .rate-history-table tbody td:nth-child(5) { padding: 7px 8px; border: 1px solid #e7ebe7; border-radius: 8px; background: #fafbfa !important; }
  .rate-history-table tbody td:nth-child(4)::before { content: "Было"; }
  .rate-history-table tbody td:nth-child(5)::before { content: "Стало"; }
  .rate-history-table tbody td:nth-child(6)::before { content: "Способ"; }
  .rate-history-table tbody td:nth-child(7)::before { content: "Изменил"; }
  .lateness-history-table tbody td:nth-child(1)::before, .lateness-history-table tbody td:nth-child(3)::before { display: none; }
  .lateness-history-table tbody td:nth-child(1) { grid-column: 1; color: var(--muted); font-size: .73rem; }
  .lateness-history-table tbody td:nth-child(2) { grid-column: 2; justify-self: end; padding: 3px 7px; border-radius: 7px; color: #59645d; background: #f0f3f0 !important; font-size: .7rem; line-height: 1.2; text-align: right !important; white-space: nowrap; }
  .lateness-history-table tbody td:nth-child(2)::before { content: "№"; display: inline; margin: 0 3px 0 0; color: #879088; font-size: .62rem; }
  .lateness-history-table tbody td:nth-child(3) { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid #edf0ed; font-size: .88rem; }
  .lateness-history-table tbody td:nth-child(4), .lateness-history-table tbody td:nth-child(5) { color: #5f6861; }
  .lateness-history-table tbody td:nth-child(4)::before { content: "Склад"; }
  .lateness-history-table tbody td:nth-child(5)::before { content: "Должность"; }
  .lateness-history-table tbody td:nth-child(6) { grid-column: 1 / -1; padding: 8px 9px; border-radius: 8px; color: #7a5526; background: #f7f2e8 !important; font-size: .88rem; }
  .lateness-history-table tbody td:nth-child(6)::before { content: "Опоздание"; color: #977949; }
  .incident-analytics-table tbody td:nth-child(1)::before, .incident-analytics-table tbody td:nth-child(3)::before { display: none; }
  .incident-analytics-table tbody td:nth-child(1) { grid-column: 1; color: var(--muted); font-size: .73rem; }
  .incident-analytics-table tbody td:nth-child(2) { grid-column: 2; justify-self: end; padding: 3px 7px; border-radius: 7px; color: #59645d; background: #f0f3f0 !important; font-size: .7rem; line-height: 1.2; text-align: right !important; white-space: nowrap; }
  .incident-analytics-table tbody td:nth-child(2)::before { content: "№"; display: inline; margin: 0 3px 0 0; color: #879088; font-size: .62rem; }
  .incident-analytics-table tbody td:nth-child(3) { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid #edf0ed; }
  .incident-analytics-table tbody td:nth-child(4)::before { content: "Склад"; }
  .incident-analytics-table tbody td:nth-child(5)::before { content: "Категория"; }
  .incident-analytics-table tbody td:nth-child(6), .incident-analytics-table tbody td:nth-child(7) { grid-column: 1 / -1; padding: 7px 8px; border-radius: 8px; background: #fafbfa !important; overflow-wrap: anywhere; }
  .incident-analytics-table tbody td:nth-child(6)::before { content: "Описание"; }
  .incident-analytics-table tbody td:nth-child(7)::before { content: "Решение"; }
  .incident-analytics-table tbody td:nth-child(8) { grid-column: 1 / -1; }
  .incident-analytics-table tbody td:nth-child(8)::before { content: "Статус"; }

  /* Administration: readable user and directory cards without horizontal tables. */
  .admin-user-table tbody, .position-directory-table tbody, .warehouse-directory-table tbody { gap: 8px; padding: 8px; }
  .admin-user-table tbody tr, .position-directory-table tbody tr, .warehouse-directory-table tbody tr { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; padding: 10px; }
  .admin-user-table tbody td, .position-directory-table tbody td, .warehouse-directory-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .admin-user-table tbody td::before, .position-directory-table tbody td::before, .warehouse-directory-table tbody td::before { position: static; display: block; margin-bottom: 2px; color: #8a918b; font-size: .58rem; font-weight: 750; line-height: 1.15; text-transform: uppercase; }
  .admin-user-table tbody td > *, .position-directory-table tbody td > *, .warehouse-directory-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; }
  .admin-user-table tbody td:nth-child(1)::before, .admin-user-table tbody td:nth-child(2)::before { display: none; }
  .admin-user-table tbody td:nth-child(1) { grid-column: 1 / -1; padding-right: 92px; }
  .admin-user-table tbody td:nth-child(1) b, .admin-user-table tbody td:nth-child(1) small { display: block; text-align: left !important; }
  .admin-user-table tbody td:nth-child(2) { position: absolute; top: 10px; right: 10px; justify-self: auto; text-align: right !important; }
  .admin-user-table tbody td:nth-child(3) { grid-column: 1 / -1; padding: 7px 8px; border-radius: 8px; background: #f7f9f7 !important; }
  .admin-user-table tbody td:nth-child(3)::before { content: "Доступ"; }
  .admin-user-table .access-badges { justify-content: flex-start; }
  .admin-user-table tbody td:nth-child(4) { grid-column: 1 / -1; color: #5f6861; font-size: .72rem; }
  .admin-user-table tbody td:nth-child(4)::before { content: "Последний вход"; }
  .admin-user-table tbody td:nth-child(5) { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid #edf0ed; }
  .admin-user-table tbody td:nth-child(5)::before { display: none; }
  .admin-user-table .row-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .admin-user-table .row-action-group .row-action { width: 100%; }
  .admin-user-table .row-action-group .row-action:only-child { grid-column: 1 / -1; }
  .admin-user-table .protected-account-note { margin-top: 5px; text-align: left; }
  .position-directory-table tbody td:nth-child(1), .warehouse-directory-table tbody td:nth-child(1) { grid-column: 1; align-self: center; font-size: .86rem; }
  .position-directory-table tbody td:nth-child(1)::before, .warehouse-directory-table tbody td:nth-child(1)::before, .position-directory-table tbody td:nth-child(3)::before, .warehouse-directory-table tbody td:nth-child(3)::before { display: none; }
  .position-directory-table tbody td:nth-child(2), .warehouse-directory-table tbody td:nth-child(2) { grid-column: 1; color: var(--muted); font-size: .72rem; }
  .position-directory-table tbody td:nth-child(2)::before, .warehouse-directory-table tbody td:nth-child(2)::before { content: "Сотрудников"; display: inline; margin-right: 5px; }
  .position-directory-table tbody td:nth-child(3), .warehouse-directory-table tbody td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; text-align: right !important; }
  .position-directory-table tbody td:nth-child(4), .warehouse-directory-table tbody td:nth-child(4) { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid #edf0ed; }
  .position-directory-table tbody td:nth-child(4)::before, .warehouse-directory-table tbody td:nth-child(4)::before { display: none; }
  .position-directory-table .row-action-group, .warehouse-directory-table .row-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .position-directory-table .row-action-group .row-action, .warehouse-directory-table .row-action-group .row-action { width: 100%; }

  /* Seven days: the final day fills the row instead of leaving a blank tile. */
  .timesheet-table thead th:last-child, .timesheet-table tbody td:last-child { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  .cabinet-switch-button { gap: 5px; padding: 7px 9px; }
  .cabinet-switch-long { display: none; }
  .cabinet-switch-short { display: inline; }
  .metrics-grid { grid-template-columns: 1fr; }
  .logistics-salary-metrics { grid-template-columns: 1fr; }
  .issue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .record-form-footer { align-items: stretch; flex-direction: column; }
  .record-form-footer .button { width: 100%; }
  .payout-selection-actions { grid-template-columns: 1fr; }
  .payout-selection-actions .button { grid-column: 1; }
  .logistics-trip-list .logistics-list-toolbar .toolbar-controls { grid-template-columns: 1fr; }
  .logistics-trip-table tbody tr { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 12px; }
  .logistics-trip-table .trip-route-cell { padding-right: 4px; }
  .logistics-trip-table .trip-status-cell .log-status { padding: 4px 7px; font-size: .66rem; }
  .assignment-report-summary { grid-template-columns: 1fr; }
  .assignment-report-summary > div { min-height: 62px; border-right: 0; border-bottom: 1px solid #e5e9e5 !important; }
  .assignment-report-summary > div:last-child { border-bottom: 0 !important; }
  .assignment-fuel-fields { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* Logistics directories: compact purpose-built cards, never desktop tables squeezed into a phone. */
  .logistics-card-table tbody { gap: 10px; padding: 8px; }
  .logistics-card-table tbody tr { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; overflow: hidden; border-color: #dfe5e0; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(28,39,31,.04); }
  .logistics-card-table tbody td { width: auto !important; min-width: 0 !important; min-height: 0; display: block; padding: 0; border: 0; background: transparent !important; color: #2c342e; font-size: .78rem; line-height: 1.3; text-align: left !important; overflow-wrap: anywhere; }
  .logistics-card-table tbody td::before { position: static; display: block; margin: 0 0 3px; color: #89908a; font-size: .57rem; font-weight: 780; line-height: 1.15; letter-spacing: .025em; text-align: left; text-transform: uppercase; }
  .logistics-card-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; text-align: left; }
  .logistics-card-table tbody td small { margin-top: 2px; font-size: .63rem; line-height: 1.28; text-align: left; }
  .logistics-card-table tbody td[colspan] { grid-column: 1 / -1; }
  .logistics-card-table .log-card-title { grid-column: 1; grid-row: 1; align-self: center; padding: 1px 3px 9px 1px; border-bottom: 1px solid #e9ede9; }
  .logistics-card-table .log-card-title::before, .logistics-card-table .log-card-status::before, .logistics-card-table .log-card-action::before { display: none; }
  .logistics-card-table .log-card-title > b, .logistics-card-table .log-card-title > a > b { display: block; font-size: .96rem; line-height: 1.22; }
  .logistics-card-table .log-card-status { grid-column: 2; grid-row: 1; align-self: center; justify-self: stretch; padding: 1px 1px 9px 3px; border-bottom: 1px solid #e9ede9; text-align: right !important; }
  .logistics-card-table .log-card-status > * { margin-left: auto; }
  .logistics-card-table .log-status { max-width: 100%; justify-content: center; padding: 5px 8px; font-size: .65rem; white-space: normal; text-align: center; }
  .logistics-card-table .log-card-tile { min-height: 57px; padding: 8px 9px; border: 1px solid #e7ebe7; border-radius: 9px; background: #fafbfa !important; }
  .logistics-card-table .log-card-tile > b { display: block; font-size: .82rem; }
  .logistics-card-table .log-card-action { grid-column: 1 / -1; padding-top: 2px; }
  .logistics-card-table .log-card-action:empty { display: none; }
  .logistics-card-table .log-card-action .row-action { width: 100%; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .75rem; }

  /* Drivers. */
  .logistics-driver-table .driver-card-rate { grid-column: 1; grid-row: 2; }
  .logistics-driver-table .driver-card-phone { grid-column: 2; grid-row: 2; }
  .logistics-driver-table .driver-card-license { grid-column: 1 / -1; grid-row: 3; padding: 7px 2px 3px; }
  .logistics-driver-table .log-card-action { grid-row: 4; }
  .logistics-driver-table .driver-rate-trigger { width: 100%; justify-items: start; padding: 0; text-align: left; }
  .logistics-driver-table .driver-rate-trigger b, .logistics-driver-table .driver-rate-trigger small { text-align: left; }

  /* Vehicles. */
  .logistics-vehicle-table .vehicle-card-fuel { grid-column: 1; grid-row: 2; }
  .logistics-vehicle-table .vehicle-card-odometer { grid-column: 2; grid-row: 2; }
  .logistics-vehicle-table .vehicle-card-capacity { grid-column: 1; grid-row: 3; }
  .logistics-vehicle-table .vehicle-card-driver { grid-column: 2; grid-row: 3; }
  .logistics-vehicle-table .vehicle-card-trips { grid-column: 1 / -1; grid-row: 4; display: flex; align-items: baseline; gap: 8px; padding: 3px 2px; }
  .logistics-vehicle-table .log-card-action { grid-row: 5; }
  .logistics-vehicle-table .vehicle-card-trips::before { content: "Поездок"; display: inline; margin: 0; }

  /* Routes. */
  .logistics-route-table .route-card-direction { grid-column: 1 / -1; grid-row: 2; padding: 7px 2px 3px; }
  .logistics-route-table .route-card-kind { grid-column: 1; grid-row: 3; }
  .logistics-route-table .route-card-distance { grid-column: 2; grid-row: 3; }
  .logistics-route-table .route-card-payment { grid-column: 1 / -1; grid-row: 4; min-height: 0; }
  .logistics-route-table .route-card-trips { grid-column: 1 / -1; grid-row: 5; display: flex; align-items: baseline; gap: 8px; padding: 3px 2px; }
  .logistics-route-table .log-card-action { grid-row: 6; }
  .logistics-route-table .route-card-trips::before { content: "Поездок"; display: inline; margin: 0; }

  /* Expenses. */
  .logistics-expense-table .expense-card-category { grid-column: 1; grid-row: 1; align-self: center; }
  .logistics-expense-table .expense-card-category::before, .logistics-expense-table .expense-card-amount::before { display: none; }
  .logistics-expense-table .expense-card-amount { grid-column: 2; grid-row: 1; align-self: center; color: #243d2c; font-size: 1rem; text-align: right !important; white-space: nowrap; }
  .logistics-expense-table .expense-card-amount b { text-align: right; }
  .logistics-expense-table .expense-card-date { grid-column: 1 / -1; grid-row: 2; padding: 7px 2px; border-top: 1px solid #e9ede9; }
  .logistics-expense-table .expense-card-date::before { content: "Дата расхода"; display: inline; margin-right: 7px; }
  .logistics-expense-table .expense-card-trip { grid-column: 1 / -1; grid-row: 3; padding: 8px 9px; border: 1px solid #e3e9e4; border-radius: 9px; background: #f6f9f6 !important; }
  .logistics-expense-table .expense-card-driver { grid-column: 1; grid-row: 4; }
  .logistics-expense-table .expense-card-vehicle { grid-column: 2; grid-row: 4; }
  .logistics-expense-table .expense-card-fuel, .logistics-expense-table .expense-card-note { grid-column: 1 / -1; padding: 7px 2px; }
  .logistics-expense-table .expense-card-fuel { grid-row: 5; }
  .logistics-expense-table .expense-card-note { grid-row: 6; }
  .logistics-expense-table .expense-card-fuel { border-bottom: 1px solid #edf0ed; }
  .logistics-expense-table .expense-card-receipt { grid-column: 1; grid-row: 7; align-self: stretch; padding: 8px 9px; border: 1px solid #e7ebe7; border-radius: 8px; background: #fafbfa !important; }
  .logistics-expense-table .log-card-action { grid-column: 2; grid-row: 7; align-self: end; padding: 0; }
  .logistics-expense-table .expense-card-receipt .text-link { font-weight: 750; }

  /* Salary: route and state form the heading, money action owns the full width. */
  .logistics-salary-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-salary-table .salary-card-route { grid-column: 1; grid-row: 1; }
  .logistics-salary-table .salary-card-status { grid-column: 2; grid-row: 1; }
  .logistics-salary-table .salary-card-period, .logistics-salary-table .salary-card-driver { min-height: 57px; padding: 8px 9px; border: 1px solid #e7ebe7; border-radius: 9px; background: #fafbfa !important; }
  .logistics-salary-table .salary-card-period { grid-column: 1; grid-row: 2; }
  .logistics-salary-table .salary-card-driver { grid-column: 2; grid-row: 2; }
  .logistics-salary-table .salary-calculation-cell { grid-column: 1 / -1; grid-row: 3; padding: 0 !important; }
  .logistics-salary-table .salary-offer { width: 100%; min-width: 0; min-height: 66px; max-width: none; grid-column: auto; justify-self: stretch; padding: 10px; border-radius: 10px; text-align: left; }
  .logistics-salary-table .salary-offer-copy, .logistics-salary-table .salary-offer-copy small { justify-self: stretch; text-align: left; }
  .logistics-salary-table .salary-offer-copy strong { font-size: 1.04rem; }
  .logistics-salary-table .salary-offer-action { font-size: .68rem; }
  .logistics-salary-table .salary-accrued-cell { width: 100% !important; height: auto; min-height: 38px; grid-column: 1 / -1; grid-row: 4; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #e6ebe7; border-radius: 8px; background: #f7f9f7 !important; }
  .logistics-salary-table .salary-accrued-cell::before { content: "Начислено"; grid-column: 1; grid-row: 1; align-self: center; margin: 0; font-size: .57rem; white-space: nowrap; }
  .logistics-salary-table .salary-accrued-cell > b { grid-column: 3; grid-row: 1; align-self: center; font-size: .88rem; line-height: 1; text-align: right; }
  .logistics-salary-table .salary-accrued-cell > small { grid-column: 2; grid-row: 1; align-self: center; margin: 0; color: #7c857e !important; font-size: .61rem; line-height: 1.15; text-align: left; }

  /* Analytics recent trips. */
  .logistics-dashboard-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-dashboard-table .dashboard-card-route { grid-column: 1; grid-row: 1; }
  .logistics-dashboard-table .log-card-status { grid-column: 2; grid-row: 1; }
  .logistics-dashboard-table .dashboard-card-period, .logistics-dashboard-table .dashboard-card-driver { min-height: 52px; padding: 8px 9px; border: 1px solid #e7ebe7; border-radius: 9px; background: #fafbfa !important; }
  .logistics-dashboard-table .dashboard-card-period { grid-column: 1; grid-row: 2; }
  .logistics-dashboard-table .dashboard-card-driver { grid-column: 2; grid-row: 2; }
  .logistics-dashboard-table .dashboard-card-period b { font-size: .72rem; white-space: nowrap; }
  .logistics-dashboard-columns { gap: 12px; }
  .logistics-attention-list > a { min-height: 58px; gap: 8px; }
  .logistics-attention-list > a > span:first-child { max-width: calc(100% - 102px); }

  /* Compact controls and metrics on phones. Trips and the driver schedule keep their existing layouts. */
  .table-panel:not(.logistics-trip-list) .logistics-list-toolbar .toolbar-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
  .table-panel:not(.logistics-trip-list) .logistics-list-toolbar .toolbar-controls > .button { width: auto; min-height: 42px; }
  .table-panel:not(.logistics-trip-list) .logistics-list-toolbar .logistics-salary-controls { grid-template-columns: 1fr; }
  .table-panel:not(.logistics-trip-list) .logistics-list-toolbar .logistics-salary-controls > .button { width: 100%; }
  .logistics-metrics, .logistics-expense-metrics, .logistics-salary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .logistics-metrics .metric, .logistics-expense-metrics .metric, .logistics-salary-metrics .metric { min-height: 88px; padding: 11px; }
  .logistics-metrics .metric strong, .logistics-expense-metrics .metric strong, .logistics-salary-metrics .metric strong { font-size: clamp(1rem, 5vw, 1.28rem); }
  .logistics-metrics .metric span, .logistics-expense-metrics .metric span, .logistics-salary-metrics .metric span { font-size: .66rem; }
  .logistics-metrics .metric small, .logistics-expense-metrics .metric small, .logistics-salary-metrics .metric small { font-size: .59rem; line-height: 1.25; }
  .logistics-salary-metrics .metric:first-child { grid-column: 1 / -1; }
}
/* Warehouse cabinet: a single, touch-first phone language for the daily workflows. */
@media (max-width: 760px) {
  .warehouse-mobile-page { width: 100%; min-width: 0; }
  .warehouse-mobile-page .page-head { gap: 10px; margin-bottom: 12px; }
  .warehouse-mobile-page .page-head h1 { font-size: 1.42rem; line-height: 1.12; }
  .warehouse-mobile-page .page-head p { margin-top: 5px; font-size: .78rem; line-height: 1.35; }
  .warehouse-mobile-page .page-head > .button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .warehouse-mobile-page .table-panel { overflow: hidden; border-radius: 13px; }
  .warehouse-mobile-page .warehouse-fixed-journal,
  .warehouse-mobile-page .warehouse-fixed-scroll { height: auto; max-height: none; overflow: visible; }

  /* Timesheet: employee identity stays compact; every day remains a large tap target. */
  .warehouse-mobile-timesheet .week-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-mobile-timesheet .week-navigation .week-nav-current { grid-column: 1 / -1; grid-row: 1; }
  .warehouse-mobile-timesheet .week-navigation .week-nav-previous { grid-column: 1; grid-row: 2; }
  .warehouse-mobile-timesheet .week-navigation .week-nav-next { grid-column: 2; grid-row: 2; }
  .warehouse-mobile-timesheet .week-navigation .week-nav-picker { grid-column: 1 / -1; grid-row: 3; }
  .warehouse-mobile-timesheet .timesheet-toolbar { gap: 11px; padding: 12px; border-bottom: 1px solid #e8ece8; }
  .warehouse-mobile-timesheet .timesheet-search span { margin-bottom: 5px; font-size: .64rem; }
  .warehouse-mobile-timesheet .timesheet-search input { min-height: 44px; }
  .warehouse-mobile-timesheet .legend { gap: 6px 10px; padding: 2px 1px 0; }
  .warehouse-mobile-timesheet .legend span { min-height: 22px; font-size: .69rem; white-space: nowrap; }
  .warehouse-mobile-timesheet .legend .dot { width: 8px; height: 8px; }
  .warehouse-mobile-timesheet .timesheet-table thead { padding: 9px 9px 0; }
  .warehouse-mobile-timesheet .timesheet-table thead tr { gap: 7px; }
  .warehouse-mobile-timesheet .timesheet-table thead th { overflow: hidden; border-color: #e1e6e1; border-radius: 9px; background: #fbfcfb; }
  .warehouse-mobile-timesheet .day-bulk-button { min-height: 54px; padding: 6px 26px 6px 7px; }
  .warehouse-mobile-timesheet .day-bulk-button span { font-size: .56rem; }
  .warehouse-mobile-timesheet .day-bulk-button b { margin-top: 2px; font-size: .76rem; }
  .warehouse-mobile-timesheet .day-bulk-button i { right: 7px; font-size: .95rem; }
  .warehouse-mobile-timesheet .timesheet-table tbody { gap: 9px; padding: 9px; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] { grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px 3px; padding: 9px; border-color: #dce3dd; border-radius: 12px; box-shadow: 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.employee-col { grid-column: 3 / 15; grid-row: 1; min-height: 31px; display: flex; align-items: center; padding: 1px 4px 5px; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.employee-col b { font-size: .96rem; line-height: 1.18; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.number-col { grid-column: 1 / 3; grid-row: 1 / 3; min-height: 57px; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 5px 2px; border: 1px solid #dfe7e1; border-radius: 9px; background: #f0f4f1 !important; color: #526159; font-size: .8rem; text-align: center; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.number-col::before { content: "№"; font-size: .54rem; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col { grid-column: 3 / 7; grid-row: 2; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col { grid-column: 7 / 15; grid-row: 2; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col,
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col { min-height: 24px; display: flex; align-items: center; gap: 4px; padding: 2px 4px; overflow: visible; border: 0; border-radius: 0; background: transparent !important; color: #5d685f; font-size: .65rem; line-height: 1.15; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col::before,
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col::before { flex: 0 0 auto; color: #929a94; font-size: .52rem; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col::before { content: "Склад"; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col::before { content: "Должность"; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td:nth-child(n+5) { grid-column: span 2; grid-row: 3; min-height: 63px; display: grid; grid-template-rows: 25px 32px; align-content: center; gap: 2px; padding: 2px; border-color: #e1e6e2; border-radius: 8px; background: #fbfcfb !important; }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td:nth-child(n+5)::before { display: none; }
  .warehouse-mobile-timesheet .mobile-shift-heading { min-width: 0; display: grid; align-content: center; justify-items: center; gap: 0; color: #778078; line-height: 1; text-align: center; }
  .warehouse-mobile-timesheet .mobile-shift-heading b { font-size: .53rem; text-transform: uppercase; }
  .warehouse-mobile-timesheet .mobile-shift-heading small { margin-top: 2px; font-size: .43rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .warehouse-mobile-timesheet .shift-cell { width: 100%; min-width: 0; min-height: 32px; height: 32px; padding: 2px 1px; border-radius: 7px; }
  .warehouse-mobile-timesheet .shift-cell > .shift-mark,
  .warehouse-mobile-timesheet .shift-cell > .shift-details,
  .warehouse-mobile-timesheet .shift-cell > .shift-meta { display: none; }
  .warehouse-mobile-timesheet .mobile-shift-mark { min-width: 0; display: block; overflow: hidden; font-size: .5rem; font-weight: 800; line-height: 1.05; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .warehouse-mobile-timesheet .shift-cell.schedule-default .mobile-shift-mark { color: #a2aaa4; }
  .warehouse-mobile-timesheet .shift-cell.weekend-default .mobile-shift-mark { color: #68746b; }

  /* Employees: one glance gives number, name and four editable facts. */
  .warehouse-mobile-employees-126 .employee-toolbar { display: none; }
  .warehouse-mobile-employees-126 .employee-table tbody tr.employee-rate-missing { order: -1; }
  .warehouse-mobile-employees .employee-toolbar { gap: 9px; padding: 11px; }
  .warehouse-mobile-employees .employee-toolbar .toolbar-search input,
  .warehouse-mobile-employees .employee-toolbar select { min-height: 44px; }
  .warehouse-mobile-employees .employee-table tbody { gap: 9px; padding: 9px; }
  .warehouse-mobile-employees .employee-table tbody tr { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; padding: 11px; border-radius: 12px; box-shadow: 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing { border-color: #dfb8b8; background: #fffafa; box-shadow: inset 3px 0 #b45b5b, 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing .employee-warehouse-cell,
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing .employee-position-cell,
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing .employee-rate-cell,
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing .employee-status-cell { background: #fff7f7 !important; }
  .warehouse-mobile-employees .employee-table tbody tr.employee-rate-missing .number-cell { border-color: #e1c1c1; background: #f8eaea !important; color: #8d4949; }
  .warehouse-mobile-employees .employee-table .missing-rate-badge { margin-top: 3px; font-size: .57rem; }
  .warehouse-mobile-employees .employee-table tbody td,
  .warehouse-mobile-employees .employee-table tbody td::before,
  .warehouse-mobile-employees .employee-table tbody td > * { grid-column: auto; grid-row: auto; align-self: auto; justify-self: auto; }
  .warehouse-mobile-employees .employee-table tbody .number-cell { width: 40px !important; min-width: 40px !important; height: 40px; border: 1px solid #dfe7e1; border-radius: 10px; background: #f0f4f1 !important; font-size: .78rem; }
  .warehouse-mobile-employees .employee-table tbody .number-cell span { line-height: 40px; }
  .warehouse-mobile-employees .employee-table tbody .number-cell { grid-column: 1 / 3; grid-row: 1; align-self: start; justify-self: start; }
  .warehouse-mobile-employees .employee-table .employee-name-cell { grid-column: 3 / 13; grid-row: 1; min-height: 46px; padding: 3px 1px 9px 2px; }
  .warehouse-mobile-employees .employee-table .employee-name-cell a { font-size: 1rem; line-height: 1.22; }
  .warehouse-mobile-employees .employee-table .employee-warehouse-cell { grid-column: 1 / 7; grid-row: 2; }
  .warehouse-mobile-employees .employee-table .employee-position-cell { grid-column: 7 / 13; grid-row: 2; }
  .warehouse-mobile-employees .employee-table .employee-rate-cell { grid-column: 1 / 7; grid-row: 3; }
  .warehouse-mobile-employees .employee-table .employee-status-cell { grid-column: 7 / 13; grid-row: 3; }
  .warehouse-mobile-employees .employee-table tbody tr:not(:has(.employee-rate-cell)) .employee-status-cell { grid-column: 1 / 13; grid-row: 3; }
  .warehouse-mobile-employees .employee-table .employee-warehouse-cell,
  .warehouse-mobile-employees .employee-table .employee-position-cell,
  .warehouse-mobile-employees .employee-table .employee-rate-cell,
  .warehouse-mobile-employees .employee-table .employee-status-cell { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 4px; padding: 8px 9px; border-radius: 9px; }
  .warehouse-mobile-employees .employee-table .employee-warehouse-cell::before,
  .warehouse-mobile-employees .employee-table .employee-position-cell::before,
  .warehouse-mobile-employees .employee-table .employee-rate-cell::before,
  .warehouse-mobile-employees .employee-table .employee-status-cell::before { grid-column: auto; grid-row: auto; align-self: auto; margin: 0 0 5px; }
  .warehouse-mobile-employees .employee-table .quick-rate-button,
  .warehouse-mobile-employees .employee-table .quick-position-button,
  .warehouse-mobile-employees .employee-table .quick-warehouse-button,
  .warehouse-mobile-employees .employee-table .quick-status-button { width: 100%; min-width: 0; min-height: 36px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-content: stretch; gap: 2px; }
  .warehouse-mobile-employees .employee-table .quick-rate-button b,
  .warehouse-mobile-employees .employee-table .quick-position-button b,
  .warehouse-mobile-employees .employee-table .quick-warehouse-button b,
  .warehouse-mobile-employees .employee-table .quick-status-button b { max-width: 100%; justify-self: start; overflow: visible; font-size: .82rem; line-height: 1.2; overflow-wrap: anywhere; text-align: left; text-overflow: clip; white-space: normal; }
  .warehouse-mobile-employees .employee-table .quick-status-button b { width: fit-content; }
  .warehouse-mobile-employees .employee-table .quick-rate-button small,
  .warehouse-mobile-employees .employee-table .quick-position-button small,
  .warehouse-mobile-employees .employee-table .quick-warehouse-button small,
  .warehouse-mobile-employees .employee-table .quick-status-button small { display: block; justify-self: start; color: #7a847c; font-size: .57rem; line-height: 1.2; text-align: left; }
  .warehouse-mobile-employees .employee-table .quick-rate-button:active,
  .warehouse-mobile-employees .employee-table .quick-position-button:active,
  .warehouse-mobile-employees .employee-table .quick-warehouse-button:active,
  .warehouse-mobile-employees .employee-table .quick-status-button:active { opacity: .65; }
  .warehouse-mobile-employees .employee-table .action-cell { grid-column: 1 / 13; grid-row: 4; padding-top: 2px; }
  .warehouse-mobile-employees .employee-table .action-cell .row-action { min-height: 40px; display: flex; align-items: center; justify-content: center; }

  /* Payroll periods: status, dates and money read in a predictable three-row card. */
  .warehouse-mobile-payroll-list .payroll-period-picker { padding: 11px; }
  .warehouse-mobile-payroll-list .mobile-payroll-period-form select { min-height: 44px; }
  .warehouse-mobile-payroll-list .compact-toolbar { gap: 9px; padding: 11px; }
  .warehouse-mobile-payroll-list .toolbar-copy b { font-size: .88rem; }
  .warehouse-mobile-payroll-list .toolbar-copy span { display: none; }
  .warehouse-mobile-payroll-list .status-key { gap: 6px 10px; }
  .warehouse-mobile-payroll-list .status-key span { font-size: .65rem; }
  .warehouse-mobile-payroll-list .payroll-list-table tbody { gap: 9px; padding: 9px; }
  .warehouse-mobile-payroll-list .payroll-list-table tbody tr { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 7px; padding: 12px; border-radius: 12px; box-shadow: 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-payroll-list .payroll-list-table tbody td,
  .warehouse-mobile-payroll-list .payroll-list-table tbody td::before,
  .warehouse-mobile-payroll-list .payroll-list-table tbody td > * { grid-column: auto; grid-row: auto; align-self: auto; justify-self: auto; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-period-cell { grid-column: 1 / 9; grid-row: 1; align-self: center; font-size: .98rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-status-cell { grid-column: 9 / 13; grid-row: 1; align-self: center; justify-self: end; width: auto; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-status-cell .status-badge { width: auto; min-height: 28px; padding: 5px 9px; white-space: nowrap; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-date-cell,
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-employee-count-cell { grid-row: 2; min-height: 38px; display: grid; align-content: center; gap: 2px; padding: 7px 1px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; background: transparent !important; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-date-cell { grid-column: 1 / 7; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-employee-count-cell { grid-column: 7 / 13; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-date-cell::before,
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-employee-count-cell::before { margin: 0; font-size: .57rem; text-transform: uppercase; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell,
  .warehouse-mobile-payroll-list .payroll-list-table .paid-total-column { grid-row: 3; min-height: 58px; display: grid; align-content: center; gap: 3px; padding: 9px 10px; border: 1px solid #e1e7e2; border-radius: 9px; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell { grid-column: 1 / 7; border-color: #bdcec1; background: #f0f5f1 !important; }
  .warehouse-mobile-payroll-list .payroll-list-table .paid-total-column { grid-column: 7 / 13; background: #fafbfa !important; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell::before,
  .warehouse-mobile-payroll-list .payroll-list-table .paid-total-column::before { margin: 0; color: #708077; font-size: .58rem; line-height: 1; text-transform: uppercase; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell { font-size: 1.06rem; line-height: 1.1; white-space: nowrap; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary { align-content: center; justify-items: start; gap: 2px; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary b { font-size: .92rem; line-height: 1.1; white-space: nowrap; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary small { font-size: .59rem; line-height: 1.2; }
  .warehouse-mobile-payroll-list .payroll-list-table .action-cell { grid-column: 1 / 13; grid-row: 4; padding-top: 1px; }
  .warehouse-mobile-payroll-list .payroll-list-table .action-cell .row-action { min-height: 40px; display: flex; align-items: center; justify-content: center; }

  /* Payroll detail: due amount is prominent without turning into a tall side panel. */
  .warehouse-mobile-payroll-detail .page-head .title-line { align-items: center; flex-wrap: wrap; gap: 7px; }
  .warehouse-mobile-payroll-detail .payroll-back-button { width: 100%; min-height: 42px; justify-content: center; }
  .warehouse-mobile-payroll-detail .payroll-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .warehouse-mobile-payroll-detail .payroll-metrics .metric { min-height: 82px; padding: 11px; }
  .warehouse-mobile-payroll-detail .payroll-metrics .metric:first-child { grid-column: 1 / -1; min-height: 88px; }
  .warehouse-mobile-payroll-detail .payroll-metrics .metric strong { font-size: 1.17rem; }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-metric { grid-column: 1 / -1; }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-summary { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px; }
  .warehouse-mobile-payroll-detail .cash-summary > div { min-width: 0; padding: 7px 3px; }
  .warehouse-mobile-payroll-detail .workflow-bar { gap: 10px; padding: 12px; border-radius: 12px; }
  .warehouse-mobile-payroll-detail .workflow-bar p { line-height: 1.35; }
  .warehouse-mobile-payroll-detail .payroll-table-panel .panel-head { gap: 6px; padding: 13px; }
  .warehouse-mobile-payroll-detail .payroll-table-panel .table-head-actions { width: auto; }
  .warehouse-mobile-payroll-detail .payroll-table tbody { gap: 9px; padding: 9px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody tr { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px 6px; padding: 12px; border-radius: 12px; box-shadow: 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-payroll-detail .payroll-table tbody td,
  .warehouse-mobile-payroll-detail .payroll-table tbody td::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td > * { grid-column: auto; grid-row: auto; align-self: auto; justify-self: auto; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(1) { grid-column: 1 / 13; grid-row: 1; min-height: 40px; display: block; padding: 1px 2px 9px; font-size: 1rem; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(1) > b { display: block; font-size: 1.02rem; line-height: 1.22; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(2),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(3) { grid-row: 2; min-height: 45px; display: grid; align-content: center; gap: 3px; padding: 7px 8px; border: 0; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; border-radius: 0; background: transparent !important; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(2) { grid-column: 1 / 7; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(3) { grid-column: 7 / 13; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(2)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(3)::before { margin: 0; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(4),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(5),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(6) { grid-row: 3; grid-column: span 4; min-height: 57px; display: grid; align-content: center; gap: 3px; padding: 8px; border: 1px solid #e6ebe7; border-radius: 9px; background: #fafbfa !important; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(7),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(8),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(9) { grid-row: 4; grid-column: span 4; min-height: 64px; display: grid; align-content: center; gap: 3px; padding: 8px; border: 1px solid #e1e7e2; border-radius: 9px; background: #f7f9f7 !important; font-variant-numeric: tabular-nums; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(7),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(8),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(9) { min-height: 64px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(4)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(5)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(6)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(7)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(8)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(9)::before { margin: 0 0 3px; }
  .warehouse-mobile-payroll-detail .payroll-table .shift-progress-dots { flex-wrap: nowrap; gap: 3px; }
  .warehouse-mobile-payroll-detail .payroll-table .shift-progress-dots i { width: 8px; height: 8px; }
  .warehouse-mobile-payroll-detail .payroll-table .record-tooltip-trigger { min-width: 0; justify-items: start !important; padding: 0; }
  .warehouse-mobile-payroll-detail .payroll-table .record-tooltip-trigger small { white-space: normal; text-align: left; }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button { min-height: 40px; align-content: center; justify-items: start !important; padding: 5px 7px; border: 1px dashed #cdd7cf; background: #fff; text-align: left !important; }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button.has-value { border-style: solid; }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button b { font-size: .75rem; white-space: nowrap; }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button small { font-size: .56rem; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(10) { grid-column: 1 / 13; grid-row: 5; min-height: 38px; padding: 7px 10px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(10) > * { justify-self: end; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11) { grid-column: 1 / 13; grid-row: 6; min-height: 50px; padding: 10px 11px; border-radius: 9px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11)::before { grid-column: 1; grid-row: 1; margin: 0; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11) > b { grid-column: 2; grid-row: 1; justify-self: end; font-size: 1.08rem; white-space: nowrap; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11) .early-payment-deduction { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-top: 1px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(12) { grid-column: 1 / 13; grid-row: 7; padding-top: 9px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(12)::before { display: none; }
  .warehouse-mobile-payroll-detail .payroll-table .issue-action { min-height: 43px; align-content: center; }
  .warehouse-mobile-payroll-detail .payroll-table .issue-state { min-height: 40px; align-content: center; padding: 2px; }
  .warehouse-mobile-payroll-detail .payroll-table .issue-cell-controls { width: 100%; max-width: none; grid-template-columns: 30px minmax(0, 1fr); }
  .warehouse-mobile-payroll-detail .individual-payment-note { padding: 8px 9px; border-radius: 8px; }
  .warehouse-mobile-payroll-detail .individual-payment-note span,
  .warehouse-mobile-payroll-detail .individual-payment-note small { line-height: 1.25; }

  /* Warehouse issues: fast month scan, compact journal and an easy one-hand add flow. */
  .warehouse-mobile-issues .issue-period-filter { gap: 8px; padding: 11px; }
  .warehouse-mobile-issues .issue-period-filter > div { min-height: 42px; justify-content: center; }
  .warehouse-mobile-issues .issue-period-filter select { min-height: 44px; }
  .warehouse-mobile-issues .issue-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .warehouse-mobile-issues .issue-metrics .metric { min-height: 88px; padding: 10px 8px; }
  .warehouse-mobile-issues .issue-metrics .metric span { font-size: .61rem; line-height: 1.2; }
  .warehouse-mobile-issues .issue-metrics .metric strong { font-size: 1.23rem; }
  .warehouse-mobile-issues .issue-metrics .metric small { font-size: .56rem; line-height: 1.2; }
  .warehouse-mobile-issues .warehouse-issues-layout { gap: 11px; }
  .warehouse-mobile-issues .warehouse-issues-layout > .panel { height: auto; max-height: none; }
  .warehouse-mobile-issues .warehouse-issues-journal .table-panel-head { gap: 10px; min-height: 0; padding: 13px; }
  .warehouse-mobile-issues .issue-journal-scroll { max-height: none; overflow: visible; }
  .warehouse-mobile-issues .issue-journal-table tbody { gap: 9px; padding: 9px; }
  .warehouse-mobile-issues .issue-journal-table tbody tr { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; padding: 11px; border-radius: 12px; box-shadow: 0 3px 12px rgba(27, 38, 30, .035); }
  .warehouse-mobile-issues .issue-journal-table tbody td { min-height: 0; display: block; padding: 0; border: 0; text-align: left !important; }
  .warehouse-mobile-issues .issue-journal-table tbody td::before { position: static; display: block; margin-bottom: 3px; color: #89908a; font-size: .57rem; font-weight: 750; line-height: 1.15; text-transform: uppercase; }
  .warehouse-mobile-issues .issue-journal-table tbody td > * { max-width: 100%; grid-column: auto; justify-self: auto; text-align: left; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding: 8px 0; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; text-align: right !important; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(3)::before { text-align: right; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; padding: 8px 9px; border: 1px solid #e6ebe7; border-radius: 8px; background: #fafbfa !important; font-size: .82rem; line-height: 1.4; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; display: flex; align-items: baseline; gap: 7px; color: #657068; font-size: .7rem; }
  .warehouse-mobile-issues .issue-journal-table tbody td:nth-child(5)::before { display: inline; margin: 0; }
  .warehouse-mobile-issues .issue-leaderboard-panel { margin-bottom: 0; }
  .warehouse-mobile-issues .issue-leaderboard-panel > .panel-head { padding: 13px; }
  .warehouse-mobile-issues .issue-leaderboard { max-height: 360px; padding: 6px 12px 12px; }
  .warehouse-mobile-issues .issue-leaderboard > button { min-height: 56px; }

  /* Warehouse dialogs: no tiny controls and the primary action stays easy to reach. */
  .warehouse-mobile-page + .dialog .dialog-form,
  .warehouse-issue-dialog .dialog-form { padding: 16px; }
  .warehouse-issue-dialog .issue-selected-employee { padding: 10px; }
  .warehouse-issue-dialog .issue-employee-list { max-height: min(260px, 34dvh); }
  .warehouse-issue-dialog .issue-employee-list > button { min-height: 54px; padding: 9px 10px; }
  .warehouse-issue-dialog .issue-description-field textarea { min-height: 104px; }
}

@media (max-width: 390px) {
  .warehouse-mobile-timesheet .legend { column-gap: 7px; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell { font-size: .96rem; }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary b { font-size: .86rem; }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  /* Compact payroll period cards: money always stays inside its half. */
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell,
  .warehouse-mobile-payroll-list .payroll-list-table .paid-total-column {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    column-gap: 7px;
    padding-right: 13px;
    padding-left: 9px;
    overflow: hidden;
  }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell::before,
  .warehouse-mobile-payroll-list .payroll-list-table .paid-total-column::before {
    grid-column: 1;
    grid-row: 1;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell > b,
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary b {
    min-width: 0;
    max-width: 100%;
    display: block;
    overflow: visible;
    font-size: clamp(.76rem, 3.7vw, .94rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
    line-height: 1.05;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-due-cell > b {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary {
    width: 100%;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    justify-items: end;
    text-align: right;
  }
  .warehouse-mobile-payroll-list .payroll-list-table .payroll-paid-summary small {
    max-width: 100%;
    text-align: right;
  }

  /* One employee is one short, readable card instead of a stack of tall boxes. */
  .warehouse-mobile-payroll-detail .payroll-table tbody { gap: 7px; padding: 7px; }
  .warehouse-mobile-payroll-detail .payroll-table tbody tr {
    gap: 5px 6px;
    padding: 9px;
    border-radius: 11px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(1) {
    min-height: 0;
    padding: 1px 2px 6px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(1) > b {
    font-size: .95rem;
  }
  .warehouse-mobile-payroll-detail .individual-payment-note {
    margin-top: 5px;
    padding: 6px 8px;
  }
  .warehouse-mobile-payroll-detail .individual-payment-note strong { font-size: .57rem; }
  .warehouse-mobile-payroll-detail .individual-payment-note span { font-size: .65rem; }
  .warehouse-mobile-payroll-detail .individual-payment-note small { font-size: .55rem; }

  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(2),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(3) {
    min-height: 31px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: 5px;
    padding: 5px 6px;
    font-size: .68rem;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(2)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(3)::before {
    font-size: .53rem;
  }

  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(4),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(5),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(6) {
    min-width: 0;
    min-height: 39px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    align-content: center;
    gap: 4px;
    padding: 6px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(4)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(5)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(6)::before {
    grid-column: 1;
    margin: 0;
    font-size: .52rem;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-table .shift-progress-mobile {
    min-width: 0;
    display: block;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    color: #45534a;
    font-size: .76rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-table .shift-progress-dots { display: none; }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(5) > *,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(6) > * {
    grid-column: 2;
    justify-self: end !important;
  }
  .warehouse-mobile-payroll-detail .payroll-table .record-tooltip-trigger small { display: none; }
  .warehouse-mobile-payroll-detail .payroll-table .record-tooltip-trigger b,
  .warehouse-mobile-payroll-detail .payroll-table .mistakes-column > b,
  .warehouse-mobile-payroll-detail .payroll-table .lateness-column > b { font-size: .76rem; }

  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(7),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(8),
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(9) {
    min-width: 0;
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: center;
    gap: 3px;
    padding: 6px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(7)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(8)::before,
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(9)::before {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: .52rem;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-base-value,
  .warehouse-mobile-payroll-detail .bonus-column > span,
  .warehouse-mobile-payroll-detail .fine-column > span {
    max-width: 100%;
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    overflow: visible;
    font-size: clamp(.66rem, 3vw, .74rem);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -.025em;
    text-align: right;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .individual-accrual-label { display: none; }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button {
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-column: 1;
    grid-row: 2;
    min-height: 27px;
    justify-items: start !important;
    padding: 3px 5px;
    overflow: hidden;
  }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button b {
    max-width: 100%;
    overflow: hidden;
    font-size: .66rem;
    text-overflow: clip;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-table .row-bonus-button small { display: none; }

  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(10) {
    min-height: 34px;
    padding: 6px 9px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11) {
    min-height: 42px;
    padding: 8px 10px;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(11) > b {
    font-size: 1rem;
  }
  .warehouse-mobile-payroll-detail .payroll-table tbody td:nth-child(12) {
    min-height: 36px;
    padding-top: 6px;
  }
  .warehouse-mobile-payroll-detail .payroll-table .issue-state {
    min-height: 31px;
    padding: 0;
  }
  .warehouse-mobile-payroll-detail .payroll-table .issue-state span { font-size: .75rem; }
  .warehouse-mobile-payroll-detail .payroll-table .issue-state small { font-size: .56rem; }
  .warehouse-mobile-payroll-detail .payroll-table .issue-action { min-height: 36px; }
}

/* Compact, touch-first driver schedule. Desktop layout intentionally stays unchanged. */
@media (max-width: 760px) {
  .logistics-schedule-head {
    gap: 12px;
    margin-bottom: 12px;
  }
  .logistics-schedule-head h1 { margin-bottom: 2px; }
  .logistics-schedule-head .schedule-period-mobile {
    margin-top: 0;
    color: #667169;
    font-size: .82rem;
    font-weight: 650;
  }
  .logistics-schedule-head .schedule-week-navigation {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .logistics-schedule-head .schedule-week-navigation .button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 7px;
    font-size: .78rem;
  }
  .logistics-schedule-head .schedule-current-link {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 45px !important;
  }
  .logistics-schedule-head .schedule-previous-link { grid-column: 1; grid-row: 2; }
  .logistics-schedule-head .schedule-next-link { grid-column: 2; grid-row: 2; }
  .logistics-schedule-head .schedule-week-navigation [data-week-picker-open] {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .logistics-schedule-head .schedule-nav-desktop { display: none; }
  .logistics-schedule-head .schedule-nav-mobile { display: inline; }

  .logistics-schedule-panel {
    overflow: visible;
    border-radius: 13px;
  }
  .logistics-schedule-panel .schedule-toolbar {
    min-height: 0;
    gap: 9px;
    padding: 10px;
  }
  .logistics-schedule-panel .toolbar-search { gap: 4px; }
  .logistics-schedule-panel .toolbar-search > span {
    font-size: .62rem;
    letter-spacing: .015em;
  }
  .logistics-schedule-panel .toolbar-search input {
    min-height: 43px;
    font-size: 1rem;
  }
  .logistics-schedule-panel .schedule-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .logistics-schedule-panel .schedule-legend > span {
    min-width: 0;
    min-height: 31px;
    justify-content: center;
    gap: 5px;
    padding: 5px 3px;
    border: 1px solid #e6ebe7;
    border-radius: 8px;
    background: #f8faf8;
    font-size: clamp(.55rem, 2.55vw, .65rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
  }
  .logistics-schedule-panel .schedule-legend-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
  }
  .logistics-schedule-panel .schedule-table-wrap {
    padding: 6px;
    overflow: visible;
  }
  .logistics-schedule-panel .schedule-week-section {
    overflow: visible;
    border-radius: 10px;
  }
  .logistics-schedule-panel .schedule-week-title {
    min-height: 39px;
    gap: 8px;
    padding: 8px 10px;
  }
  .logistics-schedule-panel .schedule-week-title b {
    color: #4d5b52;
    font-size: .64rem;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  .logistics-schedule-panel .schedule-week-title span {
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
  }
  .logistics-schedule-panel .driver-schedule-table tbody { gap: 10px; }
  .logistics-schedule-panel .driver-schedule-table tbody tr {
    gap: 6px;
    padding: 8px;
    border-radius: 11px;
  }
  .logistics-schedule-panel .driver-schedule-table tbody tr + tr::before { display: none; }
  .logistics-schedule-panel .driver-schedule-table td {
    min-height: 62px;
    padding: 6px;
    border-radius: 8px;
  }
  .logistics-schedule-panel .driver-schedule-table .schedule-driver-cell {
    min-height: 43px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: 8px;
    padding: 4px 2px 8px !important;
  }
  .logistics-schedule-panel .schedule-driver-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 7px;
    color: #647168;
    background: #f0f4f1;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1;
    text-transform: uppercase;
  }
  .logistics-schedule-panel .schedule-driver-cell b {
    font-size: .98rem;
    line-height: 1.2;
  }
  .logistics-schedule-panel .schedule-cell-actions {
    min-height: 27px;
    margin: 0;
  }
  .logistics-schedule-panel .schedule-mobile-date {
    color: #59665d;
    font-size: clamp(.66rem, 2.85vw, .75rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.015em;
    line-height: 1.15;
  }
  .logistics-schedule-panel .schedule-add-button,
  .logistics-schedule-panel .schedule-entry-edit {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    font-size: .92rem;
  }
  .logistics-schedule-panel .schedule-empty-mark {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 1px 1px;
    font-size: .65rem;
  }
  .logistics-schedule-panel .driver-schedule-table td:not(.schedule-has-entry) {
    min-height: 62px;
  }
  .logistics-schedule-panel .driver-schedule-table td:not(.schedule-has-entry) .schedule-cell-actions {
    min-height: 27px;
  }
  .logistics-schedule-panel .driver-schedule-table td.schedule-has-entry:not(.schedule-mobile-route) {
    min-height: 88px;
  }
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-actions {
    min-height: 40px;
    padding: 5px 34px 2px 7px;
  }
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-action-copy {
    gap: 3px;
  }
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-cell-status {
    font-size: .56rem;
    line-height: 1.1;
  }
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry-list,
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry {
    min-height: 48px;
  }
  .logistics-schedule-panel .schedule-has-entry:not(.schedule-mobile-route) .schedule-entry {
    padding: 5px 7px 7px;
  }
  .logistics-schedule-panel .schedule-entry-title {
    font-size: .82rem;
    line-height: 1.16;
  }
  .logistics-schedule-panel .schedule-mobile-route {
    min-height: 105px !important;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-cell-actions {
    min-height: 41px;
    padding: 5px 36px 1px;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-cell-action-copy { gap: 3px; }
  .logistics-schedule-panel .schedule-mobile-route .schedule-mobile-date {
    font-size: clamp(.67rem, 2.9vw, .76rem);
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-cell-status {
    font-size: .57rem;
    line-height: 1.1;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-add-button {
    top: 5px;
    right: 5px;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-entry-list,
  .logistics-schedule-panel .schedule-mobile-route .schedule-entry {
    min-height: 63px;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-entry {
    grid-template-columns: minmax(0, 1fr) 30px;
    padding: 4px 7px 8px;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-entry-title {
    font-size: .98rem;
    line-height: 1.14;
  }
  .logistics-schedule-panel .schedule-mobile-route .schedule-entry-carry {
    margin-top: 5px;
    padding: 3px 6px;
    font-size: .56rem;
  }
  .logistics-schedule-panel .schedule-entry-report {
    min-height: 39px;
    margin-top: 6px;
    padding: 8px;
    border-radius: 8px;
    font-size: .72rem;
  }

  .logistics-schedule-panel .schedule-selection-bar {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 85;
    max-height: min(230px, calc(100dvh - 24px));
    gap: 8px;
    padding: 10px;
    overflow: auto;
    border: 1px solid #cbd8cf;
    border-radius: 13px;
    background: rgba(250,252,250,.97);
    box-shadow: 0 12px 38px rgba(25,39,30,.24);
    backdrop-filter: blur(12px);
  }
  .logistics-schedule-panel .schedule-selection-bar > div:first-child {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 5px 10px;
  }
  .logistics-schedule-panel .schedule-selection-bar b {
    overflow: hidden;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .logistics-schedule-panel .schedule-selection-bar span {
    font-size: .64rem;
    white-space: nowrap;
  }
  .logistics-schedule-panel .schedule-selection-bar .button-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .logistics-schedule-panel .schedule-selection-bar .button {
    min-height: 41px;
    padding: 7px;
    font-size: .72rem;
  }
  .logistics-schedule-panel .schedule-selection-bar [data-schedule-selection-assign] { grid-column: 1; grid-row: 1; }
  .logistics-schedule-panel .schedule-selection-bar [data-schedule-selection-clear] { grid-column: 2; grid-row: 1; }
  .logistics-schedule-panel .schedule-selection-bar [data-schedule-selection-delete] { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
  #employee-rate-dialog[open] {
    top: var(--rate-dialog-center-y, 50%);
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(460px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    height: auto;
    max-height: var(--rate-dialog-height, calc(100dvh - 12px));
    margin: 0;
    overflow: hidden;
    transform: translate(-50%, -50%);
  }
  #employee-rate-dialog .dialog-form {
    width: 100%;
    max-height: var(--rate-dialog-height, calc(100dvh - 12px));
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  #employee-rate-dialog .dialog-head {
    flex: 0 0 auto;
    margin-bottom: 13px;
  }
  #employee-rate-dialog .rate-edit-fields {
    min-width: 0;
    flex: 0 0 auto;
    gap: 11px;
  }
  #employee-rate-dialog .rate-field,
  #employee-rate-dialog .rate-field input,
  #employee-rate-dialog .rate-date-picker {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  #employee-rate-dialog .rate-date-picker { height: 48px; }
  #employee-rate-dialog .rate-confirmation {
    min-width: 0;
    flex: 0 0 auto;
    gap: 9px;
    margin-top: 11px;
    padding: 9px 10px;
  }
  #employee-rate-dialog .rate-confirmation span {
    min-width: 0;
    line-height: 1.3;
  }
  #employee-rate-dialog .rate-confirmation b {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  #employee-rate-dialog .form-actions {
    position: sticky;
    bottom: -1px;
    z-index: 3;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    gap: 7px;
    margin-top: 12px;
    padding: 10px 0 0;
    border-top: 1px solid #edf0ed;
    background: #fff;
  }
  #employee-rate-dialog .form-actions .button {
    width: auto;
    min-height: 43px;
    margin: 0;
    padding-right: 12px;
    padding-left: 12px;
  }
  #employee-rate-dialog .form-actions .button.primary { width: 100%; }
  #employee-rate-dialog [data-rate-submit][aria-disabled="true"] { opacity: .62; cursor: pointer; }
  #employee-rate-dialog.rate-keyboard-visible .dialog-head {
    margin-bottom: 9px;
  }
  #employee-rate-dialog.rate-keyboard-visible .rate-confirmation { display: none; }
  #employee-rate-dialog.rate-keyboard-visible .form-actions {
    margin-top: 9px;
    padding-top: 8px;
  }
}

/* Compact phone-only employee timesheet. The desktop table and bulk workflow stay unchanged. */
@media (max-width: 760px) {
  /* Bulk marking remains available on desktop; the phone is optimized for one employee at a time. */
  .warehouse-mobile-timesheet .timesheet-toolbar { display: none !important; }
  .warehouse-mobile-timesheet .timesheet-table thead { display: none !important; }

  .warehouse-mobile-timesheet .timesheet-table tbody {
    gap: 7px;
    padding: 7px;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] {
    grid-template-columns: 27px repeat(13, minmax(0, 1fr));
    gap: 2px;
    padding: 7px;
    border-radius: 10px;
  }

  /* One compact identity strip: number, name, then warehouse and position. */
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.number-col {
    grid-column: 1;
    grid-row: 1;
    width: 25px !important;
    min-width: 25px !important;
    min-height: 25px;
    height: 25px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 7px;
    font-size: .65rem;
    line-height: 1;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.number-col::before {
    display: none;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.employee-col {
    grid-column: 2 / 15;
    grid-row: 1;
    min-height: 29px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 0 3px;
    border: 0;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.employee-col b {
    overflow: hidden;
    font-size: .87rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .warehouse-mobile-timesheet .mobile-employee-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: #68726a;
    font-size: .58rem;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
  }
  .warehouse-mobile-timesheet .mobile-employee-meta span:first-child {
    flex: 0 0 auto;
    color: #526159;
    font-weight: 850;
  }
  .warehouse-mobile-timesheet .mobile-employee-meta span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .warehouse-mobile-timesheet .mobile-employee-meta i {
    width: 3px;
    height: 3px;
    flex: 0 0 3px;
    border-radius: 50%;
    background: #9aa39c;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col,
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col {
    display: none !important;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.warehouse-col::before,
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col::before {
    display: none;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col::before {
    content: none;
  }
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td.position-col::after {
    content: none;
  }

  /* Seven small tap targets in one row: weekday plus a short, unambiguous mark. */
  .warehouse-mobile-timesheet .timesheet-table tbody tr[data-employee-row] td:nth-child(n+5) {
    grid-column: span 2;
    grid-row: 2;
    min-height: 45px;
    grid-template-rows: 13px 27px;
    gap: 1px;
    padding: 2px 1px;
    border-radius: 7px;
  }
  .warehouse-mobile-timesheet .mobile-shift-heading {
    line-height: 13px;
  }
  .warehouse-mobile-timesheet .mobile-shift-heading b {
    font-size: .56rem;
    letter-spacing: .01em;
  }
  .warehouse-mobile-timesheet .mobile-shift-heading small {
    display: none;
  }
  .warehouse-mobile-timesheet .shift-cell {
    min-height: 27px;
    height: 27px;
    padding: 0;
    border-radius: 6px;
  }
  .warehouse-mobile-timesheet .mobile-shift-mark {
    overflow: visible;
    font-size: .88rem;
    font-weight: 900;
    line-height: 1;
    text-overflow: clip;
  }
  .warehouse-mobile-timesheet .shift-cell.schedule-default .mobile-shift-mark,
  .warehouse-mobile-timesheet .shift-cell.weekend-default .mobile-shift-mark {
    font-size: .72rem;
  }

  /* User 126 gets one purposeful payroll card: current period, amount and action. */
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table tbody {
    gap: 0;
    padding: 8px;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table tbody tr {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .payroll-period-cell {
    grid-column: 1 / 13;
    grid-row: 1;
    display: grid;
    gap: 3px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf0ed;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .current-week-label {
    display: block;
    color: #66746a;
    font-size: .57rem;
    font-weight: 850;
    letter-spacing: .045em;
    line-height: 1;
    text-transform: uppercase;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .payroll-due-cell {
    grid-column: 1 / 13;
    grid-row: 2;
    min-height: 52px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    padding: 9px 11px;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .payroll-due-cell::before {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .payroll-due-cell > b {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 1rem;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .action-cell {
    grid-column: 1 / 13;
    grid-row: 3;
    padding: 0;
  }
  .warehouse-mobile-payroll-list.payroll-current-week-only .payroll-list-table .action-cell .row-action {
    min-height: 42px;
  }
  .warehouse-mobile-payroll-detail.payroll-current-week-only-detail .workflow-bar {
    padding: 10px;
  }
  .warehouse-mobile-payroll-detail.payroll-current-week-only-detail .workflow-actions {
    width: 100%;
  }
}

@media (max-width: 760px) {
  /* Weekly payroll totals: one compact strip, followed by one full banknote row. */
  .warehouse-mobile-payroll-detail .payroll-metrics {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .warehouse-mobile-payroll-detail .payroll-money-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dfe5e0;
    border-radius: 11px;
    background: #fff;
  }
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric,
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric:first-child {
    min-width: 0;
    min-height: 68px;
    grid-column: auto;
    justify-content: center;
    padding: 8px 7px;
    border: 0;
    border-right: 1px solid #e3e8e4;
    border-radius: 0;
    background: #fff;
  }
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric:last-child { border-right: 0; }
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric span {
    font-size: .61rem;
    line-height: 1.1;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric strong {
    margin: 4px 0 2px;
    font-size: clamp(.82rem, 4vw, 1rem);
    line-height: 1;
    letter-spacing: -.035em;
    white-space: nowrap;
  }
  .warehouse-mobile-payroll-detail .payroll-money-summary .metric small {
    font-size: .52rem;
    line-height: 1.15;
  }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-metric {
    min-height: 0;
    grid-column: 1;
    gap: 6px;
    padding: 9px 10px;
  }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-metric > span {
    font-size: .68rem;
    font-weight: 700;
  }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px;
  }
  .warehouse-mobile-payroll-detail .cash-summary > div {
    min-height: 42px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 5px 2px;
    border-radius: 7px;
  }
  .warehouse-mobile-payroll-detail .cash-summary b {
    font-size: .84rem;
    line-height: 1;
  }
  .warehouse-mobile-payroll-detail .cash-summary small {
    margin: 0;
    font-size: clamp(.46rem, 2.15vw, .56rem);
    line-height: 1;
    letter-spacing: -.02em;
  }
  .warehouse-mobile-payroll-detail .payroll-metrics .cash-metric > small {
    font-size: .54rem;
    line-height: 1.15;
  }

  /* Early payout is a real full-width action, aligned with the amount block. */
  .warehouse-mobile-payroll-detail .payroll-table .early-payment-action {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid #aebcb1;
    border-radius: 9px;
    color: #304b38;
    background: #f3f7f4;
    box-shadow: 0 1px 2px rgba(37, 57, 43, .12);
    text-align: center;
  }
  .warehouse-mobile-payroll-detail .payroll-table .early-payment-action:active {
    background: #e8f0ea;
    box-shadow: inset 0 1px 2px rgba(37, 57, 43, .14);
    transform: translateY(1px);
  }
  .warehouse-mobile-payroll-detail .payroll-table .early-payment-action span {
    width: 100%;
    justify-content: center;
    color: inherit;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .025em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
  }
  .warehouse-mobile-payroll-detail .payroll-table .early-payment-action small {
    margin: 0;
    color: #607166;
    font-size: .56rem;
    line-height: 1.1;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .employee-debts-page { gap: 12px; }
  .debts-page-head { display: grid; gap: 10px; }
  .debts-page-head h1 { font-size: 1.45rem; }
  .debts-page-head p { line-height: 1.35; }
  .debts-page-head > .button { width: 100%; justify-content: center; }
  .debt-create-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .debt-form-row { grid-template-columns: 1fr; }
  .debt-create-actions { grid-template-columns: 1fr; }
  .debt-create-actions .button, .debt-repayment-form .button { width: 100%; justify-content: center; }
  .debt-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .debt-metrics .metric { min-height: 92px; padding: 10px; }
  .debt-metrics .metric:first-child { grid-column: 1 / -1; }
  .debt-metrics .metric strong { font-size: 1.15rem; white-space: nowrap; }
  .debt-filters { grid-template-columns: 1fr; gap: 8px; padding: 11px; }
  .debt-filters .button { width: 100%; justify-content: center; }
  .debt-list { max-height: none; overflow: visible; }
  .debt-list-head { display: none; }
  .debt-row { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; border-bottom: 8px solid #f2f4f2; }
  .debt-row > div { min-height: 0; padding: 8px 10px; border-right: 0; border-bottom: 1px solid #edf0ed; }
  .debt-row-employee { grid-column: 1 / -1; padding-top: 11px !important; }
  .debt-row-employee > b { font-size: .9rem; }
  .debt-row-principal { grid-column: 1; border-right: 1px solid #edf0ed !important; }
  .debt-row-balance { grid-column: 2; }
  .debt-row-principal::before, .debt-row-balance::before, .debt-row-latest::before { color: #8a918c; font-size: .54rem; font-weight: 750; text-transform: uppercase; }
  .debt-row-principal::before { content: "Долг"; }
  .debt-row-balance::before { content: "Остаток"; }
  .debt-row-progress { grid-column: 1 / -1; }
  .debt-row-latest { grid-column: 1; border-right: 1px solid #edf0ed !important; }
  .debt-row-latest::before { content: "Последний возврат"; }
  .debt-row-action { grid-column: 2; align-content: center !important; }
  .debt-repayment-open { width: 100%; min-height: 38px; justify-content: center; }
  .debt-row-history { grid-column: 1 / -1; }
  .debt-repayment-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .debt-repayment-summary > div { padding: 8px 6px; }
  .debt-repayment-summary b, .debt-repayment-summary strong { font-size: clamp(.7rem, 3.4vw, .84rem); }
  .debt-history-list > div { grid-template-columns: 70px auto minmax(0, 1fr); gap: 6px; padding: 8px 12px; }
  .debt-history-list small { display: none; }
}

@media print {
  .site-header, .page-head .button-group, .action-bar, .details-panel { display: none !important; }
  .app-shell { display: block; }.content { max-width: none; padding: 0; }.panel { border: 0; box-shadow: none; }
}
