/* Tasks and Shifts presentation. Load after native CSS and orders-design.css.
 * Native actions, calendars, form fields and filtering remain authoritative.
 * Calendar/row adaptations use actual workspace/dialog width, not sidebar guesses. */

/* Tasks: the original module owns its local palette; connect it to both themes. */
html:root.orders-crystal #page-content .ts-workspace {
  --ts-blue:var(--text); --ts-text:var(--text); --ts-muted:var(--muted); --ts-border:var(--line);
  min-width:0;
  color:var(--text);
  container:tasks-workspace / inline-size;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-surface {
  border:0!important;
  border-radius:var(--orders-radius-card,24px)!important;
  background:var(--card-surface)!important;
  box-shadow:var(--card-edge)!important;
  -webkit-backdrop-filter:blur(18px)!important;
  backdrop-filter:blur(18px)!important;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-task-navigation,.ts-task-filters,.ts-status-filters) {
  min-width:0;
  gap:10px;
  padding-inline:18px;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-navigation { padding-block:14px; border-color:var(--line); }
html:root.orders-crystal #page-content .ts-workspace .ts-task-filters { padding-block:14px 8px; }
html:root.orders-crystal #page-content .ts-workspace .ts-status-filters {
  padding-block:4px 14px;
  gap:6px;
  max-width:100%;
  overscroll-behavior-inline:contain;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-scope,.ts-view-switch) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  min-height:44px;
  padding:4px;
  gap:4px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  -webkit-backdrop-filter:blur(var(--glass-blur,18px))!important;
  backdrop-filter:blur(var(--glass-blur,18px))!important;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-pill,.ts-view-switch>button) {
  box-sizing:border-box;
  min-width:0;
  min-height:44px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  padding:8px 12px;
  color:var(--text)!important;
  font-size:13px;
  line-height:20px;
  font-weight:500;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-scope,.ts-view-switch)>button {
  height:36px;
  min-height:36px;
  padding-block:8px;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-pill,.ts-view-switch>button):is(.is-active,[aria-selected="true"],[aria-pressed="true"]) {
  color:var(--text)!important;
  font-weight:600;
  background:var(--orders-control-selected,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow,none)!important;
}
html:root.orders-crystal #page-content .ts-workspace :is(.ts-pill,.ts-view-switch>button):hover:not(:disabled):not(.is-active) {
  background:var(--orders-control-hover,var(--control-surface))!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-count {
  min-width:20px;
  padding:1px 6px;
  border-radius:999px;
  background:var(--control-surface)!important;
  color:var(--muted)!important;
  font-size:11px;
  line-height:18px;
}
html:root.orders-crystal #page-content .ts-workspace .is-active .ts-count { color:var(--text)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-search {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  flex:0 1 340px;
  width:340px;
  min-width:160px;
  max-width:100%;
  height:44px;
  min-height:44px;
  gap:10px;
  padding:0 14px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  -webkit-backdrop-filter:blur(var(--glass-blur,18px))!important;
  backdrop-filter:blur(var(--glass-blur,18px))!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-search input {
  box-sizing:border-box;
  width:100%;
  height:44px;
  min-height:0;
  padding:10px 0;
  border:0!important;
  border-radius:inherit;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--text)!important;
  -webkit-text-fill-color:currentColor!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-search input:focus-visible { outline:0!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-search:focus-within { outline:2px solid var(--orders-focus); outline-offset:3px; }
html:root.orders-crystal #page-content .ts-workspace .ts-assignee-filter { min-width:0; gap:10px; color:var(--muted); }
html:root.orders-crystal #page-content .ts-workspace .ts-assignee-filter>span { flex-shrink:0; }
html:root.orders-crystal #page-content .ts-workspace .ts-assignee-filter select {
  box-sizing:border-box;
  min-width:0;
  max-width:240px;
  height:44px;
  min-height:44px;
  padding:10px 36px 10px 14px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text)!important;
  color-scheme:inherit;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-filters>.icon-btn { margin-inline-start:auto; flex:0 0 44px; width:44px!important; height:44px!important; min-height:44px!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task {
  grid-template-columns:44px minmax(0,1fr) minmax(140px,180px) minmax(110px,140px) 44px;
  gap:14px;
  padding:16px 18px;
  border-color:var(--line);
  background:transparent!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task:hover { background:var(--control-surface)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-title { min-height:44px; color:var(--text); }
html:root.orders-crystal #page-content .ts-workspace .ts-task-title strong { font-size:14px; font-weight:600; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-people { color:var(--text); }
html:root.orders-crystal #page-content .ts-workspace .ts-task-people time { white-space:normal; overflow-wrap:anywhere; }
html:root.orders-crystal #page-content .ts-workspace .ts-person-avatar { background:var(--orders-control-fill)!important; box-shadow:var(--orders-control-shadow); color:var(--text)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-people time.ts-overdue { color:var(--danger)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-priority { color:var(--amber)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-status {
  min-height:44px;
  padding:8px 12px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text)!important;
  font-size:12px!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-task-status.ts-status-done { color:var(--green)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task-status.ts-status-cancel { color:var(--danger)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-task>.icon-btn {
  width:44px!important; height:44px!important; min-height:44px!important; min-width:44px!important; padding:10px!important;
  border:0!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
}
html:root.orders-crystal #page-content .ts-workspace .task-complete,
html:root.orders-crystal body #dialog-content .task-editor-grid .task-complete {
  box-sizing:border-box;
  width:44px; height:44px; min-width:44px; min-height:44px;
  padding:10px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px);
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow,none)!important;
  color:var(--text)!important;
}
html:root.orders-crystal #page-content .ts-workspace .task-complete.checked,
html:root.orders-crystal body #dialog-content .task-editor-grid .task-complete.checked {
  background:var(--green)!important;
  color:var(--orders-selection-ink)!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-empty { padding:36px 20px; }
html:root.orders-crystal #page-content .ts-workspace .ts-empty>.icon { color:var(--muted); }
html:root.orders-crystal #page-content .ts-workspace .ts-error { color:var(--danger); background:var(--danger-bg); border-radius:var(--orders-radius-inset,20px); }
html:root.orders-crystal #page-content .ts-workspace .ts-task-footer { padding:12px 18px; border-color:var(--line); }

/* Calendar: compact cells; today and selected day use neutral, distinct edges. */
html:root.orders-crystal #page-content .ts-workspace .ts-calendar-toolbar { padding:14px 18px; gap:12px; flex-wrap:wrap; }
html:root.orders-crystal #page-content .ts-workspace .ts-month-controls { min-width:0; gap:12px; }
html:root.orders-crystal #page-content .ts-workspace .ts-month-controls h2 { font-size:16px; line-height:1.4; font-weight:600; }
html:root.orders-crystal #page-content .ts-workspace .ts-month-controls .icon-btn {
  flex:0 0 44px; width:44px!important; min-width:44px!important; height:44px!important; min-height:44px!important;
  border:0!important; padding:10px!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-month-grid { padding:0 18px 18px; gap:5px; }
html:root.orders-crystal #page-content .ts-workspace .ts-day {
  box-sizing:border-box;
  min-height:80px;
  padding:8px;
  gap:4px;
  border:0!important;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text);
}
html:root.orders-crystal #page-content .ts-workspace .ts-day:hover { background:var(--orders-control-hover,var(--control-surface))!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-day.is-selected {
  padding:8px;
  background:var(--orders-control-selected,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow,none),inset 0 0 0 1.5px var(--orders-focus)!important;
}
html:root.orders-crystal #page-content .ts-workspace .ts-day-number { width:24px; line-height:24px; border-radius:999px; }
html:root.orders-crystal #page-content .ts-workspace .ts-day.is-today .ts-day-number {
  background:var(--text)!important;
  color:var(--orders-selection-ink)!important;
  font-weight:700;
}
html:root.orders-crystal #page-content .ts-workspace .ts-day-count {
  top:10px; right:8px; bottom:auto;
  min-width:18px;
  border-radius:999px;
  background:var(--control-surface)!important;
  color:var(--text)!important;
  font-variant-numeric:tabular-nums;
}
html:root.orders-crystal #page-content .ts-workspace .ts-day-preview { font-size:11px; gap:3px; color:var(--muted)!important; }
html:root.orders-crystal #page-content .ts-workspace .ts-day-preview>span { border-color:var(--muted); }
html:root.orders-crystal #page-content .ts-workspace .ts-agenda-heading { padding:16px 18px; gap:12px; flex-wrap:wrap; }
html:root.orders-crystal #page-content .ts-workspace .ts-agenda-empty { padding-inline:18px; }
html:root.orders-crystal #page-content .ts-workspace :is(button,select,input):focus-visible { outline:2px solid var(--orders-focus); outline-offset:3px; }

/* Native task editor and task detail; every data-task-* input stays in place. */
html:root.orders-crystal body .dialog:has(.task-editor-grid) { container:task-editor / inline-size; }
html:root.orders-crystal body #dialog-content .task-editor-grid { gap:20px; min-width:0; }
html:root.orders-crystal body #dialog-content .task-editor-side {
  padding:18px;
  border:0;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--control-surface);
  box-shadow:var(--orders-control-shadow,none);
}
html:root.orders-crystal body #dialog-content .task-editor-grid :is(.task-editor-controls,.task-editor-dates,.task-people) { min-width:0; gap:12px; }
html:root.orders-crystal body #dialog-content .task-editor-controls>div { min-width:0; flex:1 1 140px; }
html:root.orders-crystal body #dialog-content .task-editor-grid .task-people .button { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
html:root.orders-crystal body #dialog-content .task-step { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; }
html:root.orders-crystal body #dialog-content .task-step>input {
  box-sizing:border-box;
  min-width:0;
  min-height:44px;
  padding:10px 14px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text)!important;
}
html:root.orders-crystal body #dialog-content .task-step>.icon-btn { width:44px!important; height:44px!important; min-width:44px!important; min-height:44px!important; padding:10px!important; }
html:root.orders-crystal body #dialog-content .task-colors { flex-wrap:wrap; gap:12px; }
html:root.orders-crystal body #dialog-content .task-colors button { width:36px; height:36px; min-height:36px; }
html:root.orders-crystal body #dialog-content .task-extra>summary { display:flex; align-items:center; min-height:44px; }
html:root.orders-crystal body #dialog-content .task-view-details { min-width:0; gap:14px; }
html:root.orders-crystal body #dialog-content .task-view-details :is(p,a,div) { max-width:100%; overflow-wrap:anywhere; }
html:root.orders-crystal body #dialog-content :is(.task-editor-grid,.task-view-details) :is(input,button,a,summary):focus-visible { outline:2px solid var(--orders-focus); outline-offset:3px; }

/* Shifts: preserve the native details filter, tabs and journal actions. */
html:root.orders-crystal #page-content:has(> .shift-journal-toolbar) { container:shifts-workspace / inline-size; }
html:root.orders-crystal #page-content .shift-journal-toolbar { align-items:end; gap:12px 20px; margin-bottom:18px; }
html:root.orders-crystal #page-content .shift-journal-toolbar>.tabs {
  box-sizing:border-box;
  display:flex;
  min-height:44px;
  max-width:100%;
  padding:4px;
  gap:4px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
}
html:root.orders-crystal #page-content .shift-journal-toolbar>.tabs>.tab {
  box-sizing:border-box;
  min-height:36px;
  padding:8px 13px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--text)!important;
  line-height:20px;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html:root.orders-crystal #page-content .shift-journal-toolbar>.tabs>.tab.active {
  background:var(--orders-control-selected,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow,none)!important;
  font-weight:600;
}
html:root.orders-crystal #page-content .shift-journal-filters { flex:1 1 430px; min-width:0; gap:10px; justify-content:flex-end; }
html:root.orders-crystal #page-content .shift-journal-filters>label { flex:0 1 200px; min-width:140px; max-width:240px; gap:7px; }
html:root.orders-crystal #page-content .shift-journal-filters>.journal-advanced-filters { flex:0 1 280px; min-width:0; }
html:root.orders-crystal #page-content .shift-journal-filters>.journal-advanced-filters[open] { flex-basis:100%; }
html:root.orders-crystal #page-content .shift-journal-filters :is(input,select,summary) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  min-height:44px;
  height:44px;
  padding:10px 14px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text)!important;
  font:inherit;
  font-size:13px;
  -webkit-backdrop-filter:blur(var(--glass-blur,18px))!important;
  backdrop-filter:blur(var(--glass-blur,18px))!important;
}
html:root.orders-crystal #page-content .shift-journal-filters select { padding-inline-end:36px; }
html:root.orders-crystal #page-content .shift-journal-filters summary { white-space:normal; line-height:1.4; height:auto; }
html:root.orders-crystal #page-content .shift-journal-filters .journal-advanced-filters[open]>summary {
  background:var(--orders-control-selected,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow,none)!important;
}
html:root.orders-crystal #page-content .shift-journal-filters .journal-advanced-content {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));
  gap:14px;
  align-items:end;
  margin-top:12px;
  padding:16px;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--control-surface);
  box-shadow:var(--orders-control-shadow,none);
}
html:root.orders-crystal #page-content .shift-journal-filters .journal-advanced-content label { min-width:0; max-width:none; gap:7px; }
html:root.orders-crystal #page-content .shift-journal-filters .journal-advanced-content>.button { height:44px; min-height:44px; align-self:end; }
html:root.orders-crystal #page-content .shift-filter-summary { text-align:start; color:var(--muted); font-size:12px; }
html:root.orders-crystal #page-content :is(.employee-shift-row,.cash-journal-row,.cash-journal-head) { min-width:0; max-width:100%; }
html:root.orders-crystal #page-content .employee-shift-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  padding:10px 12px;
  border-color:var(--line);
  border-radius:var(--orders-radius-inset,20px);
}
html:root.orders-crystal #page-content .employee-shift-row .purchase-request-open { min-width:0; padding:6px 0; gap:12px; }
html:root.orders-crystal #page-content .employee-shift-row .purchase-request-open>span { min-width:0; overflow-wrap:anywhere; }
html:root.orders-crystal #page-content .employee-shift-row .purchase-request-open :is(strong,small) { white-space:normal; overflow-wrap:anywhere; }
html:root.orders-crystal #page-content .employee-shift-row .purchase-request-open>.icon { flex:0 0 18px; }
html:root.orders-crystal #page-content .employee-shift-row>.button { margin:0; min-height:44px; }
html:root.orders-crystal #page-content :is(.cash-journal-head,.cash-journal-row) {
  grid-template-columns:minmax(0,1.15fr) minmax(0,1.35fr) minmax(90px,.7fr) minmax(90px,.7fr) 20px;
  gap:16px;
}
html:root.orders-crystal #page-content .cash-journal-row {
  padding:16px 12px;
  border-color:var(--line);
  border-radius:var(--orders-radius-inset,20px);
  background:transparent!important;
  color:var(--text);
}
html:root.orders-crystal #page-content :is(.cash-journal-row,.employee-shift-row):hover { background:var(--orders-control-hover,var(--control-surface))!important; }
html:root.orders-crystal #page-content :is(.cash-journal-row,.cash-journal-head)>:is(span,strong) { min-width:0; overflow-wrap:anywhere; }
html:root.orders-crystal #page-content .cash-journal-row small { overflow-wrap:anywhere; line-height:1.5; color:var(--muted); }
html:root.orders-crystal #page-content .shift-journal-toolbar :is(input,select,summary,button):focus-visible,
html:root.orders-crystal #page-content :is(.employee-shift-row button,.cash-journal-row):focus-visible { outline:2px solid var(--orders-focus); outline-offset:3px; }

/* Cash forms and reports: glass fields, bounded tables, readable numeric groups. */
html:root.orders-crystal body #dialog-content .cash-dashboard { container:cash-workspace / inline-size; min-width:0; gap:18px; }
html:root.orders-crystal body #dialog-content .cash-report { container:cash-report / inline-size; min-width:0; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) .cash-section {
  min-width:0;
  max-width:100%;
  padding:18px;
  border:0!important;
  border-radius:var(--orders-radius-card,24px)!important;
  background:var(--card-surface)!important;
  box-shadow:var(--card-edge)!important;
}
html:root.orders-crystal body #dialog-content .cash-main-grid { grid-template-columns:minmax(0,1fr) 300px; gap:16px; min-width:0; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) .cash-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) .cash-metric {
  min-width:0;
  padding:14px;
  border:0!important;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--control-surface)!important;
  box-shadow:var(--orders-control-shadow,none);
}
html:root.orders-crystal body #dialog-content .cash-dashboard .cash-actual { grid-column:1/-1; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) :is(.cash-metric>strong,.cash-payment-row,.cash-status-bar>span,.cash-report-dates) { overflow-wrap:anywhere; min-width:0; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) .cash-metric>strong { font-size:18px; line-height:1.4; font-variant-numeric:tabular-nums; }
html:root.orders-crystal body #dialog-content .cash-denomination {
  box-sizing:border-box;
  min-height:56px;
  padding:6px;
  gap:6px;
  border:0!important;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--orders-control-fill,var(--control-surface));
  box-shadow:var(--orders-control-shadow,none);
}
html:root.orders-crystal body #dialog-content .cash-denomination input { box-sizing:border-box; height:44px; min-height:44px; background:transparent!important; box-shadow:none!important; border:0!important; color:var(--text)!important; }
html:root.orders-crystal body #dialog-content .cash-token { min-width:44px; width:44px; height:44px; }
html:root.orders-crystal body #dialog-content .cash-counter-total { gap:12px; flex-wrap:wrap; border-color:var(--line); }
html:root.orders-crystal body #dialog-content .cash-counter-total strong { font-size:22px; overflow-wrap:anywhere; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) :is(.cash-payment-row,.cash-reconcile-head,.cash-reconcile-row) { border-color:var(--line); }
html:root.orders-crystal body #dialog-content .cash-reconcile-row input {
  box-sizing:border-box;
  min-width:0;
  min-height:44px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  color:var(--text)!important;
}
html:root.orders-crystal body #dialog-content .cash-reconcile-head { color:var(--muted); }
html:root.orders-crystal body #dialog-content :is(.cash-reconcile-head,.cash-reconcile-row) { grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr)); gap:12px; }
html:root.orders-crystal body #dialog-content :is(.cash-reconcile-head,.cash-reconcile-row)>* { min-width:0; overflow-wrap:anywhere; }
html:root.orders-crystal body #dialog-content .cash-report .table-scroll { min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
html:root.orders-crystal body #dialog-content .cash-report-table { min-width:600px; }
html:root.orders-crystal body #dialog-content .cash-report-table td { max-width:240px; overflow-wrap:anywhere; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) [data-cash-sign="negative"] { color:var(--danger)!important; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) [data-cash-sign="positive"] { color:var(--amber)!important; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) [data-cash-sign="zero"] { color:var(--text)!important; }
html:root.orders-crystal body #dialog-content :is(.cash-dashboard,.cash-report) :is(button,input,select,summary):focus-visible,
html:root.orders-crystal body #dialog-content .cash-denomination:focus-within { outline:2px solid var(--orders-focus); outline-offset:3px; }
html:root.orders-crystal body #dialog-content .cash-dashboard [data-act="cash-submit"] {
  background:var(--orders-primary-current,var(--orders-primary-fill,#1764ef))!important;
  color:var(--orders-primary-ink,#fff)!important;
  box-shadow:var(--orders-primary-shadow,none)!important;
  border:0!important;
}
html:root.orders-crystal body #dialog-content:has([data-act="manager-shift-employee"])>.field-label { display:block; margin:16px 0 7px; }
html:root.orders-crystal body #dialog-content [data-act="manager-shift-employee"] { max-width:100%; white-space:normal; overflow-wrap:anywhere; }

@container tasks-workspace (max-width:720px) {
  html:root.orders-crystal #page-content .ts-workspace .ts-task-filters { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:10px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-search { width:100%; min-width:0; max-width:none; grid-column:1; grid-row:1; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-filters>.icon-btn { grid-column:2; grid-row:1; margin:0; }
  html:root.orders-crystal #page-content .ts-workspace .ts-assignee-filter { grid-column:1/-1; grid-row:2; width:100%; }
  html:root.orders-crystal #page-content .ts-workspace .ts-assignee-filter select { flex:1; max-width:none; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task { grid-template-columns:44px minmax(0,1fr) minmax(105px,130px); gap:10px 12px; padding:16px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-complete { grid-column:1; grid-row:1; align-self:start; margin-top:0; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-title { grid-column:2/-1; grid-row:1; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-people { grid-column:2; grid-row:2; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-status { grid-column:3; grid-row:2; min-height:44px; align-self:center; }
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-task>.icon-btn,.ts-task-edit-spacer,.ts-person-avatar) { display:none; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day-preview { display:none; }
  html:root.orders-crystal #page-content .ts-workspace .ts-month-grid { gap:4px; padding-inline:12px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day { min-height:62px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day-count { top:auto; bottom:7px; right:7px; }
}
@container tasks-workspace (max-width:540px) {
  html:root.orders-crystal #page-content .ts-workspace .ts-task-navigation { flex-direction:column; align-items:stretch; padding:12px; }
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-scope,.ts-view-switch)>button { flex:1; padding-inline:8px; }
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-task-filters,.ts-status-filters) { padding-inline:12px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task { padding:14px 12px; gap:10px; grid-template-columns:44px minmax(0,1fr) 116px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-task-status { font-size:12px!important; padding-inline:10px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-calendar-toolbar { padding:12px; gap:8px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-month-controls { flex:1 1 100%; justify-content:space-between; }
  html:root.orders-crystal #page-content .ts-workspace .ts-month-controls h2 { font-size:15px; text-align:center; }
  html:root.orders-crystal #page-content .ts-workspace .ts-month-grid { gap:3px; padding-inline:10px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day { min-height:56px; border-radius:var(--orders-radius-inset,20px); padding:5px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day.is-selected { padding:5px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day-number { width:22px; line-height:22px; font-size:12px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-day-count { right:4px; bottom:5px; min-width:14px; line-height:14px; padding:0 3px; font-size:10px; }
  html:root.orders-crystal #page-content .ts-workspace .ts-agenda-heading { padding:14px 12px; }
}
@container task-editor (max-width:760px) {
  html:root.orders-crystal body #dialog-content .task-editor-grid { grid-template-columns:minmax(0,1fr); }
}
@container task-editor (max-width:480px) {
  html:root.orders-crystal body #dialog-content .task-editor-dates { grid-template-columns:minmax(0,1fr); }
  html:root.orders-crystal body #dialog-content .task-editor-side { padding:14px; }
}
@container shifts-workspace (max-width:760px) {
  html:root.orders-crystal #page-content .shift-journal-filters { flex-basis:100%; justify-content:flex-start; }
  html:root.orders-crystal #page-content .shift-journal-filters>label { flex:1 1 140px; max-width:220px; min-width:0; }
  html:root.orders-crystal #page-content .shift-journal-filters>.journal-advanced-filters { flex:1 1 220px; }
  html:root.orders-crystal #page-content .cash-journal-head { display:none; }
  html:root.orders-crystal #page-content .cash-journal-row {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 20px;
    gap:14px 12px;
    padding:16px;
    margin:10px 0;
    border:0;
    background:var(--control-surface)!important;
    box-shadow:var(--orders-control-shadow,none);
  }
  html:root.orders-crystal #page-content .cash-journal-row>span:nth-child(1) { grid-column:1; grid-row:1; }
  html:root.orders-crystal #page-content .cash-journal-row>span:nth-child(2) { grid-column:2; grid-row:1; }
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(3) { grid-column:1; grid-row:2; }
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(4) { grid-column:2; grid-row:2; }
  html:root.orders-crystal #page-content .cash-journal-row>.icon { grid-column:3; grid-row:1/3; }
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(3)::before,
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(4)::before { display:block; margin-bottom:5px; font-size:11px; line-height:1.4; font-weight:400; color:var(--muted); }
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(3)::before { content:'При открытии'; }
  html:root.orders-crystal #page-content .cash-journal-row>strong:nth-child(4)::before { content:'При закрытии'; }
  html:root.orders-crystal:lang(en) #page-content .cash-journal-row>strong:nth-child(3)::before { content:'Opening cash'; }
  html:root.orders-crystal:lang(en) #page-content .cash-journal-row>strong:nth-child(4)::before { content:'Closing cash'; }
  html:root.orders-crystal #page-content .employee-shift-row { padding:14px; margin:10px 0; border:0; background:var(--control-surface); box-shadow:var(--orders-control-shadow,none); }
  html:root.orders-crystal #page-content .employee-shift-row .purchase-request-open { grid-column:1/-1; }
  html:root.orders-crystal #page-content .employee-shift-row>.button { grid-column:2; justify-self:end; }
}
@container shifts-workspace (max-width:440px) {
  html:root.orders-crystal #page-content .shift-journal-toolbar>.tabs { width:100%; }
  html:root.orders-crystal #page-content .shift-journal-toolbar>.tabs>.tab { flex:1; padding-inline:10px; }
  html:root.orders-crystal #page-content .shift-journal-filters>label { max-width:none; flex-basis:100%; }
  html:root.orders-crystal #page-content .shift-journal-filters>.journal-advanced-filters { flex-basis:100%; }
  html:root.orders-crystal #page-content .shift-journal-filters .journal-advanced-content { padding:14px; grid-template-columns:minmax(0,1fr); }
}
@container cash-workspace (max-width:800px) {
  html:root.orders-crystal body #dialog-content .cash-main-grid { grid-template-columns:minmax(0,1fr); }
  html:root.orders-crystal body #dialog-content .cash-bottom-grid { grid-template-columns:minmax(0,1fr); }
}
@container cash-workspace (max-width:480px) {
  html:root.orders-crystal body #dialog-content .cash-dashboard .cash-section { padding:14px; }
  html:root.orders-crystal body #dialog-content .cash-dashboard .cash-metrics { grid-template-columns:minmax(0,1fr); }
  html:root.orders-crystal body #dialog-content :is(.cash-reconcile-head,.cash-reconcile-row) { gap:6px; font-size:12px; }
  html:root.orders-crystal body #dialog-content .cash-reconciliation:has(.cash-reconcile-row>input)>.cash-reconcile-head { display:none; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; padding-block:16px; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>label { grid-column:1/-1; grid-row:1; margin-bottom:4px; font-weight:600; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>strong:nth-child(2) { grid-column:1; grid-row:2/4; align-self:start; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>strong:nth-child(2)::before { content:'По учёту'; display:block; margin-bottom:6px; color:var(--muted); font-weight:400; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)::before { content:'Фактически'; grid-column:2; grid-row:2; color:var(--muted); }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>input { grid-column:2; grid-row:3; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>strong:last-child { grid-column:1/-1; grid-row:4; margin-top:4px; }
  html:root.orders-crystal body #dialog-content .cash-reconcile-row:has(>input)>strong:last-child::before { content:'Разница: '; color:var(--muted); font-weight:400; }
  html:root.orders-crystal:lang(en) body #dialog-content .cash-reconcile-row:has(>input)>strong:nth-child(2)::before { content:'Recorded'; }
  html:root.orders-crystal:lang(en) body #dialog-content .cash-reconcile-row:has(>input)::before { content:'Actual'; }
  html:root.orders-crystal:lang(en) body #dialog-content .cash-reconcile-row:has(>input)>strong:last-child::before { content:'Difference: '; }
}
@container cash-report (max-width:480px) {
  html:root.orders-crystal body #dialog-content .cash-report .cash-section { padding:14px; }
  html:root.orders-crystal body #dialog-content .cash-report .cash-metrics { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
  html:root.orders-crystal #page-content .ts-workspace :is(input,select),
  html:root.orders-crystal #page-content .shift-journal-filters :is(input,select),
  html:root.orders-crystal body #dialog-content :is(.task-step>input,.cash-reconcile-row input) { font-size:16px; }
}
@media(prefers-reduced-transparency:reduce) {
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-scope,.ts-view-switch,.ts-task-search),
  html:root.orders-crystal #page-content .shift-journal-filters :is(input,select,summary) { -webkit-backdrop-filter:none!important; backdrop-filter:none!important; }
}
@media(forced-colors:active) {
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-pill,.ts-view-switch>button,.ts-task-search,.ts-day,.ts-task-status,.task-complete),
  html:root.orders-crystal #page-content .shift-journal-filters :is(input,select,summary),
  html:root.orders-crystal body #dialog-content :is(.task-step>input,.cash-reconcile-row input) { background:Canvas!important; color:CanvasText!important; border:1px solid CanvasText!important; box-shadow:none!important; }
  html:root.orders-crystal #page-content .ts-workspace :is(.ts-day.is-selected,.ts-pill.is-active,[aria-selected="true"]) { outline:2px solid Highlight; }
}
