:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #d8dde5;
  --text: #17202a;
  --muted: #667085;
  --accent: #176b87;
  --accent-strong: #0f4f66;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

body.modal-open {
  overflow: hidden;
}

body.drawer-open {
  overflow: hidden;
}

body.order-card-open {
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #111827;
  color: #f9fafb;
  padding: 18px 14px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  font-weight: 700;
}

.brand span:last-child {
  display: block;
  color: #aeb7c4;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-link {
  border-radius: 6px;
  color: #d7dce5;
  padding: 9px 10px;
  text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
  background: #1f2937;
  color: #ffffff;
}

.content {
  min-width: 0;
  overflow-x: hidden;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  max-width: 1420px;
  margin: 0 auto 12px;
}

.employee-badge {
  display: inline-grid;
  min-height: 34px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 3px 10px;
}

.employee-badge span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.employee-badge small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.logout-form {
  margin: 0;
}

.location-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.location-switcher select {
  width: 180px;
  min-height: 34px;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  background: #eef2f6;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.auth-brand {
  color: var(--text);
  margin-bottom: 18px;
}

.auth-brand span:last-child {
  color: var(--muted);
}

.auth-card h1 {
  margin: 0 0 18px;
  font-size: 24px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.page-header,
.toolbar,
.workspace {
  width: 100%;
  min-width: 0;
  max-width: 1420px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

.page-header p,
.order-panel dd,
.empty-state,
.muted {
  color: var(--muted);
}

.primary-button,
.primary-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 600;
  padding: 0 14px;
  text-decoration: none;
}

.primary-button:hover,
.primary-link:hover {
  background: var(--accent-strong);
}

.secondary-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.secondary-link:hover {
  color: var(--text);
}

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) repeat(4, minmax(140px, 170px)) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: start;
}

.order-toolbar input[type="search"],
.order-toolbar select {
  height: 36px;
}

.order-toolbar input[type="search"] {
  flex: 0 1 140px;
  max-width: 140px;
}

.order-toolbar .filter-submit {
  min-height: 36px;
  padding: 0 9px;
}

.order-toolbar select[name="status_id"],
.order-toolbar select[name="master_id"],
.order-toolbar select[name="order_type_id"] {
  flex: 0 0 104px;
  max-width: 104px;
}

.order-toolbar select[name="manager_id"] {
  flex: 0 0 120px;
  max-width: 120px;
}

.order-toolbar .segmented-filter {
  flex: 0 0 auto;
}

.order-toolbar .segmented-filter span {
  min-width: 52px;
  justify-content: center;
  padding: 0 7px;
}

.order-toolbar .segmented-filter label:nth-child(2) span {
  min-width: 72px;
}

.order-toolbar .segmented-filter label:nth-child(3) span {
  min-width: 46px;
}

.order-toolbar .segmented-filter label:nth-child(4) span {
  min-width: 34px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

option {
  background: #ffffff;
  color: var(--text);
}

.status-color-select,
.status-select {
  border-color: color-mix(in srgb, var(--status-color-bg, #eef0f3) 72%, #1f2937);
  background: var(--status-color-bg, #eef0f3);
  color: var(--status-color-text, var(--text));
  font-weight: 700;
}

.status-color-select:focus,
.status-select:focus {
  outline-color: color-mix(in srgb, var(--status-color-bg, #9fb9c4) 70%, #1f2937);
}

.status-color-select[data-selected-color="gray"],
.status-select[data-selected-color="gray"],
.status-pill[data-selected-color="gray"],
.order-status-pill[data-selected-color="gray"],
.status-badge-gray {
  --status-color-bg: #eef0f3;
  --status-color-text: #344054;
}

.status-color-select[data-selected-color="blue"],
.status-select[data-selected-color="blue"],
.status-pill[data-selected-color="blue"],
.order-status-pill[data-selected-color="blue"],
.status-badge-blue {
  --status-color-bg: #dbeafe;
  --status-color-text: #1d4ed8;
}

.status-color-select[data-selected-color="violet"],
.status-select[data-selected-color="violet"],
.status-pill[data-selected-color="violet"],
.order-status-pill[data-selected-color="violet"],
.status-badge-violet {
  --status-color-bg: #ede9fe;
  --status-color-text: #6d28d9;
}

.status-color-select[data-selected-color="orange"],
.status-select[data-selected-color="orange"],
.status-pill[data-selected-color="orange"],
.order-status-pill[data-selected-color="orange"],
.status-badge-orange {
  --status-color-bg: #ffedd5;
  --status-color-text: #c2410c;
}

.status-color-select[data-selected-color="yellow"],
.status-select[data-selected-color="yellow"],
.status-pill[data-selected-color="yellow"],
.order-status-pill[data-selected-color="yellow"],
.status-badge-yellow {
  --status-color-bg: #fef3c7;
  --status-color-text: #92400e;
}

.status-color-select[data-selected-color="green"],
.status-select[data-selected-color="green"],
.status-pill[data-selected-color="green"],
.order-status-pill[data-selected-color="green"],
.status-badge-green {
  --status-color-bg: #dcfce7;
  --status-color-text: #15803d;
}

.status-color-select[data-selected-color="red"],
.status-select[data-selected-color="red"],
.status-pill[data-selected-color="red"],
.order-status-pill[data-selected-color="red"],
.status-badge-red {
  --status-color-bg: #fee2e2;
  --status-color-text: #b91c1c;
}

.status-color-option-gray {
  background: #eef0f3;
  color: #344054;
}

.status-color-option-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-color-option-violet {
  background: #ede9fe;
  color: #6d28d9;
}

.status-color-option-orange {
  background: #ffedd5;
  color: #c2410c;
}

.status-color-option-yellow {
  background: #fef3c7;
  color: #92400e;
}

.status-color-option-green {
  background: #dcfce7;
  color: #15803d;
}

.status-color-option-red {
  background: #fee2e2;
  color: #b91c1c;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
}

textarea {
  min-height: 88px;
  padding: 9px 10px;
  resize: vertical;
}

.form-errors {
  display: grid;
  gap: 4px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 9px 10px;
}

.form-errors p {
  margin: 0;
}

.checkbox-filter {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  color: #344054;
  white-space: nowrap;
}

.checkbox-filter input {
  width: 16px;
  min-height: 16px;
}

.segmented-filter {
  display: inline-flex;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  white-space: nowrap;
}

.segmented-filter label {
  display: inline-flex;
  align-items: center;
}

.segmented-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented-filter span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-right: 1px solid var(--line);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  padding: 0 11px;
}

.segmented-filter label:last-child span {
  border-right: 0;
}

.segmented-filter input:checked + span {
  background: #e7f3f6;
  color: var(--accent-strong);
}

.secondary-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  padding: 0 12px;
}

.secondary-button:hover {
  border-color: #b8c0cc;
  background: #f8fafc;
}

.danger-button {
  min-height: 36px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #b42318;
  cursor: pointer;
  font-weight: 700;
  padding: 0 12px;
}

.danger-button:hover {
  border-color: #fda29b;
  background: #ffe4e6;
}

.compact-secondary-button,
.compact-danger-button {
  min-height: 30px;
  font-size: 12px;
  white-space: nowrap;
}

.reset-link {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.reset-link:hover {
  color: var(--text);
}

.reference-toolbar {
  grid-template-columns: minmax(280px, 1fr) 180px auto auto;
}

.audit-toolbar {
  grid-template-columns: repeat(2, minmax(135px, 150px)) minmax(170px, 1fr) repeat(3, minmax(135px, 160px)) repeat(2, minmax(130px, 150px)) auto auto auto auto;
  align-items: end;
}

.audit-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-toolbar input,
.audit-toolbar select {
  min-height: 36px;
}

.audit-check-filter {
  min-height: 36px;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: #344054 !important;
  white-space: nowrap;
}

.audit-check-filter input {
  width: 14px;
  min-height: 14px;
}

.reference-create-panel {
  max-width: 1420px;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.reference-create-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(130px, 160px) minmax(130px, 160px) minmax(80px, 100px) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.reference-create-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reference-create-form label span {
  white-space: nowrap;
}

.employee-create-form {
  grid-template-columns: minmax(210px, 1.2fr) minmax(115px, 140px) minmax(115px, 140px) minmax(140px, 160px) minmax(120px, 150px) minmax(170px, 1fr) auto;
}

.status-create-form {
  grid-template-columns: minmax(190px, 1.1fr) minmax(130px, 150px) minmax(120px, 140px) 90px minmax(220px, 1fr) auto;
}

.location-create-form {
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 1fr) minmax(240px, 1.4fr) minmax(120px, 140px) auto;
}

.employee-location-picker,
.status-role-picker {
  display: flex;
  min-height: 36px;
  flex-wrap: wrap;
  align-content: center;
  gap: 6px 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.employee-location-picker legend,
.status-role-picker legend {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.employee-location-picker label,
.status-role-picker label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.employee-location-picker input,
.status-role-picker input {
  width: 14px;
  min-height: 14px;
}

.employee-location-picker-table,
.status-role-picker-table {
  min-width: 150px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.alert-panel,
.order-form {
  max-width: 1260px;
  margin: 0 auto;
}

.order-form-header {
  max-width: 1260px;
}

.order-form-header h1 {
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.alert-panel {
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: #fffbfa;
  color: #b42318;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 12px;
  padding: 14px;
}

.form-section h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.order-form .form-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 16px;
  padding: 0;
}

.order-form .form-section h2 {
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.order-form .form-grid {
  grid-template-columns: repeat(2, 360px);
  column-gap: 28px;
  row-gap: 7px;
  justify-content: start;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.order-form .form-grid label,
.order-form .client-search-field {
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  gap: 4px;
}

.order-form input,
.order-form select {
  height: 34px;
  min-height: 34px;
  font-size: 14px;
}

.order-form textarea {
  min-height: 72px;
  font-size: 14px;
}

.order-type-section {
  margin-bottom: 12px;
}

.compact-field {
  display: grid;
  max-width: 360px;
  gap: 6px;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
}

.client-kind-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.client-kind-toggle label {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  padding: 0 10px;
}

.client-kind-toggle input {
  width: 14px;
  height: 14px;
  min-height: 14px;
}

.client-picker {
  position: relative;
}

.client-search-field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.order-form .client-search-field {
  max-width: 360px;
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
}

.work-name-field .input-with-action {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
}

.input-with-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 8px;
}

.input-with-action input {
  min-width: 0;
}

.input-with-actions input {
  min-width: 0;
}

.icon-button {
  display: inline-grid;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.order-form .icon-button {
  min-height: 34px;
}

.icon-button:hover {
  border-color: #9fb9c4;
  background: #eef7fa;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.client-view-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.order-card-client-picker .client-suggestions {
  top: calc(100% + 4px);
  width: 100%;
}

.order-card-client-picker .client-summary {
  grid-column: 1 / -1;
}

.client-suggestions {
  position: absolute;
  z-index: 10;
  left: 0;
  width: min(calc(100% - 44px), 556px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 12%);
}

.client-suggestion {
  display: grid;
  width: 100%;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.client-suggestion:last-child {
  border-bottom: 0;
}

.client-suggestion:hover {
  background: #f0f7fa;
}

.client-suggestion span,
.client-summary {
  color: var(--muted);
  font-size: 12px;
}

.client-summary {
  margin-top: 6px;
}

.new-client-fields {
  margin-top: 12px;
}

.side-drawer-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgb(15 23 42 / 34%);
}

.side-drawer-backdrop[hidden] {
  display: none;
}

.side-drawer {
  display: grid;
  width: min(460px, 100%);
  max-width: calc(100vw - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -18px 0 44px rgb(15 23 42 / 20%);
}

.side-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.side-drawer-header h2 {
  margin: 0;
  font-size: 22px;
}

.side-drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-form {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.drawer-form label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.drawer-form .client-kind-toggle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-bottom: 2px;
}

.drawer-form .client-kind-toggle label {
  display: inline-flex;
  height: 38px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-form .client-kind-toggle input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}

.drawer-form input,
.drawer-form select {
  height: 38px;
  min-height: 38px;
  font-size: 14px;
}

.drawer-form textarea {
  min-height: 86px;
  font-size: 14px;
}

.drawer-content {
  overflow: auto;
  padding: 18px;
}

.client-view-card {
  display: grid;
  gap: 18px;
}

.client-view-card h3 {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 15px;
  text-transform: uppercase;
}

.client-view-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.client-view-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-view-card dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 600;
}

.client-view-card p {
  margin: 0;
  color: #344054;
  line-height: 1.45;
}

.drawer-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 14px;
}

.drawer-alert {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
}

.drawer-alert p {
  margin: 0;
}

.wide-field {
  grid-column: span 2;
}

.order-form .wide-field {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.order-form .form-actions {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
}

.print-create-button {
  gap: 8px;
}

.print-create-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 48%);
  padding: 28px;
}

.modal-backdrop[hidden] {
  display: none;
}

.center-modal {
  display: grid;
  width: min(900px, 100%);
  max-height: calc(100vh - 56px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}

.center-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.center-modal-header h1 {
  margin: 0;
  font-size: 24px;
}

.center-modal-header p {
  color: var(--muted);
}

.center-modal-body {
  overflow: auto;
  padding: 22px;
}

.center-modal .order-form {
  max-width: none;
}

.center-modal .order-form .form-actions {
  position: sticky;
  bottom: -22px;
  background: var(--panel);
  margin-bottom: -22px;
  padding-bottom: 18px;
}

.modal-loading {
  color: var(--muted);
  min-height: 180px;
  padding: 24px;
}

.table-panel {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.table-panel {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.muted {
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--status-color-bg, #e7f3f6);
  color: var(--status-color-text, var(--accent-strong));
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}

.status-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: var(--status-color-bg, #eef0f3);
  color: var(--status-color-text, #344054);
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px;
}

.order-row-status-form {
  display: inline-flex;
  margin: 0;
}

.row-status-pill {
  position: relative;
  padding: 0;
}

.row-status-pill::after {
  position: absolute;
  right: 9px;
  color: var(--status-color-text, var(--accent-strong));
  content: "⌄";
  pointer-events: none;
}

.row-status-pill select {
  width: auto;
  min-width: 92px;
  height: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--status-color-bg, transparent);
  color: var(--status-color-text, inherit);
  cursor: pointer;
  font: inherit;
  padding: 0 26px 0 9px;
}

.row-status-pill select:focus {
  outline: 2px solid #8ab4f8;
  outline-offset: 2px;
}

th {
  background: #f0f3f7;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.table-sort-link:hover {
  color: var(--accent-strong);
}

.sort-mark {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 6px;
  text-transform: none;
}

.table-sort-link.is-active .sort-mark {
  border-color: #9cc3d0;
  background: #e7f3f6;
  color: var(--accent-strong);
}

.order-table-row {
  cursor: pointer;
}

.order-table-row.is-order-archived-row {
  opacity: 0.56;
}

.order-table-row.is-order-archived-row td {
  background: #f8fafc;
}

.order-table-row:hover,
.order-table-row.is-active {
  background: #eef7fa;
}

.order-archive-mini-badge {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border: 1px solid #d8dde5;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
  padding: 0 7px;
}

.order-table-row:focus {
  outline: 2px solid #9fb9c4;
  outline-offset: -2px;
}

.empty-state {
  height: 160px;
  text-align: center;
  vertical-align: middle;
}

.reference-table {
  min-width: 1240px;
}

.reference-table th:nth-child(1) {
  width: 27%;
}

.reference-table th:nth-child(2),
.reference-table th:nth-child(3) {
  width: 140px;
}

.reference-table th:nth-child(4) {
  width: 90px;
}

.reference-table th:nth-child(6) {
  width: 115px;
}

.reference-table th:nth-child(7) {
  width: 210px;
}

.reference-table input {
  min-height: 34px;
}

.reference-table select {
  min-height: 34px;
}

.employee-table th:nth-child(1) {
  width: 24%;
}

.employee-table th:nth-child(2),
.employee-table th:nth-child(3),
.employee-table th:nth-child(4),
.employee-table th:nth-child(5) {
  width: 150px;
}

.employee-table th:nth-child(6) {
  width: 170px;
}

.employee-table th:nth-child(7) {
  width: 105px;
}

.employee-table th:nth-child(8) {
  width: 210px;
}

.employee-table select {
  min-height: 34px;
}

.audit-table {
  min-width: 1500px;
}

.audit-table th:nth-child(1) {
  width: 125px;
}

.audit-table th:nth-child(2) {
  width: 170px;
}

.audit-table th:nth-child(3),
.audit-table th:nth-child(5),
.audit-table th:nth-child(6) {
  width: 115px;
}

.audit-table th:nth-child(4) {
  width: 185px;
}

.audit-table th:nth-child(7),
.audit-table th:nth-child(8),
.audit-table th:nth-child(9) {
  width: 220px;
}

.audit-table td {
  font-size: 13px;
}

.audit-denied-row {
  background: #fffbfa;
}

.audit-danger-row {
  background: #fffcf5;
}

.audit-denied-pill {
  --status-color-bg: #fee4e2;
  --status-color-text: #b42318;
}

.audit-danger-pill {
  --status-color-bg: #fef0c7;
  --status-color-text: #b54708;
}

.status-settings-table {
  min-width: 1260px;
}

.status-settings-table th:nth-child(1) {
  width: 190px;
}

.status-settings-table th:nth-child(2),
.status-settings-table th:nth-child(3) {
  width: 135px;
}

.status-settings-table th:nth-child(4) {
  width: 95px;
}

.status-settings-table th:nth-child(5) {
  width: 150px;
}

.status-settings-table th:nth-child(6) {
  width: 190px;
}

.status-settings-table th:nth-child(7) {
  width: 115px;
}

.status-settings-table th:nth-child(8) {
  width: 118px;
}

.locations-settings-table {
  min-width: 1060px;
}

.locations-settings-table th:nth-child(1) {
  width: 220px;
}

.locations-settings-table th:nth-child(2) {
  width: 220px;
}

.locations-settings-table th:nth-child(3) {
  width: 300px;
}

.locations-settings-table th:nth-child(4) {
  width: 140px;
}

.locations-settings-table th:nth-child(5) {
  width: 115px;
}

.locations-settings-table th:nth-child(6) {
  width: 118px;
}

.reference-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reference-actions form {
  margin: 0;
}

.icon-action-button {
  display: inline-flex;
  width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.icon-action-button:hover {
  border-color: #b8c0cc;
  background: #f8fafc;
}

.muted-row {
  background: #f8fafc;
  color: #667085;
}

.muted-status {
  background: #eef0f3;
  color: #667085;
}

.order-panel-empty {
  color: var(--muted);
  padding: 24px;
}

.order-card-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: rgb(15 23 42 / 42%);
  padding: 28px 0;
}

.order-card-backdrop[hidden] {
  display: none;
}

.order-card-drawer {
  width: min(1460px, calc(100vw - 72px));
  min-width: min(100vw, 860px);
  height: calc(100dvh - 56px);
  max-height: calc(100dvh - 56px);
  margin-right: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: -18px 0 44px rgb(15 23 42 / 22%);
}

.order-card-drawer-body,
.order-card-shell {
  height: 100%;
}

.order-card-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}

.order-card-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--line);
}

.order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  min-height: 58px;
  padding: 8px 18px;
}

.order-card-top h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #101828;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-card-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-card-danger-form {
  margin: 0;
}

.order-archive-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid #d8dde5;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.is-order-archived {
  opacity: 0.88;
}

.order-card-tabs {
  display: flex;
  justify-content: center;
  padding: 24px 18px 16px;
}

.order-card-tab {
  min-width: 280px;
  height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.order-card-tab:first-child {
  border-radius: 6px 0 0 6px;
}

.order-card-tab:last-child {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.order-card-tab.is-active {
  background: #f8fafc;
  color: var(--accent-strong);
}

.order-card-content {
  min-height: 0;
  overflow: auto;
  padding: 0 28px 18px;
}

.order-card-form {
  overflow: visible;
}

.order-card-status-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.order-card-status-row form {
  margin: 0;
}

.order-locked-note {
  width: min(460px, 100%);
  margin: 0 auto 12px;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  text-align: center;
}

.order-card-fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.is-order-locked input:disabled,
.is-order-locked textarea:disabled,
.is-order-locked select:disabled {
  background: #f8fafc;
  color: #667085;
}

.order-status-pill {
  position: relative;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--status-color-bg, #e7f3f6);
  color: var(--status-color-text, var(--accent-strong));
  font-size: 12px;
  font-weight: 700;
}

.order-status-pill::after {
  position: absolute;
  right: 11px;
  color: var(--status-color-text, var(--accent-strong));
  content: "⌄";
  pointer-events: none;
}

.order-status-pill select {
  width: auto;
  min-width: 0;
  height: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--status-color-bg, transparent);
  color: var(--status-color-text, inherit);
  cursor: pointer;
  font: inherit;
  padding: 0 30px 0 12px;
  text-align: center;
}

.order-status-pill select::-ms-expand {
  display: none;
}

.order-status-pill select:focus {
  outline: 2px solid #8ab4f8;
  outline-offset: 2px;
}

.order-card-alert {
  margin-bottom: 8px;
}

.order-card-section {
  margin-bottom: 11px;
}

.order-card-section h3 {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.order-card-type-section {
  max-width: 360px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.order-card-type-section .order-card-grid {
  grid-template-columns: 1fr;
  row-gap: 0;
}

.order-card-type-section label {
  display: block;
}

.order-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  column-gap: 22px;
  row-gap: 6px;
}

.order-card-grid label {
  display: grid;
  gap: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.order-card-field {
  position: relative;
  display: grid;
  gap: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
}

.money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.money-input input {
  border: 0;
  background: transparent;
}

.money-input span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px 0 6px;
}

.order-card-grid input,
.order-card-grid select {
  height: 32px;
  min-height: 32px;
  font-size: 13px;
}

.order-card-grid textarea {
  min-height: 52px;
  font-size: 13px;
}

.order-card-works-panel {
  min-height: 0;
}

.order-card-works-scroll {
  display: grid;
  gap: 16px;
}

.order-work-add-form {
  display: grid;
  gap: 10px;
  background: #ffffff;
}

.order-work-topline {
  display: grid;
  align-items: end;
  width: min(520px, 100%);
  gap: 10px;
}

.order-work-add-form label,
.order-verdict-form label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.order-work-add-form input,
.order-work-add-form select {
  height: 36px;
  min-height: 36px;
  font-size: 14px;
}

.order-work-master {
  color: #667085;
}

.order-work-master select,
.work-name-field input {
  color: #1d2939;
  font-size: 16px;
  font-weight: 700;
}

.work-catalog-suggestions {
  position: absolute;
  z-index: 25;
  top: calc(100% + 4px);
  left: 0;
  width: calc(100% - 84px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 12%);
}

.work-catalog-suggestion {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 10px;
  text-align: left;
}

.work-catalog-suggestion:last-child {
  border-bottom: 0;
}

.work-catalog-suggestion:hover {
  background: #f0f7fa;
  color: var(--text);
}

.order-work-drawer {
  width: min(620px, 100%);
}

.order-work-drawer .side-drawer-header {
  min-height: 72px;
  align-items: center;
}

.order-work-drawer .side-drawer-header h2 {
  color: #101828;
  font-size: 32px;
  font-weight: 800;
}

.order-work-drawer-form {
  gap: 18px;
}

.drawer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.work-drawer-name-field input {
  height: 42px;
  min-height: 42px;
}

.required-mark {
  color: #dc2626;
}

.order-works-ledger {
  margin-top: 0;
}

.order-works-table {
  overflow: hidden;
  background: #ffffff;
}

.order-works-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 86px 110px 110px 170px;
  align-items: center;
  gap: 12px;
  color: #344054;
  font-size: 15px;
  min-height: 40px;
  padding: 0 28px;
}

.order-works-head {
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.order-works-row span:not(:first-child) {
  text-align: right;
}

.order-work-actions-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.order-work-edit-button,
.order-work-delete-button {
  width: 28px;
  min-height: 28px;
  border-radius: 5px;
  font-size: 14px;
}

.order-work-delete-form {
  margin: 0;
}

.order-work-delete-button {
  color: #b42318;
}

.order-work-quantity-form {
  margin: 0;
}

.order-work-quantity-form input {
  width: 70px;
  min-height: 28px;
  height: 28px;
  padding: 0 6px;
  text-align: right;
}

.order-works-row strong,
.order-works-row small {
  display: block;
}

.order-works-row strong {
  color: #1d2939;
  font-size: 14px;
  line-height: 1.2;
}

.order-works-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  margin-top: 2px;
}

.order-works-placeholder {
  color: var(--muted);
  min-height: 38px;
}

.order-works-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 86px 110px 110px 170px;
  align-items: center;
  gap: 12px;
  background: #f2f6fc;
  min-height: 76px;
  padding: 12px 28px;
}

.order-works-summary dl {
  display: grid;
  grid-column: 4 / 6;
  gap: 8px;
  margin: 0;
}

.order-works-summary div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px;
  gap: 10px;
}

.order-works-summary dt,
.order-works-summary dd {
  margin: 0;
  color: #667085;
  font-size: 15px;
  font-weight: 800;
}

.order-works-summary dd {
  text-align: right;
}

.order-verdict-form {
  margin-top: 8px;
}

.order-verdict-form label {
  color: #667085;
  font-size: 15px;
  font-weight: 500;
}

.order-verdict-form textarea {
  min-height: 104px;
  font-size: 14px;
}

.order-card-grid input[readonly],
.order-card-grid textarea[readonly],
.order-card-grid select:disabled {
  background: #ffffff;
  opacity: 1;
}

.order-card-footer {
  display: flex;
  flex: 0 0 auto;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 24px;
  box-shadow: 0 -6px 14px rgb(15 23 42 / 6%);
}

.order-issue-form {
  margin: 0;
}

.order-card-footer button:disabled {
  cursor: default;
  opacity: 0.58;
}

.order-card-print-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.order-card-print-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.print-page {
  background: #e7ebf0;
  color: #111827;
  font-size: 13px;
}

.print-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 18px auto;
  background: #ffffff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 14%);
  padding: 14mm;
}

.print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 8px;
}

.print-header strong,
.print-header span {
  display: block;
}

.print-header strong {
  font-size: 18px;
}

.print-header span {
  color: #4b5563;
  margin-top: 2px;
}

.print-title {
  padding: 14px 0 12px;
  text-align: center;
}

.print-title h1 {
  font-size: 22px;
  margin: 4px 0;
}

.print-title p {
  color: #4b5563;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.print-block {
  break-inside: avoid;
  border: 1px solid #d1d5db;
  margin-bottom: 10px;
  padding: 10px;
}

.print-block h2 {
  color: #111827;
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.print-block p {
  line-height: 1.45;
}

.print-block dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.print-block dl div,
.print-device-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
}

.print-block dt,
.print-block dd {
  margin: 0;
}

.print-block dt {
  color: #6b7280;
}

.print-block dd {
  color: #111827;
  font-weight: 600;
}

.print-device-list .wide-print-row {
  grid-template-columns: 130px minmax(0, 1fr);
}

.print-table {
  min-width: 0;
}

.print-table th,
.print-table td {
  padding: 7px 8px;
}

.print-table th:nth-child(2),
.print-table th:nth-child(3),
.print-table th:nth-child(4),
.print-table td:nth-child(2),
.print-table td:nth-child(3),
.print-table td:nth-child(4) {
  text-align: right;
  width: 110px;
}

.print-table small {
  display: block;
  color: #6b7280;
  font-size: 11px;
  margin-top: 2px;
}

.print-empty {
  color: #6b7280;
  text-align: center;
}

.print-total {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  border: 1px solid #111827;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 16px;
}

.print-total strong {
  min-width: 150px;
  text-align: right;
}

.print-terms {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.print-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 28px;
}

.print-signatures div {
  border-top: 1px solid #111827;
  padding-top: 6px;
}

.print-signatures span,
.print-signatures strong {
  display: block;
}

.print-signatures span {
  color: #6b7280;
}

@media print {
  @page {
    margin: 10mm;
    size: A4;
  }

  body.print-page {
    background: #ffffff;
  }

  .print-sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    box-shadow: none;
    padding: 0;
  }

  .print-hide {
    display: none !important;
  }
}

.order-card-history {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fbfcfe;
}

.order-card-history header {
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
  text-align: center;
}

.order-card-history h2 {
  font-size: 21px;
}

.order-card-history ol {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 9px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  margin: 0;
  padding: 12px 20px 12px 28px;
}

.order-card-history ol::-webkit-scrollbar {
  width: 8px;
}

.order-card-history ol::-webkit-scrollbar-track {
  background: #eef2f5;
}

.order-card-history ol::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f5;
  border-radius: 999px;
  background: #9fb9c4;
}

.order-card-history li {
  border-left: 2px solid var(--accent);
  list-style: none;
  padding-left: 12px;
}

.order-card-history time,
.order-card-history span,
.order-card-history small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.order-card-history strong {
  display: block;
  color: #344054;
  font-size: 13px;
  line-height: 1.2;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.order-card-history p {
  color: #344054;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.order-card-comment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 18px;
}

.order-card-comment textarea {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  overflow: auto;
  resize: none;
  font-size: 12px;
  line-height: 1.25;
}

.comment-send-button {
  display: inline-grid;
  width: 38px;
  min-height: 38px;
  align-self: end;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.comment-send-button:hover {
  background: #eef7fa;
  color: var(--accent-strong);
}

.comment-send-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .toolbar,
  .workspace {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .order-form .form-grid {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .order-card-drawer {
    width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .order-card-shell {
    grid-template-columns: 1fr;
  }

  .order-card-history {
    display: none;
  }

  .order-card-grid {
    grid-template-columns: 1fr;
  }

  .order-works-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .order-work-add-grid {
    grid-template-columns: 1fr;
  }
}
