:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --unda-rose: #dc9189;
  --unda-rose-soft: #fbeae8;
  --unda-rose-muted: #e7b0aa;
  --unda-rose-dark: #8f4741;
  --unda-ink: #3f2020;
  --unda-navy: #2f3c50;
  --unda-wine: #9a514b;
  --unda-danger: #b42318;
  background: #f6f7f9;
  color: #1d2433;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.hidden {
  display: none !important;
}

body.login-page {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px;
  background: #f3f6f8;
}

body.login-page .login-shell {
  width: min(420px, 100%);
}

body.login-page .login-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  padding: 28px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 32, 45, 0.12);
}

body.login-page .login-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: #1d2433;
  text-align: center;
}

body.login-page .login-brand .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

body.login-page .login-brand strong {
  font-size: 24px;
}

body.login-page .login-brand small {
  color: #667085;
  font-size: 14px;
}

body.login-page label {
  width: 100%;
}

body.login-page input,
body.login-page button {
  width: 100%;
}

body.login-page #loginStatus {
  min-height: 18px;
  color: #4b5565;
  font-size: 13px;
  text-align: center;
}

.sidebar {
  background: #18202d;
  color: #fff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--unda-rose);
  color: var(--unda-ink);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #b7c0cc;
  font-size: 12px;
}

nav a {
  display: block;
  padding: 10px 12px;
  color: #d9dee7;
  text-decoration: none;
  border-radius: 6px;
}

nav a.active {
  background: #273142;
  color: #fff;
}

.logout-button {
  margin-top: auto;
}

textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 750;
}

p {
  margin: 0;
  color: #5d6878;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 16px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
}

.technical-toolbar {
  align-items: flex-start;
  padding: 10px 12px;
}

.technical-toolbar details {
  width: 100%;
}

.technical-toolbar summary {
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.technical-toolbar form {
  margin-top: 12px;
}

.bulkbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 35;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.ops-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
}

.ops-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ops-section h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.ops-section p {
  font-size: 13px;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.tools-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(360px, 1.8fr) minmax(170px, 0.7fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.tool-group {
  display: grid;
  align-content: end;
  gap: 6px;
  min-height: 84px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}

.tool-label {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.print-tool {
  grid-template-columns: minmax(160px, 210px) minmax(180px, max-content);
  align-items: end;
  column-gap: 10px;
}

.print-tool #printReadyButton {
  min-width: 180px;
  height: 38px;
}

.print-tool small {
  grid-column: 1 / -1;
  color: #667085;
  font-size: 12px;
}

.danger-tool {
  justify-content: end;
}

.gift-panel {
  max-width: 1120px;
}

.gift-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) minmax(260px, 2fr) minmax(120px, 0.7fr) minmax(100px, 0.6fr);
  gap: 12px;
  align-items: end;
}

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

.gift-form input {
  width: 100%;
}

.gift-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.gift-summary {
  padding: 12px;
  border: 1px solid var(--unda-rose-muted);
  border-radius: 12px;
  background: var(--unda-rose-soft);
}

.gift-results {
  overflow-x: auto;
}

.compact-results-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #dde2ea;
  border-radius: 12px;
  overflow: hidden;
}

.compact-results-table th,
.compact-results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
}

.compact-results-table th {
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
}

.pdf-history-tool {
  justify-content: stretch;
}

.recent-pdfs-panel {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
}

.recent-pdfs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.recent-pdfs-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.recent-pdfs-header p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.recent-pdfs-status {
  min-height: 20px;
  margin: 12px 0;
  color: #667085;
  font-size: 13px;
}

.recent-pdfs-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.recent-pdf-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f9fafb;
}

.recent-pdf-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #fee4e2;
  color: #b42318;
  font-size: 11px;
  font-weight: 900;
}

.recent-pdf-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.recent-pdf-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-pdf-info span,
.recent-pdf-info small {
  color: #667085;
}

.recent-pdf-open {
  color: #9a514b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.recent-pdf-open:hover {
  text-decoration: underline;
}

.recent-pdfs-empty {
  padding: 24px;
  color: #667085;
  text-align: center;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.print-count-control {
  display: grid;
  gap: 4px;
}

.print-count-control span {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.print-count-control input {
  width: 100%;
  min-width: 120px;
  height: 38px;
}

@media (max-width: 980px) {
  .tools-layout {
    grid-template-columns: 1fr;
  }

  .print-tool {
    grid-template-columns: 1fr;
  }

  .print-tool #printReadyButton {
    width: 100%;
  }

  .danger-tool {
    justify-content: stretch;
  }

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

  .gift-actions {
    justify-content: stretch;
  }

  .gift-actions button {
    width: 100%;
  }

  .recent-pdf-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .recent-pdf-open {
    grid-column: 1 / -1;
    padding-left: 52px;
  }
}

.selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.bulk-status {
  min-height: 18px;
  margin: 0 0 12px;
  color: #4b5565;
  font-size: 13px;
  text-align: left;
  white-space: pre-line;
}

.bulk-meta {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-width: 260px;
}

#selectedCount {
  color: #1d2433;
  font-size: 14px;
  white-space: nowrap;
}

.range-panel {
  padding: 10px;
  margin-bottom: 0;
  background: #f9fafb;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}

.range-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: #101828;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.range-panel summary::-webkit-details-marker {
  display: none;
}

.range-panel summary::before {
  content: "▾";
  color: #667085;
  font-size: 12px;
  transition: transform 0.16s ease;
}

.range-panel:not([open]) summary {
  margin-bottom: 0;
}

.range-panel:not([open]) summary::before {
  transform: rotate(-90deg);
}

.range-panel summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.range-panel:not([open]) summary span {
  font-size: 0;
}

.range-panel:not([open]) summary span::after {
  content: "Mostrar";
  font-size: 12px;
}

.range-panel form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.current-config {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
}

.current-config > strong {
  color: #101828;
  font-size: 13px;
}

.current-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.current-config-grid span {
  color: #667085;
  font-size: 12px;
}

.current-config-grid b {
  color: #1d2433;
}

.problem-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 12px;
}

.counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid transparent;
}

.counter-ready {
  background: #dcfce7;
  color: #166534;
}

.counter-label {
  background: #ede9fe;
  color: #6d28d9;
}

.counter-review {
  background: #ffedd5;
  color: #92400e;
}

.counter-pakke {
  background: #f3e8ff;
  color: #7e22ce;
}

.counter-shopify {
  background: #dbeafe;
  color: #1d4ed8;
}

.counter-error {
  background: #fee2e2;
  color: #991b1b;
}

.toast-area {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.buffer-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  padding: 0 24px 14px;
}

.buffer-card {
  border: 1px solid #d8dee8;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
}

.buffer-card span {
  display: block;
  color: #5d6878;
  font-size: 11px;
}

.buffer-card strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 24px;
}

.report-panel {
  display: grid;
  gap: 14px;
}

.report-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
}

.report-controls span {
  color: #4b5565;
  font-size: 13px;
  margin-left: auto;
}

.period-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.period-filter button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e1c0bc;
  background: #fff;
  color: #69322e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.period-filter button.active,
.period-filter button:hover {
  border-color: var(--unda-rose);
  background: var(--unda-rose-soft);
  color: var(--unda-rose-dark);
}

.custom-range {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}

.report-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.report-table-wrap {
  overflow: auto;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}

.report-table-wrap table {
  min-width: 100%;
}

.report-wide-section {
  grid-column: 1 / -1;
}

.report-wide-section table {
  min-width: 1060px;
}

.section-help {
  margin: -6px 0 12px;
  color: #5f6c80;
  font-size: 14px;
}

.buffer-debug-panel {
  margin: -4px 24px 16px;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
}

.buffer-debug-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #344054;
}

.buffer-debug-panel pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: #344054;
  font: inherit;
  font-size: 12px;
}

.order-search {
  padding: 0 24px 12px;
}

.order-search-field {
  display: grid;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
}

.order-search label {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.order-search-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-search input {
  width: min(260px, 50vw);
  height: 38px;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.table-sort-button:hover,
.table-sort-button:focus-visible,
.table-sort-button.active {
  background: transparent;
  color: var(--unda-rose-dark);
}

.sort-indicator {
  display: inline-block;
  min-width: 10px;
  color: #667085;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 640px) {
  .order-search-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .order-search-field,
  .order-search input,
  .order-search button {
    width: 100%;
  }
}

.order-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 10px;
}

.order-filter-tabs button {
  border: 1px solid #d8dee8;
  background: #ffffff;
  color: #344054;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.order-filter-tabs button.active {
  border-color: var(--unda-rose);
  background: var(--unda-rose-soft);
  color: var(--unda-rose-dark);
}

.system-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.checklist-grid,
.activity-list {
  display: grid;
  gap: 8px;
}

.check-item,
.activity-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 2fr) 160px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fff;
}

.check-item {
  grid-template-columns: 90px minmax(0, 1fr);
}

.check-item span {
  font-size: 11px;
  font-weight: 700;
}

.check-ok span {
  color: #a4554e;
}

.check-warn span {
  color: #b54708;
}

.toast {
  padding: 11px 13px;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24, 32, 45, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.toast-success {
  border-color: #dc9189;
  color: #7a3934;
}

.toast-warning {
  border-color: #f2c86b;
  color: #92400e;
}

.toast-error {
  border-color: #f0a19b;
  color: #991b1b;
}

#selectedCount {
  color: #2f3c50;
  font-size: 12px;
  font-weight: 800;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

label {
  display: grid;
  gap: 6px;
  color: #4b5565;
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 150px;
  height: 38px;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
}

.settings-panel {
  display: grid;
  gap: 14px;
}

.settings-overview {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
}

.settings-overview h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.settings-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.settings-overview-card {
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f9fafb;
}

.settings-overview-card span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
}

.settings-overview-card strong {
  display: block;
  margin-top: 6px;
  color: #101828;
  font-size: 22px;
  line-height: 1.1;
}

.system-panel {
  display: grid;
  gap: 14px;
}

.settings-section {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  padding: 14px;
}

.settings-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.setting-row strong,
.setting-row small,
.setting-row code {
  display: block;
}

.setting-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-title-line strong {
  color: #101828;
  font-size: 16px;
}

.help-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--unda-rose-soft);
  color: var(--unda-rose-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: help;
}

.setting-row code {
  margin-top: 3px;
  color: #344054;
  font-size: 11px;
  background: #f3f6fa;
  border-radius: 4px;
  padding: 2px 4px;
  width: fit-content;
}

.setting-row small {
  margin-top: 3px;
  color: #667085;
  font-weight: 500;
}

.setting-description {
  max-width: 720px;
  line-height: 1.35;
}

.setting-row .setting-meta {
  color: var(--unda-rose-dark);
}

.technical-setting-name {
  margin-top: 6px;
}

.technical-setting-name summary {
  width: fit-content;
  cursor: pointer;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.value-rules-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
}

.value-rules-head,
.value-rules-row {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1.4fr 1fr 0.8fr;
  gap: 0;
}

.value-rules-head span,
.value-rules-row span {
  padding: 7px 8px;
  border-bottom: 1px solid #edf0f4;
}

.value-rules-head {
  background: #f9fafb;
  color: #344054;
  font-weight: 800;
}

.value-rules-row:last-child span {
  border-bottom: 0;
}

.settings-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#settingsStatus {
  min-height: 20px;
  color: #4b5565;
  font-size: 14px;
  text-align: right;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: var(--unda-rose);
}

button {
  height: 38px;
  border: 1px solid var(--unda-rose);
  border-radius: 35px;
  padding: 0 14px;
  background: var(--unda-rose);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

button.secondary,
#refreshButton {
  border-color: var(--unda-rose);
  background: #ffffff;
  color: var(--unda-rose);
}

button.danger {
  border-color: var(--unda-danger);
  background: var(--unda-danger);
  color: #ffffff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.hidden {
  display: none !important;
}

#status {
  min-height: 20px;
  color: #4b5565;
  font-size: 14px;
  text-align: right;
}

.table-wrap {
  height: calc(100vh - 250px);
  min-height: 440px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  position: relative;
}

.orders-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 4px;
  color: #667085;
  font-size: 13px;
}

.orders-pagination button {
  width: auto;
  min-width: 150px;
}

table {
  width: 100%;
  min-width: 1900px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  background: #fff;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f9fafb;
  color: #4b5565;
  font-size: 11px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfcfd;
}

tbody tr.row-selected td {
  background: #fdf1ef;
}

.order-name {
  font-weight: 800;
  color: #9a514b;
}

.order-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.order-admin-link:hover {
  color: #7a3934;
  text-decoration: underline;
}

.external-link-icon {
  color: #667085;
  font-size: 10px;
  line-height: 1;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 128px;
  width: 128px;
  box-shadow: 1px 0 0 #edf0f4;
}

th.sticky-col {
  z-index: 7;
  background: #f9fafb;
}

.sticky-status {
  position: sticky;
  left: 128px;
  z-index: 4;
  min-width: 112px;
  width: 112px;
  box-shadow: 1px 0 0 #edf0f4;
}

th.sticky-status {
  z-index: 7;
  background: #f9fafb;
}

.sticky-problem {
  position: sticky;
  left: 240px;
  z-index: 4;
  min-width: 220px;
  width: 220px;
  box-shadow: 1px 0 0 #edf0f4;
}

th.sticky-problem {
  z-index: 7;
  background: #f9fafb;
}

.sticky-actions {
  position: sticky;
  right: 0;
  z-index: 4;
  min-width: 300px;
  box-shadow: -1px 0 0 #edf0f4;
}

.row-select {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.select-all {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

th.sticky-actions {
  z-index: 7;
  background: #f9fafb;
}

.empty {
  color: #6b7280;
  text-align: center;
  padding: 36px;
}

.muted {
  color: #7a8595;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-ready {
  background: #dcfce7;
  color: #166534;
}

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

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

.status-pdf {
  background: #2563eb;
  color: #fff;
}

.status-printed {
  background: #166534;
  color: #fff;
}

.status-fulfilled {
  background: #4b5563;
  color: #ffffff;
}

.status-review {
  background: #ffedd5;
  color: #92400e;
}

.status-error {
  background: #fee2e2;
  color: #991b1b;
}

.status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.status-cancelled {
  background: #374151;
  color: #fff;
}

.text-error {
  color: #b42318;
  font-weight: 800;
}

.errors-cell {
  max-width: 260px;
  color: #5d6878;
}

.problem-cell {
  min-width: 180px;
  max-width: 260px;
  color: #5d6878;
  font-weight: 700;
}

.problem-active {
  color: #92400e;
}

.problem-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}

.problem-stack small {
  color: #5d6878;
  font-weight: 650;
}

.problem-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.problem-neutral {
  background: #f3f4f6;
  color: #374151;
}

.problem-review {
  background: #fff3e8;
  color: #8a4b20;
}

.problem-error {
  background: #fee2e2;
  color: var(--unda-danger);
}

.problem-address {
  background: #fef3c7;
  color: #92400e;
}

.problem-paqueteria {
  background: #ede9fe;
  color: #6d28d9;
}

.problem-shopify {
  background: #dbeafe;
  color: #1d4ed8;
}

.selection-cell {
  min-width: 170px;
}

.quote-button,
.select-rate-button {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.quote-panel {
  margin: 5px 0 0;
  font-size: 11px;
}

.quote-error {
  color: #b42318;
  font-weight: 700;
}

.quote-options {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.quote-options li {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #dde2ea;
  border-radius: 6px;
  background: #fbfcfd;
}

.quote-options small {
  color: #5d6878;
}

.quote-options li.rate-not-recommended {
  border-color: #f3d08a;
  background: #fff8e6;
}

.selection-panel {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  font-size: 11px;
}

.compact-selection {
  margin-top: 0;
}

.pending-label-panel {
  border-left: 3px solid var(--unda-rose);
  padding-left: 7px;
}

.label-panel a {
  color: #9a514b;
  font-weight: 800;
  text-decoration: none;
}

.actions-stack {
  display: grid;
  gap: 6px;
}

.selection-panel small {
  color: #5d6878;
}

.not-recommended {
  color: #92400e;
  font-weight: 700;
}

.pakke-debug {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #edf0f4;
  font-size: 11px;
}

.pakke-debug summary {
  cursor: pointer;
  color: #2f3c50;
  font-weight: 800;
}

.debug-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  margin: 5px 0;
}

.debug-grid span,
.debug-list li {
  min-width: 0;
}

.debug-title {
  display: block;
  margin-top: 4px;
  color: #5d6878;
  font-weight: 800;
}

.debug-list {
  display: grid;
  gap: 4px;
  padding: 0;
  margin: 4px 0 6px;
  list-style: none;
}

.debug-list li {
  display: grid;
  gap: 1px;
  padding: 5px;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #fbfcfd;
}

.compact-debug-list li {
  padding: 4px;
}

.debug-json {
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #fbfcfd;
  color: #2f3c50;
  font-size: 10px;
  white-space: pre-wrap;
}

.debug-selected {
  margin-left: 6px;
  color: #8f4741;
  font-size: 10px;
}

.phone-validation-cell {
  display: grid;
  min-width: 130px;
  gap: 3px;
}

.phone-validation-result {
  width: fit-content;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
}

.phone-valid {
  background: #fbeae8;
  color: #8f4741;
}

.phone-invalid {
  background: #fee2e2;
  color: #991b1b;
}

.phone-validation-cell details {
  font-size: 10px;
}

.phone-validation-cell summary {
  color: #4b5565;
  cursor: pointer;
  font-weight: 700;
}

.phone-validation-cell small {
  display: block;
  margin-top: 2px;
  white-space: normal;
}

.action-summary {
  display: grid;
  gap: 6px;
  text-align: left;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.job-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid #dc9189;
  border-radius: 999px;
  background: #fff;
}

.job-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: #dc9189;
  transition: width 0.25s ease;
}

.summary-warning {
  margin: 0;
  color: #92400e;
  font-weight: 800;
}

.action-details summary {
  cursor: pointer;
  font-weight: 800;
}

.action-details pre {
  max-height: 180px;
  overflow: auto;
  margin: 6px 0 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: 12px;
}

.config-line {
  margin-top: 4px;
  color: #5d6878;
  font-size: 11px;
}

.test-mode-line {
  color: #92400e;
  font-weight: 700;
}

@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 14px 18px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  input,
  button {
    width: 100%;
  }

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

  #status {
    text-align: left;
  }
}
