/* Shared refinements; preserve the established palette and layout. */
.management-sidebar .sidebar-search input.touch-input,
.management-sidebar .sidebar-search input.touch-input:focus {
  color: #173f51;
  -webkit-text-fill-color: #173f51;
  background: #f0f7fc;
  border-color: #a7c7dd;
  caret-color: #173f51;
}
.management-sidebar .sidebar-search input.touch-input::placeholder {
  color: #58758b;
  -webkit-text-fill-color: #58758b;
}
.keyboard-controls {
  position: fixed;
  bottom: 20px;
  right: 22px;
  display: flex;
  gap: 8px;
  z-index: 101;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100vw - 24px);
}
.keyboard-controls .keyboard-toggle {
  position: static;
}
.keyboard-mode {
  min-height: 48px;
  border: 1px solid #a7c7dd;
  padding: 10px 14px;
  border-radius: 14px;
  background: #e5eff9;
  color: #234c5d;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 20px #0c304f20;
}
.keyboard-mode.selected {
  background: #d0f1e2;
  color: #126349;
  border-color: #50a989;
}
.touch-keyboard {
  left: auto;
  right: 14px;
  transform: none;
  max-height: calc(100dvh - 90px);
  overflow: auto;
}
.touch-keyboard > .keyboard-drag-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.touch-keyboard > .keyboard-drag-handle:active {
  cursor: grabbing;
}
.material-list-prices {
  margin-top: 18px;
}
.material-list-prices .price-list-entry {
  border: 1px solid #bed6e5;
  border-radius: 14px;
  background: #eff7fc;
  padding: 14px;
  margin-top: 10px;
}
.material-list-prices .price-list-entry .choice-card {
  width: 100%;
  text-align: left;
}
.material-list-prices .form-grid {
  margin-top: 12px;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: saturate(0.4);
}

/* Full-width weighing desk; material selection reuses the client card picker. */
.op-desk-layout.op-desk-focused {
  grid-template-columns: minmax(0, 1fr);
}
.op-material-actions {
  margin: 0 20px 22px;
  display: grid;
  gap: 12px;
}
.op-add-material-button {
  width: 100%;
  min-height: 100px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  color: #11614f;
  background: linear-gradient(120deg, #d1efe3, #e3f3fb);
  border: 2px solid #68b89e;
  border-radius: 16px;
  box-shadow: 0 5px 16px #287b6512;
}
.op-add-material-button:hover:not(:disabled) {
  border-color: #258e70;
  background: #c8ebde;
}
.op-add-material-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.op-add-material-button strong {
  display: block;
  font-size: 21px;
  font-weight: 800;
}
.op-add-material-button small {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: #416e74;
}
.op-add-material-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #fff9;
}
.op-add-material-arrow {
  margin-left: auto;
  font-size: 30px;
}
.op-material-actions .op-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 740px) {
  .op-material-actions {
    margin: 0 14px 18px;
  }
  .op-add-material-button {
    padding: 16px;
    gap: 12px;
  }
  .op-add-material-button strong {
    font-size: 18px;
  }
  .op-add-material-icon {
    width: 44px;
    height: 48px;
  }
}

/* The operator's main path: client, material, weight, save. */
.op-desk-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}
.op-kind-controls {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.op-scale-compact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 9px 14px;
  border-radius: 13px;
  border: 1px solid #bed2e4;
  background: #f3f8fd;
  color: #315e7d;
  text-align: left;
}
.op-scale-compact span {
  display: grid;
  gap: 2px;
}
.op-scale-compact small {
  font-size: 10px;
  color: #527b88;
}
.op-scale-compact strong {
  font-size: 13px;
  font-weight: 750;
}
.op-scale-compact.live {
  background: #d7f1e7;
  color: #115d4a;
  border-color: #75bca2;
}
.op-scale-compact.live strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.op-scale-compact.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #229f72;
}
.op-scale-consult {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
  color: #315e7d;
  line-height: 1.6;
}
.op-scale-consult h3 {
  font-size: 19px;
  font-weight: 750;
}
.op-scale-consult .op-consult-weight {
  font-size: 27px;
  color: #12674e;
  padding: 16px;
  background: #ddf4e9;
  border-radius: 15px;
  width: 100%;
}
.op-work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}
.op-work-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #5a7a8c;
  font-size: 12px;
}
.op-work-status b {
  font-size: 15px;
  color: #315e7d;
}
.op-work-toolbar > div:last-child {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.op-selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 18px;
}
.op-selection-row .op-client-button,
.op-selection-row .op-add-material-button {
  width: 100%;
  min-height: 102px;
  margin: 0;
  padding: 16px 18px;
  gap: 12px;
}
.op-selection-row .op-client-button strong,
.op-selection-row .op-add-material-button strong {
  font-size: 18px;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.op-selection-row .op-add-material-button small:first-child {
  font-size: 10px;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.op-selection-row .op-add-material-button small {
  font-size: 12px;
  margin-top: 4px;
}
.op-selection-row .op-client-button > div {
  min-width: 0;
}
.op-selection-row .op-add-material-icon {
  width: 42px;
  height: 48px;
}
.op-selection-row .op-add-material-arrow {
  font-size: 22px;
}
.op-desk-options {
  margin: 8px 18px 18px;
  border: 1px solid #cfdfeb;
  border-radius: 12px;
  background: #f0f6fc;
}
.op-desk-options summary {
  padding: 14px;
  min-height: 48px;
  color: #4c7190;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.op-desk-options .op-desk-details {
  margin: 0;
}
@media (max-width: 740px) {
  .op-desk-header-actions {
    justify-content: flex-start;
  }
  .op-selection-row {
    gap: 9px;
  }
  .op-selection-row .op-client-button,
  .op-selection-row .op-add-material-button {
    padding: 12px;
    gap: 8px;
    min-height: 110px;
  }
  .op-selection-row .op-client-button strong,
  .op-selection-row .op-add-material-button strong {
    font-size: 15px;
  }
  .op-selection-row .op-add-material-icon {
    display: none;
  }
  .op-work-status {
    gap: 6px;
  }
}

/* Separate customer and material pickers while retaining the shared dialog. */
.touch-modal.op-picker-blue {
  background: #f3f7ff;
  border-color: #94b7e1;
}
.touch-modal.op-picker-blue > header {
  background: linear-gradient(120deg, #cddff8, #e2eafa);
  border-color: #a9c4e7;
}
.touch-modal.op-picker-blue > header h2 {
  color: #24558b;
}
.touch-modal.op-picker-green {
  background: #f2fbf5;
  border-color: #8dc6aa;
}
.touch-modal.op-picker-green > header {
  background: linear-gradient(120deg, #c1e5d3, #e0f1d2);
  border-color: #99cbb0;
}
.touch-modal.op-picker-green > header h2 {
  color: #19634d;
}
.touch-modal.op-picker-green .op-picker-card {
  background: #eaf7ee;
  border-color: #acd1b9;
  color: #26634b;
}
.touch-modal.op-picker-green .op-picker-initial {
  background: #c7e7d3;
  color: #23614a;
}
.op-picker-entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.op-picker-entry > .op-picker-card {
  width: 100%;
  flex: 1;
}
.op-picker-actions .action-button {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.op-cell-edit {
  min-height: 44px;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #e8f2fc;
  color: #275c83;
  font-weight: 750;
  border: 1px solid #c7dcec;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
.op-cell-edit.needs-value {
  background: #fff0cc;
  color: #865b12;
  border-color: #e1c581;
}
.op-cell-link {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 650;
  color: #317a68;
}
.op-cell-link.muted {
  color: #70899e;
}
.op-weight-only {
  display: grid;
  gap: 16px;
}
.op-weight-reading {
  display: grid;
  gap: 12px;
  justify-items: center;
  border: 1px solid #a7d4bc;
  background: #e2f4e9;
  border-radius: 16px;
  padding: 26px 18px;
  color: #1d6a50;
}
.op-weight-reading strong {
  font-size: 38px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.op-weight-reading small {
  font-size: 12px;
}
.op-missing-quantity {
  margin: 14px 20px;
  border-radius: 11px;
  padding: 12px;
  color: #855810;
  background: #fff0cb;
  font-size: 12px;
}

.op-weight-only {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.touch-modal.op-picker-green > footer {
  background: #e1f1e5;
  border-color: #a9cfb6;
}

.op-simulation-toggle {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cfbc86;
  border-radius: 12px;
  background: #fff7e6;
  color: #795b20;
  font-size: 12px;
  font-weight: 750;
}
.op-simulation-toggle.active {
  background: #ffe4a1;
  border-color: #b99038;
}
.op-simulation-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid #d8b970;
  border-radius: 13px;
  background: #fff3cd;
  color: #795821;
  font-size: 12px;
  line-height: 1.6;
}
.op-simulation-inline {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d8b970;
  background: #fff3cd;
  color: #795821;
  font-size: 12px;
  font-weight: 700;
}

/* Keep numeric editing inside the dialog above its actions. */
.touch-modal > .touch-keyboard.keyboard-inline {
  position: static;
  width: auto;
  max-width: none;
  margin: 0 28px 20px;
  padding: 14px;
  transform: none;
  box-shadow: none;
}
.keyboard-inline > .keyboard-drag-handle {
  cursor: default;
  padding: 0 0 10px;
}
.keyboard-inline .keyboard-row {
  max-width: 320px;
  margin: 5px auto;
}
.keyboard-inline .keyboard-row button {
  min-height: 46px;
  flex: 1;
}
@media (max-width: 600px) {
  .touch-modal > .touch-keyboard.keyboard-inline {
    margin: 0 16px 16px;
  }
}

.op-inform-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  max-width: calc(100% - 40px);
  margin: 4px 20px 12px;
  padding: 12px 16px;
  min-height: 52px;
  border: 1px solid #a7c7dd;
  border-radius: 14px;
  background: #f0f7fc;
  color: #234c5d;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.op-inform-card.selected {
  background: #d0f1e2;
  border-color: #50a989;
  color: #126349;
}
.op-inform-card:disabled {
  opacity: 0.6;
}
.op-desk-save {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
}

.op-selection-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.op-selection-group > .op-client-button,
.op-selection-group > .op-add-material-button {
  width: 100%;
  flex: 1;
}
.op-quick-access {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #a7c7dd;
  border-radius: 12px;
  background: #e5eff9;
  color: #234c5d;
  font-weight: 600;
}
.op-quick-access.op-quick-material {
  background: #e4f3e9;
  border-color: #9dceb7;
  color: #126349;
}
.op-quick-access:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.op-contractor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 16px 20px;
  border: 1px solid #bfd3df;
  border-radius: 14px;
  background: #f0f7fc;
  color: #234c5d;
  font-weight: 700;
  text-align: left;
}
.op-contractor-card.selected {
  background: #d0f1e2;
  border-color: #50a989;
  color: #126349;
}

/* Readable figures and touch targets in the weighing desk's material table. */
.op-lines-table table {
  font-variant-numeric: tabular-nums;
}
.op-lines-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: #34576d;
  padding: 16px 14px;
}
.op-lines-table td {
  font-size: 15px;
  line-height: 1.5;
  color: #193f51;
  padding: 16px 14px;
}
.op-lines-table td:first-child > strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}
.op-lines-table .op-cell-note {
  font-size: 13px;
  line-height: 1.5;
  color: #526e80;
}
.op-lines-table .op-cell-edit {
  min-height: 48px;
  min-width: 90px;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 16px;
  line-height: 1.3;
}
.op-lines-table .price-chip {
  font-size: 16px;
  font-weight: 700;
  padding: 10px 16px;
  line-height: 1.4;
}
.op-lines-table .op-cell-link,
.op-lines-table .action-button {
  font-size: 14px;
  min-height: 48px;
  line-height: 1.4;
}
.op-lines-table .op-cell-link svg {
  width: 18px;
  height: 18px;
}
.op-lines-table .op-cell-link.muted {
  color: #45667b;
}
.op-lines-table td:first-child {
  min-width: 200px;
}
.op-lines-table td:nth-child(2),
.op-lines-table .op-cell-edit,
.op-lines-table .price-chip {
  white-space: nowrap;
}

/* The shared navigation can be hidden to give the current screen more room. */
.management-app.sidebar-collapsed > .management-main {
  margin-left: 0;
}
.management-header-start {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.management-header-start > .sidebar-toggle {
  min-width: 48px;
  min-height: 48px;
  padding: 10px;
  flex-shrink: 0;
}
.management-header-start > .live-clock {
  width: auto;
}
.management-app.sidebar-collapsed .management-content {
  margin-inline: auto;
}
@media (max-width: 740px) {
  .management-header-start {
    width: 100%;
  }
}

.touch-modal .op-picker-card.op-item-color,
.op-selection-group > .op-client-button.op-item-color {
  background: var(--item-pastel);
  border-color: var(--item-border);
  color: #193f51;
}
.touch-modal .op-picker-card.op-item-color .op-picker-initial {
  background: var(--item-pastel);
  color: var(--item-accent);
  border: 1px solid var(--item-border);
}
.touch-modal .op-picker-card.op-item-color:hover {
  box-shadow: 0 0 0 2px var(--item-border);
}
.touch-modal .op-picker-card.op-item-color.selected {
  border-color: var(--item-accent);
}
.op-lines-table tr.op-material-color > td {
  background: var(--item-pastel);
  border-bottom-color: var(--item-border);
}
.op-lines-table tr.op-material-color > td:first-child {
  border-left: 4px solid var(--item-border);
}
.op-lines-table .op-delete-icon {
  width: 48px;
  min-width: 48px;
  padding: 10px;
  justify-content: center;
  align-items: center;
}

.op-lines-table thead th {
  text-align: center;
  font-weight: 800;
}
.op-inform-card:hover {
  border-color: #317a68;
  box-shadow: 0 2px 8px #193f5114;
}
.op-inform-card:focus-visible {
  outline: 3px solid #3669d4;
  outline-offset: 3px;
}
.op-inform-card:disabled {
  cursor: not-allowed;
}
.op-inform-track {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  padding: 3px;
  border-radius: 20px;
  background: #8a9ca9;
}
.op-inform-track > span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #193f5133;
  transition: transform 0.15s;
}
.op-inform-card.selected .op-inform-track {
  background: #087d75;
}
.op-inform-card.selected .op-inform-track > span {
  transform: translateX(18px);
}
.op-ticket-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
}
.op-ticket-totals > div {
  flex: 1 1 170px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #c7dcec;
  border-radius: 14px;
  background: #f0f7fc;
}
.op-ticket-totals span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #45667b;
  margin-bottom: 6px;
}
.op-ticket-totals strong {
  display: block;
  font-size: 23px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: #193f51;
  overflow-wrap: anywhere;
}
.op-ticket-totals strong small {
  font-size: 14px;
}
.op-ticket-totals > .op-total-payment {
  background: #e2f4e9;
  border-color: #9dceb7;
}
.op-ticket-totals .op-total-payment strong {
  color: #087d75;
}
@media (prefers-reduced-motion: reduce) {
  .op-inform-track > span {
    transition: none;
  }
}

/* Leave a clear area for the floating keyboard controls below page actions. */
.management-app .management-content {
  padding-bottom: 120px;
}
.touch-modal > .keyboard-controls {
  position: relative;
  right: auto;
  bottom: auto;
  max-width: none;
  padding: 12px 20px 18px;
  border-top: 1px solid #d5e1ed;
  background: #f4f8fc;
}
@media (max-width: 480px) {
  .management-app .management-content {
    padding-bottom: 160px;
  }
}
