:root {
  --hub-canvas: #f3eee5;
  --hub-paper: #fffaf2;
  --hub-paper-strong: #fffdf9;
  --hub-ink: #1c1916;
  --hub-muted: #746c63;
  --hub-red: #e31b23;
  --hub-red-dark: #bd1118;
  --hub-line: rgb(51 42 33 / 0.11);
  --hub-line-strong: rgb(51 42 33 / 0.19);
  --hub-shadow: 0 1.15rem 3.5rem rgb(70 49 28 / 0.075);
  --hub-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --hub-sidebar-width: 17.5rem;
}

[hidden] {
  display: none !important;
}

body:is([data-dashboard-page], [data-employee-dashboard]) {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--hub-canvas);
  color: var(--hub-ink);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:is([data-dashboard-page], [data-employee-dashboard]) *,
body:is([data-dashboard-page], [data-employee-dashboard]) *::before,
body:is([data-dashboard-page], [data-employee-dashboard]) *::after {
  box-sizing: border-box;
}

body:is([data-dashboard-page], [data-employee-dashboard]) :where(input, select, textarea) {
  margin: 0;
  color: inherit;
  font: inherit;
}

body:is([data-dashboard-page], [data-employee-dashboard]) :where(button) {
  margin: 0;
  font: inherit;
}

body:is([data-dashboard-page], [data-employee-dashboard]) :where(button, a, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

body:is([data-dashboard-page], [data-employee-dashboard]) :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgb(227 27 35 / 0.32);
  outline-offset: 3px;
}

body:is([data-dashboard-page], [data-employee-dashboard]) button {
  cursor: pointer;
}

body:is([data-dashboard-page], [data-employee-dashboard]).hub-menu-open {
  overflow: hidden;
}

body:is([data-dashboard-page], [data-employee-dashboard]) .grain {
  opacity: 0.015;
}

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

.hub-shell {
  min-height: 100vh;
}

.hub-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--hub-sidebar-width);
  flex-direction: column;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  border-radius: 0 2rem 2rem 0;
  background: var(--hub-ink);
  color: #fff;
  box-shadow: 1.125rem 0 3.75rem rgb(28 25 22 / 0.18);
  scrollbar-color: rgb(255 255 255 / 0.18) transparent;
  scrollbar-width: thin;
  transform: translateX(-105%);
  transition: transform 500ms var(--hub-ease);
}

.hub-sidebar.is-open {
  transform: translateX(0);
}

.hub-brand {
  padding: 0.5rem 0.75rem;
}

.hub-brand-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.hub-brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.08);
}

.hub-brand-mark img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.hub-brand-link strong,
.hub-brand-link small {
  display: block;
}

.hub-brand-link strong {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hub-brand-link small {
  margin-top: 0.25rem;
  color: rgb(255 255 255 / 0.45);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hub-workspace {
  margin: 1.25rem 0.75rem 0;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 1.15rem;
  background: rgb(255 255 255 / 0.045);
}

.hub-workspace p {
  margin: 0;
  color: rgb(255 255 255 / 0.42);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hub-workspace strong {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.hub-workspace span {
  display: block;
  margin-top: 0.35rem;
  color: rgb(255 255 255 / 0.48);
  font-size: 0.68rem;
  line-height: 1.45;
}

.hub-navigation {
  flex: 1;
  margin-top: 1.25rem;
}

.hub-navigation-label {
  margin: 0;
  padding: 0 1rem 0.55rem;
  color: rgb(255 255 255 / 0.34);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hub-nav-list {
  display: grid;
  gap: 0.2rem;
}

.hub-nav-button {
  display: grid;
  grid-template-columns: 0.4rem 1.2rem minmax(0, 1fr) auto;
  width: 100%;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: rgb(255 255 255 / 0.55);
  font-size: 0.82rem;
  text-align: left;
  transition: background-color 240ms ease, color 240ms ease;
}

.hub-nav-button:hover,
.hub-nav-button.is-active {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.hub-nav-marker {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--hub-red);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 200ms ease, transform 200ms ease;
}

.hub-nav-button.is-active .hub-nav-marker {
  opacity: 1;
  transform: scale(1);
}

.hub-nav-button > i {
  font-size: 1.05rem;
}

.hub-nav-button small {
  color: rgb(255 255 255 / 0.26);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
}

.hub-sidebar-footer {
  display: grid;
  gap: 0.2rem;
  margin-top: 1rem;
  padding: 1rem 0.25rem 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.hub-sidebar-footer :where(a, button) {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: rgb(255 255 255 / 0.55);
  font-size: 0.8rem;
  text-align: left;
  text-decoration: none;
}

.hub-sidebar-footer :where(a, button):hover {
  background: rgb(255 255 255 / 0.07);
  color: #fff;
}

.hub-page {
  min-width: 0;
}

.hub-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 5rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgb(0 0 0 / 0.07);
  background: rgb(243 238 229 / 0.9);
  backdrop-filter: blur(18px);
}

.hub-menu-button,
.icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  place-items: center;
  border: 1px solid var(--hub-line);
  border-radius: 0.95rem;
  background: var(--hub-paper);
  color: var(--hub-ink);
  box-shadow: 0 0.25rem 1rem rgb(70 49 28 / 0.05);
}

.hub-menu-button :where(i, span),
.icon-button i {
  line-height: 1;
  font-size: 1.15rem;
}

.hub-current-view {
  display: none;
  min-width: 0;
}

.hub-current-view p,
.hub-current-view strong {
  margin: 0;
}

.hub-current-view p {
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hub-current-view strong {
  display: block;
  max-width: 15rem;
  margin-top: 0.22rem;
  overflow: hidden;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-global-search {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin-left: auto;
}

[data-employee-dashboard] .hub-topbar [data-logout].icon-button {
  margin-left: auto;
}

.hub-global-search i {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  color: var(--hub-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.hub-global-search input {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem 0 2.75rem;
  border: 1px solid var(--hub-line);
  border-radius: 1rem;
  background: var(--hub-paper);
  box-shadow: 0 0.5rem 1.5rem rgb(71 52 32 / 0.06);
  font-size: 0.82rem;
  outline: 0;
}

.hub-global-search input::placeholder {
  color: var(--hub-muted);
  opacity: 1;
}

.hub-main {
  width: 100%;
  max-width: 110rem;
  margin-inline: auto;
  padding: 1.5rem 1rem 4rem;
}

.hub-view.is-active {
  animation: hub-view-in 380ms var(--hub-ease) both;
}

@keyframes hub-view-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--hub-red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.view-header h2 {
  margin: 0.65rem 0 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.25rem, 7vw, 4.4rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.view-header--overview h2 {
  max-width: 52rem;
  font-size: clamp(2.65rem, 8vw, 5.2rem);
}

.view-header h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.view-summary {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: var(--hub-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.view-actions,
.detail-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-paper);
  color: var(--hub-ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: none;
}

.button--primary {
  border-color: transparent;
  background: var(--hub-red);
  color: #fffaf2;
  box-shadow: 0 0.85rem 1.8rem rgb(227 27 35 / 0.18);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--hub-red-dark);
  color: #fffaf2;
}

.button--secondary {
  border-color: var(--hub-line-strong);
  background: var(--hub-paper);
  color: var(--hub-ink);
}

.button--secondary:hover,
.button--secondary:focus-visible {
  border-color: var(--hub-ink);
  background: var(--hub-paper-strong);
  color: var(--hub-ink);
}

.button--danger {
  border-color: transparent;
  background: var(--hub-red-dark);
  color: #fffaf2;
}

.button--danger:hover,
.button--danger:focus-visible {
  background: #8f0e14;
  color: #fffaf2;
}

.button--compact {
  min-height: 2.5rem;
  padding-inline: 0.9rem;
  border-color: transparent;
  background: var(--hub-ink);
  color: #fffaf2;
}

.button--compact:hover,
.button--compact:focus-visible {
  background: #2f2a26;
  color: #fffaf2;
}

.button--text {
  min-height: 2.5rem;
  padding-inline: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--hub-muted);
  box-shadow: none;
}

.button--text:hover,
.button--text:focus-visible {
  background: transparent;
  color: var(--hub-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hub-menu-button:hover,
.icon-button:hover {
  border-color: var(--hub-line-strong);
  background: var(--hub-paper-strong);
  color: var(--hub-ink);
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  margin-top: 1.75rem;
  padding: 0.85rem;
  overflow-x: auto;
  border: 1px solid var(--hub-line);
  border-radius: 1.35rem;
  background: rgb(255 250 242 / 0.76);
  box-shadow: 0 0.7rem 2rem rgb(70 49 28 / 0.04);
}

.filter-bar-heading {
  min-width: 8rem;
  padding: 0 0.35rem 0.15rem;
}

.filter-bar-heading strong,
.filter-bar-heading span {
  display: block;
}

.filter-bar-heading strong {
  font-size: 0.75rem;
}

.filter-bar-heading span {
  margin-top: 0.25rem;
  color: var(--hub-muted);
  font-size: 0.65rem;
}

.filter-bar label {
  display: grid;
  min-width: 9.5rem;
  gap: 0.35rem;
}

.filter-bar .filter-search {
  min-width: min(19rem, 70vw);
  flex: 1;
}

.filter-bar label > span {
  padding-left: 0.25rem;
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-bar :where(input, select),
.dialog-body :where(input, select, textarea) {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.75rem;
  border: 1px solid var(--hub-line);
  border-radius: 0.75rem;
  background: var(--hub-paper-strong);
  color: var(--hub-ink);
  font-size: 0.75rem;
  outline: 0;
}

.filter-bar input::placeholder,
.dialog-body :where(input, textarea)::placeholder {
  color: var(--hub-muted);
  opacity: 1;
}

.dialog-body textarea {
  min-height: 7rem;
  padding-block: 0.75rem;
  resize: vertical;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.hub-kpi-card {
  min-height: 10.5rem;
  padding: 1.25rem;
  border: 1px solid var(--hub-line);
  border-radius: 1.5rem;
  background: var(--hub-paper);
  box-shadow: 0 0.85rem 2.5rem rgb(70 49 28 / 0.05);
}

.hub-kpi-card:first-child {
  background:
    radial-gradient(circle at 100% 0, rgb(227 27 35 / 0.3), transparent 42%),
    var(--hub-ink);
  color: #fff;
}

.overview-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hub-line);
  border-radius: 1.7rem;
  background: var(--hub-paper);
  box-shadow: var(--hub-shadow);
}

.panel--dark {
  border-color: transparent;
  background: var(--hub-ink);
  color: #fffaf2;
}

.panel--dark .panel-kicker {
  color: #ffb4b7;
}

.panel--dark .record-count,
.panel--dark .panel-header > span {
  color: rgb(255 250 242 / 0.58);
}

.panel--dark .button--secondary {
  border-color: rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.08);
  color: #fffaf2;
}

.panel--dark .button--text {
  color: rgb(255 250 242 / 0.72);
}

.panel--dark .button--compact {
  background: #fffaf2;
  color: var(--hub-ink);
}

.panel--dark .button--compact:hover,
.panel--dark .button--compact:focus-visible {
  background: #efe8dc;
  color: var(--hub-ink);
}

.panel-copy {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
}

.panel-copy p {
  margin: 0;
  color: var(--hub-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.panel-copy [data-employee-status] {
  color: var(--hub-ink);
}

.panel-copy [data-employee-status][data-state="error"] {
  color: var(--hub-red-dark);
}

.panel-header,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--hub-line);
}

.panel--dark .panel-header {
  border-color: rgb(255 255 255 / 0.1);
}

.panel-header h3,
.detail-header h3 {
  margin: 0.35rem 0 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.record-count {
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  white-space: nowrap;
}

.record-list,
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list > li + li {
  border-top: 1px solid var(--hub-line);
}

.record-list--dark > li + li {
  border-color: rgb(255 255 255 / 0.1);
}

.state-row {
  display: flex;
  min-height: 8rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.5rem;
  color: var(--hub-muted);
  font-size: 0.78rem;
  text-align: center;
}

.record-list--dark .state-row {
  color: rgb(255 255 255 / 0.48);
}

.state-card {
  display: grid;
  width: 100%;
  min-height: 14rem;
  place-items: center;
  align-content: center;
  gap: 0.6rem;
  padding: 2rem;
  border: 1px dashed var(--hub-line-strong);
  border-radius: 1.35rem;
  background: rgb(255 250 242 / 0.58);
  color: var(--hub-muted);
  text-align: center;
}

.state-card--inline {
  grid-column: 1 / -1;
  min-height: 8rem;
}

.state-card > i {
  color: var(--hub-red);
  font-size: 2rem;
}

.state-card h3,
.state-card p {
  margin: 0;
}

.state-card h3 {
  color: var(--hub-ink);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.1rem;
}

.state-card p {
  max-width: 28rem;
  font-size: 0.78rem;
  line-height: 1.55;
}

.state-card--error {
  border-color: rgb(227 27 35 / 0.28);
  background: rgb(227 27 35 / 0.045);
}

.state-spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hub-spin 800ms linear infinite;
}

@keyframes hub-spin {
  to {
    transform: rotate(1turn);
  }
}

.master-detail,
.register-detail,
.workspace-with-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 1rem;
  margin-top: 1rem;
}

.master-detail > *,
.register-detail > *,
.workspace-with-detail > *,
.wholesale-inbox-layout > *,
.toolbar-stack > * {
  min-width: 0;
}

.wholesale-inbox {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--hub-line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.34);
}

.wholesale-inbox-heading {
  align-items: end;
}

.wholesale-inbox-heading p:last-child {
  max-width: 52rem;
  margin: 0.25rem 0 0;
  color: var(--hub-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.wholesale-status-counts {
  display: flex;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.wholesale-status-filter {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-paper);
  color: var(--hub-muted);
  font: inherit;
  font-size: 0.66rem;
}

.wholesale-status-filter:hover,
.wholesale-status-filter:focus-visible,
.wholesale-status-filter.is-active {
  border-color: rgb(227 27 35 / 0.32);
  color: var(--hub-ink);
}

.wholesale-status-filter strong {
  color: var(--hub-red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.wholesale-inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 1rem;
}

.wholesale-register {
  min-width: 0;
}

.wholesale-request-cards {
  display: grid;
  gap: 0.6rem;
}

.wholesale-request-table {
  display: none;
}

.hub-wholesale-card {
  display: grid;
  width: 100%;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--hub-line);
  border-radius: 0.9rem;
  background: var(--hub-paper);
  color: inherit;
  text-align: left;
}

.hub-wholesale-card:hover,
.hub-wholesale-card:focus-visible,
.hub-wholesale-card.is-selected {
  border-color: rgb(227 27 35 / 0.36);
  box-shadow: 0 0 0 3px rgb(227 27 35 / 0.07);
}

.hub-wholesale-card strong {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.hub-wholesale-card span:not(.record-status),
.hub-wholesale-card small {
  color: var(--hub-muted);
  font-size: 0.7rem;
}

.wholesale-detail {
  min-width: 0;
}

.order-workflow-heading {
  margin-top: 1.5rem;
}

.wholesale-item-list li > div {
  display: grid;
  gap: 0.25rem;
}

.master-list {
  min-height: 28rem;
  padding: 0.75rem;
}

.master-list > .state-card {
  min-height: 26.5rem;
}

.detail-panel {
  align-self: start;
}

.detail-empty {
  display: grid;
  min-height: 19rem;
  place-items: center;
  align-content: center;
  gap: 0.7rem;
  padding: 2rem;
  color: var(--hub-muted);
  text-align: center;
}

.detail-empty i {
  color: var(--hub-red);
  font-size: 1.75rem;
}

.detail-empty p {
  max-width: 20rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

.detail-content {
  padding: 0 1.25rem 1.25rem;
}

.detail-content > section {
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--hub-line);
}

.detail-content > section:last-child {
  border-bottom: 0;
}

.detail-content h4,
.section-heading h4 {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-content section > div:not(.section-heading),
.detail-content section > ol {
  margin-top: 0.75rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading button {
  padding: 0.25rem;
  border: 0;
  background: transparent;
  color: var(--hub-red);
  font-size: 0.68rem;
  font-weight: 600;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline {
  display: grid;
  gap: 0.7rem;
}

.timeline > li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--hub-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.timeline > li::before {
  position: absolute;
  top: 0.42rem;
  left: 0.1rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--hub-red);
  content: "";
}

.toolbar-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.view-switcher,
.subview-tabs {
  display: flex;
  width: fit-content;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 1px solid var(--hub-line);
  border-radius: 0.9rem;
  background: var(--hub-paper);
}

.view-switcher button,
.subview-tabs button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--hub-muted);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.view-switcher button.is-active,
.subview-tabs button.is-active {
  background: var(--hub-ink);
  color: #fff;
}

.order-board {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 0.75rem;
  min-height: 28rem;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: rgb(28 25 22 / 0.2) transparent;
}

.board-column {
  width: min(19rem, 82vw);
  flex: 0 0 min(19rem, 82vw);
  min-height: 27rem;
  padding: 0.75rem;
  border: 1px solid var(--hub-line);
  border-radius: 1.35rem;
  background: rgb(255 250 242 / 0.66);
  scroll-snap-align: start;
}

.board-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.8rem;
}

.board-column h3 {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.board-column > header span {
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
}

.column-empty {
  display: grid;
  min-height: 8rem;
  margin: 0;
  place-items: center;
  padding: 1rem;
  border: 1px dashed var(--hub-line);
  border-radius: 0.9rem;
  color: var(--hub-muted);
  font-size: 0.68rem;
  text-align: center;
}

.hub-order-card,
.hub-project-card,
.hub-customer-card {
  border: 1px solid var(--hub-line);
  border-radius: 1rem;
  background: var(--hub-paper);
  box-shadow: 0 0.4rem 1.4rem rgb(70 49 28 / 0.045);
  transition: border-color 220ms ease, transform 220ms ease;
}

.hub-order-card:hover,
.hub-project-card:hover,
.hub-customer-card:hover {
  border-color: rgb(227 27 35 / 0.25);
  transform: translateY(-2px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.8rem;
  min-height: 28rem;
}

.portfolio-grid > .state-card {
  grid-column: 1 / -1;
  min-height: 28rem;
}

.table-panel {
  min-width: 0;
}

.responsive-table {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-color: rgb(28 25 22 / 0.2) transparent;
}

.responsive-table table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: left;
}

.responsive-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.responsive-table th {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--hub-line);
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.responsive-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--hub-line);
  vertical-align: top;
}

.responsive-table tbody tr:last-child td {
  border-bottom: 0;
}

.responsive-table tbody tr[data-record-id] {
  cursor: pointer;
  transition: background-color 180ms ease;
}

.responsive-table tbody tr[data-record-id]:hover {
  background: rgb(227 27 35 / 0.025);
}

.table-state {
  display: flex;
  min-height: 10rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--hub-muted);
  text-align: center;
}

.table-state.state-card {
  display: grid;
  min-height: 14rem;
  border: 0;
  background: transparent;
}

.subview-bar {
  margin-top: 1.75rem;
  overflow-x: auto;
}

.subview-tabs {
  min-width: max-content;
}

.hub-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: rgb(28 25 22 / 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.hub-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hub-dialog {
  width: min(44rem, calc(100vw - 2rem));
  max-height: min(50rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  overflow: hidden auto;
  border: 0;
  border-radius: 1.75rem;
  background: var(--hub-paper);
  color: var(--hub-ink);
  box-shadow: 0 2rem 7rem rgb(28 25 22 / 0.3);
}

.hub-dialog::backdrop {
  background: rgb(28 25 22 / 0.62);
  backdrop-filter: blur(6px);
}

.hub-dialog form {
  margin: 0;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--hub-line);
}

.dialog-header h2 {
  margin: 0.45rem 0 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.dialog-header p:last-child {
  max-width: 34rem;
  margin: 0.55rem 0 0;
  color: var(--hub-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.dialog-body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.dialog-body label {
  display: grid;
  gap: 0.4rem;
}

.dialog-body label > span {
  color: var(--hub-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.dialog-status {
  min-height: 1.25rem;
  margin: 0;
  padding: 0 1.25rem;
  color: var(--hub-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.dialog-status[role="alert"] {
  color: var(--hub-red-dark);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--hub-line);
}

.hub-dialog--confirm {
  width: min(32rem, calc(100vw - 2rem));
}

.hub-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: flex;
  width: min(24rem, calc(100vw - 2rem));
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--hub-ink);
  color: #fff;
  box-shadow: 0 1.1rem 3rem rgb(28 25 22 / 0.25);
  font-size: 0.75rem;
  line-height: 1.5;
}

.hub-toast p {
  margin: 0;
}

.button:disabled,
body.is-saving [data-action] {
  cursor: wait;
  opacity: 0.58;
  pointer-events: none;
  transform: none;
}

.hub-workspace [data-status="ready"] {
  color: rgb(161 236 176 / 0.78);
}

.hub-workspace [data-status="error"],
.hub-workspace [data-status="forbidden"],
.hub-workspace [data-status="unconfigured"] {
  color: rgb(255 162 166 / 0.9);
}

.hub-fatal-state {
  min-height: 0;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  place-items: start;
  align-content: start;
  gap: 0.25rem;
  text-align: left;
}

.record-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgb(28 25 22 / 0.09);
  border-radius: 999px;
  background: rgb(28 25 22 / 0.055);
  color: var(--hub-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.record-status--active,
.record-status--approved,
.record-status--completed,
.record-status--current,
.record-status--delivered,
.record-status--hired,
.record-status--verified {
  border-color: rgb(29 130 73 / 0.18);
  background: rgb(29 130 73 / 0.09);
  color: #126036;
}

.record-status--cancelled,
.record-status--declined,
.record-status--expired,
.record-status--high,
.record-status--overdue,
.record-status--rejected,
.record-status--withdrawn {
  border-color: rgb(227 27 35 / 0.18);
  background: rgb(227 27 35 / 0.08);
  color: var(--hub-red-dark);
}

.record-status--expiring,
.record-status--medium,
.record-status--needs-information,
.record-status--pending,
.record-status--screening,
.record-status--under-review {
  border-color: rgb(182 116 23 / 0.2);
  background: rgb(182 116 23 / 0.09);
  color: #81510d;
}

.hub-kpi-button {
  display: grid;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.hub-kpi-button:hover {
  border-color: rgb(227 27 35 / 0.24);
  transform: translateY(-2px);
}

.kpi-label,
.kpi-note,
.kpi-value {
  display: block;
}

.kpi-label {
  color: var(--hub-muted);
  font-size: 0.72rem;
}

.kpi-value {
  margin-top: 0.7rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 2rem;
  letter-spacing: -0.045em;
}

.kpi-note {
  margin-top: 0.75rem;
  color: var(--hub-muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.hub-kpi-card:first-child :where(.kpi-label, .kpi-note) {
  color: rgb(255 255 255 / 0.56);
}

.priority-button,
.activity-button {
  display: grid;
  width: 100%;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.priority-button:hover {
  background: rgb(255 255 255 / 0.045);
}

.priority-button .record-status {
  border-color: rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.08);
  color: rgb(255 255 255 / 0.65);
}

.priority-button strong,
.activity-button strong {
  font-size: 0.8rem;
}

.priority-button span:last-child,
.activity-button time {
  color: rgb(255 255 255 / 0.44);
  font-size: 0.66rem;
}

.activity-button:hover {
  background: rgb(227 27 35 / 0.025);
}

.activity-button time {
  color: var(--hub-muted);
}

.hub-customer-card,
.hub-order-card,
.hub-project-card {
  display: grid;
  width: 100%;
  gap: 0.55rem;
  padding: 1rem;
  color: inherit;
  font: inherit;
  text-align: left;
}

.master-list .hub-customer-card + .hub-customer-card {
  margin-top: 0.55rem;
}

.hub-customer-card.is-selected,
.hub-order-card.is-selected,
.hub-project-card.is-selected {
  border-color: rgb(227 27 35 / 0.38);
  box-shadow: 0 0 0 3px rgb(227 27 35 / 0.08);
}

.hub-customer-card strong,
.hub-order-card strong,
.hub-project-card strong {
  margin-top: 0.15rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
}

.hub-customer-card span:not(.record-status),
.hub-order-card span:not(.record-status),
.hub-project-card span:not(.record-status) {
  color: var(--hub-muted);
  font-size: 0.72rem;
}

.hub-customer-card small,
.hub-order-card small,
.hub-project-card small {
  color: var(--hub-muted);
  font-size: 0.63rem;
  line-height: 1.45;
}

.hub-project-card progress,
[data-project-progress] progress {
  width: 100%;
  height: 0.55rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--hub-red);
}

.hub-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.hub-detail-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgb(51 42 33 / 0.07);
}

.hub-detail-list > div:last-child {
  border-bottom: 0;
}

.hub-detail-list :where(dt, dd) {
  min-width: 0;
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

.hub-detail-list dt {
  color: var(--hub-muted);
}

.hub-detail-list dd {
  overflow-wrap: anywhere;
  text-align: right;
}

.detail-placeholder,
.timeline-empty {
  margin: 0;
  color: var(--hub-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.detail-record-list,
.document-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-record-list > li,
.document-list > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid rgb(51 42 33 / 0.08);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 0.35);
}

.detail-record-list li > div:first-child,
.document-list li > div:first-child {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.detail-record-list :where(strong, span),
.document-list :where(strong, span) {
  font-size: 0.68rem;
  line-height: 1.45;
}

.detail-record-list span:not(.record-status),
.document-list span {
  color: var(--hub-muted);
}

.row-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.record-link {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.2rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--hub-red-dark);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.record-link:hover {
  text-decoration: underline;
}

.relation-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.65rem;
}

.timeline > li {
  display: grid;
  gap: 0.16rem;
}

.timeline > li strong {
  color: var(--hub-ink);
  font-size: 0.7rem;
}

.timeline > li time {
  font-size: 0.62rem;
}

.timeline > li p {
  margin: 0.2rem 0 0;
}

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

.dialog-field--wide {
  grid-column: 1 / -1;
}

.dialog-body label small {
  color: var(--hub-muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.dialog-checkbox {
  display: flex !important;
  grid-column: 1 / -1;
  min-height: 2.5rem;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem !important;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--hub-line);
  border-radius: 0.75rem;
  background: var(--hub-paper-strong);
}

.dialog-checkbox input {
  width: 1rem !important;
  height: 1rem !important;
  flex: 0 0 1rem;
}

.hub-search-results {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 80;
  display: grid;
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(30rem, calc(100vh - 7rem));
  padding: 0.45rem;
  overflow-y: auto;
  border: 1px solid var(--hub-line);
  border-radius: 1rem;
  background: var(--hub-paper-strong);
  box-shadow: 0 1.25rem 4rem rgb(28 25 22 / 0.2);
}

.hub-search-list {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-result {
  display: grid;
  width: 100%;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: inherit;
  text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
  background: rgb(227 27 35 / 0.055);
}

.search-result strong {
  font-size: 0.76rem;
}

.search-result span,
.search-empty {
  color: var(--hub-muted);
  font-size: 0.65rem;
}

.search-empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
}

.hub-toast[data-notice-kind="success"] {
  background: #174c2d;
}

.hub-toast[data-notice-kind="error"] {
  background: #821219;
}

@media (min-width: 640px) {
  .hub-topbar {
    padding-inline: 1.5rem;
  }

  .hub-current-view {
    display: block;
  }

  .hub-main {
    padding: 2rem 1.5rem 4rem;
  }

  .view-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .view-header > .button,
  .view-header > .view-actions {
    flex: 0 0 auto;
  }

  .dialog-header,
  .dialog-body {
    padding: 1.5rem;
  }

  .dialog-status {
    padding-inline: 1.5rem;
  }

  .dialog-footer {
    padding: 1.15rem 1.5rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .wholesale-request-cards {
    display: none;
  }

  .wholesale-request-table {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hub-shell {
    display: grid;
    grid-template-columns: var(--hub-sidebar-width) minmax(0, 1fr);
  }

  .hub-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .hub-menu-button {
    display: none;
  }

  .wholesale-inbox-layout.has-detail {
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.42fr);
  }

  .hub-topbar {
    padding-inline: 2rem;
  }

  .hub-main {
    padding: 2.5rem 2rem 5rem;
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  }

  .master-detail {
    grid-template-columns: minmax(22rem, 0.85fr) minmax(27rem, 1.15fr);
  }

  .register-detail {
    grid-template-columns: minmax(0, 1.3fr) minmax(25rem, 0.7fr);
  }

  .workspace-with-detail {
    grid-template-columns: minmax(0, 1fr) minmax(23rem, 0.32fr);
  }

  .detail-panel {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-color: rgb(28 25 22 / 0.2) transparent;
    scrollbar-width: thin;
  }

  .toolbar-stack {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .toolbar-stack .filter-bar {
    flex: 1;
  }

  .toolbar-stack .view-switcher {
    flex: 0 0 auto;
    margin-bottom: 0.1rem;
  }
}

@media (min-width: 1440px) {
  .master-detail {
    grid-template-columns: minmax(24rem, 0.72fr) minmax(35rem, 1.28fr);
  }

  .workspace-with-detail {
    grid-template-columns: minmax(0, 1fr) 27rem;
  }
}

@media (max-width: 767px) {
  .view-actions {
    width: 100%;
  }

  .view-actions .button,
  .view-header > .button {
    flex: 1 1 10rem;
  }

  .filter-bar {
    padding-bottom: 0.95rem;
    scroll-snap-type: x proximity;
  }

  .filter-bar > * {
    scroll-snap-align: start;
  }

  .hub-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 1.3rem;
  }

  .dialog-footer .button {
    flex: 1;
  }
}

@media (max-width: 479px) {
  .hub-current-view {
    display: none;
  }

  .hub-topbar {
    min-height: 4.5rem;
  }

  .hub-main {
    padding-top: 1.25rem;
  }

  .panel,
  .filter-bar {
    border-radius: 1.25rem;
  }

  .panel-header,
  .detail-header {
    padding: 1rem;
  }

  .detail-content {
    padding-inline: 1rem;
  }

  .subview-tabs button {
    padding-inline: 0.65rem;
  }

  .dialog-body {
    grid-template-columns: 1fr;
  }

  .dialog-field--wide {
    grid-column: auto;
  }

  .hub-detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .hub-detail-list dd {
    text-align: left;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .hub-topbar {
    background: var(--hub-canvas);
    backdrop-filter: none;
  }

  .hub-dialog::backdrop {
    background: rgb(28 25 22 / 0.86);
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-view.is-active,
  .state-spinner {
    animation: none;
  }

  body:is([data-dashboard-page], [data-employee-dashboard]) *,
  body:is([data-dashboard-page], [data-employee-dashboard]) *::before,
  body:is([data-dashboard-page], [data-employee-dashboard]) *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    margin: 0.5in;
  }

  body:is([data-dashboard-page], [data-employee-dashboard]) {
    min-width: 0;
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body:is([data-dashboard-page], [data-employee-dashboard]) :where(.grain, .hub-sidebar, .hub-topbar, .hub-overlay, .hub-dialog, .hub-toast, .view-actions, .filter-bar, .view-switcher, .subview-bar) {
    display: none !important;
  }

  .hub-shell {
    display: block;
  }

  .hub-main {
    max-width: none;
    padding: 0;
  }

  .hub-view:not([hidden]) {
    display: block !important;
  }

  .panel,
  .state-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .responsive-table {
    overflow: visible;
  }
}
