/* Adapter entrypoint: imports the vendored Walrus Tech Design token source. */

/* Walrus Tech Design: canonical design tokens */

:root {
  color-scheme: dark;

  --ds-font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --ds-font-mono: "IBM Plex Mono", "Consolas", monospace;
  --ds-font-display: "Unbounded", "Segoe UI", sans-serif;

  --ds-space-1: 0.25rem;
  --ds-space-2: 0.5rem;
  --ds-space-3: 0.75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.25rem;
  --ds-space-6: 1.5rem;
  --ds-space-7: 2rem;
  --ds-space-8: 2.5rem;

  --ds-radius-xs: 0.375rem;
  --ds-radius-sm: 0.5rem;
  --ds-radius-md: 0.75rem;
  --ds-radius-lg: 1rem;
  --ds-radius-xl: 1.125rem;
  --ds-radius-pill: 999px;

  --ds-shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.16);
  --ds-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.22);
  --ds-shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.42);

  --ds-motion-fast: 140ms ease;
  --ds-motion-base: 220ms ease;
  --ds-motion-emphasized: 250ms cubic-bezier(0.22, 1, 0.36, 1);

  --ds-control-pad-block: 10px;
  --ds-control-pad-inline: 14px;
  --ds-control-gap: 10px;
  --ds-control-row-gap: 14px;

  --ds-color-bg: #0e0e0e;
  --ds-color-bg-top: #111111;
  --ds-color-surface-1: rgba(22, 22, 22, 0.94);
  --ds-color-surface-2: rgba(30, 30, 30, 0.96);
  --ds-color-surface-3: rgba(38, 38, 38, 0.98);
  --ds-color-surface-overlay: rgba(22, 20, 18, 0.98);
  --ds-color-surface-soft: rgba(255, 255, 255, 0.04);
  --ds-color-border: #2a2a2a;
  --ds-color-border-strong: #3d3d3d;
  --ds-color-border-soft: rgba(255, 255, 255, 0.08);
  --ds-color-text: #f0ede8;
  --ds-color-text-muted: #8f8a84;
  --ds-color-text-subtle: #5e5a55;
  --ds-color-text-inverse: #191512;
  --ds-color-accent: #ff4d00;
  --ds-color-accent-soft: #ff7a3d;
  --ds-color-accent-rgb: 255, 77, 0;
  --ds-color-danger: #ff3b3b;
  --ds-color-danger-rgb: 255, 59, 59;
  --ds-color-success: #00c97a;
  --ds-color-success-rgb: 0, 201, 122;
  --ds-color-info: #2979ff;
  --ds-color-info-rgb: 41, 121, 255;

  --ds-status-processing: #ff9b2f;
  --ds-status-processing-strong: #ff5d1f;
  --ds-status-processing-rgb: 255, 155, 47;
  --ds-status-done: #19d58b;
  --ds-status-done-strong: #10b56b;
  --ds-status-done-rgb: 25, 213, 139;
  --ds-status-cancelled: #6ea8ff;
  --ds-status-cancelled-strong: #3e85ff;
  --ds-status-cancelled-rgb: 110, 168, 255;
  --ds-status-error: #ff6b6b;
  --ds-status-error-strong: #d53b3b;
  --ds-status-error-rgb: 255, 107, 107;

  --ds-signal-single: #5fa87b;
  --ds-signal-single-strong: #3f7656;
  --ds-signal-multi: #6b8fc8;
  --ds-signal-multi-strong: #466ba5;
  --ds-signal-split: #ca7b96;
  --ds-signal-split-strong: #a34e6b;
  --ds-signal-documents: #8667bf;
  --ds-signal-cod: #c9a11e;
  --ds-signal-ioss: #cc7135;
  --ds-signal-customs: #9a645c;
}

[data-theme="light"] {
  color-scheme: light;

  --ds-color-bg: #f4f0ea;
  --ds-color-bg-top: #faf6f0;
  --ds-color-surface-1: rgba(255, 252, 248, 0.96);
  --ds-color-surface-2: rgba(247, 242, 236, 0.98);
  --ds-color-surface-3: rgba(238, 232, 225, 0.98);
  --ds-color-surface-overlay: rgba(250, 246, 240, 0.98);
  --ds-color-surface-soft: rgba(25, 21, 18, 0.04);
  --ds-color-border: #d8cec4;
  --ds-color-border-strong: #b7aa9d;
  --ds-color-border-soft: rgba(25, 21, 18, 0.08);
  --ds-color-text: #191512;
  --ds-color-text-muted: #6d655d;
  --ds-color-text-subtle: #938980;
  --ds-color-text-inverse: #fffaf5;
  --ds-color-danger: #cb2e2e;
  --ds-color-danger-rgb: 203, 46, 46;
  --ds-color-success: #058d59;
  --ds-color-success-rgb: 5, 141, 89;
  --ds-color-info: #1f63db;
  --ds-color-info-rgb: 31, 99, 219;
  --ds-signal-single-strong: #2f6e4b;
  --ds-signal-multi-strong: #3d5f98;
  --ds-signal-split-strong: #8f4661;

  --ds-status-processing: #d78726;
  --ds-status-processing-strong: #b8620c;
  --ds-status-processing-rgb: 215, 135, 38;
  --ds-status-done: #0ca768;
  --ds-status-done-strong: #058d59;
  --ds-status-done-rgb: 12, 167, 104;
  --ds-status-cancelled: #4d86eb;
  --ds-status-cancelled-strong: #1f63db;
  --ds-status-cancelled-rgb: 77, 134, 235;
  --ds-status-error: #d75858;
  --ds-status-error-strong: #b33030;
  --ds-status-error-rgb: 215, 88, 88;

  --ds-shadow-sm: 0 8px 18px rgba(43, 31, 18, 0.12);
  --ds-shadow-md: 0 10px 28px rgba(43, 31, 18, 0.12);
  --ds-shadow-lg: 0 22px 50px rgba(43, 31, 18, 0.12);
}


/* Adapter entrypoint: imports the vendored Walrus Tech Design reset layer. */

/* Walrus Tech Design: optional global reset and page baseline */

html,
body {
  margin: 0;
  min-height: 100%;
}

*,
*::before,
*::after,
.wtd-root,
.wtd-root * {
  box-sizing: border-box;
}

body.wtd-root {
  font-family: var(--ds-font-sans);
  color: var(--ds-color-text);
  background: linear-gradient(180deg, var(--ds-color-bg-top) 0%, var(--ds-color-bg) 100%);
  overflow-x: hidden;
  transition: background var(--ds-motion-base), color var(--ds-motion-fast);
}

[hidden] {
  display: none !important;
}


/* Adapter entrypoint: imports the vendored Walrus Tech Design primitives layer. */

/* Walrus Tech Design: reusable primitives built on shared tokens */

.wtd-root {
  --wtd-panel: var(--ds-color-surface-1);
  --wtd-panel-2: var(--ds-color-surface-2);
  --wtd-panel-3: var(--ds-color-surface-3);
  --wtd-panel-border: var(--ds-color-border);
  --wtd-panel-border-strong: var(--ds-color-border-strong);
  --wtd-text: var(--ds-color-text);
  --wtd-muted: var(--ds-color-text-muted);
  --wtd-muted-2: var(--ds-color-text-subtle);
  --wtd-accent: var(--ds-color-accent);
  --wtd-accent-warm: var(--ds-color-accent-soft);
  --wtd-danger: var(--ds-color-danger);
  --wtd-success: var(--ds-color-success);
  --wtd-info: var(--ds-color-info);
  --wtd-shadow: var(--ds-shadow-lg);
  --wtd-control-pad-block: var(--ds-control-pad-block);
  --wtd-control-pad-inline: var(--ds-control-pad-inline);
  --wtd-control-gap: var(--ds-control-gap);
  --wtd-control-row-gap: var(--ds-control-row-gap);
  --wtd-details-panel-motion: var(--ds-motion-emphasized);
  --wtd-control-height: 44px;
  --wtd-compact-control-height: 35px;
  --wtd-segment-height: 31px;
}

.wtd-root {
  color: var(--wtd-text);
  font-family: var(--ds-font-sans);
}

.ds-surface,
.wtd-surface {
  background: var(--wtd-panel);
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-xl);
  backdrop-filter: blur(10px);
  box-shadow: var(--wtd-shadow);
}

.wtd-page {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.wtd-page.is-full-width {
  width: calc(100% - 24px);
  max-width: none;
}

.ds-section-head,
.wtd-section-head {
  display: grid;
  gap: 0.5rem;
}

.ds-kicker,
.wtd-kicker,
.wtd-meta-label {
  color: var(--wtd-accent);
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:is(.ds-button, .ds-button-ghost, .ds-toggle, .wtd-button, .wtd-button-ghost, .wtd-theme-toggle, .ghost-btn, .theme-toggle) {
  appearance: none;
  min-height: 44px;
  padding: var(--wtd-control-pad-block) var(--wtd-control-pad-inline);
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-color-surface-soft);
  color: var(--wtd-text);
  cursor: pointer;
  font: inherit;
  transition:
    transform var(--ds-motion-fast),
    border-color var(--ds-motion-fast),
    background var(--ds-motion-fast),
    color var(--ds-motion-fast),
    box-shadow var(--ds-motion-fast);
}

:is(.ds-button, .ds-button-ghost, .ds-toggle, .wtd-button, .wtd-button-ghost, .wtd-theme-toggle, .ghost-btn, .theme-toggle):hover {
  transform: translateY(-1px);
  border-color: var(--wtd-panel-border-strong);
}

.wtd-button-danger,
.ghost-btn-danger {
  border-color: rgba(var(--ds-color-danger-rgb), 0.24);
}

.wtd-button-danger:hover,
.ghost-btn-danger:hover {
  border-color: rgba(var(--ds-color-danger-rgb), 0.42);
  background: rgba(var(--ds-color-danger-rgb), 0.1);
  color: #ffd7d7;
}

[data-theme="light"] .wtd-button-danger:hover,
[data-theme="light"] .ghost-btn-danger:hover {
  border-color: rgba(var(--ds-color-danger-rgb), 0.42);
  background: rgba(var(--ds-color-danger-rgb), 0.1);
  color: var(--ds-status-error-strong);
}

.wtd-theme-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  min-height: 44px;
  padding-inline: 14px;
}

.wtd-theme-toggle-label,
.theme-toggle-label {
  display: inline-flex;
  align-items: center;
  color: var(--wtd-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtd-theme-toggle-track,
.theme-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-pill);
  background: rgba(255, 255, 255, 0.06);
  transition: background var(--ds-motion-fast), border-color var(--ds-motion-fast);
}

.wtd-theme-toggle-thumb,
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wtd-text);
  box-shadow: var(--ds-shadow-sm);
  transition: transform var(--ds-motion-base), background var(--ds-motion-fast);
}

[data-theme="light"] .wtd-theme-toggle-thumb,
[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
  background: var(--ds-color-text-inverse);
}

[data-theme="light"] .wtd-theme-toggle-track,
[data-theme="light"] .theme-toggle-track {
  background: rgba(25, 21, 18, 0.06);
}

:is(.ds-field, .wtd-field, .filter-field) {
  display: grid;
  gap: 0.5rem;
  color: var(--wtd-muted);
  font-size: 0.9rem;
}

:is(.ds-input, .ds-select, .wtd-field input, .wtd-field select, .filter-field input, .filter-field select) {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-md);
  background: var(--wtd-panel-2);
  color: var(--wtd-text);
  font: inherit;
}

:is(.ds-chip, .wtd-chip, .filter-chip) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid rgba(var(--ds-color-accent-rgb), 0.42);
  background: rgba(var(--ds-color-accent-rgb), 0.12);
  color: var(--wtd-text);
  font-size: 0.82rem;
}

.filter-chip {
  gap: 6px;
  color: var(--wtd-accent-warm);
  font-family: var(--ds-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.filter-chip-text {
  display: inline-flex;
  align-items: center;
}

.filter-chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  background: rgba(var(--ds-color-accent-rgb), 0.18);
  color: currentColor;
  font-size: 0.78rem;
  line-height: 1;
  text-align: center;
}

[data-theme="light"] .filter-chip-close {
  background: rgba(var(--ds-color-accent-rgb), 0.12);
}

:is(.ds-badge, .wtd-badge, .flag-badge) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: var(--ds-radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ds-panel-grid {
  display: grid;
  gap: 0.85rem;
}

.wtd-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
}

.wtd-metric-card,
.overview-card {
  display: grid;
  gap: 0.35rem;
  min-height: 7.25rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--wtd-panel-border);
  background: rgba(255, 255, 255, 0.04);
}

.wtd-metric-value,
.overview-value {
  font-family: var(--ds-font-display);
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.wtd-indicator-grid,
.category-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  width: 100%;
  gap: 0.7rem;
}

.wtd-indicator,
.category-filter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: 4rem;
  padding: 0.78rem 0.92rem;
  border: 1px solid var(--wtd-panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.wtd-indicator:hover,
.wtd-indicator.is-active,
.category-filter:hover,
.category-filter.active {
  border-color: var(--wtd-panel-border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.wtd-indicator-copy,
.category-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.wtd-indicator-label,
.category-label {
  color: var(--wtd-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtd-indicator-count,
.category-count {
  font-family: var(--ds-font-display);
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.wtd-indicator-dot,
.category-dot {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border-width: 1.5px;
  border-style: solid;
}

.wtd-indicator.all .wtd-indicator-dot,
.category-filter.all .category-dot {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.7);
}

.wtd-indicator.all,
.category-filter.all {
  border-color: rgba(255, 255, 255, 0.3);
}

.wtd-indicator:hover.all,
.wtd-indicator.is-active.all,
.category-filter:hover.all,
.category-filter.active.all {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.wtd-indicator.single .wtd-indicator-dot,
.category-filter.single .category-dot {
  background: rgba(95, 168, 123, 0.2);
  border-color: rgba(95, 168, 123, 0.76);
}

.wtd-indicator.single,
.category-filter.single {
  border-color: rgba(95, 168, 123, 0.32);
}

.wtd-indicator.multi .wtd-indicator-dot,
.category-filter.multi .category-dot {
  background: rgba(107, 143, 200, 0.2);
  border-color: rgba(107, 143, 200, 0.76);
}

.wtd-indicator.multi,
.category-filter.multi {
  border-color: rgba(107, 143, 200, 0.32);
}

.wtd-indicator.split .wtd-indicator-dot,
.category-filter.split .category-dot {
  background: rgba(202, 123, 150, 0.22);
  border-color: rgba(202, 123, 150, 0.78);
}

.wtd-indicator.split,
.category-filter.split {
  border-color: rgba(202, 123, 150, 0.34);
}

.wtd-indicator.documents .wtd-indicator-dot,
.category-filter.documents .category-dot {
  background: rgba(134, 103, 191, 0.22);
  border-color: rgba(134, 103, 191, 0.78);
}

.wtd-indicator.documents,
.category-filter.documents {
  border-color: rgba(134, 103, 191, 0.32);
}

.wtd-indicator.cod .wtd-indicator-dot,
.category-filter.cod .category-dot {
  background: rgba(201, 161, 30, 0.22);
  border-color: rgba(201, 161, 30, 0.78);
}

.wtd-indicator.cod,
.category-filter.cod {
  border-color: rgba(201, 161, 30, 0.34);
}

.wtd-indicator.ioss .wtd-indicator-dot,
.category-filter.ioss .category-dot {
  background: rgba(204, 113, 53, 0.22);
  border-color: rgba(204, 113, 53, 0.78);
}

.wtd-indicator.ioss,
.category-filter.ioss {
  border-color: rgba(204, 113, 53, 0.34);
}

.wtd-indicator.customs .wtd-indicator-dot,
.category-filter.customs .category-dot {
  background: rgba(154, 100, 92, 0.22);
  border-color: rgba(154, 100, 92, 0.78);
}

.wtd-indicator.customs,
.category-filter.customs {
  border-color: rgba(154, 100, 92, 0.34);
}

.wtd-indicator.is-active.single,
.wtd-indicator:hover.single,
.category-filter.active.single {
  background: rgba(0, 201, 122, 0.12);
  border-color: rgba(134, 225, 176, 0.46);
}

.wtd-indicator.is-active.multi,
.wtd-indicator:hover.multi,
.category-filter.active.multi {
  background: rgba(41, 121, 255, 0.12);
  border-color: rgba(151, 197, 255, 0.46);
}

.wtd-indicator.is-active.split,
.wtd-indicator:hover.split,
.category-filter.active.split {
  background: rgba(255, 128, 149, 0.13);
  border-color: rgba(229, 162, 174, 0.48);
}

.wtd-indicator.is-active.documents,
.wtd-indicator:hover.documents,
.category-filter.active.documents {
  background: rgba(164, 132, 214, 0.13);
  border-color: rgba(203, 182, 235, 0.46);
}

.wtd-indicator.is-active.cod,
.wtd-indicator:hover.cod,
.category-filter.active.cod {
  background: rgba(245, 200, 66, 0.13);
  border-color: rgba(236, 213, 137, 0.48);
}

.wtd-indicator.is-active.ioss,
.wtd-indicator:hover.ioss,
.category-filter.active.ioss {
  background: rgba(var(--ds-color-accent-rgb), 0.14);
  border-color: rgba(255, 167, 128, 0.48);
}

.wtd-indicator.is-active.customs,
.wtd-indicator:hover.customs,
.category-filter.active.customs {
  background: rgba(171, 69, 56, 0.14);
  border-color: rgba(210, 147, 139, 0.48);
}

[data-theme="light"] .wtd-indicator,
[data-theme="light"] .category-filter {
  background: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .wtd-indicator:hover,
[data-theme="light"] .wtd-indicator.is-active,
[data-theme="light"] .category-filter:hover,
[data-theme="light"] .category-filter.active {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .wtd-indicator:hover.all,
[data-theme="light"] .wtd-indicator.is-active.all,
[data-theme="light"] .category-filter:hover.all,
[data-theme="light"] .category-filter.active.all {
  background: rgba(25, 21, 18, 0.04);
  border-color: rgba(25, 21, 18, 0.16);
}

[data-theme="light"] .wtd-indicator.all,
[data-theme="light"] .category-filter.all {
  border-color: rgba(25, 21, 18, 0.16);
}

[data-theme="light"] .wtd-indicator.all .wtd-indicator-dot,
[data-theme="light"] .category-filter.all .category-dot {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(25, 21, 18, 0.26);
}

[data-theme="light"] .wtd-indicator:hover.single,
[data-theme="light"] .wtd-indicator.is-active.single,
[data-theme="light"] .category-filter:hover.single,
[data-theme="light"] .category-filter.active.single {
  background: rgba(0, 201, 122, 0.16);
}

[data-theme="light"] .wtd-indicator:hover.multi,
[data-theme="light"] .wtd-indicator.is-active.multi,
[data-theme="light"] .category-filter:hover.multi,
[data-theme="light"] .category-filter.active.multi {
  background: rgba(41, 121, 255, 0.14);
}

[data-theme="light"] .wtd-indicator:hover.split,
[data-theme="light"] .wtd-indicator.is-active.split,
[data-theme="light"] .category-filter:hover.split,
[data-theme="light"] .category-filter.active.split {
  background: rgba(255, 128, 149, 0.16);
}

[data-theme="light"] .wtd-indicator:hover.documents,
[data-theme="light"] .wtd-indicator.is-active.documents,
[data-theme="light"] .category-filter:hover.documents,
[data-theme="light"] .category-filter.active.documents {
  background: rgba(164, 132, 214, 0.15);
}

[data-theme="light"] .wtd-indicator:hover.cod,
[data-theme="light"] .wtd-indicator.is-active.cod,
[data-theme="light"] .category-filter:hover.cod,
[data-theme="light"] .category-filter.active.cod {
  background: rgba(245, 200, 66, 0.16);
}

[data-theme="light"] .wtd-indicator:hover.ioss,
[data-theme="light"] .wtd-indicator.is-active.ioss,
[data-theme="light"] .category-filter:hover.ioss,
[data-theme="light"] .category-filter.active.ioss {
  background: rgba(var(--ds-color-accent-rgb), 0.16);
}

[data-theme="light"] .wtd-indicator:hover.customs,
[data-theme="light"] .wtd-indicator.is-active.customs,
[data-theme="light"] .category-filter:hover.customs,
[data-theme="light"] .category-filter.active.customs {
  background: rgba(171, 69, 56, 0.16);
}

.ds-table-shell {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-lg);
}

.wtd-table-shell,
.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-lg);
}

.wtd-pager,
.pager {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 188px;
  height: var(--wtd-compact-control-height);
  border: 1px solid rgba(var(--ds-color-accent-rgb), 0.16);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-color-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.wtd-page-size-picker,
.page-size-picker {
  display: inline-flex;
  align-items: center;
  height: var(--wtd-compact-control-height);
  border: 1px solid rgba(var(--ds-color-accent-rgb), 0.16);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-color-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.wtd-page-size-label,
.page-size-label {
  padding: 0 16px;
  color: var(--wtd-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wtd-range-label,
.table-range {
  display: inline-flex;
  align-items: center;
  height: var(--wtd-compact-control-height);
  color: var(--wtd-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wtd-page-size-segment,
.page-size-segment {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border-left: 1px solid var(--ds-color-border-soft);
}

.wtd-page-size-option,
.page-size-option {
  min-width: 56px;
  height: var(--wtd-segment-height);
  min-height: var(--wtd-segment-height);
  max-height: var(--wtd-segment-height);
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--wtd-muted);
  cursor: pointer;
  font-family: var(--ds-font-mono);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  box-sizing: border-box;
  transition: background var(--ds-motion-fast), color var(--ds-motion-fast), box-shadow var(--ds-motion-fast);
}

.wtd-page-size-option:hover,
.page-size-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--wtd-text);
}

.wtd-page-size-option.is-active,
.page-size-option.active,
.wtd-pager-input,
.pager-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 12px;
  height: var(--wtd-segment-height);
  min-height: var(--wtd-segment-height);
  max-height: var(--wtd-segment-height);
  line-height: 1;
}

.wtd-page-size-option.is-active,
.page-size-option.active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ds-color-text-inverse);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.wtd-pager-nav,
.pager-nav {
  width: 48px;
  height: var(--wtd-compact-control-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wtd-text);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  transition: background var(--ds-motion-fast), color var(--ds-motion-fast);
}

.wtd-pager-nav:hover:not(:disabled),
.pager-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.wtd-pager-nav:disabled,
.pager-nav:disabled {
  opacity: 0.34;
  cursor: default;
}

.wtd-pager-current,
.pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: var(--wtd-compact-control-height);
  padding: 2px 14px 2px 2px;
  border-left: 1px solid var(--ds-color-border-soft);
  border-right: 1px solid var(--ds-color-border-soft);
}

.wtd-pager-input,
.wtd-pager-total,
.pager-input,
.pager-total {
  font-family: var(--ds-font-mono);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wtd-pager-input,
.pager-input {
  width: 56px;
  min-width: 56px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ds-color-text-inverse);
  text-align: center;
  text-indent: 0;
  appearance: textfield;
  flex: 0 0 var(--wtd-segment-height);
  align-self: center;
  vertical-align: middle;
}

.wtd-pager-input::-webkit-outer-spin-button,
.wtd-pager-input::-webkit-inner-spin-button,
.pager-input::-webkit-outer-spin-button,
.pager-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wtd-pager-input:focus,
.pager-input:focus {
  outline: none;
}

.wtd-pager-total,
.pager-total {
  color: var(--wtd-muted);
  white-space: nowrap;
}

[data-theme="light"] .wtd-page-size-picker,
[data-theme="light"] .page-size-picker,
[data-theme="light"] .wtd-pager,
[data-theme="light"] .pager {
  background: rgba(255, 252, 248, 0.92);
  border-color: rgba(25, 21, 18, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

[data-theme="light"] .wtd-page-size-option:hover,
[data-theme="light"] .page-size-option:hover {
  background: rgba(25, 21, 18, 0.05);
}

[data-theme="light"] .wtd-page-size-option,
[data-theme="light"] .page-size-option {
  color: #5c5148;
}

[data-theme="light"] .wtd-page-size-option.is-active,
[data-theme="light"] .page-size-option.active {
  background: #1f1d1b;
  color: #fffaf5;
  box-shadow: 0 6px 14px rgba(43, 31, 18, 0.16);
}

[data-theme="light"] .wtd-page-size-label,
[data-theme="light"] .page-size-label,
[data-theme="light"] .wtd-range-label,
[data-theme="light"] .table-range,
[data-theme="light"] .wtd-pager-total,
[data-theme="light"] .pager-total {
  color: #5c5148;
}

[data-theme="light"] .wtd-pager-nav:hover:not(:disabled),
[data-theme="light"] .pager-nav:hover:not(:disabled) {
  background: rgba(25, 21, 18, 0.05);
}

[data-theme="light"] .wtd-pager-current,
[data-theme="light"] .pager-current {
  border-left-color: rgba(25, 21, 18, 0.08);
  border-right-color: rgba(25, 21, 18, 0.08);
}

[data-theme="light"] .wtd-pager-input,
[data-theme="light"] .pager-input {
  background: #1f1d1b;
  color: #fffaf5;
  box-shadow: 0 6px 14px rgba(43, 31, 18, 0.16);
}

.ds-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 100vw);
  height: 100vh;
  padding: 22px 20px;
  background: var(--ds-color-surface-overlay);
  border-left: 1px solid var(--wtd-panel-border);
  box-shadow: var(--wtd-shadow);
}

.wtd-drawer,
.details-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 100vw);
  height: 100vh;
  padding: 22px 20px;
  background: var(--ds-color-surface-overlay);
  border-left: 1px solid var(--wtd-panel-border);
  box-shadow: var(--wtd-shadow);
}

.wtd-drawer {
  z-index: 40;
  transform: translateX(100%);
  transition: transform var(--wtd-details-panel-motion);
}

.wtd-drawer.is-open {
  transform: translateX(0);
}

.wtd-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(8, 8, 8, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ds-motion-fast);
}

.wtd-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wtd-drawer-head {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.wtd-drawer-close {
  position: absolute;
  left: -22px;
  top: 22px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--ds-color-border-soft);
  border-radius: 999px;
  background: var(--ds-color-surface-1);
  color: var(--ds-color-text-muted);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ds-shadow-sm);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: background var(--wtd-details-panel-motion), border-color var(--wtd-details-panel-motion), transform var(--wtd-details-panel-motion), color var(--wtd-details-panel-motion);
}

.wtd-drawer.is-open .wtd-drawer-close {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wtd-drawer-close:hover {
  border-color: rgba(var(--ds-color-accent-rgb), 0.28);
  transform: scale(0.98);
}

.wtd-drawer-scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

[data-theme="dark"] .wtd-drawer-close {
  background: var(--ds-color-surface-2);
  color: var(--ds-color-text);
  border-color: var(--ds-color-border-strong);
}

.wtd-row-state-single,
.shipment-row.category-single,
.mvl-table-row.is-single {
  background: rgba(95, 168, 123, 0.12);
}

.wtd-row-state-multi,
.shipment-row.category-multi,
.mvl-table-row.is-multi {
  background: rgba(107, 143, 200, 0.12);
}

.wtd-row-state-split,
.shipment-row.category-split,
.mvl-table-row.is-split {
  background: rgba(202, 123, 150, 0.12);
}

.wtd-row-state-error {
  background: rgba(var(--ds-color-danger-rgb), 0.14);
}

.wtd-row-is-selected td:first-child {
  box-shadow: inset 4px 0 0 transparent;
}

.wtd-row-is-selected td,
.wtd-process-table-row.is-selected td {
  position: relative;
}

.wtd-row-is-selected.wtd-row-state-single td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-single-strong);
}

.wtd-row-is-selected.wtd-row-state-multi td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-multi-strong);
}

.wtd-row-is-selected.wtd-row-state-split td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-split-strong);
}

.wtd-row-is-selected.wtd-row-state-error td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-status-error-strong);
}

.wtd-row-is-selected.wtd-row-state-single td {
  background: rgba(95, 168, 123, 0.18);
}

.wtd-row-is-selected.wtd-row-state-multi td {
  background: rgba(107, 143, 200, 0.18);
}

.wtd-row-is-selected.wtd-row-state-split td {
  background: rgba(202, 123, 150, 0.18);
}

.wtd-row-is-selected.wtd-row-state-error td {
  background: rgba(var(--ds-color-danger-rgb), 0.2);
}

.wtd-row-state-single:hover,
.shipment-row.category-single:hover,
.mvl-table-row.is-single:hover {
  background: rgba(95, 168, 123, 0.24);
}

.wtd-row-state-multi:hover,
.shipment-row.category-multi:hover,
.mvl-table-row.is-multi:hover {
  background: rgba(107, 143, 200, 0.24);
}

.wtd-row-state-split:hover,
.shipment-row.category-split:hover,
.mvl-table-row.is-split:hover {
  background: rgba(202, 123, 150, 0.24);
}

.wtd-row-state-error:hover {
  background: rgba(var(--ds-color-danger-rgb), 0.28);
}

[data-theme="light"] .wtd-row-state-single,
[data-theme="light"] .shipment-row.category-single,
[data-theme="light"] .mvl-table-row.is-single {
  background: rgba(95, 168, 123, 0.14);
}

[data-theme="light"] .wtd-row-state-single:hover,
[data-theme="light"] .shipment-row.category-single:hover,
[data-theme="light"] .mvl-table-row.is-single:hover {
  background: rgba(95, 168, 123, 0.22);
}

[data-theme="light"] .wtd-row-is-selected.wtd-row-state-single td {
  background: rgba(95, 168, 123, 0.2);
}

[data-theme="light"] .wtd-row-state-multi,
[data-theme="light"] .shipment-row.category-multi,
[data-theme="light"] .mvl-table-row.is-multi {
  background: rgba(107, 143, 200, 0.14);
}

[data-theme="light"] .wtd-row-state-multi:hover,
[data-theme="light"] .shipment-row.category-multi:hover,
[data-theme="light"] .mvl-table-row.is-multi:hover {
  background: rgba(107, 143, 200, 0.22);
}

[data-theme="light"] .wtd-row-is-selected.wtd-row-state-multi td {
  background: rgba(107, 143, 200, 0.2);
}

[data-theme="light"] .wtd-row-state-split,
[data-theme="light"] .shipment-row.category-split,
[data-theme="light"] .mvl-table-row.is-split {
  background: rgba(202, 123, 150, 0.16);
}

[data-theme="light"] .wtd-row-state-split:hover,
[data-theme="light"] .shipment-row.category-split:hover,
[data-theme="light"] .mvl-table-row.is-split:hover {
  background: rgba(202, 123, 150, 0.24);
}

[data-theme="light"] .wtd-row-is-selected.wtd-row-state-split td {
  background: rgba(202, 123, 150, 0.22);
}

[data-theme="light"] .wtd-row-state-error {
  background: rgba(var(--ds-color-danger-rgb), 0.12);
}

[data-theme="light"] .wtd-row-state-error:hover {
  background: rgba(var(--ds-color-danger-rgb), 0.24);
}

[data-theme="light"] .wtd-row-is-selected.wtd-row-state-error td {
  background: rgba(var(--ds-color-danger-rgb), 0.18);
}

.wtd-process-stack {
  display: grid;
  gap: 14px;
}

.wtd-process-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--wtd-panel-border);
  border-radius: var(--ds-radius-lg);
  background: rgba(255, 255, 255, 0.03);
}

.wtd-process-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.wtd-process-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

@keyframes wtd-status-breathe {
  0% {
    transform: scale(1);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.32);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.82;
  }
}

.wtd-process-badge.is-queued,
.wtd-process-badge.is-processing {
  color: var(--ds-status-processing);
  background: rgba(var(--ds-status-processing-rgb), 0.14);
  border-color: rgba(var(--ds-status-processing-rgb), 0.28);
}

.wtd-process-badge.is-processing::before {
  animation: wtd-status-breathe 1.4s ease-in-out infinite;
}

.wtd-process-badge.is-done {
  color: var(--ds-status-done);
  background: rgba(var(--ds-status-done-rgb), 0.12);
  border-color: rgba(var(--ds-status-done-rgb), 0.28);
}

.wtd-process-badge.is-cancelled {
  color: var(--ds-status-cancelled-strong);
  background: rgba(var(--ds-status-cancelled-rgb), 0.12);
  border-color: rgba(var(--ds-status-cancelled-rgb), 0.28);
}

.wtd-process-badge.is-error {
  color: var(--ds-status-error);
  background: rgba(var(--ds-status-error-rgb), 0.14);
  border-color: rgba(var(--ds-status-error-rgb), 0.28);
}

.wtd-progress {
  width: 100%;
  height: 8px;
  border-radius: var(--ds-radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--ds-color-border-soft);
}

.wtd-progress-bar {
  height: 100%;
  border-radius: inherit;
}

.wtd-progress-bar.is-processing,
.wtd-progress-bar.is-queued {
  background: linear-gradient(90deg, var(--ds-status-processing-strong) 0%, var(--ds-status-processing) 100%);
}

.wtd-progress-bar.is-done {
  background: linear-gradient(90deg, var(--ds-status-done-strong) 0%, var(--ds-status-done) 100%);
}

.wtd-progress-bar.is-cancelled {
  background: linear-gradient(90deg, var(--ds-status-cancelled-strong) 0%, var(--ds-status-cancelled) 100%);
}

.wtd-progress-bar.is-error {
  background: linear-gradient(90deg, var(--ds-status-error-strong) 0%, var(--ds-status-error) 100%);
}

.wtd-process-table-row.is-selected td:first-child {
  box-shadow: inset 4px 0 0 transparent;
}

.wtd-process-table-row.is-selected.is-done td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-status-done-strong);
}

.wtd-process-table-row.is-selected.is-processing td:first-child,
.wtd-process-table-row.is-selected.is-queued td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-status-processing-strong);
}

.wtd-process-table-row.is-selected.is-cancelled td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-status-cancelled-strong);
}

.wtd-process-table-row.is-selected.is-error td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-status-error-strong);
}

.wtd-process-meta {
  display: grid;
  gap: 6px;
  color: var(--wtd-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .wtd-page {
    width: min(100%, calc(100% - 16px));
    padding-top: 16px;
  }

  .wtd-drawer,
  .details-panel {
    width: 100vw;
  }

  .wtd-drawer-close {
    left: 10px;
    top: 10px;
  }

}


/* Adapter entrypoint: imports the vendored Walrus Tech Design manifest viewer layer. */

/* Walrus Tech Design: manifest viewer extension layer */

.routing-reasons { margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); font-family: var(--ds-font-sans, sans-serif); }
.routing-reasons ul + ul { margin-top: 14px; }
.routing-reasons ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.routing-reason { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: start; column-gap: 8px; row-gap: 3px; min-width: 0; color: var(--muted); cursor: help; }
.routing-reason-light { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: transparent; border: 1px solid currentColor; }
.routing-reason--on { color: var(--text); }
.routing-reason--on .routing-reason-light { background: var(--success); border-color: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent); }
.routing-reason--on.routing-reason--support .routing-reason-light { background: var(--info); border-color: var(--info); box-shadow: none; }
.routing-reason--neutral .routing-reason-light { background: var(--muted); border-color: var(--muted); box-shadow: none; }
.routing-reason strong { font-size: 0.8rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.routing-reason-state { grid-column: 2; font-size: 0.65rem; text-transform: uppercase; color: var(--muted); }
.routing-reason:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }



.app-footer.project-footer { display: block; padding: clamp(20px, 3vw, 32px); }
.footer-main { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 2fr); gap: 32px; }
.footer-tagline { color: var(--muted); margin: 12px 0; }
.footer-fromme { margin-top: 24px; }
.footer-fromme a { display: inline-block; max-width: 100%; }
.footer-fromme img { display: block; max-width: 100%; height: auto; }
.footer-fromme .footer-tagline { margin: 8px 0 0; font-size: 0.85rem; }
.footer-link { color: var(--text); text-decoration: none; }
.footer-link:hover { color: var(--accent-warm); text-decoration: underline; }
.footer-project h2 { font-size: 1rem; margin: 0 0 10px; }
.footer-project p { max-width: 65ch; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-data-notice { margin-top: 24px; padding: 18px; background: var(--panel-2); border: 1px solid var(--panel-border); border-radius: 8px; }
.footer-data-notice strong { font-size: 0.9rem; }
.footer-data-notice p { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--panel-border); }
.project-footer .app-footer-copy { text-align: left; font-size: 0.7rem; letter-spacing: 0.03em; }
@media (max-width: 650px) { .footer-main { grid-template-columns: 1fr; gap: 24px; } }
.analytics-consent {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 1000;
  max-width: 760px; max-height: 70dvh; overflow: auto; margin: 0 auto;
  padding: 20px; border: 1px solid var(--panel-border-strong); border-radius: 12px;
  background: var(--ds-color-surface-overlay); color: var(--text); box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.analytics-consent[hidden] { display: none; }
.analytics-consent h2 { margin: 0; font-size: 1.1rem; }
.analytics-consent p { margin: 10px 0; }
.analytics-consent a { color: var(--text); text-decoration: underline; }
.analytics-consent summary { cursor: pointer; }
.analytics-consent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.analytics-consent-actions button { flex: 1; min-width: 180px; min-height: 44px; }
.analytics-consent :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--panel-border-strong);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.contact-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.contact-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-heading h2 { margin: 0; font-size: 1.3rem; }
.contact-dialog form { display: grid; gap: 14px; }
.contact-dialog label { display: grid; gap: 6px; font-size: 0.9rem; }
.contact-dialog input, .contact-dialog textarea {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--panel-border-strong); background: var(--panel-2);
  color: var(--text); font: inherit;
}
.contact-dialog textarea { resize: vertical; }
.contact-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact-note { margin: 0; color: var(--muted); font-size: 0.85rem; }
.contact-note a { color: var(--text); }
.contact-dialog button:disabled { opacity: 0.5; cursor: not-allowed; }

:root {
  --bg: var(--ds-color-bg);
  --panel: var(--ds-color-surface-1);
  --panel-2: var(--ds-color-surface-2);
  --panel-3: var(--ds-color-surface-3);
  --panel-border: var(--ds-color-border);
  --panel-border-strong: var(--ds-color-border-strong);
  --text: var(--ds-color-text);
  --muted: var(--ds-color-text-muted);
  --muted-2: var(--ds-color-text-subtle);
  --accent: var(--ds-color-accent);
  --accent-warm: var(--ds-color-accent-soft);
  --danger: var(--ds-color-danger);
  --success: var(--ds-color-success);
  --info: var(--ds-color-info);
  --shadow: var(--ds-shadow-lg);
  --control-pad-block: var(--ds-control-pad-block);
  --control-pad-inline: var(--ds-control-pad-inline);
  --control-gap: var(--ds-control-gap);
  --control-row-gap: var(--ds-control-row-gap);
  --details-panel-motion: var(--ds-motion-emphasized);
  --viewer-control-height: 35px;
  --viewer-toolbar-control-height: 44px;
  --viewer-field-height: 44px;
  --viewer-segment-height: 31px;
}

[data-theme="light"] {
  --bg: var(--ds-color-bg);
  --panel: var(--ds-color-surface-1);
  --panel-2: var(--ds-color-surface-2);
  --panel-3: var(--ds-color-surface-3);
  --panel-border: var(--ds-color-border);
  --panel-border-strong: var(--ds-color-border-strong);
  --text: var(--ds-color-text);
  --muted: var(--ds-color-text-muted);
  --muted-2: var(--ds-color-text-subtle);
  --accent: var(--ds-color-accent);
  --accent-warm: var(--ds-color-accent-soft);
  --danger: var(--ds-color-danger);
  --success: var(--ds-color-success);
  --info: var(--ds-color-info);
  --shadow: var(--ds-shadow-lg);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--ds-font-sans);
  color: var(--text);
  background: linear-gradient(180deg, var(--ds-color-bg-top) 0%, var(--bg) 100%);
  overflow-x: hidden;
  transition: background 0.22s ease, color 0.18s ease;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(36px);
  z-index: 0;
  pointer-events: none;
}

.bg-shape-a {
  width: 380px;
  height: 380px;
  background: rgba(255, 77, 0, 0.14);
  top: -120px;
  left: -70px;
}

.bg-shape-b {
  width: 300px;
  height: 300px;
  background: rgba(245, 200, 66, 0.12);
  right: -90px;
  bottom: 120px;
}

:root[data-category-filter="single"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(0, 201, 122, 0.12) 0%, transparent 28%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="multi"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(41, 121, 255, 0.12) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="split"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 128, 149, 0.12) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="documents"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(164, 132, 214, 0.12) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="cod"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 200, 66, 0.12) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="ioss"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 77, 0, 0.14) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

:root[data-category-filter="customs"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(171, 69, 56, 0.14) 0%, transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="single"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(0, 201, 122, 0.1) 0%, transparent 28%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="multi"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(41, 121, 255, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="split"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 128, 149, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="documents"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(164, 132, 214, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="cod"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(245, 200, 66, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="ioss"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 77, 0, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

[data-theme="light"]:root[data-category-filter="customs"] body {
  background:
    radial-gradient(circle at 10% 18%, rgba(171, 69, 56, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 18px 64px;
}

.hero,
.filters,
.routing-panel,
.table-panel,
.details-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: 10px;
}

.hero {
  padding: 34px 30px 24px;
  position: relative;
  overflow: hidden;
}

.routing-panel {
  margin-top: 18px;
  padding: 24px 24px 28px;
  overflow: hidden;
}

.routing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.routing-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  letter-spacing: -0.03em;
}

.routing-toggle {
  align-self: center;
  min-width: 132px;
}

.routing-body {
  display: grid;
  gap: 18px;
}

.routing-panel.is-collapsed {
  padding-bottom: 20px;
}

.routing-panel.is-collapsed .routing-head {
  margin-bottom: 0;
}

.routing-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.routing-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.routing-selection-trail {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 0, 0.18);
  background: rgba(255, 77, 0, 0.08);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.routing-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.routing-stage {
  position: relative;
  display: grid;
  gap: 14px;
}

.routing-stage:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 56px;
  left: -14px;
  width: 10px;
  height: 10px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.32);
  border-right: 1.5px solid rgba(255, 255, 255, 0.32);
  transform: rotate(45deg);
  opacity: 0.8;
}

.routing-stage-head {
  display: grid;
  gap: 4px;
  min-height: 42px;
}

.routing-stage-head strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.routing-stage-step {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.routing-stage-cards {
  display: grid;
  gap: 12px;
}

.routing-card {
  position: relative;
  width: 100%;
  min-height: 148px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(19, 17, 15, 0.92) 100%);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.18);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.routing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, rgba(255, 77, 0, 0.9) 0%, rgba(245, 200, 66, 0.95) 100%);
}

.routing-card:hover:not(:disabled),
.routing-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 0, 0.34);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.24);
  outline: none;
}

.routing-card.is-selected {
  border-color: rgba(255, 77, 0, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 77, 0, 0.12) 0%, rgba(31, 22, 18, 0.96) 100%);
  box-shadow: 0 26px 48px rgba(255, 77, 0, 0.16);
}

.routing-card:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.routing-card-label,
.routing-card-meta,
.routing-card-hint {
  display: block;
}

.routing-card-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.routing-card-count {
  display: block;
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.5rem, 1.2rem + 0.6vw, 1.9rem);
  line-height: 1;
}

.routing-card-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.routing-card-hint {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 0.82rem;
  line-height: 1.45;
}

[data-theme="light"] .routing-selection-trail {
  border-color: rgba(255, 77, 0, 0.16);
  background: rgba(255, 77, 0, 0.08);
}

[data-theme="light"] .routing-stage:not(:first-child)::before {
  border-top-color: rgba(24, 24, 24, 0.24);
  border-right-color: rgba(24, 24, 24, 0.24);
}

[data-theme="light"] .routing-card {
  border-color: rgba(39, 26, 18, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 243, 238, 0.98) 100%);
  box-shadow: 0 16px 28px rgba(35, 21, 12, 0.08);
}

[data-theme="light"] .routing-card.is-selected {
  background:
    linear-gradient(180deg, rgba(255, 244, 238, 0.96) 0%, rgba(250, 239, 230, 1) 100%);
  box-shadow: 0 20px 34px rgba(255, 77, 0, 0.1);
}

.details-overview {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 18px;
}

.details-composition-card {
  position: relative;
  background: rgba(255, 252, 248, 0.96);
  color: #1d1814;
  border: 1px solid #d8cec4;
  border-radius: 12px;
  padding: 24px 12px;
  box-shadow: none;
  overflow: hidden;
}

.details-composition-card::before {
  content: "";
  position: absolute;
  inset: -16% -20% auto;
  height: 220px;
  pointer-events: none;
  opacity: 0.24;
  filter: blur(34px);
  z-index: 0;
}

.details-composition-card.tone-single::before {
  background: radial-gradient(circle at 34% 18%, rgba(95, 168, 123, 0.22) 0%, rgba(95, 168, 123, 0.08) 30%, transparent 68%);
}

.details-composition-card.tone-multi::before {
  background: radial-gradient(circle at 50% 18%, rgba(107, 143, 200, 0.24) 0%, rgba(107, 143, 200, 0.08) 30%, transparent 68%);
}

.details-composition-card.tone-split::before {
  background: radial-gradient(circle at 50% 18%, rgba(202, 123, 150, 0.24) 0%, rgba(202, 123, 150, 0.08) 30%, transparent 68%);
}

.details-composition-card.tone-documents::before {
  background: radial-gradient(circle at 50% 18%, rgba(134, 103, 191, 0.22) 0%, rgba(134, 103, 191, 0.08) 30%, transparent 68%);
}

.details-composition-card.tone-ioss::before {
  background: radial-gradient(circle at 50% 18%, rgba(204, 113, 53, 0.24) 0%, rgba(204, 113, 53, 0.08) 30%, transparent 68%);
}

.details-composition-card.tone-customs::before {
  background: radial-gradient(circle at 50% 18%, rgba(154, 100, 92, 0.26) 0%, rgba(154, 100, 92, 0.1) 30%, transparent 68%);
}

.details-composition-card.tone-cod::before {
  background: radial-gradient(circle at 50% 18%, rgba(201, 161, 30, 0.22) 0%, rgba(201, 161, 30, 0.08) 30%, transparent 68%);
}

.details-identity,
.details-status-card,
.details-core-card,
.details-party-card {
  background: #f5f5f3;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

[data-theme="dark"] .details-composition-card {
  background: rgba(22, 20, 18, 0.98);
  color: #f0ede8;
  border-color: #3a332d;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.44);
}

[data-theme="dark"] .details-composition-card::before {
  opacity: 0.38;
  filter: blur(44px);
}

[data-theme="dark"] .details-identity,
[data-theme="dark"] .details-status-card,
[data-theme="dark"] .details-core-card,
[data-theme="dark"] .details-party-card,
[data-theme="dark"] .details-route-card {
  background: #23201d;
  border-color: #3a332d;
}

[data-theme="dark"] .details-composition-card {
  background: #1b1815;
  color: #efe7de;
  border-color: #3a322b;
}

[data-theme="dark"] .details-kicker,
[data-theme="dark"] .details-subidentity span,
[data-theme="dark"] .details-core-card span,
[data-theme="dark"] .details-status-card span,
[data-theme="dark"] .details-party-head span,
[data-theme="dark"] .details-party-meta span,
[data-theme="dark"] .details-party-address > span {
  color: #93887d;
}

[data-theme="dark"] .details-identity h3,
[data-theme="dark"] .details-party-head strong,
[data-theme="dark"] .details-route-side strong,
[data-theme="dark"] .details-status-line strong {
  color: #f4ede5;
}

[data-theme="dark"] .details-status-line {
  color: #b2a79c;
}

[data-theme="dark"] .details-status-time {
  color: #9e9286;
}

[data-theme="dark"] .details-package-meta {
  color: #a79b90;
}

[data-theme="dark"] .details-status-card.is-neutral {
  background: #24201c;
  border-color: #3b332c;
}

[data-theme="dark"] .details-status-card.is-neutral strong {
  color: #c2b7ab;
}

[data-theme="dark"] .details-status-card.is-ioss {
  background: #35261e;
  border-color: rgba(204, 113, 53, 0.34);
  color: #f1b287;
}

[data-theme="dark"] .details-status-card.is-cod {
  background: #342d18;
  border-color: rgba(201, 161, 30, 0.34);
  color: #f1d36b;
}

[data-theme="dark"] .details-status-card.is-customs {
  background: #31231f;
  border-color: rgba(154, 100, 92, 0.36);
  color: #e1afa6;
}

[data-theme="dark"] .details-status-card.is-documents {
  background: #2b2337;
  border-color: rgba(134, 103, 191, 0.34);
  color: #cab0ff;
}

[data-theme="dark"] .details-status-card.is-single {
  background: #1f2b22;
  border-color: rgba(95, 168, 123, 0.34);
  color: #9ed7b1;
}

[data-theme="dark"] .details-status-card.is-multi {
  background: #20283a;
  border-color: rgba(107, 143, 200, 0.36);
  color: #a9c4f4;
}

[data-theme="dark"] .details-status-card.is-split {
  background: #33232b;
  border-color: rgba(202, 123, 150, 0.36);
  color: #f0adc2;
}

[data-theme="dark"] .details-route-card {
  background: #201c18;
  border-color: #3a322c;
}

[data-theme="dark"] .details-route-side span {
  color: #a1968a;
}

[data-theme="dark"] .details-route-service {
  color: #93887d;
}

[data-theme="dark"] .details-route-billing {
  color: #b6a99c;
}

[data-theme="dark"] .details-route-line::before {
  border-top-color: rgba(239, 231, 222, 0.2);
}

[data-theme="dark"] .details-route-line::after {
  border-top-color: rgba(239, 231, 222, 0.34);
  border-right-color: rgba(239, 231, 222, 0.34);
}

[data-theme="dark"] .details-package-chip.tone-single h3 {
  color: #9ed7b1;
}

[data-theme="dark"] .details-package-chip.tone-multi h3 {
  color: #a9c4f4;
}

[data-theme="dark"] .details-package-chip.tone-split h3 {
  color: #f0adc2;
}

[data-theme="dark"] .details-divider {
  border-top-color: rgba(239, 231, 222, 0.12);
}

[data-theme="dark"] .details-party-meta strong,
[data-theme="dark"] .details-address-lines li,
[data-theme="dark"] .details-address-empty {
  color: #d4c9bc;
}

[data-theme="dark"] .details-party-field-value {
  color: #d4c9bc;
}

[data-theme="dark"] .details-address-empty {
  color: #9c9085;
}

[data-theme="dark"] .details-tax-panel {
  border-top-color: rgba(239, 231, 222, 0.12);
}

[data-theme="dark"] .details-tax-kicker,
[data-theme="dark"] .details-tax-label {
  color: rgba(217, 199, 181, 0.66);
}

[data-theme="dark"] .details-tax-head strong {
  color: #93887d;
}

[data-theme="dark"] .details-tax-value {
  color: rgba(248, 240, 233, 0.92);
}

[data-theme="dark"] .details-party-compare-head {
  background: transparent;
}

[data-theme="dark"] .details-party-compare-head strong,
[data-theme="dark"] .details-party-field-label {
  color: #93887d;
}

[data-theme="dark"] .details-party-compare {
  background: transparent;
}

.details-status-line.tone-single .details-status-dot {
  background: #5fa87b;
}

.details-status-line.tone-multi .details-status-dot {
  background: #6b8fc8;
}

.details-status-line.tone-split .details-status-dot {
  background: #ca7b96;
}

.details-status-line.tone-documents .details-status-dot {
  background: #8667bf;
}

.details-status-line.tone-cod .details-status-dot {
  background: #c9a11e;
}

.details-status-line.tone-ioss .details-status-dot {
  background: #cc7135;
}

.details-status-line.tone-customs .details-status-dot {
  background: #9a645c;
}

.details-identity {
  padding: 18px 20px 20px;
  border: 0;
  background: transparent;
}

.details-kicker,
.details-subidentity span,
.details-updated span,
.details-core-card span,
.details-status-card span,
.details-party-head span,
.details-party-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.details-identity-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) 96px minmax(150px, 1fr);
  align-items: flex-start;
  gap: 16px;
}

.details-identity-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.details-identity h3 {
  margin: 6px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.details-shipment-chip {
  text-align: center;
  min-width: 0;
  max-width: none;
}

.details-package-chip {
  text-align: center;
  flex: 0 0 96px;
}

.details-package-chip h3 {
  font-size: 15px;
}

.details-package-meta {
  display: grid;
  gap: 2px;
  margin-top: 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #7d7267;
}

.details-package-chip.tone-single h3 {
  color: #3f7656;
}

.details-package-chip.tone-multi h3 {
  color: #466ba5;
}

.details-package-chip.tone-split h3 {
  color: #a34e6b;
}

.details-subidentity {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.details-tracking-line {
  margin: 0;
  display: block;
  white-space: nowrap;
  color: inherit;
  min-width: 0;
  width: 100%;
  font-size: clamp(14px, 1vw + 10px, 16px);
}

.details-identity-value {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 30px;
  padding-right: 34px;
}

.details-identity-value-tracking {
  justify-content: flex-start;
}

.details-identity-value-shipment {
  justify-content: center;
}

.details-identity-value .details-tracking-line {
  min-width: 0;
  overflow: visible;
  line-height: 1.15;
}

.details-tracking-prefix,
.details-tracking-tail,
.details-tracking-service,
.details-tracking-account {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: -0.01em;
}

.details-tracking-prefix,
.details-tracking-tail {
  color: inherit;
}

.details-tracking-account {
  font-size: 1.12em;
  color: inherit;
}

.details-tracking-service {
  color: #cc7135;
}

.details-tracking-copy {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: #6b635b;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.details-tracking-copy:hover {
  transform: translateY(calc(-50% - 1px));
  border-color: rgba(204, 113, 53, 0.35);
  color: #a35524;
}

.details-tracking-copy.copied {
  color: #3f7656;
  border-color: rgba(95, 168, 123, 0.3);
  background: rgba(223, 242, 230, 0.9);
}

.details-status-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: #6a655f;
}

.details-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
  animation: details-status-breathe 2.4s ease-in-out infinite;
}

.details-status-line strong {
  font-size: 13px;
  font-weight: 500;
}

.details-status-time {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.details-status-time span + span::before {
  content: "•";
  margin-right: 10px;
  color: rgba(0, 0, 0, 0.32);
}

.details-status-dashboard {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.details-status-card {
  min-height: 66px;
  padding: 8px 10px;
  display: grid;
  align-content: space-between;
}

.details-status-card.span-2 {
  grid-column: span 2;
}

:root .details-status-card .details-customs-conversion {
  position: relative;
  display: block;
  width: fit-content;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  cursor: help;
}

:root .details-status-card .details-rate-tooltip {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 7px);
  left: 0;
  padding: 7px 9px;
  border: 1px solid var(--panel-border-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: normal;
  text-transform: none;
  visibility: hidden;
  pointer-events: none;
}

:root .details-customs-conversion:is(:hover, :focus) .details-rate-tooltip {
  visibility: visible;
}

.route-flow {
  min-width: 0;
  margin-top: 18px;
  padding: 16px 12px 8px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
}

.route-flow-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.route-flow-key,
.route-flow-summary {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.route-flow-key::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.route-flow-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.route-flow-scroll:focus-visible,
.details-customs-conversion:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.route-flow-svg {
  display: block;
  width: 100%;
  min-width: 1040px;
  height: auto;
  font-family: var(--ds-font-sans, sans-serif);
}

.route-flow-drawer { margin-top: 32px; padding: 20px 8px 8px; }
.route-flow-drawer .route-flow-heading { font-family: var(--ds-font-sans, sans-serif); font-size: 1rem; }
.route-flow-drawer .route-flow-scroll { width: 100%; min-width: 0; }
.route-flow-drawer .route-flow-svg { width: 100%; min-width: 0; max-width: 100%; height: auto; }

.route-flow-node > rect,
.route-flow-node > path {
  fill: var(--panel-2);
  stroke: var(--panel-border-strong);
  stroke-width: 1.5;
}

.route-flow-node text { fill: var(--text); }
.route-flow-title { font-size: 17px; font-weight: 650; }
.route-flow-subtitle { font-size: 12px; fill: var(--muted); }
.route-flow-drawer .route-flow-subtitle { font-size: 14px; }
.route-flow-stage { font-size: 15px; font-weight: 650; fill: var(--muted); }
.route-flow-label { font-size: 12px; fill: var(--muted); }
.route-flow-edge { fill: none; stroke: var(--muted-2); stroke-width: 1.6; }
.route-flow-arrow { fill: var(--muted-2); }
.route-flow.has-route .route-flow-node:not(.is-active) { opacity: 0.5; }
.route-flow.has-route .route-flow-edge:not(.is-active) { opacity: 0.35; }
.route-flow-node.is-active > rect,
.route-flow-node.is-active > path { stroke: var(--accent); stroke-width: 2.5; }
.route-flow-edge.is-active { stroke: var(--accent); stroke-width: 3; }
.route-flow-arrow.is-active { fill: var(--accent); }
.route-flow-label.is-active { fill: var(--accent); font-weight: 700; }

.details-status-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.details-status-card.is-neutral strong {
  color: var(--muted-2);
}

.details-status-card.is-ioss {
  background: #fbe7da;
  border-color: rgba(204, 113, 53, 0.2);
  color: #9a4d1b;
}

.details-status-card.is-cod {
  background: #fff1c7;
  border-color: rgba(201, 161, 30, 0.2);
  color: #8c6a00;
}

.details-status-card.is-customs {
  background: #eeded8;
  border-color: rgba(154, 100, 92, 0.2);
  color: #7f433b;
}

.details-status-card.is-documents {
  background: #efe7fa;
  border-color: rgba(134, 103, 191, 0.18);
  color: #6545a8;
}

.details-status-card.is-single {
  background: #dff2e6;
  border-color: rgba(95, 168, 123, 0.2);
  color: #3f7656;
}

.details-status-card.is-multi {
  background: #e3eaf8;
  border-color: rgba(107, 143, 200, 0.22);
  color: #466ba5;
}

.details-status-card.is-split {
  background: #f9e4eb;
  border-color: rgba(202, 123, 150, 0.22);
  color: #a34e6b;
}

.details-status-card.is-neutral {
  background: #f5f5f3;
}

.details-route-card {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 1.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: #f5f5f3;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.details-route-side strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  word-break: break-word;
}

.details-route-side span {
  display: block;
  margin-top: 3px;
  color: #5e5a55;
  font-size: 12px;
}

.details-route-side.is-destination {
  text-align: right;
}

.details-route-line {
  position: relative;
  height: 40px;
  padding-top: 1px;
}

.details-route-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 8px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.2);
  transform: translateY(-50%);
}

.details-route-line::after {
  content: "";
  position: absolute;
  right: 1px;
  top: calc(100% - 8px);
  width: 6px;
  height: 8px;
  transform: translateY(-50%);
  border-top: 1.2px solid rgba(0, 0, 0, 0.36);
  border-right: 1.2px solid rgba(0, 0, 0, 0.36);
  rotate: 45deg;
}

.details-route-service {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d7267;
}

.details-route-billing {
  display: block;
  margin-top: 2px;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.25;
  color: #9a8f84;
}

.details-divider {
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
  margin-top: 16px;
}

.details-party-compare {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: grid;
  gap: 14px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.details-party-compare-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  background: transparent;
  border-bottom: 0;
}

.details-party-compare-head strong {
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 500;
  color: #7d7267;
}

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

.details-party-column {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.details-party-field {
  min-width: 0;
}

.details-party-field-label {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: #7d7267;
  margin-bottom: 4px;
}

.details-party-field-value {
  min-width: 0;
  font-size: 13px;
  line-height: 1.58;
  font-weight: 500;
  color: #2d2722;
  overflow-wrap: anywhere;
}

.details-tax-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}

.details-tax-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.details-tax-kicker {
  font-size: 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b7f73;
}

.details-tax-head strong {
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 500;
  color: #7d7267;
}

.details-tax-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

.details-tax-item {
  display: grid;
  gap: 4px;
}

.details-tax-label {
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7d7267;
}

.details-tax-value {
  font-size: 13px;
  line-height: 1.58;
  font-weight: 500;
  color: #2d2722;
  overflow-wrap: anywhere;
}

.details-party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.details-party-card {
  padding: 0;
  background: transparent;
  border: 0;
  min-width: 0;
}

.details-party-head strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.details-party-meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.details-party-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.details-party-address {
  margin-top: 10px;
}

.details-address-lines {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 2px;
}

.details-address-lines li,
.details-address-empty {
  color: inherit;
  line-height: 1.6;
  font-size: 12px;
  color: #555;
  overflow-wrap: anywhere;
}

.details-address-empty {
  color: #888;
}

.details-panel h3 {
  margin: 22px 0 12px;
  font-size: 14px;
}

.details-head h2 {
  display: none;
}

@keyframes details-status-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  50% {
    transform: scale(1.32);
    opacity: 1;
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.05);
  }
}

.hero::before {
  content: "WALRUS";
  position: absolute;
  right: 10px;
  top: 12px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(4rem, 16vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  color: rgba(255, 77, 0, 0.06);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 12ch;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero p {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 60ch;
  font-size: 0.96rem;
  line-height: 1.7;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.app-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.12s ease;
}

.app-footer-brand:hover {
  color: var(--accent-warm);
}

.app-footer-logo {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

.app-footer-name,
.app-footer-copy {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-footer-copy {
  text-align: right;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 18px;
}

.hero-metric {
  display: grid;
  gap: 3px;
}

.hero-metric-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-metric strong {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text);
}

.file-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
  flex-wrap: wrap;
}

#fileInput {
  display: none;
}

.hero-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.file-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  height: var(--viewer-control-height);
  padding: 4px var(--control-pad-inline);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-family: var(--ds-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.hero-toolbar .file-btn,
.hero-toolbar .ghost-btn {
  height: var(--viewer-toolbar-control-height);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--viewer-control-height);
  padding: 4px var(--control-pad-inline);
  border: 1px solid rgba(255, 77, 0, 0.16);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.88);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.hero-toolbar .theme-toggle {
  height: var(--viewer-toolbar-control-height);
}

.theme-toggle-track {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  transition: transform 0.16s ease;
}

.theme-toggle-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.file-btn {
  border-color: rgba(255, 77, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 77, 0, 0.22), rgba(255, 122, 61, 0.06));
}

.file-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: var(--panel-border-strong);
}

.ghost-btn-danger:hover {
  border-color: rgba(255, 107, 107, 0.58);
  background: rgba(255, 59, 59, 0.16);
}

.status-row {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

#statusText {
  color: var(--muted);
}

.progress-wrap {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  display: none;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f5c842);
  transition: width 0.12s linear;
}

.filters {
  margin-top: 14px;
  padding: 16px 18px 14px;
}

.filter-grid {
  display: grid;
  gap: var(--control-gap);
  align-items: end;
}

.filter-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  min-width: 0;
}

.filter-search-row {
  margin-top: 0.85rem;
  display: grid;
}

.exchange-rate-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--control-gap);
}

.exchange-rate-controls .filter-field {
  min-width: 10rem;
}

.exchange-rate-controls a {
  text-decoration: none;
}

.rate-date-control { position: relative; }

.rate-date-picker {
  width: 100%;
  min-width: 12rem;
  min-height: var(--viewer-field-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--control-pad-inline);
  border: 1px solid var(--panel-border-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.rate-date-picker[hidden] { display: none; }
.rate-date-picker svg { flex-shrink: 0; }
.rate-date-picker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.rate-date-control input.is-picker-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-field-global {
  max-width: min(100%, 42rem);
}

.filter-field-global input {
  height: var(--viewer-field-height);
  min-height: var(--viewer-field-height);
  padding: 0 1rem;
  font-size: 1rem;
  border-color: rgba(255, 77, 0, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 0, 0.08);
}

.filter-grid-secondary {
  grid-template-columns:
    minmax(18ch, 1.55fr)
    minmax(13ch, 1.15fr)
    minmax(9ch, 0.75fr)
    minmax(9ch, 0.75fr)
    minmax(12ch, 0.82fr)
    minmax(6ch, 0.45fr)
    minmax(8ch, 0.6fr)
    minmax(18ch, 1fr);
  margin-top: var(--control-row-gap);
}

input,
select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px;
  font: inherit;
}

[data-theme="light"] input,
[data-theme="light"] select {
  background: rgba(255, 255, 255, 0.88);
}

.active-filters {
  min-height: 0;
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 auto;
  gap: 8px;
}

.filters-summary-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.filters-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--viewer-control-height);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-family: var(--ds-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.filters-toggle::after {
  content: "▴";
  font-size: 0.8rem;
  color: var(--muted);
}

.filters-toggle[aria-expanded="false"]::after {
  content: "▾";
}

.filters-summary-reset {
  margin-left: auto;
  align-self: center;
  white-space: nowrap;
}

.filters-body {
  margin-top: 12px;
}

.category-filters {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 26px;
}

.category-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: background 0.14s ease, color 0.14s ease;
}

.category-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(240, 237, 232, 0.56);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.category-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.category-filter:hover .category-dot,
.category-filter.active .category-dot {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(255, 77, 0, 0.08);
}

.category-filter.all:hover,
.category-filter.all.active {
  background: rgba(255, 255, 255, 0.05);
}

.category-filter.single:hover,
.category-filter.single.active {
  background: rgba(0, 201, 122, 0.12);
}

.category-filter.multi:hover,
.category-filter.multi.active {
  background: rgba(41, 121, 255, 0.12);
}

.category-filter.split:hover,
.category-filter.split.active {
  background: rgba(255, 128, 149, 0.14);
}

.category-filter.documents:hover,
.category-filter.documents.active {
  background: rgba(164, 132, 214, 0.12);
}

.category-filter.cod:hover,
.category-filter.cod.active {
  background: rgba(245, 200, 66, 0.12);
}

.category-filter.ioss:hover,
.category-filter.ioss.active {
  background: rgba(255, 77, 0, 0.12);
}

.category-filter.customs:hover,
.category-filter.customs.active {
  background: rgba(171, 69, 56, 0.14);
}

.category-filter.active .category-count {
  color: var(--accent);
}

.category-filter.all .category-dot {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(240, 237, 232, 0.86);
}

.category-filter.single .category-dot {
  background: rgba(0, 201, 122, 0.18);
  border-color: rgba(134, 225, 176, 0.82);
}

.category-filter.multi .category-dot {
  background: rgba(41, 121, 255, 0.18);
  border-color: rgba(151, 197, 255, 0.8);
}

.category-filter.split .category-dot {
  background: rgba(255, 128, 149, 0.2);
  border-color: rgba(229, 162, 174, 0.82);
}

.category-filter.documents .category-dot {
  background: rgba(164, 132, 214, 0.18);
  border-color: rgba(203, 182, 235, 0.82);
}

.category-filter.cod .category-dot {
  background: rgba(245, 200, 66, 0.18);
  border-color: rgba(236, 213, 137, 0.82);
}

.category-filter.ioss .category-dot {
  background: rgba(255, 77, 0, 0.18);
  border-color: rgba(255, 167, 128, 0.8);
}

.category-filter.customs .category-dot {
  background: rgba(171, 69, 56, 0.2);
  border-color: rgba(210, 147, 139, 0.8);
}

[data-theme="light"] .category-dot {
  background: rgba(25, 21, 18, 0.03);
  border-color: rgba(80, 68, 58, 0.5);
  box-shadow: inset 0 0 0 1px rgba(25, 21, 18, 0.03);
}

[data-theme="light"] .category-count {
  color: #28211b;
}

[data-theme="light"] .category-filter.all:hover,
[data-theme="light"] .category-filter.all.active {
  background: rgba(25, 21, 18, 0.04);
}

[data-theme="light"] .category-filter.single:hover,
[data-theme="light"] .category-filter.single.active {
  background: rgba(0, 201, 122, 0.1);
}

[data-theme="light"] .category-filter.multi:hover,
[data-theme="light"] .category-filter.multi.active {
  background: rgba(41, 121, 255, 0.1);
}

[data-theme="light"] .category-filter.split:hover,
[data-theme="light"] .category-filter.split.active {
  background: rgba(255, 128, 149, 0.11);
}

[data-theme="light"] .category-filter.documents:hover,
[data-theme="light"] .category-filter.documents.active {
  background: rgba(164, 132, 214, 0.1);
}

[data-theme="light"] .category-filter.cod:hover,
[data-theme="light"] .category-filter.cod.active {
  background: rgba(245, 200, 66, 0.11);
}

[data-theme="light"] .category-filter.ioss:hover,
[data-theme="light"] .category-filter.ioss.active {
  background: rgba(255, 77, 0, 0.11);
}

[data-theme="light"] .category-filter.customs:hover,
[data-theme="light"] .category-filter.customs.active {
  background: rgba(171, 69, 56, 0.11);
}

[data-theme="light"] .category-filter.all .category-dot {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(92, 81, 71, 0.82);
}

[data-theme="light"] .category-filter.single .category-dot {
  background: rgba(0, 201, 122, 0.18);
  border-color: rgba(68, 133, 95, 0.78);
}

[data-theme="light"] .category-filter.multi .category-dot {
  background: rgba(41, 121, 255, 0.16);
  border-color: rgba(70, 111, 181, 0.76);
}

[data-theme="light"] .category-filter.split .category-dot {
  background: rgba(255, 128, 149, 0.18);
  border-color: rgba(170, 94, 106, 0.74);
}

[data-theme="light"] .category-filter.documents .category-dot {
  background: rgba(164, 132, 214, 0.16);
  border-color: rgba(126, 101, 168, 0.74);
}

[data-theme="light"] .category-filter.cod .category-dot {
  background: rgba(245, 200, 66, 0.18);
  border-color: rgba(161, 122, 17, 0.78);
}

[data-theme="light"] .category-filter.ioss .category-dot {
  background: rgba(255, 77, 0, 0.16);
  border-color: rgba(168, 72, 23, 0.76);
}

[data-theme="light"] .category-filter.customs .category-dot {
  background: rgba(171, 69, 56, 0.15);
  border-color: rgba(135, 77, 70, 0.74);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--viewer-control-height);
  font-family: var(--ds-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  border: 1px solid rgba(255, 77, 0, 0.52);
  color: #c85d23;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 77, 0, 0.13);
  cursor: pointer;
}

.filter-chip-dot {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 0.8rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: rgba(255, 255, 255, 0.18);
}

.filter-chip.is-category .filter-chip-dot {
  background: currentColor;
  opacity: 0.18;
}

.filter-chip-text {
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.filter-chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 1.2rem;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 77, 0, 0.16);
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.88;
  text-align: center;
}

.filter-chip.is-category.single {
  color: var(--ds-signal-single-strong);
  border-color: rgba(var(--ds-color-success-rgb), 0.42);
  background: rgba(var(--ds-color-success-rgb), 0.12);
}

.filter-chip.is-category.multi {
  color: var(--ds-signal-multi-strong);
  border-color: rgba(var(--ds-color-info-rgb), 0.36);
  background: rgba(var(--ds-color-info-rgb), 0.1);
}

.filter-chip.is-category.split {
  color: var(--ds-signal-split-strong);
  border-color: rgba(202, 123, 150, 0.42);
  background: rgba(202, 123, 150, 0.12);
}

.filter-chip.is-category.documents {
  color: #6545a8;
  border-color: rgba(134, 103, 191, 0.36);
  background: rgba(134, 103, 191, 0.12);
}

.filter-chip.is-category.cod {
  color: #8c6a00;
  border-color: rgba(201, 161, 30, 0.4);
  background: rgba(201, 161, 30, 0.14);
}

.filter-chip.is-category.ioss {
  color: #9a4d1b;
  border-color: rgba(var(--ds-color-accent-rgb), 0.4);
  background: rgba(var(--ds-color-accent-rgb), 0.14);
}

.filter-chip.is-category.customs {
  color: #7f433b;
  border-color: rgba(154, 100, 92, 0.38);
  background: rgba(154, 100, 92, 0.14);
}

.filter-chip:hover {
  border-color: rgba(255, 167, 128, 0.82);
  background: rgba(255, 77, 0, 0.16);
}

.filter-chip:focus-visible {
  outline: 2px solid rgba(255, 167, 128, 0.72);
  outline-offset: 2px;
}

body.workspace-loaded .hero {
  padding: 16px 18px 14px;
}

body.workspace-loaded .hero::before {
  top: 8px;
  right: 12px;
  font-size: clamp(2.8rem, 10vw, 5.8rem);
  color: rgba(255, 77, 0, 0.05);
}

body.workspace-loaded .hero-toolbar {
  gap: 8px;
}

body.workspace-loaded .hero-copy {
  display: flex;
  align-items: baseline;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

body.workspace-loaded .hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  max-width: none;
}

body.workspace-loaded .hero p {
  display: none;
}

body.workspace-loaded .overview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

body.workspace-loaded .overview-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 8px 12px;
  border-radius: 999px;
}

body.workspace-loaded .overview-label {
  font-size: 0.62rem;
  line-height: 1;
  white-space: nowrap;
}

body.workspace-loaded .overview-value {
  font-size: 1rem;
  line-height: 1;
}

body.workspace-loaded .overview-subcopy {
  display: none;
}

body.workspace-loaded .hero-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

body.workspace-loaded .hero-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

body.workspace-loaded .hero-status-label {
  display: none;
}

body.workspace-loaded .hero-status-file {
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workspace-loaded #statusText {
  font-size: 0.82rem;
  white-space: nowrap;
}

body.workspace-loaded .status-row-progress {
  flex: 1 0 100%;
  margin-top: 2px;
}

body.workspace-loaded .filters {
  padding: 12px 14px;
}

body.workspace-loaded .filters-head {
  display: none;
}

body.workspace-loaded .active-filters {
  flex: 1 1 auto;
  margin-top: 0;
}

body.workspace-loaded .category-filters {
  grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr));
  gap: 0.55rem;
}

body.workspace-loaded .category-filter {
  min-height: 3.25rem;
  padding: 0.62rem 0.75rem;
}

body.workspace-loaded .category-label {
  font-size: 0.62rem;
}

body.workspace-loaded .category-count {
  font-size: 0.88rem;
}

body.workspace-loaded.filters-collapsed .filters {
  padding-bottom: 12px;
}

body.workspace-loaded.filters-collapsed .table-panel {
  margin-top: 10px;
}

[data-theme="light"] .filters-summary-bar {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(25, 21, 18, 0.12);
}

[data-theme="light"] .filters-toggle {
  background: rgba(25, 21, 18, 0.04);
  border-color: rgba(25, 21, 18, 0.12);
}

.table-panel {
  margin-top: 8px;
  padding: 14px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 18px;
}

.table-controls-bottom {
  margin-top: 18px;
  margin-bottom: 0;
}

.table-count {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.3;
}

.table-nav-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.table-nav-cluster > * {
  align-self: center;
}

.page-size-picker {
  display: inline-flex;
  align-items: center;
  height: var(--viewer-control-height);
  border: 1px solid rgba(255, 77, 0, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.page-size-label {
  padding: 0 16px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-size-segment {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.page-size-option {
  min-width: 56px;
  height: var(--viewer-segment-height);
  min-height: var(--viewer-segment-height);
  max-height: var(--viewer-segment-height);
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  box-sizing: border-box;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.page-size-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.page-size-option.active,
.pager-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 12px;
  height: var(--viewer-segment-height);
  min-height: var(--viewer-segment-height);
  max-height: var(--viewer-segment-height);
  line-height: 1;
}

.page-size-option.active {
  background: rgba(255, 255, 255, 0.96);
  color: #191512;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.table-range {
  display: inline-flex;
  align-items: center;
  height: var(--viewer-control-height);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pager {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 188px;
  height: var(--viewer-control-height);
  border: 1px solid rgba(255, 77, 0, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.pager-nav {
  width: 48px;
  height: var(--viewer-control-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  transition: background 0.14s ease, color 0.14s ease;
}

.pager-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.pager-nav:disabled {
  opacity: 0.34;
  cursor: default;
}

.pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: var(--viewer-control-height);
  padding: 2px 14px 2px 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.pager-input,
.pager-total {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pager-input {
  display: inline-flex;
  width: 56px;
  min-width: 56px;
  height: var(--viewer-segment-height);
  min-height: var(--viewer-segment-height);
  max-height: var(--viewer-segment-height);
  margin: 0;
  padding: 0 10px;
  border: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #191512;
  text-align: center;
  text-indent: 0;
  appearance: textfield;
  flex: 0 0 var(--viewer-segment-height);
  align-self: center;
  vertical-align: middle;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pager-input::-webkit-outer-spin-button,
.pager-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pager-input:focus {
  outline: none;
}

.pager-total {
  color: var(--muted);
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

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

thead {
  background: var(--panel-3);
}

th,
td {
  text-align: left;
  padding: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
}

th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sort-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button:focus-visible,
#uploadManifestBtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shipment-row:focus-visible,
.tracking-subtable tbody tr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sort-button::after {
  content: "  ";
  opacity: 0.65;
}

th.sortable.sorted-asc .sort-button::after {
  content: " ▲";
}

th.sortable.sorted-desc .sort-button::after {
  content: " ▼";
}

tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: rgba(22, 200, 176, 0.08);
}

.shipment-row.category-split {
  background: rgba(255, 182, 193, 0.16);
}

.shipment-row.category-multi {
  background: rgba(120, 205, 255, 0.14);
}

.shipment-row.category-single {
  background: rgba(140, 230, 160, 0.14);
}

.shipment-row.category-split:hover {
  background: rgba(255, 182, 193, 0.24);
}

.shipment-row.category-multi:hover {
  background: rgba(120, 205, 255, 0.22);
}

.shipment-row.category-single:hover {
  background: rgba(140, 230, 160, 0.22);
}

.shipment-row.category-split.selected {
  background: rgba(255, 182, 193, 0.34);
}

.shipment-row.category-multi.selected {
  background: rgba(120, 205, 255, 0.32);
}

.shipment-row.category-single.selected {
  background: rgba(140, 230, 160, 0.3);
}

.shipment-row.selected td:first-child {
  position: relative;
  box-shadow: inset 4px 0 0 transparent;
  padding-left: 16px;
}

.shipment-row.category-single.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-single-strong);
}

.shipment-row.category-multi.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-multi-strong);
}

.shipment-row.category-split.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--ds-signal-split-strong);
}

.shipment-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.shipment-main {
  display: grid;
  gap: 6px;
}

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

.shipment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.copy-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

tbody tr:hover .copy-btn,
tbody tr:focus-within .copy-btn,
.copy-btn:focus-visible,
.copy-btn[title="Copied"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.copy-btn:hover {
  border-color: var(--panel-border-strong);
  background: rgba(255, 77, 0, 0.1);
}

@media (hover: none) {
  .copy-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.tracking-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}


.flags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.flag-badge[title],
.details-status-card[title],
.details-tax-item[title] {
  cursor: help;
}

.flag-badge.ioss {
  color: #ffe9df;
  background: rgba(255, 77, 0, 0.18);
  border-color: rgba(255, 77, 0, 0.42);
}

.flag-badge.cod {
  color: #fff3dc;
  background: rgba(245, 200, 66, 0.16);
  border-color: rgba(245, 200, 66, 0.42);
}

.flag-badge.customs {
  color: #ffe9e3;
  background: rgba(154, 100, 92, 0.18);
  border-color: rgba(154, 100, 92, 0.4);
}

.flag-badge.documents {
  color: #f1e9ff;
  background: rgba(134, 103, 191, 0.18);
  border-color: rgba(134, 103, 191, 0.4);
}

.shipment-toggle,
.shipment-toggle-slot {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.shipment-toggle {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

.shipment-toggle-slot {
  display: block;
  visibility: hidden;
}

.shipment-toggle.disabled {
  opacity: 0.45;
  cursor: default;
}

.tracking-subtable-row td {
  background: rgba(4, 14, 22, 0.6);
  padding: 10px 12px;
}

[data-theme="light"] .tracking-subtable-row td {
  background: rgba(239, 248, 255, 0.92);
}

.tracking-subtable-row.category-split td {
  background: rgba(255, 182, 193, 0.12);
}

.tracking-subtable-row.category-multi td {
  background: rgba(120, 205, 255, 0.1);
}

.tracking-subtable-row.category-single td {
  background: rgba(140, 230, 160, 0.1);
}

[data-theme="light"] .tracking-subtable-row.category-split td {
  background: rgba(255, 211, 220, 0.62);
}

[data-theme="light"] .tracking-subtable-row.category-multi td {
  background: rgba(206, 237, 255, 0.68);
}

[data-theme="light"] .tracking-subtable-row.category-single td {
  background: rgba(209, 246, 219, 0.68);
}

.tracking-subtable {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.tracking-subtable th,
.tracking-subtable td {
  padding: 8px 10px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tracking-subtable tbody tr {
  cursor: pointer;
}

.no-data {
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.muted {
  color: var(--muted);
}

.details-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(8, 8, 8, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

[data-theme="light"] .details-backdrop {
  background: rgba(30, 22, 14, 0.04);
}

.details-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.details-panel {
  position: fixed;
  z-index: 2;
  top: 0;
  right: 0;
  width: min(620px, 100vw);
  height: 100vh;
  border-radius: 0;
  transform: translateX(100%);
  transition: transform var(--details-panel-motion);
  padding: 22px 20px;
  overflow: visible;
}

[data-theme="light"] .details-panel {
  background: rgba(250, 246, 240, 0.98);
}

[data-theme="dark"] .details-panel {
  padding: 26px 24px 24px;
}

.details-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: visible;
  overscroll-behavior: contain;
}

.details-panel.open {
  transform: translateX(0);
}

.details-head {
  position: relative;
  min-height: 0;
}

.details-close {
  position: absolute;
  left: 0;
  top: -14px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.96);
  color: #5f564f;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(43, 31, 18, 0.12);
  z-index: 6;
  transition: background var(--details-panel-motion), border-color var(--details-panel-motion), box-shadow var(--details-panel-motion), transform var(--details-panel-motion), color var(--details-panel-motion);
}

.details-close:hover {
  background: rgba(255, 248, 241, 1);
  border-color: rgba(204, 113, 53, 0.28);
  box-shadow: 0 10px 22px rgba(43, 31, 18, 0.16);
}

.details-close:active {
  transform: scale(0.96);
}

.details-close-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

[data-theme="dark"] .details-close {
  background: #23201d;
  color: #d0c8bf;
  border-color: #4a4138;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .details-close:hover {
  background: #2a2521;
  border-color: rgba(240, 163, 108, 0.28);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .details-status-time span + span::before {
  color: rgba(255, 255, 255, 0.28);
}

[data-theme="dark"] .details-tracking-service {
  color: #f0a36c;
}

[data-theme="dark"] .details-tracking-copy {
  background: rgba(255, 255, 255, 0.04);
  color: #d0c8bf;
  border-color: rgba(255, 211, 173, 0.12);
}

[data-theme="dark"] .details-tracking-copy:hover {
  border-color: rgba(240, 163, 108, 0.3);
  color: #f0a36c;
}

[data-theme="dark"] .details-tracking-copy.copied {
  color: #9ed7b1;
  border-color: rgba(95, 168, 123, 0.28);
  background: rgba(95, 168, 123, 0.12);
}

.details-summary {
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#detailsOverview + .details-summary {
  display: none;
}

.details-item {
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.details-item span {
  color: var(--muted);
  display: block;
  font-size: 0.8rem;
}

pre {
  margin: 0;
  background: #050b11;
  color: #d7f2ff;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--panel-border);
  font-size: 0.8rem;
  line-height: 1.45;
}

.details-table-wrap {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: auto;
  background: rgba(3, 8, 12, 0.55);
}

[data-theme="light"] .details-table-wrap {
  background: rgba(246, 251, 255, 0.95);
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.details-table th,
.details-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  vertical-align: top;
  font-size: 0.86rem;
}

.details-table td:nth-child(2) {
  color: var(--muted);
  text-transform: lowercase;
}

.tree-key {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-toggle {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  line-height: 16px;
  font-size: 0.75rem;
}

.tree-leaf-pad {
  display: inline-block;
  width: 20px;
}

.details-row.hidden-row {
  display: none;
}

.details-value {
  color: #ddf2ff;
  word-break: break-word;
}

[data-theme="light"] .details-value {
  color: #174161;
}

@media (max-width: 900px) {
  .details-party-grid,
  .details-party-meta {
    grid-template-columns: 1fr;
  }

  .details-identity-top,
  .details-status-line {
    display: grid;
    gap: 10px;
  }

  .details-identity-top {
    grid-template-columns: 1fr;
  }

  .details-shipment-chip,
  .details-route-side.is-destination {
    text-align: left;
  }

  .details-tracking-row-shipment {
    justify-items: start;
  }

  .details-shipment-chip {
    min-width: 0;
    max-width: none;
  }

  .details-route-card,
  .details-status-dashboard {
    grid-template-columns: 1fr;
  }

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

  .table-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-nav-cluster {
    width: 100%;
    justify-content: flex-start;
  }
}


.table-panel.design-fork-grid {
  position: relative;
}

th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

strong, .shipment-cell strong, .table-count {
  color: var(--text);
}

.copy-btn, .shipment-toggle {
  border-radius: 6px;
}

@media (max-width: 980px) {
  .details-panel {
    width: 100vw;
  }

  .details-close {
    left: 0;
    top: -10px;
  }

  .hero::before {
    font-size: 5.6rem;
    right: -4px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


[data-theme="light"] .filter-chip {
  color: #9a3f10;
  border-color: rgba(255, 77, 0, 0.56);
  background: rgba(255, 77, 0, 0.16);
}

[data-theme="light"] .ghost-btn {
  border-color: rgba(25, 21, 18, 0.18);
  background: rgba(25, 21, 18, 0.05);
  color: #2f2720;
}

[data-theme="light"] .ghost-btn:hover {
  border-color: rgba(25, 21, 18, 0.28);
  background: rgba(25, 21, 18, 0.08);
}

[data-theme="light"] .ghost-btn-danger:hover {
  border-color: rgba(203, 46, 46, 0.42);
  background: rgba(203, 46, 46, 0.1);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(25, 21, 18, 0.12);
  background: rgba(255, 252, 248, 0.92);
  color: #241d18;
}

[data-theme="light"] .theme-toggle-track {
  background: rgba(25, 21, 18, 0.06);
  border-color: rgba(25, 21, 18, 0.08);
}

[data-theme="light"] .theme-toggle-label {
  color: #5c5148;
}

[data-theme="light"] .pager {
  background: rgba(255, 252, 248, 0.92);
  border-color: rgba(25, 21, 18, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

[data-theme="light"] .page-size-picker {
  background: rgba(255, 252, 248, 0.92);
  border-color: rgba(25, 21, 18, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

[data-theme="light"] .page-size-segment {
  border-left-color: rgba(25, 21, 18, 0.08);
}

[data-theme="light"] .page-size-option:hover {
  background: rgba(25, 21, 18, 0.05);
}

[data-theme="light"] .page-size-option {
  color: #5c5148;
}

[data-theme="light"] .page-size-option.active {
  background: #1f1d1b;
  color: #fffaf5;
  box-shadow: 0 6px 14px rgba(43, 31, 18, 0.16);
}

[data-theme="light"] .page-size-label,
[data-theme="light"] .table-range,
[data-theme="light"] .pager-total {
  color: #5c5148;
}
[data-theme="light"] .pager-nav:hover:not(:disabled) {
  background: rgba(25, 21, 18, 0.05);
}

[data-theme="light"] .pager-current {
  border-left-color: rgba(25, 21, 18, 0.08);
  border-right-color: rgba(25, 21, 18, 0.08);
}

[data-theme="light"] .pager-input {
  background: #1f1d1b;
  color: #fffaf5;
  box-shadow: 0 6px 14px rgba(43, 31, 18, 0.16);
}

[data-theme="light"] .flag-badge {
  font-weight: 700;
}

[data-theme="light"] .flag-badge.ioss {
  color: #8a2f00;
  background: rgba(255, 77, 0, 0.14);
  border-color: rgba(255, 77, 0, 0.36);
}

[data-theme="light"] .flag-badge.cod {
  color: #744d00;
  background: rgba(245, 200, 66, 0.18);
  border-color: rgba(189, 145, 20, 0.42);
}

[data-theme="light"] .flag-badge.customs {
  color: #7f433b;
  background: rgba(154, 100, 92, 0.14);
  border-color: rgba(154, 100, 92, 0.34);
}

[data-theme="light"] .flag-badge.documents {
  color: #6545a8;
  background: rgba(134, 103, 191, 0.14);
  border-color: rgba(134, 103, 191, 0.34);
}

@media (max-width: 980px) {
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-footer-copy {
    text-align: left;
  }

  .filters-summary-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .filters-summary-reset {
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  .details-tax-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 980px) {
  .category-filters {
    justify-content: flex-start;
    gap: 14px 18px;
  }

  .category-dot {
    width: 28px;
    height: 28px;
  }
}


/* Manifest viewer extension overrides */

.bg-shape-c {
  position: fixed;
  width: 32rem;
  height: 32rem;
  left: 50%;
  top: 36vh;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

[data-theme="light"] .bg-shape-c {
  background: radial-gradient(circle, rgba(25, 21, 18, 0.06), transparent 70%);
}

.app-shell {
  max-width: none;
  width: calc(100% - 1rem);
  padding: 0.8rem 0 2.2rem;
}

.hero,
.filters,
.table-panel {
  border-radius: 18px;
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 1.05rem 1.05rem 1.2rem;
}

.hero-toolbar,
.workflow-actions,
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--control-gap);
}

.hero-toolbar {
  position: relative;
  z-index: 1;
  padding-right: 7rem;
}

.hero-copy,
.hero-status,
.section-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
}

.hero-kicker,
.section-kicker,
.overview-label,
.overview-subcopy,
.status-row-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-kicker,
.section-kicker {
  color: var(--accent);
}

.hero-copy h1 {
  margin: 0;
  max-width: none;
}

.hero-copy p,
.section-head p,
.overview-subcopy,
#statusText,
.status-row-label {
  color: var(--muted);
}

.hero-source {
  min-height: 1.2rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.overview-card {
  display: grid;
  gap: 0.35rem;
  min-height: 7.25rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  align-content: center;
}

.overview-value {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.overview-value-copy {
  max-width: 26ch;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: normal;
}

.hero-status {
  gap: 0.45rem;
}

.status-row {
  position: relative;
  z-index: 1;
}

.status-row-progress {
  display: grid;
  gap: 0.4rem;
}

.progress-wrap {
  max-width: 42rem;
}

.filters-horizontal,
.table-panel-full {
  margin-top: 0.9rem;
}

.filters-horizontal {
  padding: 1rem 1.05rem 1.05rem;
}

.filters-head,
.table-section-head {
  grid-template-columns: minmax(18rem, 34rem) minmax(0, 1fr);
  align-items: end;
  gap: 0.8rem 1.3rem;
}

.filters-head {
  grid-template-columns: 1fr;
}

.filters-head h2,
.table-section-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.workflow-actions {
  margin-top: 1rem;
}

.category-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  width: 100%;
  justify-content: stretch;
  align-items: stretch;
  gap: 0.7rem;
}

.category-filter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: 4rem;
  padding: 0.78rem 0.92rem;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.category-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.category-label {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-dot {
  width: 0.95rem;
  height: 0.95rem;
  border-width: 1.5px;
  box-shadow: 0 0 0 0.24rem rgba(255, 255, 255, 0.03);
}

.category-count {
  font-size: 0.96rem;
}

.category-filter:hover,
.category-filter.active {
  border-color: var(--panel-border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.category-filter.active.all {
  background: rgba(255, 255, 255, 0.08);
}

.category-filter.active.single {
  background: rgba(0, 201, 122, 0.12);
  border-color: rgba(134, 225, 176, 0.46);
}

.category-filter.active.multi {
  background: rgba(41, 121, 255, 0.12);
  border-color: rgba(151, 197, 255, 0.46);
}

.category-filter.active.split {
  background: rgba(255, 128, 149, 0.13);
  border-color: rgba(229, 162, 174, 0.48);
}

.category-filter.active.documents {
  background: rgba(164, 132, 214, 0.13);
  border-color: rgba(203, 182, 235, 0.46);
}

.category-filter.active.cod {
  background: rgba(245, 200, 66, 0.13);
  border-color: rgba(236, 213, 137, 0.48);
}

.category-filter.active.ioss {
  background: rgba(255, 77, 0, 0.14);
  border-color: rgba(255, 167, 128, 0.48);
}

.category-filter.active.customs {
  background: rgba(171, 69, 56, 0.14);
  border-color: rgba(210, 147, 139, 0.48);
}

.category-filter.active .category-count {
  color: var(--text);
}

[data-theme="light"] .category-filter {
  background: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .category-filter:hover,
[data-theme="light"] .category-filter.active {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .category-filter.active.all {
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .category-filter.active.single {
  background: rgba(0, 201, 122, 0.16);
}

[data-theme="light"] .category-filter.active.multi {
  background: rgba(41, 121, 255, 0.14);
}

[data-theme="light"] .category-filter.active.split {
  background: rgba(255, 128, 149, 0.16);
}

[data-theme="light"] .category-filter.active.documents {
  background: rgba(164, 132, 214, 0.15);
}

[data-theme="light"] .category-filter.active.cod {
  background: rgba(245, 200, 66, 0.16);
}

[data-theme="light"] .category-filter.active.ioss {
  background: rgba(255, 77, 0, 0.16);
}

[data-theme="light"] .category-filter.active.customs {
  background: rgba(171, 69, 56, 0.16);
}

.table-panel-full {
  padding: 1rem 1.05rem 1.1rem;
}

.page-jump {
  gap: 0.35rem;
  padding: 0.35rem 0.4rem 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
}

.page-jump label {
  display: inline-flex;
  align-items: center;
  padding-left: 0.12rem;
}

.page-jump input {
  width: 4.15rem;
  min-height: 2.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
}

.page-jump .ghost-btn {
  min-height: 2.15rem;
  padding: var(--control-pad-block) var(--control-pad-inline);
  border-radius: 999px;
}

[data-theme="light"] .page-jump {
  background: rgba(255, 255, 255, 0.94);
}

.details-close-btn {
  position: absolute;
  left: -28px;
  top: -6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.96);
  color: #555;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(43, 31, 18, 0.12);
  z-index: 4;
}

[data-theme="dark"] .details-close-btn {
  background: #23201d;
  color: #d0c8bf;
  border-color: #4a4138;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.details-data-section {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}

.details-data-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.details-data-kicker {
  font-size: 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b7f73;
}

.details-data-head strong {
  font-size: 0.92rem;
  line-height: 1.3;
  color: #2d2722;
  overflow-wrap: anywhere;
}

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

.details-data-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #f5f5f3;
}

.details-data-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.details-data-card-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d7267;
}

.details-data-card-title,
.details-data-card-value {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #2d2722;
  overflow-wrap: anywhere;
}

.details-data-card-value {
  text-align: right;
}

[data-theme="dark"] .details-data-section {
  border-top-color: rgba(239, 231, 222, 0.12);
}

[data-theme="dark"] .details-data-kicker,
[data-theme="dark"] .details-data-card-kicker {
  color: rgba(217, 199, 181, 0.66);
}

[data-theme="dark"] .details-data-head strong,
[data-theme="dark"] .details-data-card-title,
[data-theme="dark"] .details-data-card-value {
  color: rgba(248, 240, 233, 0.92);
}

[data-theme="dark"] .details-data-card {
  background: #23201d;
  border-color: #3a332d;
}

@media (max-width: 1100px) {
  .routing-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-grid,
  .filter-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-head,
  .table-section-head,
  .routing-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters-head h2,
  .table-section-head h2 {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 900px) {
  .no-data {
    text-align: left;
  }

  .routing-panel {
    padding: 22px 18px 24px;
  }

  .routing-intro {
    flex-direction: column;
    align-items: stretch;
  }

  .routing-selection-trail {
    width: 100%;
    justify-content: flex-start;
  }

  .routing-stages {
    grid-template-columns: 1fr;
  }

  .routing-stage:not(:first-child)::before {
    display: none;
  }

  .app-shell {
    width: calc(100% - 0.75rem);
  }

  .hero-toolbar {
    padding-right: 0;
  }

  body.workspace-loaded #statusText {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .overview-grid,
  .filter-grid-secondary {
    grid-template-columns: 1fr;
  }

  .table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .details-data-grid {
    grid-template-columns: 1fr;
  }

  .category-filters {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  }
}

@media (max-width: 980px) {
  .details-close-btn {
    left: 10px;
    top: 10px;
  }
}

/* Consolidated clearance label below the route arrow. */
.details-route-line:has(.details-route-world-ease) { margin-bottom: 18px; }
.details-route-world-ease { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: 0.7rem; line-height: 1.25; color: var(--muted); }

/* The drawer owns the outer gutter; shipment wrappers add no nested frame. */
.details-panel,
[data-theme] .details-panel { padding-inline: 8px; }
.details-panel .details-scroll { scrollbar-width: thin; scrollbar-gutter: stable both-edges; }
.details-panel .details-composition-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.details-panel .details-composition-card::before { display: none; }
.details-panel .details-identity {
  padding: 18px 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
}



