/* Buying workbench styles are scoped to the recipient manifestation page. */
.manifest-workspace {
  --mf-ink: var(--text, #152a40);
  --mf-border: var(--line, #dce7ed);
  --mf-panel: var(--surface, #fff);
  --mf-soft: color-mix(in srgb, var(--mf-panel) 92%, #6897a9);
  --mf-green: color-mix(in srgb, #16955c 76%, var(--mf-ink));
  --mf-muted: color-mix(in srgb, var(--mf-ink) 70%, var(--mf-panel));
  min-width: 0;
}
.manifest-workspace .manifest-hero {
  align-items: center;
  flex-wrap: wrap;
  gap: 17px 24px;
  margin: 0 0 18px;
  min-height: 134px;
  padding: clamp(18px, 2.2vw, 34px);
  border-radius: 17px;
  background: linear-gradient(110deg, #122a40 0%, #143b53 60%, #176878 100%);
  box-shadow: 0 10px 25px rgba(16, 49, 66, .14);
  color: #f5f9fb;
}
.manifest-workspace .manifest-hero .ops-eyebrow { color: #99d8e5 !important; margin-bottom: 7px; }
.manifest-workspace .manifest-hero h1 {
  color: #fff !important;
  font-size: clamp(25px, 2.7vw, 37px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.manifest-workspace .manifest-hero p { color: #e1f1f5; margin: 8px 0 0; font-size: 13px; }
.manifest-workspace .manifest-hero .ops-heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.manifest-workspace .manifest-hero .btn {
  border-radius: 9px;
  min-height: 41px;
  padding-inline: 14px;
  font-size: 12px;
}
.manifest-workspace .manifest-hero .btn-secondary {
  color: #123449 !important;
  border-color: #daedf2;
  background: #f8fcfd !important;
  background-image: none !important;
}
.manifest-workspace .manifest-hero .btn-secondary:hover { background: #e5f4f6 !important; }
.manifest-workspace .manifest-hero .btn-primary {
  color: #0c2d3a !important;
  background: #a6eced !important;
  background-image: none !important;
  border: 1px solid #a6eced;
  box-shadow: none;
}
.manifest-workspace .manifest-hero .btn-primary:hover { background: #c2f6f6 !important; }
.manifest-workspace .manifest-board {
  min-width: 0;
  padding: clamp(13px, 1.45vw, 22px);
  color: var(--mf-ink);
  background: var(--mf-panel);
  border: 1px solid var(--mf-border);
  border-radius: 17px;
}
.manifest-board .manifest-board-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.manifest-board .manifest-board-title h2 {
  color: var(--mf-ink);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.025em;
  margin: 0;
}
.manifest-board .manifest-board-title small { color: var(--mf-muted); font-size: 12px; white-space: nowrap; }
.manifest-board .manifest-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  margin: 0 0 14px;
}
.manifest-board .manifest-tools .ops-received-advanced {
  min-width: 0;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--mf-border);
  border-radius: 9px;
  color: var(--mf-ink);
  background: var(--mf-soft);
}
.manifest-board .manifest-tools summary {
  min-height: 36px;
  display: list-item;
  align-content: center;
  color: var(--mf-ink);
  font-size: 12px;
  font-weight: 650;
}
.manifest-board .manifest-tools details[open] { padding-bottom: 12px; }
.manifest-board .manifest-tools .ops-key-lookup { margin: 0; }
.manifest-board .manifest-tools .ops-received-autosync {
  padding: 8px 0;
  margin: 0;
  color: var(--mf-muted);
  border: 0;
  background: transparent;
}
.manifest-board .manifest-tools .ops-provider-search { margin: 6px 0; }
.manifest-board .ops-received-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 13px;
}
.manifest-board .ops-received-summary button {
  justify-content: flex-start;
  gap: 7px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--mf-border);
  border-radius: 8px;
  background: var(--mf-panel);
  color: var(--mf-ink);
}
.manifest-board .ops-received-summary button:hover,
.manifest-board .ops-received-summary button.selected {
  border-color: #4d9eaf;
  background: color-mix(in srgb, var(--mf-panel) 87%, #43a8bd);
}
.manifest-board .ops-received-summary button strong {
  order: 1;
  color: var(--mf-ink);
  background: var(--mf-soft);
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 750;
}
.manifest-board .ops-received-summary span {
  color: var(--mf-muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.manifest-board .ops-received-total,
.manifest-board .ops-received-total.pending {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  min-height: 34px;
  gap: 8px;
  padding: 5px 9px;
  border: 0;
  background: transparent;
}
.manifest-board .ops-received-total strong { font-size: 12px; color: var(--mf-ink); }
.manifest-board .ops-received-filters {
  align-items: end;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  margin: 0 0 12px;
  border: 1px solid var(--mf-border);
  border-radius: 10px;
  background: var(--mf-soft);
}
.manifest-board .ops-received-filters .ops-received-search { flex: 2 1 255px; min-width: 0; }
.manifest-board .ops-received-filters .ops-received-filter-select { min-width: 0; max-width: min(100%, 260px); }
.manifest-board .ops-received-filters .ops-received-daterange { margin: 0; }
.manifest-board .ops-received-filters > .btn:last-child { margin-left: 0; }
.manifest-board .ops-received-batch { margin: 0 0 12px; padding: 7px 10px; }
.manifest-board .manifest-grid-scroll {
  position: relative;
  max-width: 100%;
  max-height: 58vh;
  border: 1px solid var(--mf-border);
  border-radius: 10px;
  scrollbar-color: #85aab8 var(--mf-soft);
}
.manifest-board .manifest-grid { border-spacing: 0; font-size: 12px; }
.manifest-board .manifest-grid :is(th, td) {
  padding: 9px 11px;
  border-bottom: 1px solid var(--mf-border);
}
.manifest-board .manifest-grid th {
  background: var(--mf-soft);
  color: var(--mf-ink);
  font-size: 11px;
  font-weight: 750;
  z-index: 2;
}
.manifest-board .manifest-grid tbody tr { --mf-row: var(--mf-panel); }
.manifest-board .manifest-grid tbody tr:nth-child(even) { --mf-row: color-mix(in srgb, var(--mf-panel) 97%, #6897a9); }
.manifest-board .manifest-grid tbody tr:hover,
.manifest-board .manifest-grid tr[aria-current=true] { --mf-row: color-mix(in srgb, var(--mf-panel) 88%, #62c2d1); }
.manifest-board .manifest-grid tbody td { color: var(--mf-ink); background: var(--mf-row); }
.manifest-board .manifest-grid tbody td:nth-child(6) { min-width: 176px; max-width: 250px; font-weight: 650; line-height: 1.3; }
.manifest-board .manifest-grid :is(td, th):nth-child(n+9):nth-child(-n+12) { text-align: right; font-variant-numeric: tabular-nums; }
.manifest-board .manifest-grid :is(td, th):last-child {
  position: sticky;
  inset-inline-end: 0;
  border-inline-start: 1px solid var(--mf-border);
}
.manifest-board .manifest-grid th:last-child { z-index: 3; }
.manifest-board .manifest-grid td:last-child { z-index: 1; }
.manifest-board .manifest-grid td:last-child .btn { min-height: 30px; padding-inline: 9px; font-size: 11px; }
.manifest-board .manifest-grid td:nth-child(2) { min-width: 170px; }
.manifest-board .manifest-grid td:nth-child(2) .ops-mono {
  max-width: 23ch;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  user-select: all;
}
.manifest-board .manifest-grid td:nth-child(5) { font-weight: 650; }
.manifest-board .manifest-grid .entered td:nth-child(5),
.manifest-board .manifest-grid .entered td:nth-child(6) { color: var(--mf-green); }
.manifest-board .manifest-grid-footer { color: var(--mf-muted); padding-inline: 3px; }
.manifest-board .manifest-grid-footer .manifest-scroll-hint { margin-inline-start: auto; }
.manifest-board .manifest-legend { border-top: 1px solid var(--mf-border); margin-top: 14px; padding-top: 10px; }
.manifest-board .manifest-legend strong { color: var(--mf-ink); font-size: 12px; }
.manifest-board .manifest-detail:not(:empty) { margin-top: 14px; scroll-margin-top: 80px; }
.manifest-board .manifest-detail .ops-received-card { border-radius: 10px; }
@media (max-width: 700px) {
  .app-shell .main-shell:has(.manifest-workspace) { margin-left: 0 !important; transition-property: none !important; }
  .manifest-board .manifest-board-title { flex-wrap: wrap; }
  .manifest-workspace .manifest-hero { min-height: auto; }
  .manifest-board .manifest-tools { grid-template-columns: minmax(0, 1fr); }
  .manifest-board .ops-received-filters .ops-received-search { flex-basis: 100%; }
  .manifest-board .manifest-grid-scroll { max-height: 52vh; }
}


.manifest-company-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:8px; margin:0 0 13px; }
.manifest-company-toolbar label { display:grid; gap:4px; font-size:12px; font-weight:650; min-width:min(100%, 240px); }
.manifest-company-toolbar select { width:100%; min-height:36px; }
.manifest-company-toolbar .btn { min-height:36px; }
.manifest-company-cell { min-width:168px; max-width:235px; white-space:normal !important; }
.manifest-company-edit { display:block; text-align:left; max-width:100%; overflow-wrap:anywhere; border:1px solid var(--mf-border); border-radius:7px; background:var(--mf-panel); color:var(--mf-ink); cursor:pointer; padding:6px 8px; font:inherit; }
.manifest-company-edit:hover { border-color:#4d9eaf; }
.manifest-company-edit:disabled { opacity:.45; cursor:default; }
.manifest-company-form { display:grid; gap:5px; }
.manifest-company-form input { width:100%; min-width:0; min-height:30px; }
.manifest-company-form > div { display:flex; flex-wrap:wrap; gap:4px; }
.manifest-company-form .btn { min-height:28px; padding:3px 7px; font-size:11px; }
.manifest-company-print { width:100%; height:62vh; border:1px solid #dce7ed; border-radius:8px; background:#fff; }
.manifest-nfe-number { display:inline-flex; align-items:center; gap:7px; }
.manifest-nfe-number strong { font-variant-numeric:tabular-nums; }
.manifest-view-note {
  display:inline-grid; place-items:center; width:30px; height:30px; padding:0;
  border:1px solid color-mix(in srgb, #218d9d 32%, var(--mf-border)); border-radius:8px;
  background:color-mix(in srgb, #3bacc0 11%, var(--mf-panel)); color:var(--mf-ink);
  cursor:pointer;
}
.manifest-view-note:hover { background:color-mix(in srgb, #3bacc0 24%, var(--mf-panel)); }
.manifest-view-note:focus-visible { outline:2px solid #168299; outline-offset:2px; }
.manifest-danfe-body { min-height:100px; }
.manifest-danfe-dialog .manifest-company-print { height:min(68vh, 780px); }
