﻿@import url("https://fonts.googleapis.com/css2family=Instrument+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --page: #ffffff;
  --canvas: #f6f7f4;
  --surface: #ffffff;
  --ink: #252421;
  --black: #111111;
  --muted: #6f6c64;
  --line: #e3dfd6;
  --line-strong: #cfc8ba;
  --green: #006649;
  --green-soft: #e7f3ec;
  --amber: #9a6515;
  --amber-soft: #fff2da;
  --blue: #326b8f;
  --blue-soft: #eaf3f8;
  --red: #a13b34;
  --red-soft: #fae8e5;
  --shadow: 0 14px 34px rgba(24, 23, 20, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.14);
  outline-offset: 2px;
}

.ops-header {
  position: static;
  top: auto;
  z-index: 30;
  max-width: none;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  backdrop-filter: none;
}

.ops-toolbar {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 26px;
  margin: 0 auto;
  padding: 0 30px;
}

.ops-logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.ops-logo strong {
  color: var(--black);
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 1px;
}

.ops-logo span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.connection-pill {
  justify-self: center;
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.connection-pill i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
  box-shadow: none;
}

.connection-pill strong,
.connection-pill span {
  display: block;
}

.connection-pill strong {
  color: var(--black);
  font-size: 13px;
}

.connection-pill span {
  color: var(--muted);
  font-size: 12px;
}

.ops-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.primary-button,
.secondary-button,
.mini-button {
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--black);
  color: #fff;
  background: var(--black);
}

.secondary-button,
.mini-button {
  border: 1px solid var(--line-strong);
  color: var(--black);
  background: #fff;
}

.primary-button:hover {
  background: #2b2a28;
}

.secondary-button:hover,
.mini-button:hover {
  border-color: var(--black);
}

.sync-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sync-now svg {
  width: 16px;
  height: 16px;
}

.admin-profile {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.admin-profile span,
.admin-profile strong,
.admin-profile small {
  display: block;
}

.admin-profile strong {
  color: var(--black);
  font-size: 14px;
}

.admin-profile small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-profile b {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--black);
  font-size: 17px;
}

.logout-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4b5565;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.logout-button svg {
  width: 15px;
  height: 15px;
}

.logout-button:hover {
  border-color: #cbd5e1;
  color: var(--black);
  background: #f8fafc;
}

.ops-dashboard {
  max-width: none;
  margin: 0;
  padding: 18px 26px 34px;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
}

.ops-intro {
  display: none;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.ops-intro > div:first-child {
  display: grid;
  align-content: center;
  gap: 10px;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.ops-intro h1 {
  color: var(--black);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 1.08;
}

.ops-intro p,
.rule-summary strong,
.metric-card small,
.metric-card span,
.board-header > strong,
.muted {
  color: var(--muted);
}

.rule-summary,
.metric-card,
.view-panel,
.rule-card,
.technical-drawer,
.delivery-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rule-summary {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 17px;
  background: var(--canvas);
}

.rule-summary strong {
  max-width: 320px;
  font-size: 15px;
  line-height: 1.35;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 18px 22px;
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.035);
}

.metric-card > .metric-icon {
  position: static;
  grid-row: 1 / span 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  padding: 11px;
  color: var(--black);
  background: #f7f7f5;
  stroke-width: 2;
}

.metric-card span {
  align-self: end;
  font-size: 14px;
}

.metric-card strong {
  color: var(--black);
  grid-column: 2;
  font-size: 31px;
  line-height: 1.1;
}

.metric-card:nth-child(3) strong {
  color: #e98a00;
}

.metric-card:nth-child(4) strong {
  color: var(--green);
}

.metric-card small {
  align-self: start;
  font-size: 12px;
}

.view-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.view-tabs button:not(.active) {
  display: none;
}

.view-tabs button {
  min-height: 54px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0 30px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  font-weight: 800;
}

.view-tabs button.active {
  color: var(--black);
  border-bottom-color: var(--black);
  background: transparent;
}

.view-panel {
  display: none;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.04);
  overflow: hidden;
}

.view-panel.active {
  display: block;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 55px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.board-header h2 {
  margin: 0;
  color: var(--black);
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
}

.board-header > div {
  position: relative;
  height: 55px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-header > div::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--black);
}

.board-icon {
  width: 16px;
  height: 16px;
  color: var(--black);
  stroke-width: 2.5;
}

.board-header > strong {
  display: none;
}

.operation-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 300px 46px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.quick-filter-bar {
  display: none !important;
}

.quick-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.quick-filter-bar button {
  min-height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 13px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 850;
}

.quick-filter-bar button:hover,
.quick-filter-bar button.active {
  border-color: var(--black);
  color: #fff;
  background: var(--black);
}

.quick-filter-bar strong {
  min-width: 20px;
  min-height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--black);
  background: var(--canvas);
  font-size: 10px;
}

.operations-alerts {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(179, 54, 41, 0.22);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
}

.operations-alerts[hidden] {
  display: none;
}

.operations-alerts > strong {
  margin-right: 3px;
  color: var(--red);
}

.operations-alerts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-left: 1px solid rgba(179, 54, 41, 0.2);
  padding-left: 8px;
  font-weight: 750;
}

.operations-alerts b {
  min-width: 19px;
  min-height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 10px;
}

.advanced-filters {
  position: relative;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.advanced-filters summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
  color: var(--black);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.advanced-filters summary svg {
  width: 15px;
  height: 15px;
}

.advanced-filters summary::-webkit-details-marker {
  display: none;
}

.advanced-filters summary::after {
  content: "v";
  width: auto;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}

.advanced-filters[open] summary::after {
  content: "^";
}

.advanced-filters summary strong {
  min-width: 20px;
  min-height: 20px;
  display: none;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--black);
  font-size: 11px;
}

.search-box {
  position: relative;
}

.operation-controls .search-box {
  min-width: 0;
}

.operation-controls .search-box input {
  min-height: 38px;
}

.compact-sort {
  width: 46px;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--black);
  background: #fff;
}

.search-box input,
.queue-toolbar select,
.filter-tray select,
.cd-select,
.obs-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
}

.search-box input {
  padding-right: 70px;
}

.search-box > span,
.search-box > svg {
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.search-box > svg {
  width: 16px;
  height: 16px;
}

.filter-tray {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(720px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-tray label,
.filter-count {
  display: grid;
  gap: 5px;
}

.filter-tray span,
.filter-count span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.filter-count {
  align-content: end;
}

.filter-count strong {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--black);
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 16px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bulk-bar[hidden],
#generatePendingLabels {
  display: none;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.bulk-bar > span {
  color: var(--muted);
  font-size: 13px;
}

.bulk-bar .secondary-button {
  margin-left: auto;
}

.sheet-shell {
  max-width: 100%;
  overflow-x: auto;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.ops-sheet {
  min-width: 1380px;
  table-layout: fixed;
}

.mobile-order-list {
  display: none;
}

th,
td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.table-groups th {
  display: table-cell;
  top: 0;
  border-right: 2px solid var(--line-strong);
  border-bottom-color: var(--line-strong);
  color: var(--black);
  background: #f3f1ec;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.ops-sheet thead tr:nth-child(2) th {
  top: 31px;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1),
.sticky-order {
  position: sticky;
  background: #fff;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1) {
  z-index: 6;
}

.sticky-order {
  z-index: 3;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1),
.sticky-order {
  left: 0;
  box-shadow: 1px 0 0 var(--line-strong);
}

td {
  color: var(--ink);
  font-size: 10px;
  overflow: hidden;
}

tbody tr:hover {
  background: #fbfaf7;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.order-group-start td {
  border-top: 1px solid var(--line);
}

.order-group-start:first-child td {
  border-top: 0;
}

.order-group-end td {
  border-bottom: 1px solid var(--line);
}

.order-subrow td:not(.sticky-select) {
  background: #fcfcfa;
}

.order-summary-row td {
  background: #fff;
  vertical-align: top;
}

.order-summary-row:hover td {
  background: #fbfaf7;
}

.order-summary-row .order-shared-cell {
  padding-top: 18px;
  padding-bottom: 18px;
}

.order-summary-row .sticky-select {
  vertical-align: top;
  padding-top: 26px;
}

.order-subrow td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.order-subrow .product-inline {
  gap: 6px;
}

.order-shared-cell {
  vertical-align: top;
  background: #fff;
}

.order-shared-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.order-client-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.sheet-order-cell,
.sheet-name-cell,
.sheet-city-cell,
.sheet-tracking-cell,
.sheet-obs-cell {
  overflow: hidden;
}

.sheet-order-cell strong,
.sheet-name-cell strong {
  display: block;
  overflow: hidden;
  color: var(--black);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-name-cell strong {
  font-size: 10px;
}

.sheet-date-cell,
.sheet-uf-cell,
.sheet-qty-cell,
.sheet-icon-cell,
.sheet-confirm-cell,
.sheet-generate-cell,
.sheet-order-cd-cell {
  text-align: center;
}

.sheet-qty-cell,
.sheet-confirm-cell,
.sheet-tracking-cell,
.ops-sheet thead tr:nth-child(2) th:nth-child(9),
.ops-sheet thead tr:nth-child(2) th:nth-child(14),
.ops-sheet thead tr:nth-child(2) th:nth-child(18) {
  border-left: 2px solid var(--line-strong);
}

.sheet-icon-button {
  width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  color: var(--black);
  background: #fff;
  font-size: 9px;
  font-weight: 850;
}

.sheet-icon-button:hover {
  border-color: var(--black);
}

.sheet-status-button {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.sheet-status-button i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: currentColor;
}

.sheet-status-button.ok {
  border-color: rgba(0, 102, 73, 0.22);
  color: var(--green);
  background: var(--green-soft);
}

.sheet-status-button.wait {
  border-color: rgba(154, 101, 21, 0.24);
  color: var(--amber);
  background: var(--amber-soft);
}

.sheet-status-button:disabled {
  opacity: 1;
}

.sheet-cd-stack,
.sheet-quote-stack,
.sheet-obs-stack {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.sheet-cd-stack .summary-cell {
  gap: 3px;
}

.sheet-quote-stack strong,
.sheet-quote-text {
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
}

.sheet-quote-stack small,
.sheet-obs-stack .note-preview {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.sheet-obs-stack {
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
}

.order-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.order-customer {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.order-customer strong {
  overflow: hidden;
  color: var(--black);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-customer small {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.order-client-cell > strong {
  display: block;
  margin-top: 8px;
  color: var(--black);
  font-size: 12px;
  line-height: 1.2;
}

.order-number {
  display: grid;
  gap: 1px;
}

.order-number strong {
  color: var(--black);
  font-size: 12px;
}

.expand-order {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  color: var(--black);
  background: #fff;
  font-size: 16px;
  font-weight: 850;
}

.expand-order:hover {
  border-color: var(--black);
}

.select-col {
  text-align: center;
}

td strong {
  color: var(--black);
}

.sheet-date-cell,
.sheet-uf-cell,
.sheet-order-cd-cell,
.sheet-tracking-cell {
  white-space: nowrap;
}

.contact-stack,
.address-stack,
.action-cell {
  display: grid;
  align-content: start;
  gap: 7px;
}

.contact-stack .quick-actions {
  flex-wrap: nowrap;
}

.address-stack small,
.product-cell small,
.shipment-status small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-cell,
.expedition-cell,
.freight-quote-cell,
.delivery-cell,
.details-cell {
  vertical-align: top;
}

.cell-stack {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.expedition-summary .summary-cell {
  gap: 6px;
}

.open-shipments {
  min-height: 26px;
  justify-self: start;
  border: 1px solid var(--black);
  border-radius: 5px;
  padding: 0 8px;
  color: #fff;
  background: var(--black);
  font-size: 9px;
  font-weight: 850;
}

.close-shipments {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 850;
  text-decoration: underline;
}

.ops-sheet .cd-select {
  min-height: 28px;
  padding: 0 4px;
  font-size: 10px;
}

.ops-sheet .mini-details summary {
  min-height: 26px;
  padding: 0 5px;
  font-size: 10px;
}

.ops-sheet .summary-cell > strong {
  font-size: 10px;
}

.ops-sheet .summary-cell > span,
.ops-sheet .summary-cell small,
.ops-sheet .summary-chips span {
  font-size: 8px;
}

.sheet-obs-stack .order-details summary {
  width: 28px;
  min-height: 28px;
}

.label-status {
  display: grid;
  gap: 5px;
}

.label-status small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.cd-inline {
  display: grid;
  gap: 4px;
}

.details-cell {
  background: #fff;
}

.order-details summary {
  width: 38px;
  min-height: 38px;
  display: grid;
  justify-self: center;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  color: var(--black);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  list-style: none;
}

.order-details summary::-webkit-details-marker {
  display: none;
}

.order-details[open] summary {
  border-color: var(--black);
}

.detail-stack {
  position: absolute;
  right: 24px;
  z-index: 30;
  width: 340px;
  display: grid;
  gap: 9px;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-stack > div {
  display: grid;
  gap: 5px;
}

.detail-stack > div > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.order-products {
  max-height: 190px;
  display: grid;
  gap: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.order-products > div {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}

.order-products > div:last-child {
  border-bottom: 0;
}

.order-products strong {
  font-size: 11px;
  line-height: 1.35;
}

.order-products small {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.product-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.product-inline > strong {
  min-width: 27px;
  border-radius: 999px;
  padding: 7px 0;
  color: var(--black);
  background: var(--canvas);
  text-align: center;
  font-size: 10px;
}

.summary-cell {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
}

.summary-cell > strong {
  color: var(--black);
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.summary-cell > span,
.summary-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}

.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.summary-chips span {
  max-width: 100%;
  min-height: 19px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--muted);
  background: var(--canvas);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-summary > strong {
  color: var(--green);
}

.summary-open {
  border-color: var(--black);
  color: #fff;
  background: var(--black);
}

.summary-open i {
  background: #fff;
}

.shipment-status {
  display: grid;
  gap: 4px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.quick-actions button,
.quick-actions a,
.mini-details button {
  min-height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  color: var(--black);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}

.quick-actions .icon-action {
  flex: 1 1 30px;
  min-width: 0;
}

.mini-button {
  min-height: 27px;
  padding: 0 7px;
  font-size: 10px;
}

.mini-details {
  position: relative;
}

.mini-details summary {
  min-height: 30px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
  color: var(--black);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
}

.mini-details summary::-webkit-details-marker {
  display: none;
}

.mini-details[open] summary {
  border-color: var(--black);
}

.mini-details p,
.mini-details strong,
.mini-details ul {
  display: block;
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 11px;
}

.mini-details ul {
  display: grid;
  gap: 5px;
  padding-left: 16px;
}

.mini-details li span {
  color: var(--muted);
}

.quote-details summary {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(0, 102, 73, 0.18);
}

.soft-label {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--canvas);
  font-size: 11px;
  font-weight: 800;
}

.cd-select {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.status-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.next-action {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--black);
  background: var(--canvas);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.next-action i {
  width: 16px;
  height: 16px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.next-action span,
.next-action strong,
.next-action small {
  display: block;
}

.next-action small {
  margin-top: 4px;
  color: currentColor;
  font-size: 10px;
  font-weight: 650;
  opacity: 0.78;
}

button.next-action {
  width: 100%;
  text-align: left;
}

.next-action.danger {
  border-color: rgba(179, 54, 41, 0.22);
  color: var(--red);
  background: var(--red-soft);
}

.next-action.amber {
  border-color: rgba(154, 101, 21, 0.22);
  color: var(--amber);
  background: var(--amber-soft);
}

.next-action.blue {
  border-color: rgba(32, 92, 143, 0.22);
  color: var(--blue);
  background: var(--blue-soft);
}

.next-action.green {
  border-color: rgba(0, 102, 73, 0.22);
  color: var(--green);
  background: var(--green-soft);
}

.problem-list {
  display: grid;
  gap: 3px;
}

.problem-list span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.problem-list span::before {
  content: "!";
  width: 14px;
  height: 14px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 9px;
}

.problem-summary {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(179, 54, 41, 0.22);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.problem-summary.ok {
  border-color: rgba(0, 102, 73, 0.2);
  color: var(--green);
  background: var(--green-soft);
}

.status-toggle {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  color: var(--black);
  background: #fff;
  font-size: 11px;
  font-weight: 850;
}

.status-toggle i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--amber);
}

.status-toggle.ok {
  border-color: rgba(0, 102, 73, 0.22);
  background: var(--green-soft);
}

.status-toggle.ok i {
  background: var(--green);
}

.status-toggle.wait {
  border-color: rgba(154, 101, 21, 0.22);
  background: var(--amber-soft);
}

.compact-action {
  width: 100%;
  min-width: 64px;
}

.obs-input {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.note-preview {
  min-width: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 7px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-cell {
  height: 100px;
  color: var(--muted);
  text-align: center;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delivery-card {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.delivery-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.delivery-card h3 {
  margin-top: 3px;
  color: var(--black);
  font-size: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.pill.red {
  color: var(--red);
  background: var(--red-soft);
}

dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
  font-size: 13px;
}

dt {
  color: var(--muted);
  font-weight: 850;
}

dd {
  min-width: 0;
  margin: 0;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.rule-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.rule-card h3 {
  color: var(--black);
  font-size: 17px;
}

.rule-card p {
  color: var(--muted);
  font-size: 14px;
}

.technical-drawer {
  overflow: hidden;
}

.technical-drawer summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  color: var(--black);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  list-style: none;
}

.technical-drawer summary::-webkit-details-marker {
  display: none;
}

.technical-drawer summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Instrument Sans", Arial, sans-serif;
  font-size: 19px;
}

.technical-drawer[open] summary::after {
  content: "-";
}

.technical-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  padding: 0 18px 18px;
}

.technical-grid h3 {
  margin-bottom: 10px;
  color: var(--black);
  font-size: 15px;
}

.sheet-shell.compact table {
  min-width: 560px;
}

.integration-providers,
.audit-list {
  display: grid;
  gap: 10px;
}

.provider-panel,
.audit-list article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.provider-panel span,
.audit-list span,
.audit-list p {
  color: var(--muted);
  font-size: 13px;
}

.provider-panel em {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green);
  background: var(--green-soft);
  font-style: normal;
  font-weight: 850;
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--black);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .ops-toolbar,
  .ops-intro,
  .technical-grid,
  .delivery-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .connection-pill,
  .ops-actions {
    justify-self: stretch;
  }

  .ops-actions {
    justify-content: stretch;
  }

  .ops-actions > * {
    flex: 1;
    min-width: 0;
  }

  .operations-alerts {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .operation-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quick-filter-bar {
    grid-column: 1 / -1;
  }

  .operation-controls .search-box {
    grid-column: 1;
    grid-row: 2;
  }

  .advanced-filters {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .compact-sort {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 820px) {
  .ops-header {
    position: static;
    top: auto;
    margin: 0;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
  }

  .ops-toolbar {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 16px 18px;
  }

  .ops-logo,
  .connection-pill,
  .ops-actions {
    width: 100%;
    min-width: 0;
  }

  .ops-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .admin-profile {
    grid-column: 1 / -1;
    justify-content: space-between;
    border-left: 0;
    padding-left: 0;
  }

  .admin-profile span {
    min-width: 0;
  }

  .ops-dashboard {
    padding: 22px 18px 34px;
  }

  .ops-intro h1 {
    font-size: 30px;
  }

  .metrics-row,
  .queue-toolbar,
  .filter-tray {
    grid-template-columns: 1fr;
  }

  .board-header,
  .delivery-card header {
    display: grid;
  }

  .bulk-bar .secondary-button {
    width: 100%;
    margin-left: 0;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .view-panel {
    padding: 0;
  }

  .quick-filter-bar {
    max-width: 100%;
  }

  .operation-controls {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    padding: 12px;
  }

  .quick-filter-bar {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .advanced-filters {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .advanced-filters summary {
    justify-content: space-between;
  }

  .filter-tray {
    right: auto;
    left: 0;
    width: min(720px, calc(100vw - 60px));
  }

  .operation-controls .search-box {
    grid-column: 1;
    grid-row: 3;
  }

  .compact-sort {
    grid-column: 2;
    grid-row: 3;
  }

  .view-panel[data-view-panel="operation"] > .sheet-shell {
    display: none;
  }

  .mobile-order-list {
    display: grid;
    gap: 10px;
  }

  .mobile-order-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .mobile-order-card > summary {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-order-card > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-order-card > summary div {
    min-width: 0;
  }

  .mobile-order-card > summary strong,
  .mobile-order-card > summary span {
    display: block;
  }

  .mobile-order-card > summary strong {
    overflow: hidden;
    color: var(--black);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-order-card > summary span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-order-card > summary .pill {
    flex: 0 0 auto;
  }

  .mobile-customer {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 11px 12px;
    background: var(--canvas);
  }

  .mobile-customer-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-customer > .problem-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-customer-actions > * {
    min-width: 0;
  }

  .mobile-customer-actions .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mobile-customer-actions .mini-details summary {
    min-height: 26px;
  }

  .mobile-shipments {
    display: grid;
  }

  .mobile-shipment {
    display: grid;
    gap: 9px;
    border-top: 1px solid var(--line);
    padding: 12px;
  }

  .mobile-shipment header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .mobile-shipment header label {
    color: var(--black);
    font-size: 12px;
    font-weight: 850;
  }

  .mobile-shipment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-shipment-grid > div {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px;
  }

  .mobile-shipment-grid span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .mobile-shipment-grid strong {
    overflow-wrap: anywhere;
    color: var(--black);
    font-size: 11px;
  }

  .mobile-shipment-grid .mini-details summary,
  .mobile-shipment-grid .cd-select {
    width: 100%;
    min-height: 29px;
  }
}

/* Spreadsheet exact mode */
body {
  background: #fff;
  font-family: Calibri, Arial, "Segoe UI", sans-serif;
}

.ops-header,
.ops-intro,
.metrics-row,
.view-tabs,
.board-header,
.operation-controls,
.operations-alerts,
.bulk-bar,
.mobile-order-list {
  display: none !important;
}

.ops-dashboard {
  max-width: none;
  margin: 0;
  padding: 0;
  background: #fff;
}

.view-panel,
.view-panel.active {
  display: none;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}

.view-panel[data-view-panel="operation"],
.view-panel.active[data-view-panel="operation"] {
  display: block;
}

.view-panel[data-view-panel="operation"] > .sheet-shell {
  display: block !important;
}

.sheet-shell {
  width: 100vw;
  height: 100vh;
  overflow: auto;
  border: 0;
  background: #fff;
}

.ops-sheet {
  min-width: 1380px;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Calibri, Arial, "Segoe UI", sans-serif;
}

.ops-sheet th,
.ops-sheet td {
  height: 24px;
  border: 1px solid #8f8f8f;
  padding: 2px 4px;
  color: #000;
  background: #fff;
  font-size: 10px;
  line-height: 1.15;
  vertical-align: middle;
}

.ops-sheet th {
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.ops-sheet .table-groups th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 20px;
  border: 1px solid #777;
  border-bottom: 2px solid #000;
  background: #d9d9d9;
  text-align: center;
  font-size: 10px;
}

.ops-sheet thead tr:nth-child(2) th {
  position: sticky;
  top: 20px;
  z-index: 7;
  height: 22px;
  border: 1px solid #777;
  border-bottom: 2px solid #000;
  background: #cfcfcf;
  text-align: center;
  font-size: 10px;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(9),
.ops-sheet thead tr:nth-child(2) th:nth-child(14),
.ops-sheet thead tr:nth-child(2) th:nth-child(18),
.ops-sheet td:nth-child(9),
.ops-sheet td:nth-child(14),
.ops-sheet td:nth-child(18) {
  border-left: 3px solid #000;
}

.table-groups th:nth-child(2),
.table-groups th:nth-child(3),
.table-groups th:nth-child(4) {
  border-left: 3px solid #000;
}

.sticky-order,
.ops-sheet thead tr:nth-child(2) th:nth-child(1) {
  position: static;
  box-shadow: none;
}

tbody tr:hover td {
  background: inherit;
}

.sheet-alt-row td,
.sheet-alt-row .order-shared-cell,
.sheet-alt-row.order-subrow td:not(.sticky-select) {
  background: #d9e2f3 !important;
}

.order-group-start td,
.order-group-end td,
.order-subrow td {
  border-top: 1px solid #8f8f8f;
  border-bottom: 1px solid #8f8f8f;
}

.order-shared-cell,
.order-summary-row .order-shared-cell {
  padding-top: 2px;
  padding-bottom: 2px;
  background: inherit;
}

.sheet-empty-row td {
  height: 24px;
  background: #fff !important;
}

.sheet-order-cell strong,
.sheet-name-cell strong,
.summary-cell > strong,
.ops-sheet td strong {
  color: #000;
  font-size: 10px;
}

.sheet-order-cell small,
.summary-cell > span,
.summary-cell small,
.sheet-cd-stack small,
.sheet-generate-cell small,
.sheet-quote-stack small,
.note-preview {
  color: #000;
  font-size: 8px;
  font-weight: 400;
}

.sheet-icon-button,
.sheet-status-button,
.ops-sheet .mini-details summary,
.ops-sheet .cd-select {
  min-height: 20px;
  border: 1px solid #bfbfbf;
  border-radius: 2px;
  background: #fff;
  font-size: 9px;
}

.sheet-icon-button {
  width: 22px;
}

.sheet-status-button {
  gap: 3px;
  padding: 0 4px;
}

.sheet-status-button i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.sheet-status-button.ok {
  border-color: #8abf9b;
  color: #00843d;
  background: #e2f0d9;
}

.sheet-status-button.wait {
  border-color: #d6b46d;
  color: #8a5a00;
  background: #fff2cc;
}

.sheet-indicator-button {
  min-width: 38px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  padding: 0 2px;
  color: #000;
  background: transparent;
  font-size: 11px;
  line-height: 1;
}

.sheet-indicator-button i {
  width: 16px;
  height: 11px;
  display: block;
  border: 1px solid #666;
  border-radius: 2px;
  background: #ffd900;
}

.sheet-indicator-button.ok i {
  background: #00a651;
}

.sheet-indicator-button.generate span {
  font-size: 12px;
  font-weight: 700;
}

.sheet-indicator-button:disabled {
  cursor: default;
  opacity: 1;
}

.sheet-obs-text {
  display: -webkit-box;
  overflow: hidden;
  color: #000;
  font-size: 8px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.open-shipments {
  min-height: 22px;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 9px;
}

.summary-chips span {
  min-height: 16px;
  border-color: #c8c8c8;
  border-radius: 8px;
  padding: 0 5px;
  background: #f7f7f7;
  color: #000;
  font-size: 8px;
}

.detail-stack {
  right: 8px;
  width: 320px;
}

.sheet-obs-stack {
  grid-template-columns: minmax(0, 1fr) 26px;
}

.sheet-obs-stack .order-details summary {
  width: 24px;
  min-height: 22px;
  border-radius: 2px;
}

@media (max-width: 820px) {
  .ops-dashboard {
    padding: 0;
  }

  .view-panel[data-view-panel="operation"] > .sheet-shell {
    display: block !important;
  }

  .mobile-order-list {
    display: none !important;
  }

  .sheet-shell {
    width: 100vw;
    height: 100vh;
  }

  .ops-sheet {
    min-width: 1380px;
  }
}

/* Dashboard shell with the client's spreadsheet structure */
body {
  color: var(--ink);
  background: var(--canvas);
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

.ops-header {
  display: block !important;
}

.metrics-row {
  display: grid !important;
}

.board-header {
  display: flex !important;
}

.operation-controls {
  display: grid !important;
}

.ops-intro,
.view-tabs,
.operations-alerts,
.bulk-bar {
  display: none !important;
}

.ops-dashboard {
  max-width: none;
  margin: 0;
  padding: 18px 26px 34px;
  background: var(--canvas);
}

.view-panel[data-view-panel="operation"],
.view-panel.active[data-view-panel="operation"] {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.04);
  overflow: hidden;
}

.view-panel:not([data-view-panel="operation"]) {
  display: none !important;
}

.view-panel[data-view-panel="operation"] > .sheet-shell {
  display: block !important;
}

.sheet-shell {
  width: auto;
  height: auto;
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #fff;
}

.ops-sheet {
  min-width: 1380px;
  font-family: Calibri, Arial, "Segoe UI", sans-serif;
}

.sheet-empty-row {
  display: none;
}

@media (max-width: 820px) {
  .ops-header {
    display: block !important;
  }

  .metrics-row {
    display: grid !important;
  }

  .board-header {
    display: grid !important;
  }

  .operation-controls {
    display: grid !important;
  }

  .ops-dashboard {
    padding: 22px 18px 34px;
  }

  .view-panel[data-view-panel="operation"] > .sheet-shell {
    display: none !important;
  }

  .mobile-order-list {
    display: grid !important;
    gap: 10px;
  }
}

/* Final delivery tracking reference */
body {
  color: #101828;
  background: #fff;
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

.ops-header {
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
}

.ops-toolbar {
  min-height: 62px;
  grid-template-columns: auto 1fr auto auto;
  gap: 22px;
  padding: 0 16px;
}

.ops-toolbar h1 {
  color: #101828;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.header-spacer {
  min-width: 0;
}

.nuvemshop-brand {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-right: 1px solid #dfe5ec;
  padding-right: 22px;
  color: #101828;
  font-size: 14px;
}

.nuvemshop-brand svg {
  width: 23px;
  height: 23px;
}

.ops-actions {
  gap: 0;
}

.admin-profile {
  min-height: 48px;
  gap: 10px;
  border-left: 0;
  padding-left: 0;
}

.admin-profile b {
  width: 38px;
  height: 38px;
  color: #101828;
  background: #f2f5f8;
}

.admin-profile b svg {
  width: 20px;
  height: 20px;
}

.admin-profile > svg {
  width: 15px;
  height: 15px;
  margin-left: 12px;
}

.admin-profile strong {
  font-size: 12px;
}

.admin-profile small {
  color: #667085;
  font-size: 11px;
}

.metrics-row,
.board-header,
.ops-intro,
.view-tabs,
.operations-alerts,
.bulk-bar,
.compact-sort {
  display: none !important;
}

.ops-dashboard {
  min-height: calc(100vh - 62px);
  padding: 12px 16px 14px;
  background: #fff;
}

.view-panel[data-view-panel="operation"],
.view-panel.active[data-view-panel="operation"] {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.operation-controls {
  min-height: 59px;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 0;
  background: #fff;
}

.reference-actions {
  display: flex;
  align-items: center;
}

.new-order-button,
.export-button,
.advanced-filters summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d3dae4;
  border-radius: 5px;
  padding: 0 15px;
  color: #101828;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.new-order-button {
  border-color: #075dcc;
  color: #fff;
  background: #0868df;
  box-shadow: 0 2px 5px rgba(8, 104, 223, 0.25);
}

.new-order-button svg,
.export-button svg,
.advanced-filters summary svg {
  width: 17px;
  height: 17px;
}

.advanced-filters {
  order: 2;
}

.advanced-filters summary {
  min-width: 88px;
}

.advanced-filters summary::after {
  display: none;
}

.reference-actions {
  order: 1;
}

.export-button {
  order: 3;
}

.operation-controls .search-box {
  order: 4;
  width: 318px;
  margin-left: auto;
}

.operation-controls .search-box input {
  min-height: 36px;
  border-color: #dbe2ea;
  border-radius: 5px;
  padding-left: 13px;
  font-size: 11px;
}

.filter-tray {
  left: 0;
  right: auto;
}

.sheet-shell {
  max-height: calc(100vh - 198px);
  overflow: auto;
  border: 1px solid #dfe5ec;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.ops-sheet {
  min-width: 1430px;
  table-layout: fixed;
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1),
.ops-sheet thead tr:nth-child(2) th:nth-child(2),
.ops-sheet thead tr:nth-child(2) th:nth-child(3),
.sticky-order,
.sticky-date,
.sticky-name {
  position: sticky;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1),
.sticky-order {
  left: 0;
  z-index: 9;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(2),
.sticky-date {
  left: 48px;
  z-index: 8;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(3),
.sticky-name {
  left: 114px;
  z-index: 7;
  box-shadow: 1px 0 0 #aeb9c7;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(1),
.ops-sheet thead tr:nth-child(2) th:nth-child(2),
.ops-sheet thead tr:nth-child(2) th:nth-child(3) {
  z-index: 18;
  background: #f6f8fb;
}

.ops-sheet th,
.ops-sheet td {
  height: 53px;
  border: 1px solid #d7dee8;
  padding: 7px 8px;
  color: #101828;
  background: #fff;
  font-size: 10px;
  line-height: 1.35;
  vertical-align: middle;
}

.ops-sheet .table-groups th {
  height: 36px;
  border: 1px solid #bfc8d5;
  border-bottom: 1px solid #bfc8d5;
  color: #101828;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 750;
}

.ops-sheet thead tr:nth-child(2) th {
  top: 36px;
  height: 40px;
  border: 1px solid #d2dae5;
  border-bottom: 1px solid #c8d1dd;
  color: #101828;
  background: #f6f8fb;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(9),
.ops-sheet thead tr:nth-child(2) th:nth-child(14),
.ops-sheet thead tr:nth-child(2) th:nth-child(18),
.ops-sheet td:nth-child(9),
.ops-sheet td:nth-child(14),
.ops-sheet td:nth-child(18),
.table-groups th:nth-child(2),
.table-groups th:nth-child(3),
.table-groups th:nth-child(4) {
  border-left: 1px solid #aeb9c7;
}

.order-group-start td,
.order-group-end td,
.order-subrow td {
  border-top: 1px solid #d7dee8;
  border-bottom: 1px solid #d7dee8;
}

.order-subrow td,
.order-subrow td:not(.sticky-select),
.order-shared-cell {
  background: inherit;
}

#operationBody tr:nth-child(even) td {
  background: #fbfcff;
}

#operationBody tr:hover td {
  background: #f5f9ff;
}

.sheet-empty-row {
  display: table-row;
}

.sheet-empty-row td {
  height: 46px;
  background: #fff !important;
}

.sheet-order-cell strong,
.sheet-name-cell strong,
.summary-cell > strong,
.ops-sheet td strong {
  color: #101828;
  font-size: 10px;
  font-weight: 650;
}

.sheet-order-cell small,
.summary-cell > span,
.summary-cell small,
.sheet-cd-stack small,
.sheet-quote-stack small,
.note-preview {
  color: #667085;
  font-size: 8px;
}

.sheet-icon-button {
  width: 21px;
  height: 21px;
  min-height: 21px;
  display: inline-grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #182230;
  background: transparent;
  font-size: 0;
  line-height: 0;
}

.sheet-icon-button svg {
  width: 12px;
  height: 12px;
  display: block;
  stroke-width: 2;
}

.sheet-address-cell {
  text-align: left;
}

.sheet-address-details {
  width: 100%;
  min-width: 0;
}

.sheet-address-details summary {
  min-height: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13px;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 4px 0 6px;
  color: #182230;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  list-style: none;
}

.sheet-address-details summary::-webkit-details-marker {
  display: none;
}

.sheet-address-details[open] summary {
  border-color: #d3dae4;
  background: #fff;
}

.sheet-address-details.missing summary {
  border-color: #ffd7d7;
  color: #b42318;
  background: #fff5f5;
}

.sheet-address-details.missing .sheet-address-preview,
.sheet-address-details.missing summary svg {
  color: #d92d20;
}

.sheet-address-preview {
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-size: 8px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-address-details summary svg {
  width: 10px;
  height: 10px;
  justify-self: end;
  color: #e5484d;
  stroke-width: 2.5;
}

.sheet-address-details[open] summary svg {
  transform: rotate(45deg);
}

.sheet-address-details .sheet-address-full {
  margin: 4px 0 0;
  color: #344054;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.25;
}

.sheet-address-details button {
  margin-top: 5px;
}

.sheet-frete-cell {
  color: #101828;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
}

.sheet-indicator-button {
  min-width: 27px;
  cursor: pointer;
}

.sheet-indicator-button > span {
  display: none;
}

.sheet-indicator-button i {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: #f4c430;
}

.sheet-indicator-button i::after {
  content: "?";
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sheet-indicator-button.ok i {
  background: #26a65b;
}

.sheet-indicator-button.generate.wait i {
  background: #f4c430;
}

.sheet-indicator-button.generate.wait i::after {
  content: "+";
  font-size: 13px;
}

.sheet-indicator-button.generate.blocked i {
  background: #cbd5e1;
}

.sheet-indicator-button.generate.blocked i::after {
  content: "-";
  font-size: 13px;
}

.sheet-indicator-button.generate:disabled {
  cursor: not-allowed;
}

.sheet-indicator-button.generate.wait:not(:disabled):hover i {
  box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.24);
}

.ops-sheet .mini-details summary,
.ops-sheet .cd-select {
  min-height: 27px;
  border-color: transparent;
  background: transparent;
  font-size: 10px;
}

.ops-sheet .mini-details summary:hover,
.ops-sheet .cd-select:hover {
  border-color: #d3dae4;
  background: #fff;
}

.sheet-quote-text,
.sheet-quote-stack strong {
  color: #101828;
  font-size: 9px;
  font-weight: 500;
}

.sheet-quote-stack {
  justify-items: center;
  gap: 2px;
}

.sheet-quote-stack small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-tracking-code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #101828;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-status-pill {
  max-width: 100%;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  padding: 0 7px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-status-pill.blue {
  color: #075dcc;
  background: #e9f2ff;
}

.delivery-status-pill.green {
  color: #147a3e;
  background: #e6f6eb;
}

.delivery-status-pill.amber {
  color: #d76600;
  background: #fff2dc;
}

.sheet-obs-text {
  color: #344054;
  font-size: 8px;
}

.collapsed-cd-cell {
  justify-items: start;
  gap: 4px;
}

.collapsed-cd-cell .open-shipments {
  min-height: 22px;
  display: inline-grid;
  grid-template-columns: auto 10px;
  align-items: center;
  gap: 4px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  padding: 0 6px;
  color: #101828;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}

.collapsed-cd-cell .open-shipments strong {
  font-size: 9px;
  font-weight: 700;
}

.collapsed-cd-cell .open-shipments span {
  color: #075dcc;
  font-size: 11px;
  font-weight: 850;
}

.collapsed-cd-cell .open-shipments:hover {
  border-color: #b8c2d0;
  background: #f8fafc;
}

.sheet-obs-empty {
  color: #667085;
  font-size: 9px;
}

.sheet-obs-details {
  min-width: 0;
}

.sheet-obs-details summary {
  min-height: 22px;
  display: inline-grid;
  grid-template-columns: auto 10px;
  align-items: center;
  gap: 3px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  padding: 0 5px;
  color: #344054;
  background: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
  list-style: none;
}

.sheet-obs-details summary::-webkit-details-marker {
  display: none;
}

.sheet-obs-details summary svg {
  width: 9px;
  height: 9px;
  color: #667085;
}

.sheet-obs-details[open] summary svg {
  transform: rotate(45deg);
}

.sheet-obs-details p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 8px;
  line-height: 1.25;
}

.table-footer {
  min-height: 57px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 8px 12px;
  border: 1px solid #dfe5ec;
  border-top: 1px solid #dfe5ec;
  border-radius: 0 0 8px 8px;
  color: #667085;
  background: #fff;
  font-size: 10px;
}

.table-footer nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-footer button,
.table-footer select {
  min-height: 31px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  padding: 0 13px;
  color: #667085;
  background: #fff;
  font-size: 10px;
}

.table-footer button.active {
  border-color: #0868df;
  color: #fff;
  background: #0868df;
}

.table-footer label {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 820px) {
  .ops-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .ops-toolbar h1 {
    font-size: 17px;
  }

  .header-spacer,
  .nuvemshop-brand {
    display: none;
  }

  .admin-profile span,
  .admin-profile > svg {
    display: none;
  }

  .ops-dashboard {
    padding: 10px;
  }

  .operation-controls {
    flex-wrap: wrap;
    padding: 10px;
  }

  .operation-controls .search-box {
    width: 100%;
    margin-left: 0;
    order: 4;
  }

  .view-panel[data-view-panel="operation"] > .sheet-shell {
    display: block !important;
  }

  .mobile-order-list {
    display: none !important;
  }

  .table-footer {
    grid-template-columns: 1fr;
  }

  .table-footer nav,
  .table-footer label {
    justify-self: start;
  }
}

/* Delivery 5: planilha com orienta??o operacional */
.operation-controls {
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 8px;
}

.quick-filter-bar {
  order: 5;
  flex: 1 0 100%;
  display: flex !important;
  gap: 6px;
  overflow-x: auto;
  margin: 0;
  padding: 0 0 1px;
  border: 0;
  scrollbar-width: none;
}

.quick-filter-bar::-webkit-scrollbar {
  display: none;
}

.quick-filter-bar[hidden] {
  display: none !important;
}

.quick-filter-bar button {
  min-height: 27px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  padding: 0 10px;
  color: #344054;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.quick-filter-bar button:hover,
.quick-filter-bar button.active {
  border-color: #075dcc;
  color: #075dcc;
  background: #eff6ff;
}

.quick-filter-bar strong {
  min-width: 17px;
  min-height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 9px;
  font-weight: 750;
}

.quick-filter-bar button.active strong {
  color: #fff;
  background: #075dcc;
}

.operations-alerts:not([hidden]) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 7px 9px;
  color: #b42318;
  background: #fff7f7;
  font-size: 10px;
}

.operations-alerts > strong {
  color: #b42318;
}

.operations-alerts span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: #912018;
  background: #ffe4e4;
  font-weight: 650;
}

.operations-alerts b {
  min-width: 16px;
  min-height: 16px;
  color: #fff;
  background: #d92d20;
  font-size: 9px;
}

.sheet-shell {
  max-height: calc(100vh - 236px);
}

.ops-sheet {
  min-width: 1548px;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(18),
.ops-sheet td:nth-child(18) {
  border-left: 1px solid #d7dee8;
}

.ops-sheet thead tr:nth-child(2) th:nth-child(19),
.ops-sheet td:nth-child(19),
.sheet-tracking-cell {
  border-left: 1px solid #aeb9c7 !important;
}

.sheet-next-action-cell {
  border-left: 1px solid #aeb9c7 !important;
  text-align: left;
}

.sheet-confirm-cell {
  border-left: 1px solid #d7dee8 !important;
}

.sheet-next-action {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  padding: 4px 6px;
  color: #344054;
  background: #fff;
  text-align: left;
  line-height: 1.1;
}

button.sheet-next-action {
  cursor: pointer;
}

button.sheet-next-action:hover {
  border-color: #b8c2d0;
  background: #f8fafc;
}

.sheet-next-action i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.sheet-next-action span,
.sheet-next-action strong,
.sheet-next-action small {
  min-width: 0;
  display: block;
}

.sheet-next-action strong {
  overflow: hidden;
  color: currentColor;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-next-action small {
  overflow: hidden;
  margin-top: 2px;
  color: currentColor;
  font-size: 7.5px;
  font-weight: 600;
  opacity: 0.78;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-next-action.danger {
  border-color: #fecaca;
  color: #b42318;
  background: #fff7f7;
}

.sheet-next-action.amber {
  border-color: #fedf89;
  color: #b54708;
  background: #fffbeb;
}

.sheet-next-action.blue {
  border-color: #bfdbfe;
  color: #075dcc;
  background: #eff6ff;
}

.sheet-next-action.green {
  border-color: #bbf7d0;
  color: #147a3e;
  background: #f0fdf4;
}

.next-action-problems .sheet-next-action-cell,
.next-action-problems .sheet-address-cell {
  background: #fffafa !important;
}

@media (max-width: 820px) {
  .operation-controls {
    gap: 8px;
  }

  .quick-filter-bar {
    padding-bottom: 2px;
  }

  .sheet-shell {
    max-height: calc(100vh - 236px);
  }
}

@media (max-width: 820px) {
  .view-panel[data-view-panel="operation"] > .sheet-shell {
    display: none !important;
  }

  .mobile-order-list {
    display: grid !important;
    gap: 10px;
    margin-top: 8px;
  }

  .mobile-order-card {
    overflow: hidden;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
  }

  .mobile-order-card > summary {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-order-card > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-order-card > summary div {
    min-width: 0;
  }

  .mobile-order-card > summary strong,
  .mobile-order-card > summary span {
    display: block;
  }

  .mobile-order-card > summary strong {
    overflow: hidden;
    color: #101828;
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-order-card > summary span {
    margin-top: 3px;
    color: #667085;
    font-size: 11px;
  }

  .mobile-customer,
  .mobile-shipment {
    display: grid;
    gap: 8px;
    border-top: 1px solid #d7dee8;
    padding: 11px 12px;
    background: #fbfcff;
  }

  .mobile-customer-actions,
  .mobile-shipment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-customer-actions > *,
  .mobile-shipment-grid > div {
    min-width: 0;
  }

  .mobile-shipment-grid > div {
    display: grid;
    gap: 4px;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    padding: 7px;
    background: #fff;
  }

  .mobile-shipment-grid span {
    color: #667085;
    font-size: 9px;
    font-weight: 750;
  }

  .mobile-shipment-grid strong {
    color: #101828;
    font-size: 11px;
    overflow-wrap: anywhere;
  }
}

/* Delivery 6: lista limpa com detalhes do pedido */
.orders-list-view[hidden],
.order-detail-view[hidden] {
  display: none !important;
}

.orders-list-view {
  display: block;
}

.orders-list-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #d7dee8;
  padding: 0 4px;
}

.orders-list-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0 10px;
  color: #344054;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.orders-list-tabs button.active {
  border-bottom-color: #0868df;
  color: #075dcc;
  background: #eff6ff;
}

.orders-list-tabs button:hover {
  color: #075dcc;
}

.orders-list-shell {
  overflow-x: auto;
  border: 1px solid #d7dee8;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.orders-list-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.orders-list-table th {
  height: 42px;
  border-bottom: 1px solid #d7dee8;
  padding: 0 12px;
  color: #344054;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

.orders-list-table th:nth-child(1) { width: 78px; }
.orders-list-table th:nth-child(2) { width: 84px; }
.orders-list-table th:nth-child(3) { width: 170px; }
.orders-list-table th:nth-child(4) { width: 125px; }
.orders-list-table th:nth-child(5) { width: 130px; }
.orders-list-table th:nth-child(6) { width: 145px; }
.orders-list-table th:nth-child(7) { width: 95px; }
.orders-list-table th:nth-child(8) { width: 110px; }
.orders-list-table th:nth-child(9) { width: 155px; }
.orders-list-table th:nth-child(10) { width: 36px; }

.order-list-row {
  cursor: pointer;
  outline: none;
}

.order-list-row td {
  height: 70px;
  border-bottom: 1px solid #e3e8ef;
  padding: 9px 12px;
  color: #344054;
  background: #fff;
  font-size: 11px;
  line-height: 1.3;
  vertical-align: middle;
}

.order-list-row:last-child td {
  border-bottom: 0;
}

.order-list-row:hover td,
.order-list-row:focus td {
  background: #f7faff;
}

.order-list-row strong,
.order-list-row small {
  display: block;
}

.order-list-row strong {
  overflow: hidden;
  color: #101828;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-row small {
  overflow: hidden;
  margin-top: 4px;
  color: #667085;
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-number {
  display: block;
  color: #075dcc;
  font-size: 12px;
  font-weight: 750;
}

.order-list-status {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.order-list-status.blue {
  border-color: #bfdbfe;
  color: #075dcc;
  background: #eff6ff;
}

.order-list-status.green {
  border-color: #bbf7d0;
  color: #147a3e;
  background: #f0fdf4;
}

.order-list-status.amber {
  border-color: #fedf89;
  color: #b54708;
  background: #fffbeb;
}

.order-list-status.danger {
  border-color: #fecaca;
  color: #b42318;
  background: #fff7f7;
}

.order-list-next {
  min-width: 0;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #344054;
}

.order-list-next > i,
.order-detail-next > i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.order-list-next strong,
.order-list-next small {
  min-width: 0;
}

.order-list-next.danger,
.order-detail-next.danger {
  color: #b42318;
}

.order-list-next.amber,
.order-detail-next.amber {
  color: #b54708;
}

.order-list-next.blue,
.order-detail-next.blue {
  color: #075dcc;
}

.order-list-next.green,
.order-detail-next.green {
  color: #147a3e;
}

.order-list-open {
  color: #667085;
  text-align: right;
}

.order-list-open svg {
  width: 16px;
  height: 16px;
}

body.modal-open {
  overflow: hidden;
}

.order-detail-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.order-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(6px);
}

.order-detail-modal {
  position: relative;
  z-index: 1;
  width: min(1320px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(215, 222, 232, 0.96);
  border-radius: 14px;
  padding: 0 28px 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.26);
}

.order-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #d7dee8;
  color: #101828;
  background: #fff;
}

.order-detail-back {
  min-height: 34px;
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  color: #101828;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.order-detail-back:hover {
  color: #075dcc;
}

.order-detail-back svg,
.order-detail-topbar span svg {
  width: 15px;
  height: 15px;
}

.order-detail-topbar > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-detail-topbar > div > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 10px;
}

.order-detail-next {
  min-height: 27px;
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 9px;
  font-weight: 750;
}

.order-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 18px;
}

.order-detail-heading h2 {
  margin: 3px 0 4px;
  color: #101828;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-detail-heading p {
  margin: 0;
  color: #667085;
  font-size: 11px;
}

.order-detail-heading-actions,
.order-detail-heading-actions .quick-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.detail-icon-button {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.detail-icon-button:hover {
  border-color: #b8c2d0;
  color: #075dcc;
  background: #f8fafc;
}

.detail-icon-button svg {
  width: 15px;
  height: 15px;
}

.order-detail-warning {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 10px 12px;
  color: #b42318;
  background: #fff7f7;
}

.order-detail-warning > svg {
  width: 16px;
  height: 16px;
}

.order-detail-warning strong {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 18px;
}

.order-detail-main,
.order-detail-aside {
  display: grid;
  gap: 14px;
}

.detail-section {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.detail-section-header {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: -2px 0 12px;
}

.detail-section-header h3 {
  margin: 2px 0 0;
  color: #101828;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
}

.detail-section-header > span,
.detail-section-header > strong {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}

.detail-section > strong {
  display: block;
  margin-bottom: 9px;
  color: #101828;
  font-size: 12px;
}

.detail-section > p {
  margin: 6px 0;
  color: #475467;
  font-size: 11px;
  line-height: 1.5;
}

.detail-section a,
.detail-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  color: #075dcc;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.detail-section a svg,
.detail-link-button svg,
.detail-text-action svg,
.detail-primary-button svg,
.detail-secondary-button svg {
  width: 14px;
  height: 14px;
}

.detail-text-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  color: #075dcc;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.shipment-detail-list {
  display: grid;
}

.shipment-detail-card {
  border-top: 1px solid #e3e8ef;
  padding: 16px 0;
}

.shipment-detail-card:first-child {
  border-top: 0;
  padding-top: 4px;
}

.shipment-detail-card:last-child {
  padding-bottom: 0;
}

.shipment-detail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.shipment-detail-card > header > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.shipment-index {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #075dcc;
  background: #eaf3ff;
  font-size: 10px;
  font-weight: 800;
}

.shipment-detail-card > header strong,
.shipment-detail-card > header small {
  display: block;
}

.shipment-detail-card > header strong {
  color: #101828;
  font-size: 12px;
}

.shipment-detail-card > header small {
  margin-top: 2px;
  color: #667085;
  font-size: 9px;
}

.shipment-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  background: #dfe5ec;
}

.shipment-detail-grid > div {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  background: #fff;
}

.shipment-detail-grid span {
  color: #667085;
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.shipment-detail-grid strong {
  overflow-wrap: anywhere;
  color: #101828;
  font-size: 11px;
  line-height: 1.25;
}

.shipment-detail-grid small {
  color: #667085;
  font-size: 8px;
  line-height: 1.35;
}

.shipment-detail-grid .cd-select {
  min-height: 28px;
  border-color: #d7dee8;
  border-radius: 5px;
  padding: 0 5px;
  color: #101828;
  background: #fff;
  font-size: 10px;
}

.cd-routing-control {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 4px;
}

.cd-routing-tab {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
  border: 1px solid #dfe5ec;
  border-radius: 5px;
  padding: 6px;
  background: #fff;
}

.cd-routing-tab > span {
  color: #667085;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.cd-routing-tab > strong {
  min-width: 0;
  overflow: hidden;
  color: #101828;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-routing-tab.predefined {
  background: #f8fafc;
}

.cd-routing-tab.manual {
  cursor: pointer;
}

.cd-routing-tab.manual .cd-select {
  width: 100%;
  min-height: 24px;
  padding: 0 4px;
  font-size: 9px;
}

.quote-options {
  margin-top: 10px;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.quote-options > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eef1f5;
  padding: 8px 10px;
  background: #f8fafc;
}

.quote-options > header strong,
.quote-options > header span {
  display: block;
}

.quote-options > header strong {
  color: #101828;
  font-size: 11px;
}

.quote-options > header span {
  margin-top: 2px;
  color: #667085;
  font-size: 8px;
}

.quote-option-list {
  display: grid;
}

.quote-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, auto) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #eef1f5;
  padding: 8px 10px;
}

.quote-option:first-child {
  border-top: 0;
}

.quote-option.selected {
  background: #f5fbff;
}

.quote-option-main strong,
.quote-option-main span {
  display: block;
}

.quote-option-main strong {
  color: #101828;
  font-size: 10px;
  line-height: 1.25;
}

.quote-option-main span {
  margin-top: 2px;
  color: #475467;
  font-size: 9px;
}

.quote-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.quote-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  padding: 0 7px;
  color: #475467;
  background: #eef1f5;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.quote-badge.selected {
  color: #027a48;
  background: #dcfae6;
}

.quote-badge.best-value {
  color: #075dcc;
  background: #eaf3ff;
}

.quote-badge.fastest {
  color: #b54708;
  background: #fff4df;
}

.quote-use-button {
  min-width: 58px;
  min-height: 28px;
  border: 1px solid #c9d4e2;
  border-radius: 5px;
  color: #344054;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.quote-use-button:not(:disabled):hover {
  border-color: #075dcc;
  color: #075dcc;
  background: #f5fbff;
}

.quote-use-button:disabled {
  color: #98a2b3;
  background: #f2f4f7;
  cursor: not-allowed;
}

.shipment-detail-card .problem-list {
  margin-top: 10px;
}

.shipment-detail-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.detail-primary-button,
.detail-secondary-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  padding: 0 12px;
  color: #344054;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.detail-primary-button {
  border-color: #075dcc;
  color: #fff;
  background: #0868df;
}

.detail-primary-button:disabled,
.detail-secondary-button:disabled {
  border-color: #d7dee8;
  color: #98a2b3;
  background: #f2f4f7;
  cursor: not-allowed;
}

.detail-section .order-products {
  border-color: #dfe5ec;
  border-radius: 6px;
}

.detail-section .order-products > div {
  min-height: 48px;
  padding: 9px 10px;
}

.detail-note-section .obs-input {
  width: 100%;
  min-height: 38px;
  border-color: #d7dee8;
  border-radius: 5px;
  padding: 0 10px;
  color: #344054;
  background: #fff;
}

.order-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

.order-facts > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #eef1f5;
  padding: 10px 0;
}

.order-facts > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.order-facts dt {
  color: #667085;
  font-size: 9px;
  font-weight: 700;
}

.order-facts dd {
  margin: 0;
  color: #101828;
  font-size: 10px;
  text-align: right;
}

.detail-state-button {
  min-height: 27px;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  padding: 0 8px;
  color: #344054;
  background: #fff;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.detail-state-button.ok {
  border-color: #bbf7d0;
  color: #147a3e;
  background: #f0fdf4;
}

.detail-state-button.wait {
  border-color: #fedf89;
  color: #b54708;
  background: #fffbeb;
}

@media (max-width: 1050px) {
  .shipment-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .order-detail-view {
    align-items: stretch;
    padding: 0;
  }

  .order-detail-backdrop {
    display: none;
  }

  .order-detail-modal {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 0 10px 18px;
  }

  .orders-list-tabs {
    overflow-x: auto;
  }

  .orders-list-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .orders-list-table,
  .orders-list-table tbody,
  .order-list-row {
    width: 100%;
    min-width: 0;
    display: block;
  }

  .orders-list-table thead {
    display: none;
  }

  .order-list-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
  }

  .order-list-row td {
    height: auto;
    min-height: 56px;
    display: grid;
    align-content: center;
    border-bottom: 1px solid #eef1f5;
    padding: 9px 10px;
  }

  .order-list-row td::before {
    content: attr(data-label);
    margin-bottom: 4px;
    color: #98a2b3;
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
  }

  .order-list-row td:nth-child(1),
  .order-list-row td:nth-child(3),
  .order-list-row td:nth-child(9) {
    grid-column: 1 / -1;
  }

  .order-list-row td:nth-child(6),
  .order-list-row td:nth-child(7) {
    border-bottom: 0;
  }

  .order-list-row td:nth-child(8) {
    display: none;
  }

  .order-list-open {
    position: absolute;
    top: 14px;
    right: 10px;
    display: block !important;
    min-height: 0 !important;
    border: 0 !important;
    padding: 0 !important;
  }

  .order-list-open::before {
    display: none;
  }

  .order-detail-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 2px;
  }

  .order-detail-topbar > div {
    display: none;
  }

  .order-detail-heading {
    align-items: flex-start;
    padding: 18px 2px 14px;
  }

  .order-detail-heading h2 {
    font-size: 20px;
  }

  .order-detail-heading-actions {
    display: none;
  }

  .order-detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-section {
    padding: 13px;
  }

  .shipment-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipment-detail-grid > div {
    min-height: 82px;
  }

  .shipment-detail-card > footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .table-footer {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .shipment-detail-grid {
    grid-template-columns: 1fr;
  }

  .shipment-detail-card > footer {
    grid-template-columns: 1fr;
  }
}

body.sheet-mode {
  background: #f7f8fa;
}

.sheet-mode .ops-header.sheet-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-bottom: 1px solid #d9dde5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.sheet-mode .ops-toolbar.sheet-toolbar-top {
  min-height: 88px;
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, auto) minmax(300px, auto);
  gap: 20px;
  padding: 12px 20px 14px;
}

.sheet-mode .sheet-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sheet-mode .sheet-title-block h1 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0;
}

.sheet-mode .sheet-title-block p {
  color: #677083;
  font-size: 13px;
}

.sheet-mode .sheet-kicker {
  color: #4b78d0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sheet-mode .header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-mode .sheet-inline-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #dfe3ea;
  border-radius: 999px;
  background: #fff;
}

.sheet-mode .sheet-inline-metric b {
  font-size: 13px;
  font-weight: 700;
}

.sheet-mode .sheet-inline-metric small {
  color: #697386;
  font-size: 11px;
  font-weight: 600;
}

.sheet-mode .header-sync-time {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-right: 1px solid #d9dde5;
  padding-right: 16px;
  color: #697386;
  font-size: 12px;
  white-space: nowrap;
}

.sheet-mode .ops-actions {
  position: relative;
  gap: 14px;
}

.sheet-mode .admin-menu {
  position: relative;
}

.sheet-mode .admin-menu > summary {
  list-style: none;
}

.sheet-mode .admin-menu > summary::-webkit-details-marker {
  display: none;
}

.sheet-mode .admin-profile {
  cursor: pointer;
}

.sheet-mode .admin-menu[open] .admin-profile {
  color: #1849a9;
}

.sheet-mode .admin-menu[open] .admin-profile > svg {
  transform: rotate(180deg);
}

.sheet-mode .admin-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 214px;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.sheet-mode .admin-menu-popover a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.sheet-mode .admin-menu-popover a:hover {
  color: #1849a9;
  background: #edf3ff;
}

.sheet-mode .admin-menu-popover svg {
  width: 16px;
  height: 16px;
}

.sheet-mode .logout-button {
  display: none;
}

.sheet-mode .ops-dashboard.sheet-dashboard {
  padding: 112px 18px 18px;
  background: #f7f8fa;
}

.sheet-mode .sheet-panel {
  display: grid;
  gap: 10px;
}

.sheet-mode .sheet-toolbar {
  position: sticky;
  top: 88px;
  z-index: 32;
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.sheet-mode .sheet-search {
  grid-column: span 2;
  min-width: 0;
}

.sheet-mode .sheet-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d6dbe5;
  border-radius: 8px;
  padding-left: 12px;
  padding-right: 40px;
  background: #fff;
}

.sheet-mode .sheet-filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sheet-mode .sheet-filter-field span {
  color: #6f7787;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.sheet-mode .sheet-filter-field select {
  min-height: 40px;
  border: 1px solid #d6dbe5;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.sheet-mode .sheet-toolbar-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 8px;
}

.sheet-mode .sheet-action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.sheet-mode .sheet-filter-rail {
  position: sticky;
  top: 172px;
  z-index: 31;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.sheet-mode .sheet-segmented {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.sheet-mode .quick-filter-bar {
  flex: 1 1 auto;
  max-width: 100%;
  overflow: hidden;
}

.sheet-mode .sheet-summary-rail {
  flex: 0 0 auto;
}

.sheet-mode .sheet-segmented button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  padding: 0 10px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.sheet-mode .sheet-segmented button.active {
  border-color: #b7c6ec;
  color: #1849a9;
  background: #edf3ff;
}

.sheet-mode .sheet-segmented button strong {
  color: inherit;
  font-size: 11px;
}

.sheet-mode .sheet-summary-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  color: #667085;
  font-size: 12px;
}

.sheet-mode .sheet-summary-rail strong {
  color: #101828;
  font-size: 12px;
  white-space: nowrap;
}

.sheet-mode .sheet-filter-count {
  white-space: nowrap;
}

.sheet-mode .sheet-alerts {
  margin: 0;
  border: 1px solid #f4d6a8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff9ef;
}

.sheet-mode .bulk-bar {
  display: flex !important;
  margin: 0;
  border-color: #d9dde5;
  border-radius: 10px;
}

.sheet-mode .bulk-bar .print-action {
  margin-left: 0;
}

.sheet-mode .bulk-bar #generateSelectedLabels {
  margin-left: auto;
}

.sheet-mode .operational-snapshot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
  gap: 8px;
}

.sheet-mode .snapshot-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
}

.sheet-mode .snapshot-card,
.sheet-mode .snapshot-cd-strip {
  min-width: 0;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  background: #fff;
}

.sheet-mode .snapshot-card {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
}

.sheet-mode .snapshot-card strong {
  color: #101828;
  font-size: 18px;
  line-height: 1;
}

.sheet-mode .snapshot-card span {
  color: #344054;
  font-size: 11px;
  font-weight: 750;
}

.sheet-mode .snapshot-card small {
  overflow: hidden;
  color: #667085;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-mode .snapshot-cd-strip {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
}

.sheet-mode .snapshot-cd-strip > strong {
  color: #344054;
  font-size: 11px;
  text-transform: uppercase;
}

.sheet-mode .snapshot-cd-strip > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.sheet-mode .snapshot-cd-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  padding: 3px 7px;
  color: #475467;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 650;
}

.sheet-mode .snapshot-cd-strip b {
  color: #1849a9;
}

.sheet-mode .operational-snapshot {
  display: block;
}

.sheet-mode .nuvem-status-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  background: #fff;
}

.sheet-mode .nuvem-status-filter-bar button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  color: #101828;
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.sheet-mode .nuvem-status-filter-bar button:hover,
.sheet-mode .nuvem-status-filter-bar button.active {
  border-color: #d0d5dd;
  background: #eef4ff;
}

.sheet-mode .nuvem-status-filter-bar button strong {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  padding: 0 6px;
  color: #fff;
  background: #667085;
  font-size: 12px;
  font-weight: 850;
}

.sheet-mode .nuvem-status-filter-bar button.active strong {
  background: #075dcc;
}
.sheet-mode .nuvem-status-filter-bar .nuvem-status-toggle {
  margin-left: 2px;
  border-color: #c9d8ee;
  color: #1849a9;
  background: #f7fbff;
}

.sheet-mode .nuvem-status-filter-bar .nuvem-status-toggle:hover {
  border-color: #84adf7;
  background: #eef4ff;
}

.sheet-mode .nuvem-status-filter-bar .nuvem-status-toggle > span {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.sheet-mode .nuvem-status-board[hidden] {
  display: none;
}

.sheet-mode .nuvem-status-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sheet-mode .nuvem-status-panel {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
}

.sheet-mode .nuvem-status-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f5;
  background: #f8fafc;
}

.sheet-mode .nuvem-status-panel > header span {
  display: block;
  color: #667085;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sheet-mode .nuvem-status-panel > header strong {
  display: block;
  margin-top: 2px;
  color: #101828;
  font-size: 13px;
  font-weight: 850;
}

.sheet-mode .nuvem-status-panel > header b {
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #0b4aa2;
  font-size: 12px;
  text-align: center;
}

.sheet-mode .nuvem-status-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-mode .nuvem-status-columns section {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #edf0f5;
}

.sheet-mode .nuvem-status-columns section:last-child {
  border-right: 0;
}

.sheet-mode .nuvem-status-columns h4 {
  margin: 0 0 6px;
  color: #475467;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sheet-mode .nuvem-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  gap: 8px;
  border-top: 1px solid #f2f4f7;
  color: #344054;
  font-size: 11px;
}

.sheet-mode .nuvem-status-line:first-of-type {
  border-top: 0;
}

.sheet-mode .nuvem-status-line strong {
  flex: 0 0 auto;
  color: #101828;
  font-size: 12px;
}

@media (max-width: 900px) {
  .sheet-mode .nuvem-status-board,
  .sheet-mode .nuvem-status-columns {
    grid-template-columns: 1fr;
  }

  .sheet-mode .nuvem-status-columns section {
    border-right: 0;
    border-bottom: 1px solid #edf0f5;
  }

  .sheet-mode .nuvem-status-columns section:last-child {
    border-bottom: 0;
  }
}

.confirmation-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 750;
}

.confirmation-select.ok {
  border-color: #b7e4c7;
  color: #087443;
  background: #ecfdf3;
}

.confirmation-select.wait {
  border-color: #f3d58b;
  color: #92400e;
  background: #fffbeb;
}

.confirmation-select.danger {
  border-color: #f4b3b3;
  color: #b42318;
  background: #fff1f1;
}

.confirmation-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.confirmation-select.detail {
  min-width: 150px;
}

.internal-action-stack {
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: stretch;
}

.internal-action-stack .confirmation-select {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  font-size: 10px;
}

.sheet-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.sheet-mode .sheet-orders-view {
  display: block;
}

.sheet-mode .sheet-grid-shell {
  overflow-y: visible;
  overflow-x: hidden;
  height: auto;
  min-height: 420px;
  border: 1px solid #d9dde5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  cursor: default;
  scrollbar-gutter: stable both-edges;
  scrollbar-color: #98a2b3 #eef2f6;
  scrollbar-width: thin;
}

.sheet-mode .sheet-grid-shell.is-panning {
  cursor: grabbing;
  user-select: none;
}

.sheet-mode .sheet-grid-shell button,
.sheet-mode .sheet-grid-shell a,
.sheet-mode .sheet-grid-shell input,
.sheet-mode .sheet-grid-shell select,
.sheet-mode .sheet-grid-shell textarea {
  cursor: auto;
}

.sheet-mode .sheet-grid-shell::-webkit-scrollbar {
  width: 0;
  height: 14px;
}

.sheet-mode .sheet-grid-shell::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 999px;
}

.sheet-mode .sheet-grid-shell::-webkit-scrollbar-thumb {
  min-height: 44px;
  min-width: 44px;
  border: 3px solid #eef2f6;
  border-radius: 999px;
  background: #98a2b3;
}

.sheet-mode .ops-sheet-orders {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.sheet-mode .ops-sheet-orders thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 34px;
  padding: 0;
  border-bottom: 2px solid #cfd6e1;
  border-right: 1px solid #edf0f5;
  background: #f8fafc;
  text-transform: none;
  letter-spacing: 0;
}

.sheet-mode .ops-sheet-orders tbody td {
  height: 34px;
  padding: 4px 5px;
  border-bottom: 1px solid #edf0f5;
  border-right: 1px solid #edf0f5;
  color: #111827;
  font-size: 11px;
  line-height: 1.2;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.sheet-mode .sheet-zebra-row td {
  background: #fbfcfe;
}

.sheet-mode .sheet-group-alt td {
  background: #fbfcfe;
}

.sheet-mode .sheet-order-start td {
  border-top: 2px solid #c7d0dd;
}

.sheet-mode .sheet-order-line td {
  border-top: 0;
}

.sheet-mode .sheet-order-line td:not(.sheet-shared-cell):not(.sheet-repeat-empty) {
  color: #344054;
}

.sheet-mode .sheet-order-line td {
  background: #fcfdff;
}

.sheet-mode .sheet-repeat-empty {
  color: transparent;
  background: #f7f9fc !important;
}

.sheet-mode .sheet-order-line .sheet-product-stack {
  padding-left: 10px;
  border-left: 3px solid #e4e7ec;
}

.sheet-mode .sheet-shared-cell {
  vertical-align: middle;
}

.sheet-mode .sheet-rowspan-note {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 10px;
  font-weight: 600;
}

.sheet-mode .sheet-cd-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  border: 1px solid #dbe3f4;
  border-radius: 999px;
  padding: 0 7px;
  color: #344054;
  background: #f8fbff;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.sheet-mode .sheet-cd-choice-cell {
  padding: 3px 4px;
}

.sheet-mode .sheet-cd-choice-cell .cd-select {
  width: 100%;
  min-height: 24px;
  border: 1px solid #d3dae4;
  border-radius: 5px;
  padding: 0 6px;
  color: #101828;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.sheet-mode .sheet-cd-choice-cell .cd-select:disabled {
  color: #98a2b3;
  background: #f8fafc;
}

.sheet-mode .ops-sheet-orders tbody tr:hover td {
  background: #f3f7ff;
}

.sheet-mode .ops-sheet-orders tbody tr:hover .sticky-select-col,
.sheet-mode .ops-sheet-orders tbody tr:hover .sticky-order-col,
.sheet-mode .ops-sheet-orders tbody tr:hover .sticky-date-col,
.sheet-mode .ops-sheet-orders tbody tr:hover .sticky-client-col,
.sheet-mode .ops-sheet-orders tbody tr:hover .sticky-actions-col {
  background: #eef4ff;
}

.sheet-mode .sticky-select-col,
.sheet-mode .sticky-order-col,
.sheet-mode .sticky-date-col,
.sheet-mode .sticky-client-col,
.sheet-mode .sticky-actions-col {
  position: sticky;
  z-index: 3;
  background: #fff;
}

.sheet-mode .sticky-select-col {
  left: 0;
}

.sheet-mode .sticky-order-col {
  left: var(--sheet-sticky-select, 30px);
}

.sheet-mode .sticky-date-col {
  left: calc(var(--sheet-sticky-select, 30px) + var(--sheet-sticky-pedido, 52px));
}

.sheet-mode .sticky-client-col {
  left: calc(var(--sheet-sticky-select, 30px) + var(--sheet-sticky-pedido, 52px) + var(--sheet-sticky-data, 72px));
}

.sheet-mode .sticky-actions-col {
  left: calc(var(--sheet-sticky-select, 30px) + var(--sheet-sticky-pedido, 64px) + var(--sheet-sticky-data, 76px) + var(--sheet-sticky-cliente, 140px));
  box-shadow: 8px 0 16px rgba(15, 23, 42, 0.08), 1px 0 0 #d9dde5;
}

.sheet-mode thead .sticky-select-col,
.sheet-mode thead .sticky-order-col,
.sheet-mode thead .sticky-date-col,
.sheet-mode thead .sticky-client-col,
.sheet-mode thead .sticky-actions-col {
  z-index: 6;
}

.sheet-mode .sheet-zebra-row .sticky-select-col,
.sheet-mode .sheet-zebra-row .sticky-order-col,
.sheet-mode .sheet-zebra-row .sticky-date-col,
.sheet-mode .sheet-zebra-row .sticky-client-col,
.sheet-mode .sheet-zebra-row .sticky-actions-col {
  background: #fbfcfe;
}

.sheet-mode .sheet-group-alt .sticky-select-col,
.sheet-mode .sheet-group-alt .sticky-order-col,
.sheet-mode .sheet-group-alt .sticky-date-col,
.sheet-mode .sheet-group-alt .sticky-client-col,
.sheet-mode .sheet-group-alt .sticky-actions-col {
  background: #fbfcfe;
}

.sheet-mode .sticky-select-col input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0b63ce;
}

.sheet-mode .sheet-select-head {
  display: inline-grid;
  width: 100%;
  place-items: center;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}

.sheet-mode .sheet-sort-button {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  padding: 0 3px;
  color: #475467;
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.sheet-mode .sheet-plain-link {
  border: 0;
  padding: 0;
  color: #175cd3;
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sheet-mode .sheet-mini-select {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 750;
}

.sheet-mode .sheet-mini-select.ok {
  color: #087443;
  background: #ecfdf3;
  border-color: #b7e4c7;
}

.sheet-mode .sheet-mini-select.wait {
  color: #92400e;
  background: #fffbeb;
  border-color: #f3d58b;
}

.sheet-mode .sheet-mini-select.danger {
  color: #b42318;
  background: #fff1f1;
  border-color: #f4b3b3;
}

.sheet-mode .sheet-mini-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sheet-mode .sheet-mini-generate {
  display: inline-grid;
  width: 24px;
  height: 20px;
  place-items: center;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.sheet-mode .sheet-mini-generate.ready {
  color: #175cd3;
  background: #edf3ff;
  border-color: #b7c6ec;
}

.sheet-mode .sheet-mini-generate.ok {
  color: #087443;
  background: #ecfdf3;
  border-color: #b7e4c7;
}

.sheet-mode .sheet-mini-generate.blocked {
  color: #98a2b3;
  background: #f8fafc;
}

.sheet-mode .sheet-obs-mini {
  width: 100%;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 4px;
  color: #344054;
  background: transparent;
  font: inherit;
}

.sheet-mode .sheet-obs-mini:focus {
  border-color: #b7c6ec;
  background: #fff;
  outline: none;
}

.sheet-mode .sheet-sort-button.active {
  color: #0f172a;
}

.sheet-mode .sheet-sort-button[data-direction="asc"]::after,
.sheet-mode .sheet-sort-button[data-direction="desc"]::after {
  font-size: 10px;
}

.sheet-mode .sheet-sort-button[data-direction="asc"]::after {
  content: "?";
}

.sheet-mode .sheet-sort-button[data-direction="desc"]::after {
  content: "?";
}

.sheet-mode .sheet-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.sheet-mode.sheet-resizing,
.sheet-mode.sheet-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.sheet-mode .sheet-order-link,
.sheet-mode .sheet-inline-link,
.sheet-mode .sheet-text-link {
  border: 0;
  padding: 0;
  color: #175cd3;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.sheet-mode .sheet-order-link {
  font-weight: 700;
}

.sheet-mode .sheet-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #dbe3f4;
  background: #f8fbff;
}

.sheet-mode .sheet-inline-link:disabled {
  color: #98a2b3;
  border-color: #e4e7ec;
  background: #f8fafc;
  cursor: not-allowed;
}

.sheet-mode .sheet-inline-link.secondary {
  color: #344054;
  border-color: #d9dde5;
  background: #fff;
}

.sheet-mode .sheet-cell-stack {
  display: grid;
  gap: 2px;
}

.sheet-mode .sheet-cell-stack strong {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-mode .sheet-cell-stack small {
  color: #667085;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-mode .sheet-center-cell,
.sheet-mode .sheet-phone-cell {
  text-align: center;
}

.sheet-mode .sheet-phone-cell {
  white-space: nowrap;
}

.sheet-mode .sheet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-mode .sheet-badge.green {
  color: #0d6832;
  background: #eaf8ee;
}

.sheet-mode .sheet-badge.blue {
  color: #0c57b7;
  background: #eaf2ff;
}

.sheet-mode .sheet-badge.amber {
  color: #9a5f00;
  background: #fff3dd;
}

.sheet-mode .sheet-badge.red {
  color: #b42318;
  background: #feeceb;
}

.sheet-mode .sheet-badge.violet {
  color: #6941c6;
  background: #f3e8ff;
}

.sheet-mode .sheet-badge.slate {
  color: #475467;
  background: #eef2f6;
}

.sheet-mode .sheet-tracking-cell-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sheet-mode .sheet-copy-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #667085;
  background: #f2f4f7;
}

.sheet-mode .sheet-copy-icon svg {
  width: 13px;
  height: 13px;
}

.sheet-mode .sheet-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 0;
  color: #667085;
  font-size: 12px;
}

.sheet-mode .sheet-footer-note {
  color: #98a2b3;
}

.sheet-mode .sheet-pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sheet-mode .sheet-pagination-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sheet-mode .sheet-pagination-controls select,
.sheet-mode .sheet-pagination-controls button {
  min-height: 30px;
  font-size: 12px;
  padding: 5px 9px;
}

.sheet-mode .sheet-hidden-panel {
  display: none !important;
}

.sheet-mode .mobile-order-list {
  display: none;
}

.sheet-mode .mobile-empty-state {
  padding: 18px;
  border: 1px solid #d9dde5;
  border-radius: 12px;
  color: #667085;
  background: #fff;
  font-size: 13px;
}

.sheet-mode .order-detail-view[hidden] {
  display: none;
}

.sheet-mode .order-detail-view {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.sheet-mode .order-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
}

.sheet-mode .order-detail-modal {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100%;
  overflow: auto;
  border-radius: 0;
  border-left: 1px solid #d9dde5;
  background: #fff;
  box-shadow: -24px 0 48px rgba(15, 23, 42, 0.16);
}

.sheet-mode .order-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
}

.sheet-mode .order-detail-layout {
  grid-template-columns: 1fr;
}

.sheet-mode .order-detail-main,
.sheet-mode .order-detail-aside {
  display: grid;
  gap: 14px;
}

.sheet-mode .order-detail-aside {
  padding-top: 0;
}

.sheet-mode .detail-section-pulse {
  border-color: #b7c6ec;
  box-shadow: 0 0 0 4px rgba(76, 119, 216, 0.12);
}

.sheet-mode.modal-open {
  overflow: hidden;
}

@media (max-width: 1380px) {
  .sheet-mode .ops-toolbar.sheet-toolbar-top {
    grid-template-columns: minmax(260px, 1fr) minmax(340px, auto);
  }

  .sheet-mode .header-status {
    grid-column: 1 / -1;
    order: 3;
  }

  .sheet-mode .ops-actions {
    justify-self: end;
  }

  .sheet-mode .sheet-toolbar {
    grid-template-columns: minmax(320px, 1.4fr) repeat(3, minmax(130px, 1fr));
  }

  .sheet-mode .sheet-filter-field:nth-of-type(4) {
    grid-column: auto;
  }
}

@media (max-width: 1240px) {
  .sheet-mode .ops-sheet-orders th:nth-child(9),
  .sheet-mode .ops-sheet-orders td:nth-child(9),
  .sheet-mode .ops-sheet-orders th:nth-child(12),
  .sheet-mode .ops-sheet-orders td:nth-child(12),
  .sheet-mode .ops-sheet-orders th:nth-child(14),
  .sheet-mode .ops-sheet-orders td:nth-child(14) {
    display: none;
  }
}

@media (max-width: 1040px) {
  .sheet-mode .ops-toolbar.sheet-toolbar-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sheet-mode .header-status,
  .sheet-mode .ops-actions {
    justify-content: flex-start;
  }

  .sheet-mode .sheet-toolbar {
    top: 168px;
    grid-template-columns: 1fr 1fr;
  }

  .sheet-mode .sheet-search {
    grid-column: 1 / -1;
  }

  .sheet-mode .sheet-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .sheet-mode .sheet-filter-rail {
    top: 316px;
    flex-direction: column;
    align-items: flex-start;
  }

  .sheet-mode .sheet-grid-shell {
    height: auto;
    min-height: 360px;
  }
}

@media (max-width: 960px) {
  .sheet-mode .sheet-orders-view {
    display: none;
  }

  .sheet-mode .mobile-order-list {
    display: grid;
    gap: 12px;
  }

  .sheet-mode .mobile-sheet-card {
    border: 1px solid #d9dde5;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
  }

  .sheet-mode .mobile-sheet-card summary {
    list-style: none;
    padding: 14px;
    cursor: pointer;
  }

  .sheet-mode .mobile-sheet-card summary::-webkit-details-marker {
    display: none;
  }

  .sheet-mode .mobile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .sheet-mode .mobile-sheet-head div {
    display: grid;
    gap: 3px;
  }

  .sheet-mode .mobile-sheet-head strong {
    font-size: 14px;
  }

  .sheet-mode .mobile-sheet-head span,
  .sheet-mode .mobile-sheet-meta {
    color: #667085;
    font-size: 12px;
  }

  .sheet-mode .mobile-sheet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
  }

  .sheet-mode .mobile-sheet-actions,
  .sheet-mode .mobile-sheet-body {
    padding: 0 14px 14px;
  }

  .sheet-mode .mobile-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sheet-mode .mobile-sheet-body {
    display: grid;
    gap: 10px;
  }

  .sheet-mode .mobile-sheet-line {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fafbfd;
  }

  .sheet-mode .mobile-sheet-line div {
    display: grid;
    gap: 3px;
  }

  .sheet-mode .mobile-sheet-line span {
    color: #667085;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }
}

/* Scroll fix: keep the current visual style, but let the page own the vertical scroll. */
.sheet-mode .ops-header.sheet-header {
  position: static;
}

.sheet-mode .ops-dashboard.sheet-dashboard {
  padding-top: 18px;
}

.sheet-mode .sheet-toolbar,
.sheet-mode .sheet-filter-rail {
  position: static;
  top: auto;
}

.sheet-mode .sheet-grid-shell {
  overflow: visible;
  scrollbar-gutter: auto;
}

.sheet-mode .ops-sheet-orders thead th {
  top: 0;
}

/* Alignment audit fixes: fit the operational sheet to the visible workspace. */
.sheet-mode {
  overflow-x: hidden;
}

.sheet-mode .sheet-toolbar {
  grid-template-columns: minmax(360px, 1.55fr) minmax(108px, .75fr) minmax(132px, .9fr) minmax(186px, 1fr) repeat(2, minmax(116px, .8fr)) auto;
  align-items: end;
}

.sheet-mode .sheet-search,
.sheet-mode .sheet-toolbar-actions {
  grid-column: auto;
}

.sheet-mode .sheet-toolbar-actions {
  align-self: end;
  justify-content: flex-end;
  white-space: nowrap;
}

.sheet-mode .sheet-filter-field select,
.sheet-mode .sheet-search input,
.sheet-mode .sheet-action-button {
  min-height: 38px;
}

.sheet-mode .ops-sheet-orders th,
.sheet-mode .ops-sheet-orders td {
  white-space: nowrap;
}

.sheet-mode .sheet-sort-button {
  padding: 0 3px;
  font-size: 8px;
}

.sheet-mode .ops-sheet-orders .sheet-product-stack,
.sheet-mode .ops-sheet-orders .sheet-obs-mini,
.sheet-mode .ops-sheet-orders .sheet-muted-text {
  white-space: normal;
}

.sheet-mode .sticky-date-col {
  left: var(--sheet-sticky-pedido, 46px);
}

.sheet-mode .sticky-client-col {
  left: calc(var(--sheet-sticky-pedido, 46px) + var(--sheet-sticky-data, 64px));
}

@media (max-width: 1180px) {
  .sheet-mode .sheet-toolbar {
    grid-template-columns: minmax(300px, 1fr) repeat(2, minmax(140px, 1fr));
  }

  .sheet-mode .sheet-toolbar-actions {
    justify-content: flex-start;
  }
}


/* Nuvemshop comparison pass: make the operational layer read like their orders list. */
.sheet-mode .sheet-filter-rail {
  align-items: center;
  justify-content: space-between;
  border-color: #edf0f5;
  background: #fff;
}

.sheet-mode .quick-filter-bar.sheet-segmented {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.sheet-mode .sheet-segmented button {
  min-height: 34px;
  border-color: transparent;
  border-radius: 9px;
  padding: 0 11px;
  background: #f5f5f5;
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
}

.sheet-mode .sheet-segmented button strong {
  min-width: 21px;
  min-height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  padding: 0 6px;
  background: #667085;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.sheet-mode .sheet-segmented button.active {
  border-color: #8db5ff;
  background: #edf4ff;
  color: #075dcc;
  box-shadow: inset 0 0 0 1px rgba(7, 93, 204, 0.18);
}

.sheet-mode .sheet-segmented button.active strong {
  background: #075dcc;
}

.sheet-mode .sheet-summary-rail {
  order: -1;
  min-width: max-content;
}

.sheet-mode .operational-snapshot {
  margin-top: 0;
}

.sheet-mode .nuvem-status-filter-bar {
  display: none;
}

.sheet-mode .nuvem-status-board {
  gap: 10px;
}

.sheet-mode .nuvem-status-panel {
  border-color: #d9dde5;
  border-radius: 8px;
  box-shadow: none;
}

.sheet-mode .bulk-bar {
  min-height: 48px;
  gap: 9px;
  padding: 8px 10px;
  background: #fff;
}

.sheet-mode .bulk-bar .check-row span {
  font-size: 14px;
}

.sheet-mode .bulk-bar .secondary-button {
  min-height: 36px;
  border-radius: 6px;
  padding-inline: 12px;
}

.sheet-mode .ops-sheet-orders th {
  height: 36px;
  background: #f7f8fa;
  color: #344054;
  font-size: 10px;
}

.sheet-mode .ops-sheet-orders td {
  height: 38px;
  padding: 5px 7px;
  vertical-align: middle;
}

.sheet-mode .sheet-order-link,
.sheet-mode .sheet-plain-link {
  color: #005bd3;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sheet-mode .sheet-cd-choice-cell select,
.sheet-mode .sheet-mini-select,
.sheet-mode .sheet-mini-generate {
  min-height: 26px;
}

.sheet-mode .sheet-quote-cell,
.sheet-mode .sheet-order-cd-cell,
.sheet-mode .sheet-cd-choice-cell,
.sheet-mode .sheet-generate-cell {
  text-align: center;
}

@media (max-width: 1100px) {
  .sheet-mode .sheet-filter-rail {
    align-items: flex-start;
  }

  .sheet-mode .quick-filter-bar.sheet-segmented {
    justify-content: flex-start;
  }
}


/* Prevent the operational sheet from cutting off right-side columns. */
.sheet-mode {
  --sheet-sticky-select: 28px;
  --sheet-sticky-pedido: 58px;
  --sheet-sticky-data: 74px;
  --sheet-sticky-cliente: 150px;
}

.sheet-mode .sheet-grid-shell {
  overflow-x: auto !important;
  overflow-y: visible;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.sheet-mode .sheet-grid-shell::-webkit-scrollbar {
  height: 10px;
}

.sheet-mode .ops-sheet-orders {
  width: max-content;
  min-width: 100%;
}

.sheet-mode .ops-sheet-orders thead th,
.sheet-mode .ops-sheet-orders tbody td {
  padding-left: 4px;
  padding-right: 4px;
}

.sheet-mode .ops-sheet-orders thead th {
  font-size: 9px;
}

.sheet-mode .ops-sheet-orders tbody td {
  font-size: 10.5px;
}

.sheet-mode .sticky-order-col {
  left: var(--sheet-sticky-select) !important;
}

.sheet-mode .sticky-date-col {
  left: calc(var(--sheet-sticky-select) + var(--sheet-sticky-pedido)) !important;
}

.sheet-mode .sticky-client-col {
  left: calc(var(--sheet-sticky-select) + var(--sheet-sticky-pedido) + var(--sheet-sticky-data)) !important;
}

.sheet-mode .sticky-client-col {
  box-shadow: 8px 0 12px rgba(15, 23, 42, 0.06), 1px 0 0 #d9dde5;
}

.sheet-mode .sheet-cd-pill {
  min-width: 28px;
  padding: 0 5px;
  font-size: 10px;
}

.sheet-mode .sheet-cd-choice-cell .cd-select,
.sheet-mode .sheet-mini-select,
.sheet-mode .sheet-mini-generate {
  font-size: 10px;
}

.sheet-mode .sheet-mini-select {
  min-width: 70px;
}

.sheet-mode .sheet-mini-select span {
  max-width: 64px;
}

.sheet-mode .sheet-obs-mini {
  font-size: 10px;
}


/* Keep spreadsheet controls reachable even with hundreds of rows. */
.sheet-mode .sheet-grid-shell {
  height: calc(100vh - 350px);
  min-height: 360px;
  max-height: 620px;
  overflow: auto !important;
  position: relative;
}

.sheet-mode .sheet-grid-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sheet-mode .sheet-table-footer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.sheet-mode .sheet-obs-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid #d9dde5;
  border-radius: 999px;
  padding: 0 8px;
  color: #344054;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  overflow: visible;
}

.sheet-mode .sheet-obs-tooltip.empty {
  color: #98a2b3;
  background: #f8fafc;
}

.sheet-mode .sheet-obs-tooltip.has-note {
  border-color: #f3d58b;
  color: #8a4b00;
  background: #fff8e6;
}

.sheet-mode .sheet-obs-tooltip > span {
  overflow: hidden;
  max-width: 70px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-mode .sheet-obs-tooltip b {
  position: fixed;
  z-index: 999;
  right: 24px;
  bottom: 74px;
  display: none;
  width: min(360px, calc(100vw - 48px));
  border: 1px solid #d9dde5;
  border-radius: 10px;
  padding: 10px 12px;
  color: #101828;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
  text-align: left;
}

.sheet-mode .sheet-obs-tooltip:hover b,
.sheet-mode .sheet-obs-tooltip:focus b {
  display: block;
}

@media (max-height: 760px) {
  .sheet-mode .sheet-grid-shell {
    height: calc(100vh - 300px);
    min-height: 280px;
  }
}


/* Editable notes with a floating hover preview. */
.sheet-mode .sheet-obs-mini {
  width: 100%;
  min-height: 24px;
  border: 1px solid #d9dde5;
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.sheet-mode .sheet-obs-mini.empty,
.sheet-mode .sheet-obs-mini::placeholder {
  color: #98a2b3;
}

.sheet-mode .sheet-obs-mini.has-note {
  border-color: #f3d58b;
  color: #8a4b00;
  background: #fff8e6;
}

.sheet-mode .sheet-obs-mini:focus {
  border-color: #075dcc;
  background: #fff;
  color: #101828;
  outline: 2px solid rgba(7, 93, 204, 0.16);
}

.floating-note-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid #d9dde5;
  border-radius: 10px;
  padding: 10px 12px;
  color: #101828;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

.floating-note-tooltip.visible {
  display: block;
}

.sheet-mode .sheet-obs-tooltip b {
  display: none !important;
}


/* Freight quote preview in the grid. */
.sheet-mode .quote-cell-chip {
  width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0 7px;
  color: #075dcc;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-mode .quote-cell-chip.pending {
  border-color: #e4e7ec;
  color: #98a2b3;
  background: #f8fafc;
}

.floating-quote-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  width: max-content;
  max-width: min(390px, calc(100vw - 32px));
  border: 1px solid #d9dde5;
  border-radius: 10px;
  padding: 10px 12px;
  color: #101828;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
}

.floating-quote-tooltip.visible {
  display: block;
}


/* cd-choice-fix: keep CD controls readable in narrow cells. */
.sheet-mode .sheet-cd-choice-cell {
  min-width: 92px;
  overflow: visible !important;
}

.sheet-mode .sheet-cd-choice-cell .cd-select {
  min-width: 86px;
  max-width: 100%;
  padding: 0 20px 0 7px;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
}

.sheet-mode .floating-quote-tooltip,
.sheet-mode .floating-note-tooltip {
  transition: opacity 0.08s ease;
}


/* Live freight quote comparison. */
.sheet-mode .quote-cell-chip {
  min-height: 28px;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
  padding: 2px 6px;
}

.sheet-mode .quote-cell-chip strong,
.sheet-mode .quote-cell-chip small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-mode .quote-cell-chip small {
  font-size: 8.5px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sheet-mode .quote-cell-chip.best {
  border-color: #bbf7d0;
  color: #047857;
  background: #ecfdf3;
}

.sheet-mode .quote-cell-chip.fast {
  border-color: #bae6fd;
  color: #0369a1;
  background: #f0f9ff;
}

.sheet-mode .quote-cell-chip.recommended {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.quote-refresh-button {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 5px 9px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.quote-refresh-button:hover:not(:disabled) {
  border-color: #075dcc;
  color: #075dcc;
}

.sheet-mode .sheet-payment-filter {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 3px 8px 5px;
  border: 1px solid #d6dbe5;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.sheet-mode .sheet-payment-filter legend {
  padding: 0 4px;
  color: #6f7787;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.sheet-mode .sheet-payment-filter label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sheet-mode .sheet-payment-filter input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2563eb;
}


.sheet-mode .nuvem-status-columns.single {
  grid-template-columns: minmax(0, 1fr);
}

.sheet-mode .nuvem-status-columns.single section {
  border-right: 0;
}

.client-signal-stack {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 7px;
  row-gap: 1px;
  align-items: center;
  min-width: 0;
}

.client-signal-stack > span:not(.client-signal),
.client-signal-stack > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-signal-stack > small {
  grid-column: 2;
  color: #64748b;
  font-size: 10px;
  line-height: 1.1;
}

.client-signal {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
}

.client-signal.ok { background: #16a34a; }
.client-signal.wait { background: #f59e0b; }
.client-signal.danger { background: #dc2626; }

.ops-sheet .sheet-product-cell .mini-details summary {
  width: 100%;
  justify-content: flex-start;
}

/* Direct freight selection in the operational grid. */
.sheet-mode .quote-cell-select {
  width: 100%;
  min-width: 132px;
  min-height: 30px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  padding: 3px 22px 3px 7px;
  color: #075dcc;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.sheet-mode .quote-cell-select.best {
  border-color: #bbf7d0;
  color: #047857;
  background: #ecfdf3;
}

.sheet-mode .quote-cell-select.fast {
  border-color: #bae6fd;
  color: #0369a1;
  background: #f0f9ff;
}

.sheet-mode .quote-cell-select.recommended {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.sheet-mode .quote-cell-select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}
/* Compact feedback while confirmation or freight selection is being persisted. */
.sheet-mode .sheet-control-wrap {
  display: inline-grid;
  gap: 2px;
  width: 100%;
}

.sheet-mode .sheet-saving-status {
  color: #64748b;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.sheet-mode .quote-cell-select:disabled,
.sheet-mode select.sheet-mini-select:disabled {
  cursor: wait;
  opacity: 0.72;
}
/* Native confirmation selector: the operator sees the active value and can change it directly. */
.sheet-mode select.sheet-mini-select {
  appearance: auto;
  display: inline-block;
  min-width: 70px;
  min-height: 26px;
  padding: 2px 20px 2px 7px;
  cursor: pointer;
  text-align: center;
}

/* Label confirmation stays inside the operational screen instead of using a browser prompt. */
.label-conference-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .36);
}
.label-conference-modal {
  width: min(620px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .25);
}
.label-conference-modal header,
.label-conference-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.label-conference-modal header { border-bottom: 1px solid #e5eaf1; }
.label-conference-modal h2 { margin: 2px 0 0; font-size: 19px; }
.label-conference-modal small { color: #57708d; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.label-conference-modal p { margin: 0; padding: 16px 20px 4px; color: #526277; font-size: 13px; }
.label-conference-modal pre { margin: 12px 20px 16px; padding: 14px; overflow: auto; white-space: pre-wrap; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; color: #172033; background: #f7f9fc; border: 1px solid #e0e7f0; border-radius: 7px; }
.label-conference-modal footer { justify-content: flex-end; border-top: 1px solid #e5eaf1; }
.label-conference-modal button { min-height: 36px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #172033; font: 700 13px inherit; cursor: pointer; }
.label-conference-modal .label-conference-close { width: 34px; min-width: 34px; padding: 0; border: 0; font-size: 24px; font-weight: 400; }
.label-conference-modal .label-conference-confirm { color: #fff; background: #0969da; border-color: #0969da; }
/* Compact operational indicators: source note and internal daily follow-up. */
.sheet-note-indicator,
.sheet-note-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid #d7e0eb;
  border-radius: 5px;
  background: #fff;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}
.sheet-note-indicator { cursor: pointer; }
.sheet-note-indicator.native { color: #b42318; border-color: #fda29b; background: #fff1f0; }
.sheet-note-indicator.danger { color: #b42318; border-color: #fecaca; background: #fff1f0; }
.sheet-note-indicator.wait { color: #9a6700; border-color: #f7d37a; background: #fff9e7; }
.sheet-note-indicator.empty { color: #98a2b3; }
.sheet-note-indicator.empty.create { color: #475467; border-color: #d0d5dd; background: #fff; font-size: 9px; }
.sheet-note-indicator.empty.create:hover { color: #1659c1; border-color: #9ec5fe; background: #f4f8ff; }
.sheet-note-indicator.native::before { content: "!"; display: inline-grid; place-items: center; width: 13px; height: 13px; margin-right: 3px; border-radius: 999px; color: #fff; background: #d92d20; font-size: 9px; line-height: 1; }
.sheet-note-indicator.danger::before, .sheet-note-indicator.wait::before { content: "!"; margin-right: 3px; font-size: 13px; line-height: 0; }
.sheet-product-inline { display: grid; gap: 2px; min-width: 0; }
.sheet-product-inline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 16px; }
.sheet-product-more summary { font-size: 10px; }
.sheet-product-more ul { margin: 5px 0 0; padding-left: 14px; font-size: 10px; }
.ops-sheet-orders [data-col-key="cupom"], .ops-sheet-orders [data-col-key="desconto"] { font-size: 9px; letter-spacing: 0; padding-left: 4px; padding-right: 4px; }
/* Google Sheets-style column filters */
.sheet-sort-button { display: inline-flex; align-items: center; max-width: calc(100% - 24px); }
.sheet-column-filter { appearance: none; border: 0; background: transparent; color: #64748b; width: 18px; height: 18px; padding: 2px; margin-left: 2px; vertical-align: middle; cursor: pointer; border-radius: 3px; }
.sheet-column-filter svg { width: 12px; height: 12px; stroke-width: 2.2; }
.sheet-column-filter:hover { background: #eaf2ff; color: #1264d8; }
.sheet-column-filter.active { color: #075fc9; background: #dcecff; }
.sheet-column-filter-popover { position: fixed; z-index: 10050; padding: 10px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; box-shadow: 0 14px 32px rgba(15, 23, 42, .2); font-size: 12px; color: #172033; }
.sheet-column-filter-popover header, .sheet-column-filter-popover footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-column-filter-popover header { padding-bottom: 8px; }
.sheet-column-filter-popover header button { border: 0; background: transparent; cursor: pointer; color: #64748b; font-size: 20px; line-height: 1; }
.sheet-column-filter-popover input[type=search] { width: 100%; height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 4px; outline: none; }
.sheet-column-filter-options { max-height: 214px; overflow: auto; margin: 8px -4px; padding: 0 4px; }
.sheet-column-filter-options label { display: flex; align-items: center; gap: 7px; min-height: 29px; cursor: pointer; border-radius: 3px; padding: 2px 4px; }
.sheet-column-filter-options label:hover { background: #f1f5f9; }
.sheet-column-filter-options input { width: 14px; height: 14px; accent-color: #1264d8; }
.sheet-column-filter-popover footer { border-top: 1px solid #e2e8f0; padding-top: 8px; }
.sheet-column-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 18px; border: 1px solid #dbe5f2; border-top: 0; background: #fbfdff; }
.sheet-column-filter-chips[hidden] { display: none; }
.sheet-column-filter-chips button { border: 1px solid #b9d3f6; background: #eaf3ff; color: #075fc9; border-radius: 4px; min-height: 25px; padding: 3px 7px; font-size: 11px; cursor: pointer; }
.sheet-column-filter-chips button span { font-size: 15px; line-height: 0; margin-left: 3px; }
.sheet-column-filter-chips .clear-all { background: transparent; border-color: transparent; color: #64748b; text-decoration: underline; }

.sheet-tracking-pending {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #f1d28a;
  border-radius: 4px;
  background: #fff9e9;
  color: #8a5700;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.sheet-label-cancelled,
.detail-cancelled-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #f0b4b4;
  border-radius: 4px;
  background: #fff1f1;
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-danger-button { border: 1px solid #f3b5b5; background: #fff7f7; color: #b42318; }




.sheet-mode .sheet-cd-choice-cell .cd-select.is-empty,
.ops-sheet .cd-select.is-empty {
  color: transparent;
  background-color: #fff;
}
.sheet-mode .sheet-cd-choice-cell .cd-select.is-empty:hover,
.ops-sheet .cd-select.is-empty:hover,
.sheet-mode .sheet-cd-choice-cell .cd-select.is-empty:focus,
.ops-sheet .cd-select.is-empty:focus {
  color: #475467;
}

.sheet-mode .sheet-manual-tracking-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #b7d7f7;
  border-radius: 5px;
  background: #f0f7ff;
  color: #075fc9;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.sheet-mode .sheet-manual-tracking-button:hover {
  border-color: #84b8f0;
  background: #e4f1ff;
}

.sheet-mode .sheet-manual-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #175cd3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-mode .sheet-label-cancelled {
  cursor: pointer;
}

.sheet-mode .operations-alerts:not([hidden]) {
  display: block !important;
  margin: 0 0 8px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  background: transparent;
}

.system-health-panel {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font-size: 11px;
}

.system-health-panel.is-warning {
  border-color: #fedf89;
  background: #fffaf0;
}

.system-health-panel.is-ok {
  border-color: #d1fadf;
  background: #f6fef9;
}

.system-health-main,
.system-health-actions,
.system-health-alerts {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.system-health-main strong {
  color: #101828;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.system-health-main span:not(.system-health-badge) {
  color: #667085;
  white-space: nowrap;
}

.system-health-badge {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: #075dcc;
  background: #eff6ff;
  font-weight: 800;
}

.system-health-panel.is-warning .system-health-badge {
  color: #92400e;
  background: #fef3c7;
}

.system-health-actions {
  justify-content: flex-end;
}

.system-health-actions button {
  min-height: 28px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 9px;
  color: #344054;
  background: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.system-health-actions button:hover {
  border-color: #84caff;
  color: #075dcc;
  background: #f0f7ff;
}

.system-health-alerts {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px;
}

.system-health-alert {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 0 8px;
  color: #912018;
  background: #ffe4e4;
  font-weight: 650;
}

.system-health-alert.is-ok {
  color: #067647;
  background: #dcfae6;
}

.system-health-alert b {
  min-width: 16px;
  min-height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d92d20;
  font-size: 9px;
}

.system-health-alert.is-ok b {
  color: #067647;
  background: transparent;
}

@media (max-width: 1100px) {
  .system-health-panel {
    grid-template-columns: 1fr;
  }

  .system-health-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .system-health-main {
    flex-wrap: wrap;
  }
}
