@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2ebf0;
  --soft-line: #dbe4ec;
  --surface: #f8fafc;
  --surface-strong: #eef4fb;
  --panel: #ffffff;
  --panel-strong: #fbfcff;
  --sidebar-surface: #fbfcff;
  --sidebar-border: #e2ebf0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --green: #22c55e;
  --blue: #2563eb;
  --control-border: #dfe3e8;
  --control-shadow: 0 8px 18px rgba(15, 15, 15, 0.16);
  --control-shadow-soft: 0 4px 12px rgba(15, 15, 15, 0.1);
  --warn: #b45309;
  --danger: #dc2626;
  --black: #0d1b2a;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5eefb;
  --muted: #9aa9be;
  --line: #243044;
  --soft-line: #1c2637;
  --surface: #09111d;
  --surface-strong: #0d1726;
  --panel: #0f1726;
  --panel-strong: #121b2b;
  --sidebar-surface: #0b1321;
  --sidebar-border: #243044;
  --accent-soft: rgba(37, 99, 235, 0.18);
  --control-border: #2b3850;
  --control-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  --control-shadow-soft: 0 6px 14px rgba(0, 0, 0, 0.18);
  --black: #f8fafc;
}

body[data-accent="blue"] {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
}

body[data-accent="navy"] {
  --accent: #0f172a;
  --accent-strong: #111827;
  --accent-soft: #dbe4ec;
}

body[data-accent="slate"] {
  --accent: #334155;
  --accent-strong: #0f172a;
  --accent-soft: #e2ebf0;
}

body[data-accent="green"] {
  --accent: #16a34a;
  --accent-strong: #15803d;
  --accent-soft: #dcfce7;
}

body[data-accent="purple"] {
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: #f3e8ff;
}

body[data-accent="orange"] {
  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-soft: #ffedd5;
}

body[data-accent="red"] {
  --accent: #ef4444;
  --accent-strong: #dc2626;
  --accent-soft: #fee2e2;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

body.logged-out {
  overflow: hidden;
}

body.logged-out .app-shell {
  pointer-events: none;
  user-select: none;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, white) 0%, color-mix(in srgb, var(--surface-strong) 84%, white) 100%);
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.brand-logo-slot {
  display: block;
  width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.auth-brand-logo {
  max-width: 240px;
}

.sidebar-brand-logo {
  max-width: 172px;
}

.brand-logo-slot svg,
.brand-logo-slot img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.auth-form input {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.auth-form button {
  min-height: 44px;
}

.auth-hint {
  font-size: 12px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 260px;
  color: var(--ink);
  background: var(--sidebar-surface);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.05);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(240, 240, 240, 0.35) transparent;
  scrollbar-width: thin;
}

.sidebar-brand {
  display: grid;
  justify-items: start;
  gap: 0;
  padding: 18px 18px 14px;
  text-align: left;
  border-bottom: 1px solid var(--sidebar-border);
  user-select: none;
  -webkit-user-select: none;
  font-size: 0;
  line-height: 0;
}

.sidebar-brand-logo {
  display: block;
  width: 176px;
  max-width: 100%;
}

.sidebar-brand span {
  display: none;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 14px 12px 12px;
  overflow: visible;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(240, 240, 240, 0.24);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.nav-group {
  display: grid;
  gap: 4px;
  overflow: hidden;
  margin: 0;
  padding: 2px 0 0;
}

.nav-group summary {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 12px;
  margin: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  list-style: none;
  box-shadow: none;
}

.nav-group summary .nav-label {
  min-width: 0;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "▸";
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transform: translateY(-1px);
}

.nav-group[open] summary::after {
  content: "▾";
  transform: translateY(-1px);
}

.nav-group summary:hover,
.nav-group summary:focus-visible {
  background: #f4f7fb;
  box-shadow: none;
}

.nav-group summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group-body {
  display: grid;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 220ms ease, opacity 160ms ease;
  will-change: max-height;
}

.nav-group[open] .nav-group-body {
  max-height: 360px;
  opacity: 1;
  margin: 0 0 2px;
}

.nav-group .sub {
  min-height: 34px;
  margin-top: 0;
  padding-left: 16px;
}

.side-nav-button {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  justify-content: start;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  margin: 0;
  border: 0;
  color: #0f172a;
  text-align: left;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transform: none;
  background: transparent;
  border-radius: 8px;
}

.side-nav-button:hover,
.side-nav-button.active,
.side-nav-button:active,
.side-nav-button:focus-visible {
  transform: none;
}

.side-nav-button.sub {
  grid-template-columns: 1fr;
  min-height: 34px;
  margin-left: 0;
  width: 100%;
  padding-left: 14px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 12px;
}

.side-nav-button.disabled-nav {
  opacity: 0.48;
  cursor: not-allowed;
}

.side-nav-button.disabled-nav:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.side-nav-button:hover,
.side-nav-button.active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: none;
  transform: none;
}

.side-nav-button.active {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--accent-soft);
}

.side-nav-button:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: none;
}

body[data-theme="dark"] .side-nav-button,
body[data-theme="dark"] .nav-group summary {
  color: var(--ink);
}

body[data-theme="dark"] .side-nav-button:hover,
body[data-theme="dark"] .side-nav-button.active,
body[data-theme="dark"] .side-nav-button:focus-visible,
body[data-theme="dark"] .nav-group summary:hover,
body[data-theme="dark"] .nav-group summary:focus-visible {
  color: #0f172a;
}

body[data-theme="dark"] .nav-group summary:hover,
body[data-theme="dark"] .nav-group summary:focus-visible,
body[data-theme="dark"] .nav-group[open] > summary {
  color: #0f172a !important;
  background: var(--accent-soft) !important;
}

body[data-theme="dark"] .nav-group summary:hover *,
body[data-theme="dark"] .nav-group summary:focus-visible *,
body[data-theme="dark"] .nav-group[open] > summary * {
  color: #0f172a !important;
}

body[data-theme="dark"] .nav-group summary:hover svg,
body[data-theme="dark"] .nav-group summary:focus-visible svg,
body[data-theme="dark"] .nav-group[open] > summary svg {
  stroke: #0f172a !important;
}

body[data-theme="dark"] .side-nav-button.disabled-nav {
  color: var(--muted);
}

.side-nav-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
  margin-left: 248px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 28px;
  color: var(--ink);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 8px;
  padding: 0 10px;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  color: #4f5964;
  background: var(--panel);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-theme="dark"] .eyebrow {
  background: #0f1726;
  border-color: #304058;
  color: #cbd6e6;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

h1 {
  font-family: "Sora", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-family: "Sora", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

h3,
h4,
h5,
h6 {
  font-family: "Sora", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button,
input,
select,
textarea {
  min-height: 42px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  font: inherit;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

button {
  cursor: pointer;
  border-color: transparent;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: none;
}

button:hover {
  color: #ffffff;
  background: var(--accent-strong);
  box-shadow: none;
  transform: none;
}

button:active {
  box-shadow: none;
  transform: translateY(0);
}

button:focus,
button:focus-visible,
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
summary:focus,
summary:focus-visible {
  outline: none;
}

input:focus-visible,
select:focus-visible {
  border-color: #9aa4af;
  box-shadow: 0 0 0 2px rgba(154, 164, 175, 0.18);
}

button:focus-visible {
  box-shadow: 0 0 0 2px rgba(15, 15, 15, 0.14);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-color: transparent;
  border-radius: 10px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-actions .icon-button svg {
  transform: translate(1px, 1px);
}

.icon-button.is-loading svg {
  animation: icon-spin 0.8s linear infinite;
}

.notification-button {
  position: relative;
}

.notification-button.active,
.notification-button.is-open,
.notification-button[data-open="true"],
.notification-button[aria-expanded="true"],
.notification-button[aria-expanded="true"]:hover,
.notification-button[aria-expanded="true"]:focus-visible {
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
  border-color: rgba(37, 99, 235, 0.16) !important;
  box-shadow: none !important;
}

.notification-button.active svg,
.notification-button.is-open svg,
.notification-button[data-open="true"] svg,
.notification-button[aria-expanded="true"] svg {
  stroke: var(--accent);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.notification-center {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 255;
  width: min(388px, calc(100vw - 40px));
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(15, 15, 15, 0.16);
  overflow: hidden;
}

.notification-center-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--soft-line);
}

.notification-center-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.12;
}

.notification-center-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 14px;
  border-bottom: 1px solid var(--soft-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.notification-center-tabs::-webkit-scrollbar {
  display: none;
}

.notification-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.notification-tab:hover,
.notification-tab:focus-visible {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.notification-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.notification-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.notification-tab.active strong {
  background: var(--accent);
  color: #ffffff;
}

.notification-center-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-center-actions .ghost-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.notification-center-list {
  display: grid;
  gap: 0;
  max-height: min(65vh, 560px);
  overflow: auto;
}

.notification-empty {
  display: grid;
  gap: 6px;
  padding: 22px 14px 24px;
  color: var(--muted);
}

.notification-card {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--soft-line);
  background: var(--panel);
}

.notification-card:first-child {
  border-top: 0;
}

.notification-card.is-unread {
  background: #fcfcfd;
}

.notification-card.tone-success {
  border-left: 3px solid #34c759;
}

.notification-card.tone-warning {
  border-left: 3px solid #f59e0b;
}

.notification-card.tone-error {
  border-left: 3px solid #ef4444;
}

.notification-card.tone-info {
  border-left: 3px solid #94a3b8;
}

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

.notification-card-head strong {
  font-size: 13px;
}

.notification-card-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.notification-card-copy {
  display: grid;
  gap: 6px;
}

.notification-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notification-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.notification-card-actions .ghost-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--sidebar-border);
  color: var(--ink);
  position: sticky;
  bottom: 0;
  background: var(--sidebar-surface);
}

.sidebar-notifications {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--control-shadow-soft);
}

.sidebar-notifications-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-notifications-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-notifications-title strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar-notifications-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-notifications-open {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-notifications-open:hover,
.sidebar-notifications-open:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: none;
}

.sidebar-notifications-list {
  display: grid;
  gap: 8px;
}

.sidebar-notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  box-shadow: none;
  transform: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-notification-item:hover,
.sidebar-notification-item:focus-visible {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sidebar-notifications-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.sidebar-notification-item.is-unread .sidebar-notifications-dot {
  background: var(--accent);
}

.sidebar-notifications-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-notifications-copy strong,
.sidebar-notifications-copy span {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-notifications-copy strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.sidebar-notifications-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.sidebar-notifications-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-user {
  display: grid;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}

.sidebar-user-greeting {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-button,
.settings-button {
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--control-shadow-soft);
}

.avatar-button {
  border-radius: 50%;
  background: var(--accent-soft);
}

.sidebar-avatar-photo,
.user-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.user-thumb {
  border-radius: 999px;
  overflow: hidden;
}

.user-thumb.detail {
  display: block;
  width: 112px;
  height: 112px;
  min-width: 112px;
  min-height: 112px;
  max-width: 112px;
  max-height: 112px;
  flex: 0 0 112px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.user-thumb-placeholder {
  display: grid;
  place-items: center;
  color: #25313b;
  font-weight: 800;
  background: linear-gradient(180deg, #faf7ef, #eef1f5);
}

.avatar-button svg,
.settings-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 18px 28px 40px;
}

.breadcrumb {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 0;
}

.breadcrumb.hidden {
  display: none;
}

.breadcrumb-link {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--panel);
  border-color: transparent;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.breadcrumb-link#breadcrumbSection {
  font-weight: 750;
}

.breadcrumb-link:hover {
  background: #f5f6f7;
  box-shadow: none;
  transform: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.page-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  margin-left: auto;
  position: relative;
}

.dashboard-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.dashboard-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333333;
  font-size: 31px;
  font-weight: 400;
}

.status-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  background: #a8a8a8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.count-pill {
  min-height: 16px;
  background: #e32639;
}

.data-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-actions select {
  width: 190px;
  min-height: 34px;
  border-color: #b8c7d7;
  font-size: 13px;
}

.dashboard-actions button {
  min-height: 34px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--accent);
  font-size: 11px;
  box-shadow: none;
}

.dashboard-actions button:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

.band {
  width: 100%;
  margin-bottom: 18px;
}

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

.metrics div {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--soft-line);
  border-radius: 8px;
}

.metrics span {
  display: block;
  font-size: 30px;
  font-weight: 750;
}

.metrics p {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(86px, auto);
  gap: 8px;
  margin-bottom: 8px;
  align-items: stretch;
  grid-auto-flow: dense;
}

.dashboard-module-shell {
  min-width: 0;
  min-height: 0;
}

.dashboard-module-shell > .dashboard-card {
  height: 100%;
  min-height: 0;
}

.dashboard-card {
  min-height: 166px;
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.09);
}

.metric-widget {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.widget-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--soft-line);
}

.widget-title h3 {
  margin: 0;
  color: #4b4b4b;
  font-size: 15px;
  font-weight: 650;
}

.widget-title .table-info-button.inline {
  position: static;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  color: #2f343b;
  background: transparent;
  box-shadow: none;
  border-radius: 50%;
  padding: 0;
}

.metric-widget strong {
  align-self: end;
  justify-self: center;
  color: #3b3b3b;
  font-size: 34px;
  font-weight: 400;
}

.metric-widget p {
  justify-self: center;
  color: #4f4f4f;
  font-size: 14px;
}

.metric-widget a {
  display: grid;
  place-items: center;
  min-height: 36px;
  margin-top: 14px;
  border-top: 1px solid var(--soft-line);
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.chart-card {
  grid-row: span 2;
}

.bar-chart,
.wide-bar-chart {
  display: grid;
  align-items: end;
  gap: 12px;
  padding: 20px 18px 14px;
}

.bar-chart {
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  height: 290px;
}

.chart-column {
  display: grid;
  grid-template-rows: 22px 1fr auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  height: 100%;
}

.chart-value {
  color: #5a5a5a;
  font-size: 11px;
  text-align: center;
}

.chart-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 2px 2px 0 0;
  background: #aed66f;
}

.chart-column:nth-child(2) .chart-bar,
.wide-chart-row:nth-child(2) .wide-chart-fill {
  background: #e59ccc;
}

.chart-column:nth-child(3) .chart-bar,
.wide-chart-row:nth-child(3) .wide-chart-fill {
  background: #86cfd8;
}

.chart-column:nth-child(4) .chart-bar,
.wide-chart-row:nth-child(4) .wide-chart-fill {
  background: #e5a273;
}

.chart-column:nth-child(5) .chart-bar,
.wide-chart-row:nth-child(5) .wide-chart-fill {
  background: #c6b2d7;
}

.chart-label {
  overflow: hidden;
  color: #636363;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-wave-widget {
  display: grid;
  gap: 14px;
  padding: 14px 18px 18px;
}

.sales-wave-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sales-wave-summary div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.6);
}

.sales-wave-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sales-wave-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.sales-wave-chart {
  position: relative;
  min-height: 240px;
  padding: 8px 0 26px;
}

.sales-wave-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.sales-wave-axis {
  position: absolute;
  right: 24px;
  bottom: 8px;
  left: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
}

.sales-wave-axis span {
  justify-self: center;
  white-space: nowrap;
}

.country-breakdown {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 18px 18px;
}

.country-breakdown-chart {
  position: relative;
  width: min(210px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 16px var(--panel), 0 0 0 1px var(--soft-line);
}

.country-breakdown-inner {
  position: absolute;
  inset: 24%;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px;
  border-radius: 50%;
  background: var(--panel);
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--soft-line);
}

.country-breakdown-inner strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 750;
}

.country-breakdown-inner span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.country-breakdown-list {
  display: grid;
  gap: 10px;
}

.country-breakdown-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.country-breakdown-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.country-breakdown-row strong {
  color: var(--ink);
  font-size: 13px;
}

.country-breakdown-row span {
  color: var(--muted);
  font-size: 12px;
}

.customer-leaderboard {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.customer-leaderboard-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.48);
}

.customer-leaderboard-row.is-leader {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--soft-line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.customer-leaderboard-rank {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  background: rgba(45, 105, 255, 0.08);
}

.customer-leaderboard-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-leaderboard-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-leaderboard-copy span {
  color: var(--muted);
  font-size: 12px;
}

.customer-leaderboard-total strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.wide-chart-panel {
  min-height: 270px;
  margin-top: 8px;
}

.wide-bar-chart {
  gap: 8px;
  padding: 18px 18px 22px;
}

.wide-chart-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
  color: #4d4d4d;
  font-size: 13px;
}

.wide-chart-track {
  height: 20px;
  background: #f2f2f2;
  border: 1px solid #e5e5e5;
}

.wide-chart-fill {
  height: 100%;
  min-width: 2px;
  background: #aed66f;
}

.wide-chart-value {
  text-align: right;
  font-weight: 650;
}

.product-entry form {
  display: grid;
  grid-template-columns: 150px 1.3fr 1.5fr 140px 110px 110px 110px 110px 1.2fr 110px;
  gap: 10px;
  align-items: center;
}

input,
select,
textarea {
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
}

#inventorySearch,
#orderSearch,
#locationSearch,
#customerSearch,
#orderStatusFilter {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#inventorySearch:focus-visible,
#orderSearch:focus-visible,
#locationSearch:focus-visible,
#customerSearch:focus-visible,
#orderStatusFilter:focus-visible {
  box-shadow: none;
}

textarea {
  min-height: 78px;
  padding-top: 10px;
  resize: vertical;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.dashboard-layout-editor {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
}

.dashboard-layout-editor-head,
.dashboard-layout-tools,
.dashboard-layout-add {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.dashboard-layout-editor-head {
  padding: 0 0 8px;
}

.dashboard-layout-list {
  display: grid;
  gap: 8px;
}

.dashboard-layout-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--surface);
}

.dashboard-layout-row[draggable="true"] {
  cursor: grab;
}

.dashboard-layout-row.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.dashboard-layout-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-layout-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: grab;
}

.dashboard-layout-row-main strong,
.dashboard-layout-row-main span {
  display: block;
}

.dashboard-layout-row-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-layout-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-layout-row-actions select {
  min-width: 96px;
}

.dashboard-layout-add {
  padding-top: 8px;
  border-top: 1px solid var(--soft-line);
}

.dashboard-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.panel {
  min-height: 320px;
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

#fulfillmentView .panel {
  min-height: auto;
}

#fulfillmentView .ticket-list,
#fulfillmentView .table-list {
  min-height: 0;
}

.panel-header {
  display: grid;
  grid-template-columns: auto minmax(140px, 260px);
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--soft-line);
}

.panel-note {
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
}

.panel-info-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #2f343b;
  background: transparent;
  box-shadow: none;
  cursor: help;
}

.panel-info-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tooltip {
  position: absolute;
  z-index: 80;
  max-width: 260px;
  padding: 6px 10px;
  border: 1px solid #d5dbe1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #111111;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.14);
  pointer-events: none;
  transform: translateY(2px);
  opacity: 0;
  transition: opacity 0ms linear;
}

.tooltip.is-visible {
  opacity: 1;
}

.product-tools {
  grid-template-columns: minmax(0, 400px) 1fr;
}

.fulfillment-tools {
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
}

.fulfillment-tools #fulfillmentAssigneeFilter {
  width: 200px;
  max-width: 200px;
  justify-self: end;
}

.product-tools > :last-child {
  justify-self: end;
}

.order-tools {
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr) auto;
}

.order-tools #orderStatusFilter {
  width: 200px;
  max-width: 200px;
  justify-self: end;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  min-height: 38px;
  padding: 0 12px;
  background: var(--panel);
}

.search-field > span {
  flex: 0 0 auto;
  color: #8e98a6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-field > span svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-field input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .search-field input {
  color: #f8fafc;
}

body[data-theme="dark"] .search-field input::placeholder {
  color: #9aa8bb;
}

body[data-theme="dark"] .search-field > span {
  color: #c7d0df;
}

body[data-theme="dark"] .widget-title h3 {
  color: #f8fafc;
}

body[data-theme="dark"] .metric-widget strong {
  color: #f8fafc;
}

body[data-theme="dark"] .metric-widget p {
  color: #c7d0df;
}

body[data-theme="dark"] .metric-widget a {
  color: var(--accent);
}

body[data-theme="dark"] .product-rank {
  background: #1d2b42;
  border-color: #5e7494;
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .product-rank span {
  color: #f8fafc;
}

body[data-theme="dark"] .metric-widget .muted,
body[data-theme="dark"] .widget-title .muted,
body[data-theme="dark"] .panel-note,
body[data-theme="dark"] .data-note {
  color: #aeb9ca;
}

body[data-theme="dark"] .dashboard .metric-widget,
body[data-theme="dark"] .dashboard .metric-widget strong,
body[data-theme="dark"] .dashboard .metric-widget p,
body[data-theme="dark"] .dashboard .metric-widget a,
body[data-theme="dark"] .dashboard .widget-title h3,
body[data-theme="dark"] .dashboard .panel-note,
body[data-theme="dark"] .dashboard .data-note,
body[data-theme="dark"] .dashboard .muted {
  color: #d7e2ef;
}

body[data-theme="dark"] .dashboard-head h2 {
  color: #f8fafc;
}

body[data-theme="dark"] .dashboard-actions select {
  color: #f8fafc;
  border-color: #2b3850;
  background: #0f1726;
}

body[data-theme="dark"] .dashboard-actions select option {
  color: #f8fafc;
  background: #0f1726;
}

body[data-theme="dark"] .dashboard-card {
  background: #0f1726;
  border-color: #243044;
}

body[data-theme="dark"] .sales-wave-summary div,
body[data-theme="dark"] .customer-leaderboard-row {
  background: #0d1625;
  border-color: #25324a;
}

body[data-theme="dark"] .sales-wave-summary span,
body[data-theme="dark"] .sales-wave-axis,
body[data-theme="dark"] .country-breakdown-inner span,
body[data-theme="dark"] .customer-leaderboard-copy span,
body[data-theme="dark"] .country-breakdown-row span {
  color: #9ca9bc;
}

body[data-theme="dark"] .sales-wave-summary strong,
body[data-theme="dark"] .country-breakdown-inner strong,
body[data-theme="dark"] .country-breakdown-row strong,
body[data-theme="dark"] .customer-leaderboard-copy strong,
body[data-theme="dark"] .customer-leaderboard-total strong,
body[data-theme="dark"] .customer-leaderboard-rank {
  color: #f8fafc;
}

body[data-theme="dark"] .country-breakdown-chart {
  box-shadow: inset 0 0 0 16px #0f1726, 0 0 0 1px #243044;
}

body[data-theme="dark"] .country-breakdown-inner {
  background: #0f1726;
  box-shadow: inset 0 0 0 1px #243044;
}

body[data-theme="dark"] .customer-leaderboard-rank {
  background: rgba(91, 141, 239, 0.16);
}

body[data-theme="dark"] .dashboard-card .table-info-button,
body[data-theme="dark"] .dashboard-card .panel-info-button {
  color: #cbd6e6;
}

body[data-theme="dark"] .dashboard-card .table-info-button:hover,
body[data-theme="dark"] .dashboard-card .table-info-button:focus-visible,
body[data-theme="dark"] .dashboard-card .panel-info-button:hover,
body[data-theme="dark"] .dashboard-card .panel-info-button:focus-visible {
  color: #f8fafc;
}

body[data-theme="dark"] .widget-title h3 {
  color: #f8fafc;
}

body[data-theme="dark"] .metric-widget strong {
  color: #f8fafc;
}

body[data-theme="dark"] .metric-widget p {
  color: #d7e2ef;
}

body[data-theme="dark"] .metric-widget a {
  color: var(--accent);
}

body[data-theme="dark"] .product-rank {
  background: color-mix(in srgb, var(--accent) 24%, #0f1726);
  border-color: color-mix(in srgb, var(--accent) 55%, #3b4f6f);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .product-rank span {
  color: #f8fafc;
}

body[data-theme="dark"] .table-head,
body[data-theme="dark"] .table-heading-button {
  color: #d7e2ef;
}

body[data-theme="dark"] .module-table .table-head,
body[data-theme="dark"] .fulfillment-overview-table .table-head,
body[data-theme="dark"] .fulfillment-stage-table .table-head,
body[data-theme="dark"] .account-table .table-head,
body[data-theme="dark"] .product-table-head,
body[data-theme="dark"] .order-table .table-head,
body[data-theme="dark"] .location-table .table-head,
body[data-theme="dark"] .customer-table .table-head {
  color: #d7e2ef;
}

body[data-theme="dark"] .table-row,
body[data-theme="dark"] .table-row strong,
body[data-theme="dark"] .table-row span {
  color: #d7e2ef;
}

body[data-theme="dark"] .table-row .muted {
  color: #aeb9ca;
}

body[data-theme="dark"] .panel-header strong {
  color: #f8fafc;
}

body[data-theme="dark"] .panel-header .data-note,
body[data-theme="dark"] .panel-header .panel-note {
  color: #d7e2ef;
}

body[data-theme="dark"] .status-pill,
body[data-theme="dark"] .count-pill {
  color: #f8fafc;
  background: #142033;
  border-color: #2b3850;
}

body[data-theme="dark"] .count-pill {
  background: #d97706;
  border-color: #f59e0b;
}

body[data-theme="dark"] .dashboard-card .table-info-button,
body[data-theme="dark"] .dashboard-card .panel-info-button,
body[data-theme="dark"] .table-info-button,
body[data-theme="dark"] .panel-info-button {
  color: #cbd6e6;
}

body[data-theme="dark"] .dashboard-card .table-info-button:hover,
body[data-theme="dark"] .dashboard-card .table-info-button:focus-visible,
body[data-theme="dark"] .dashboard-card .panel-info-button:hover,
body[data-theme="dark"] .dashboard-card .panel-info-button:focus-visible,
body[data-theme="dark"] .table-info-button:hover,
body[data-theme="dark"] .table-info-button:focus-visible,
body[data-theme="dark"] .panel-info-button:hover,
body[data-theme="dark"] .panel-info-button:focus-visible {
  color: #f8fafc;
}

body[data-theme="dark"] .task-state-card {
  background: #0f1726;
  border-color: #243044;
  box-shadow: var(--control-shadow-soft);
}

body[data-theme="dark"] .task-state-card span {
  color: #b7c4d7;
}

body[data-theme="dark"] .task-state-card strong {
  color: #f8fafc;
}

body[data-theme="dark"] .task-state-card.current {
  border-top-color: #22c55e;
}

body[data-theme="dark"] .task-state-card.reference {
  border-top-color: #facc15;
}

body[data-theme="dark"] .fulfillment-stages div {
  background: #0f1726;
  border-color: #243044;
}

body[data-theme="dark"] .fulfillment-stages div:nth-child(1) { border-top-color: #93c5fd; }
body[data-theme="dark"] .fulfillment-stages div:nth-child(2) { border-top-color: #86efac; }
body[data-theme="dark"] .fulfillment-stages div:nth-child(3) { border-top-color: #fcd34d; }
body[data-theme="dark"] .fulfillment-stages div:nth-child(4) { border-top-color: #c084fc; }
body[data-theme="dark"] .fulfillment-stages div:nth-child(5) { border-top-color: #fdba74; }

body[data-theme="dark"] .fulfillment-stages span {
  color: #f8fafc;
}

body[data-theme="dark"] .fulfillment-stages strong,
body[data-theme="dark"] .fulfillment-stages p,
body[data-theme="dark"] .fulfillment-stages .muted {
  color: #d7e2ef;
}

body[data-theme="dark"] .integration-shell {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

body[data-theme="dark"] .integration-connection-card,
body[data-theme="dark"] .integration-status-card,
body[data-theme="dark"] .integration-checklist-panel,
body[data-theme="dark"] .integration-queue-panel {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--control-shadow-soft);
}

body[data-theme="dark"] .integration-shell,
body[data-theme="dark"] .integration-layout {
  background: transparent;
}

body[data-theme="dark"] .integration-shell .eyebrow,
body[data-theme="dark"] .integration-shell .data-note,
body[data-theme="dark"] .integration-shell .panel-header strong,
body[data-theme="dark"] .integration-shell .integration-status-item strong,
body[data-theme="dark"] .integration-shell .integration-status-item span {
  color: #d7e2ef;
}

body[data-theme="dark"] .integration-shell .integration-field input,
body[data-theme="dark"] .integration-shell .integration-form input,
body[data-theme="dark"] .integration-shell .search-field input {
  color: #f8fafc;
  background: #0f1726;
  border-color: #2b3850;
}

body[data-theme="dark"] .integration-shell .integration-field input::placeholder,
body[data-theme="dark"] .integration-shell .integration-form input::placeholder,
body[data-theme="dark"] .integration-shell .search-field input::placeholder {
  color: #7f8ca1;
}

body[data-theme="dark"] .integration-shell .integration-provider-button {
  background: #0f1726;
  color: #d7e2ef;
  border-color: #243044;
}

body[data-theme="dark"] .integration-shell .integration-provider-button:hover {
  background: #142030;
  color: #f8fafc;
}

body[data-theme="dark"] .integration-shell .integration-provider-button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

body[data-theme="dark"] .chart-value,
body[data-theme="dark"] .chart-label,
body[data-theme="dark"] .wide-chart-row > span:not(.wide-chart-value) {
  color: #b7c4d7;
}

body[data-theme="dark"] .wide-chart-value {
  color: #f8fafc;
}

body[data-theme="dark"] .appearance-preview-brand span {
  color: #c7d0df;
}

body[data-theme="dark"] .status.completed,
body[data-theme="dark"] .status.shipped,
body[data-theme="dark"] .status.dispatching {
  color: #bbf7d0;
  background: #12311f;
}

body[data-theme="dark"] .status.unfulfilled,
body[data-theme="dark"] .status.ready_to_pick {
  color: #fcd34d;
  background: #3a2d08;
}

body[data-theme="dark"] .status.needs_review,
body[data-theme="dark"] .status.late,
body[data-theme="dark"] .status.overdue {
  color: #fecaca;
  background: #3c1514;
}

body[data-theme="dark"] .status.backorder {
  color: #fed7aa;
  background: #3a2311;
}

body[data-theme="dark"] .status.picked,
body[data-theme="dark"] .status.packed {
  color: #bfdbfe;
  background: #102945;
}

body[data-theme="dark"] .status.new,
body[data-theme="dark"] .status.neutral {
  color: #dbeafe;
  background: #162238;
}

body[data-theme="dark"] .integration-provider-toggle {
  background: transparent;
}

body[data-theme="dark"] .integration-provider-button {
  background: #0e1624;
  color: #d7e2ef;
  border-color: var(--line);
}

body[data-theme="dark"] .integration-provider-button:hover {
  background: #142030;
  color: #f8fafc;
}

body[data-theme="dark"] .integration-provider-button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

body[data-theme="dark"] .integration-status-item {
  background: #0f1726;
  border-color: var(--line);
}

body[data-theme="dark"] .integration-status-item span {
  color: #b7c4d7;
}

body[data-theme="dark"] .integration-status-item strong {
  color: #f8fafc;
}

body[data-theme="dark"] .integration-field input,
body[data-theme="dark"] .integration-form input,
body[data-theme="dark"] .search-field input {
  color: #f8fafc;
}

body[data-theme="dark"] .integration-field input::placeholder,
body[data-theme="dark"] .integration-form input::placeholder,
body[data-theme="dark"] .search-field input::placeholder {
  color: #7f8ca1;
}

.form-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--black);
  border-radius: 8px;
}

.form-panel button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0 20px;
}

.pos-form {
  display: grid;
  gap: 14px;
}

.pos-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--black);
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.pos-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.pos-panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.pos-panel-head .eyebrow {
  margin-bottom: 6px;
}

.pos-panel-head > span {
  color: var(--muted);
  font-size: 13px;
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.field-note {
  grid-column: 1 / -1;
  min-height: 18px;
  color: #52616f;
  font-size: 12px;
}

.order-line-grid {
  grid-template-columns: minmax(260px, 2fr) 88px minmax(220px, 1.2fr) 150px;
}

.pos-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #e7e9ed;
  border-radius: 10px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 13px;
}

.pos-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pos-preview strong {
  color: var(--ink);
}

.pos-panel button[type="submit"] {
  justify-self: start;
  min-height: 38px;
  padding: 0 18px;
}

.draft-order-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.edit-record-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.draft-order-main,
.draft-order-sidebar,
.edit-record-main,
.edit-record-sidebar {
  display: grid;
  gap: 14px;
}

.order-flow-card {
  gap: 12px;
}

.task-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.task-state-card {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 14px 16px;
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.task-state-card span {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.task-state-card strong {
  color: #111827;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.1;
}

.task-state-card.current {
  border-top: 3px solid #22c55e;
}

.task-state-card.reference {
  border-top: 3px solid #facc15;
}

.order-flow-step {
  display: grid;
  gap: 10px;
  padding: 14px 14px 13px;
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.order-flow-step.locked {
  opacity: 0.45;
  background: var(--surface-strong);
}

.order-flow-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.order-flow-step-head h4 {
  margin: 0;
  color: #25313b;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.order-flow-step .status-pill {
  min-height: 20px;
}

.order-flow-step-body {
  display: grid;
  gap: 10px;
}

.order-flow-note {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.workflow-override {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, #fffaf0 0%, #fff7e8 100%);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
}

.workflow-override input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workflow-override-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-override-copy strong {
  color: #7c4f00;
  font-size: 12px;
  font-weight: 800;
}

.workflow-override-copy span {
  color: #9a6700;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.workflow-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.workflow-toggle-track {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.45);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.workflow-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.workflow-override input[type="checkbox"]:checked + .workflow-override-copy + .workflow-toggle .workflow-toggle-track {
  background: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

.workflow-override input[type="checkbox"]:checked + .workflow-override-copy + .workflow-toggle .workflow-toggle-thumb {
  transform: translateX(16px);
}

.workflow-override:hover .workflow-toggle-track {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.55);
}

.draft-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 18px rgba(16, 24, 40, 0.04);
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-nav {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 18px rgba(16, 24, 40, 0.04);
}

.settings-nav-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}

.settings-nav-item:hover {
  background: var(--surface-strong);
  box-shadow: none;
}

.settings-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.theme-mode-grid,
.theme-accent-grid {
  display: grid;
  gap: 10px;
}

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

.theme-accent-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.theme-mode-card,
.theme-accent-card {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--control-border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--control-shadow-soft);
}

.theme-mode-card strong,
.theme-accent-card strong {
  font-size: 14px;
  font-weight: 750;
}

.theme-mode-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.theme-mode-card.is-selected,
.theme-accent-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.theme-accent-card {
  min-height: 74px;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px 12px;
}

.theme-accent-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--accent-swatch, var(--accent)), var(--accent-swatch-strong, var(--accent-strong)));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.appearance-preview-card {
  gap: 16px;
}

.appearance-preview-surface {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 95%, transparent) 0%, color-mix(in srgb, var(--surface) 92%, transparent) 100%);
  box-shadow: var(--control-shadow-soft);
}

.appearance-preview-brand {
  display: grid;
  gap: 4px;
}

.appearance-preview-brand strong {
  font-size: 18px;
  font-weight: 800;
}

.appearance-preview-brand span {
  color: var(--muted);
  font-size: 13px;
}

.appearance-preview-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.appearance-preview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.settings-content {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.settings-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.settings-toolbar h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-hero-card {
  gap: 14px;
  padding: 20px;
}

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

.role-stat-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 98px;
  padding: 14px 16px 16px;
  border: 1px solid #e3e7ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.role-stat-card span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.role-stat-card strong {
  color: #111827;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.role-stat-blue {
  border-top: 3px solid #5b8def;
}

.role-stat-green {
  border-top: 3px solid #34c759;
}

.role-stat-amber {
  border-top: 3px solid #ff9f0a;
}

.role-stat-purple {
  border-top: 3px solid #bf5af2;
}

.role-stat-red {
  border-top: 3px solid #ff453a;
}

.settings-form-card {
  display: grid;
  gap: 22px;
  padding: 20px;
}

.settings-form-section {
  display: grid;
  gap: 16px;
}

.settings-form-section + .settings-form-section {
  padding-top: 18px;
  border-top: 1px solid #e8ebef;
}

.settings-form-section-head {
  display: grid;
  gap: 4px;
}

.settings-form-section-head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 750;
}

.settings-form-section-head p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.settings-field-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.settings-field-columns label {
  display: grid;
  gap: 6px;
  color: #59636e;
  font-size: 12px;
  font-weight: 750;
}

.settings-field-columns input,
.settings-field-columns select {
  min-height: 44px;
}

.settings-field-columns .full-span {
  grid-column: 1 / -1;
}

.settings-profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-profile-copy {
  display: grid;
  gap: 4px;
  color: #475467;
}

.settings-profile-copy strong {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.settings-profile-copy span {
  color: #667085;
  font-size: 13px;
}

.settings-search {
  min-width: 360px;
  max-width: 420px;
}

.accounts-list-card {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.accounts-layout .panel {
  min-width: 0;
}

.account-table {
  margin-top: 0;
}

.account-table .table-head,
.account-table .account-row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 120px;
}

.account-row {
  text-align: left;
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
}

.account-row:hover {
  background: var(--surface);
}

.account-row strong,
.account-row span {
  color: inherit;
}

.account-row.is-selected {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.account-editor {
  min-width: 0;
}

.profile-layout,
.account-editor {
  align-content: start;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: start;
}

.profile-layout .edit-save-card,
.account-editor .edit-save-card {
  align-self: start;
}

.draft-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.draft-card-head h3 {
  margin: 0;
  color: #303030;
  font-size: 14px;
  font-weight: 750;
}

.edit-record-form label {
  display: grid;
  gap: 6px;
  color: #59636e;
  font-size: 12px;
  font-weight: 750;
}

.edit-record-form input,
.edit-record-form select,
.edit-record-form textarea {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.edit-record-form input[readonly] {
  color: #667085;
  background: var(--surface-strong);
}

.edit-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.edit-save-card {
  position: sticky;
  top: 84px;
}

.edit-save-card button {
  justify-self: stretch;
  min-height: 40px;
}

.draft-product-search {
  max-width: 100%;
}

.draft-line-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  gap: 10px;
}

.draft-add-line,
.selected-product-controls {
  display: flex;
  align-items: end;
  gap: 12px;
}

.draft-add-line label,
.selected-product-controls label {
  display: grid;
  gap: 6px;
  width: 112px;
  color: #59636e;
  font-size: 12px;
  font-weight: 700;
}

.draft-add-line button {
  min-height: 42px;
  padding: 0 16px;
}

.subtle-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-color: #d7dde4;
  color: #344054;
  background: var(--panel);
  box-shadow: none;
  font-size: 12px;
}

.subtle-button:hover {
  border-color: #bcc6d0;
  color: var(--ink);
  background: var(--surface-strong);
}

.custom-line-fields {
  padding: 12px;
  border: 1px dashed #cfd6dd;
  border-radius: 10px;
  background: #fbfcfd;
}

.custom-line-fields button {
  min-height: 42px;
  padding: 0 14px;
}

.draft-cart-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: #e3e7ec;
}

.draft-cart-empty {
  padding: 14px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 13px;
}

.draft-cart-head,
.draft-cart-row {
  display: grid;
  align-items: center;
  background: #fbfcfd;
}

.draft-cart-head {
  grid-template-columns: 1fr auto;
  min-height: 38px;
  padding: 0 12px;
  color: #59636e;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.draft-cart-row {
  grid-template-columns: 44px minmax(220px, 1fr) 82px 130px auto;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
}

.draft-cart-row > div:nth-child(2) {
  display: grid;
  gap: 2px;
}

.draft-cart-row span {
  color: var(--muted);
  font-size: 12px;
}

.draft-cart-row input {
  min-height: 34px;
}

.draft-line-total {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.draft-line-total span {
  font-size: 11px;
  text-transform: uppercase;
}

.draft-cart-actions {
  display: flex;
  gap: 6px;
  justify-content: end;
}

.draft-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  color: #616a75;
  background: #f9fafb;
  font-size: 13px;
}

.draft-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.draft-preview .draft-preview-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.draft-preview .draft-preview-details > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-preview strong {
  color: var(--ink);
}

.appearance-preview-surface[data-theme-preview="dark"] {
  background: linear-gradient(180deg, #121b2b 0%, #0f1726 100%);
  border-color: #243044;
  color: #f8fafc;
}

.appearance-preview-surface[data-theme-preview="dark"] .appearance-preview-brand span {
  color: #94a3b8;
}

.appearance-preview-surface[data-theme-preview="dark"] .appearance-preview-chip {
  background: #0b1321;
  border-color: #243044;
  color: #f8fafc;
}

.payment-box {
  display: grid;
  padding: 12px 16px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: var(--surface-strong);
}

.payment-box > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #e3e7ec;
  background: transparent;
}

.payment-box span {
  color: #59636e;
}

.payment-total {
  border-bottom: 0 !important;
  border-top: 1px solid #e3e7ec;
  color: var(--ink);
  font-weight: 800;
}

.customer-detail-grid {
  display: grid;
  gap: 10px;
}

.market-pill {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #303030;
  background: #f0f2f4;
  font-size: 13px;
  font-weight: 650;
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  left: 0;
  top: calc(100% + 6px);
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #d4dae2;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.18);
}

.autocomplete-menu[hidden] {
  display: none;
}

.autocomplete-menu button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px;
  min-height: 54px;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  box-shadow: none;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.autocomplete-menu button:hover,
.autocomplete-menu button:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
}

.autocomplete-menu span {
  display: grid;
  gap: 3px;
}

.autocomplete-menu small {
  color: var(--muted);
  font-size: 12px;
}

.product-detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  color: #344054;
  background: var(--panel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.upload-button:hover {
  background: var(--surface-strong);
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.draft-order-sidebar > button[type="submit"] {
  justify-self: end;
  min-height: 40px;
  padding: 0 18px;
}

.page-head > button,
.page-head-actions > button,
.form-panel button,
.report-controls button {
  min-height: 38px;
  padding: 0 16px;
}

.report-panel {
  margin-top: 18px;
}

.report-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.report-output {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.module-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.module-summary-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.module-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--summary-accent, var(--soft-line));
}

.module-summary-card strong {
  font-size: 30px;
  font-weight: 650;
  line-height: 1;
}

.module-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.module-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.module-summary-card.blue {
  --summary-accent: #5b8def;
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 72%);
}

.module-summary-card.green {
  --summary-accent: #34c759;
  background: linear-gradient(180deg, #f5fff8 0%, #ffffff 72%);
}

.module-summary-card.amber {
  --summary-accent: #f59e0b;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 72%);
}

.module-summary-card.purple {
  --summary-accent: #bf5af2;
  background: linear-gradient(180deg, #fcf7ff 0%, #ffffff 72%);
}

.module-summary-card.orange {
  --summary-accent: #ff9f0a;
  background: linear-gradient(180deg, #fff8f1 0%, #ffffff 72%);
}

.module-summary-card.red {
  --summary-accent: #ff453a;
  background: linear-gradient(180deg, #fff6f6 0%, #ffffff 72%);
}

body[data-theme="dark"] .module-summary-card.blue,
body[data-theme="dark"] .module-summary-card.green,
body[data-theme="dark"] .module-summary-card.amber,
body[data-theme="dark"] .module-summary-card.purple,
body[data-theme="dark"] .module-summary-card.orange,
body[data-theme="dark"] .module-summary-card.red {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--surface) 90%, transparent) 100%);
}

body[data-theme="dark"] .module-summary-card.blue {
  --summary-accent: color-mix(in srgb, #5b8def 72%, var(--accent));
}

body[data-theme="dark"] .module-summary-card.green {
  --summary-accent: color-mix(in srgb, #34c759 72%, var(--accent));
}

body[data-theme="dark"] .module-summary-card.amber {
  --summary-accent: color-mix(in srgb, #f59e0b 72%, var(--accent));
}

body[data-theme="dark"] .module-summary-card.purple {
  --summary-accent: color-mix(in srgb, #bf5af2 72%, var(--accent));
}

body[data-theme="dark"] .module-summary-card.orange {
  --summary-accent: color-mix(in srgb, #ff9f0a 72%, var(--accent));
}

body[data-theme="dark"] .module-summary-card.red {
  --summary-accent: color-mix(in srgb, #ff453a 72%, var(--accent));
}

.toast-stack {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 260;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--soft-line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  animation: toast-in 180ms ease-out;
}

.toast-info {
  border-top-color: #60a5fa;
}

.toast-success {
  border-top-color: #22c55e;
}

.toast-warning {
  border-top-color: #f59e0b;
}

.toast-error {
  border-top-color: #ef4444;
}

.toast-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.toast-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 1px;
}

.toast-action,
.toast-close {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.toast-action:hover,
.toast-close:hover {
  border-color: #cfd6dd;
  transform: none;
}

.toast-action {
  background: var(--accent-soft);
  border-color: #bfdbfe;
}

.toast-close {
  width: 30px;
  padding: 0;
  border-radius: 50%;
}

.toast-exit {
  animation: toast-out 160ms ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.module-panel {
  min-height: auto;
}

.module-tools {
  grid-template-columns: minmax(320px, 1fr) 200px;
  gap: 12px;
  align-items: center;
  padding: 16px 24px;
}

.module-tools .search-field {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.module-tools select {
  width: 200px;
  max-width: 200px;
  justify-self: end;
  margin-left: auto;
}

.module-tools > span {
  display: none;
}

.module-table .table-row {
  min-height: 52px;
}

.module-table .table-head {
  color: #5d6b78;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 20px;
  margin-bottom: 18px;
  align-items: start;
}

.integration-shell {
  display: grid;
  gap: 18px;
  padding: 18px 28px 28px;
  margin: 0 14px 14px;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.integration-connection-card,
.integration-status-card,
.integration-checklist-panel,
.integration-queue-panel {
  display: grid;
  gap: 16px;
  min-height: auto;
  align-self: start;
  overflow: hidden;
  border-radius: 18px;
}

.integration-connection-card > .panel-header,
.integration-status-card > .panel-header,
.integration-checklist-panel > .panel-header,
.integration-queue-panel > .panel-header {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 20px 12px;
  min-height: 58px;
}

.integration-connection-card > .panel-header .data-note,
.integration-status-card > .panel-header .data-note,
.integration-checklist-panel > .panel-header .data-note,
.integration-queue-panel > .panel-header .data-note {
  grid-column: 2;
  justify-self: end;
  align-self: center;
  text-align: right;
  max-width: min(100%, 360px);
  margin-top: 0;
  line-height: 1;
}

.integration-connection-card > .panel-header strong,
.integration-status-card > .panel-header strong,
.integration-checklist-panel > .panel-header strong,
.integration-queue-panel > .panel-header strong {
  grid-column: 1;
}

.integration-queue-panel .panel-header-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  flex-wrap: wrap;
}

.integration-connection-card > .integration-form {
  padding: 0 20px 20px;
}

.integration-status-card > .integration-status-list {
  padding: 0 20px 20px;
}

.integration-checklist-panel > .table-list.integration-checklist {
  margin: 0 20px 20px;
}

.integration-queue-panel > .integration-queue-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 20px;
}

.integration-queue-summary-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

.integration-queue-summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.integration-queue-summary-item strong {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.integration-queue-panel > .table-list.integration-queue {
  margin: 0 20px 20px;
}

.integration-queue .table-row.import-queue-row {
  grid-template-columns: 0.9fr 1.2fr 1fr 0.8fr 0.8fr;
}

.integration-queue .table-row.import-queue-row strong {
  display: block;
}

.integration-provider-toggle {
  display: inline-flex;
  gap: 6px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  width: fit-content;
  justify-self: start;
  align-self: start;
}

.integration-provider-button {
  min-width: 0;
  min-height: 40px;
  padding: 0 16px 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.integration-provider-button:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.integration-provider-button.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.integration-provider-button-label {
  line-height: 1;
}

.integration-provider-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9ca3af;
  flex: 0 0 auto;
}

.integration-provider-status-dot.good {
  background: #22c55e;
}

.integration-provider-status-dot.warn {
  background: #f59e0b;
}

.integration-provider-status-dot.bad {
  background: #ef4444;
}

.integration-form {
  display: grid;
  gap: 12px;
}

.integration-field {
  display: grid;
  gap: 8px;
}

.integration-field span {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.integration-field input {
  min-height: 44px;
}

.integration-actions {
  display: grid;
  gap: 8px;
  align-items: start;
}

.integration-status-list {
  display: grid;
  gap: 10px;
}

.integration-status-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

.integration-status-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.integration-status-item strong {
  color: #111827;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.integration-checklist .table-row {
  grid-template-columns: 1.15fr 1.75fr 0.8fr 1.05fr 0.78fr;
  min-height: 48px;
}

.integration-checklist .table-head,
.integration-checklist .table-row:not(.table-head) {
  padding-inline: 0;
}

.integration-status-card .panel-header,
.integration-connection-card .panel-header,
.integration-checklist-panel .panel-header,
.integration-queue-panel .panel-header {
  align-items: center;
}

.integration-checklist .table-head {
  color: #5d6b78;
}

.fulfillment-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.fulfillment-stages div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
}

.fulfillment-stages div:nth-child(1) {
  border-top-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 70%);
}

.fulfillment-stages div:nth-child(2) {
  border-top-color: #86efac;
  background: linear-gradient(180deg, #f8fff9 0%, #ffffff 70%);
}

.fulfillment-stages div:nth-child(3) {
  border-top-color: #fcd34d;
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 70%);
}

.fulfillment-stages div:nth-child(4) {
  border-top-color: #c084fc;
  background: linear-gradient(180deg, #fcf8ff 0%, #ffffff 70%);
}

.fulfillment-stages div:nth-child(5) {
  border-top-color: #fdba74;
  background: linear-gradient(180deg, #fff9f4 0%, #ffffff 70%);
}

.fulfillment-stages span {
  font-size: 28px;
  font-weight: 750;
}

.fulfillment-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.fulfillment-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d7dde4;
  border-radius: 999px;
  color: #25313b;
  background: var(--panel);
  box-shadow: none;
  text-transform: none;
}

.fulfillment-tab.active {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.fulfillment-tab:hover,
.fulfillment-tab:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: var(--line);
}

.fulfillment-tab.active:hover,
.fulfillment-tab.active:focus-visible {
  color: #ffffff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.list,
.ticket-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.table-list {
  display: grid;
  background: var(--panel);
}

.table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--soft-line);
  background: var(--panel);
}

.table-row:not(.table-head) {
  cursor: pointer;
}

.table-row:not(.table-head):hover {
  background: var(--surface);
}

.table-head {
  min-height: 44px;
  background: var(--panel);
}

.table-heading-button {
  min-height: 32px;
  padding: 0;
  color: #5d6b78;
  text-align: left;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.table-heading-button:hover,
.table-heading-button.active {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.table-heading-button span {
  display: inline-block;
  min-width: 14px;
  margin-left: 4px;
}

.product-table .table-row {
  grid-template-columns: 28px minmax(130px, 0.9fr) minmax(260px, 2fr) minmax(120px, 0.9fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr);
}

.product-table-head {
  position: relative;
  grid-template-columns: 28px minmax(130px, 0.9fr) minmax(260px, 2fr) minmax(120px, 0.9fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr);
}

.table-head.has-info {
  position: relative;
}

.product-table-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #e3e7ec;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: var(--surface-strong);
  color: #59636e;
  font-size: 12px;
  font-weight: 800;
}

.product-thumb.tiny {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.product-thumb.preview {
  width: 56px;
  height: 56px;
}

.product-thumb.detail {
  width: 112px;
  height: 112px;
  border-radius: 12px;
}

.product-thumb-placeholder {
  text-transform: uppercase;
}

.order-table .table-row {
  grid-template-columns: 28px minmax(110px, 0.8fr) minmax(220px, 1.5fr) minmax(130px, 0.9fr) minmax(100px, 0.8fr) minmax(170px, 1fr);
}

.location-table .table-row,
.customer-table .table-row {
  grid-template-columns: 28px repeat(4, minmax(0, 1fr));
}

.row-select {
  justify-self: center;
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--accent);
  cursor: pointer;
}

.bulk-action-bar {
  position: sticky;
  top: 66px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 10px;
  width: fit-content;
  margin: 10px auto;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.page-head-actions .bulk-action-bar {
  position: absolute;
  top: 50%;
  left: 48%;
  z-index: 1;
  margin: 0;
  transform: translate(-50%, -50%);
}

.bulk-action-bar strong {
  padding: 0 6px;
  font-size: 13px;
}

.bulk-action-bar button {
  min-height: 30px;
}

.bulk-action-bar .danger-button {
  border-color: #f2c8c4;
  color: #b42318;
  background: var(--panel);
  box-shadow: none;
}

.bulk-action-bar .danger-button:hover {
  border-color: #e7b1ab;
  color: #8f221a;
  background: #fff7f6;
}

.bulk-action-bar .secondary-button {
  border-color: #cfd6dd;
  color: #25313b;
  background: #d7dde4;
  box-shadow: none;
}

.bulk-action-bar .secondary-button:hover {
  border-color: #bcc6d0;
  color: #25313b;
  background: #c8d0d8;
}

.bulk-action-bar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.table-row strong {
  font-weight: 750;
}

.product-table .table-row strong {
  font-weight: 600;
}

.table-row span,
.table-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-row .status {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.stat-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--panel);
}

.stat-row strong {
  font-size: 22px;
  font-weight: 600;
}

.row,
.ticket {
  background: var(--panel);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.record-row {
  align-items: center;
}

.row-main {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
}

.row-main:hover,
.row-main:focus-visible {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.row:hover {
  box-shadow: none;
  transform: none;
}

.product-row-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.product-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  color: var(--ink);
  background: #f7f8fa;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.product-row:hover,
.product-row:focus-visible {
  color: var(--black);
  background: var(--surface-strong);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.product-row:hover .sku,
.product-row:hover .product-table-identity,
.product-row:hover .product-table-identity *,
.product-row:hover p,
.product-row:hover span {
  color: inherit;
}

.sku {
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.description {
  max-width: 620px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.price-grid,
.bulk-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5f2e8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.price-retail,
.price-supplier {
  background: #e7f4ec;
  color: #17633a;
}

.price-sale {
  background: #fff3a6;
  color: #6f5a00;
}

.price-bulk {
  background: #e8f0ff;
  color: #245a9c;
}

.product-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-top: 4px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.ghost-button {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--control-border);
  font-size: 12px;
  box-shadow: var(--control-shadow-soft);
}

.ghost-button:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--control-border) 75%, var(--accent));
  transform: none;
}

.dialog-body {
  padding: 20px;
}

.confirm-dialog {
  width: min(520px, calc(100vw - 32px));
}

.confirm-dialog-body {
  padding: 20px;
}

.confirm-dialog-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
}

.detail-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 750;
}

.detail-jump,
.table-link {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 18px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.detail-jump:disabled {
  color: var(--muted);
  cursor: default;
}

.table-link {
  font-size: 14px;
  font-weight: 700;
}

.detail-description {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.quantity {
  text-align: right;
  font-weight: 500;
}

.table-info-button {
  position: absolute;
  top: 13px;
  right: 10px;
  display: inline-flex;
  place-items: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #2f343b;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  cursor: help;
}

.table-info-button.inline {
  position: static;
  top: auto;
  right: auto;
  justify-self: end;
}

.table-info-button svg,
.panel-info-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-info-button:hover,
.table-info-button:focus-visible {
  color: #475569;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.ticket {
  padding: 16px;
}

.ticket-stage-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: var(--surface);
}

.ticket-stage-note {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.backorder-note {
  color: #9a3412;
}

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

.ticket-stage-grid label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}

.ticket-stage-grid input {
  min-height: 34px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
}

.ticket-stage-grid input::placeholder {
  color: #98a2b3;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ticket-head-main {
  min-width: 0;
}

.ticket-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.ticket-assignee-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.ticket-assignee-field span {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5d6a79;
}

.ticket-assignee-field input {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e0e8;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}

.ticket-head .danger-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 10px;
  justify-self: end;
  width: auto;
}

.ticket-head select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.status.neutral {
  color: #25313b;
  background: #eef2f6;
}

.danger-button {
  min-height: 32px;
  padding: 0 12px;
  border-color: #ffd4d1;
  color: #b42318;
  background: #fff5f4;
  box-shadow: none;
  font-size: 11px;
}

.secondary-button {
  min-height: 32px;
  padding: 0 12px;
  border-color: #d7dde4;
  color: #344054;
  background: var(--panel);
  box-shadow: none;
  font-size: 11px;
}

.secondary-button:hover {
  border-color: #bcc6d0;
  color: #1f2933;
  background: var(--surface-strong);
  box-shadow: none;
  transform: none;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--soft-line);
}

.danger-button:hover {
  border-color: #ffb3ad;
  color: #912018;
  background: #ffe7e5;
  box-shadow: none;
  transform: none;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--black);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.new {
  color: #1d2939;
  background: #eef2f7;
}

.status.completed,
.status.shipped,
.status.dispatching {
  color: #05603a;
  background: #d1fadf;
}

.status.unfulfilled,
.status.ready_to_pick {
  color: #7a5b00;
  background: #fff4bf;
}

.status.needs_review,
.status.late,
.status.overdue {
  color: #b42318;
  background: #fee4e2;
}

.status.backorder {
  color: #9a3412;
  background: #ffedd5;
}

.status.picked,
.status.packed {
  color: #175cd3;
  background: #dbeafe;
}

body[data-theme="dark"] .status.completed,
body[data-theme="dark"] .status.shipped,
body[data-theme="dark"] .status.dispatching {
  color: #bbf7d0 !important;
  background: #12311f !important;
}

body[data-theme="dark"] .status.unfulfilled,
body[data-theme="dark"] .status.ready_to_pick {
  color: #fde68a !important;
  background: #3a2d08 !important;
}

body[data-theme="dark"] .status.needs_review,
body[data-theme="dark"] .status.late,
body[data-theme="dark"] .status.overdue {
  color: #fecaca !important;
  background: #3c1514 !important;
}

body[data-theme="dark"] .status.backorder {
  color: #fed7aa !important;
  background: #3a2311 !important;
}

body[data-theme="dark"] .status.picked,
body[data-theme="dark"] .status.packed {
  color: #bfdbfe !important;
  background: #102945 !important;
}

body[data-theme="dark"] .status.new,
body[data-theme="dark"] .status.neutral {
  color: #dbeafe !important;
  background: #162238 !important;
}

.ticket-lines {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 14px;
}

.ticket-lines th,
.ticket-lines td {
  padding: 9px 8px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ticket-lines th:last-child,
.ticket-lines td:last-child {
  text-align: right;
}

.fulfillment-overview-table .table-head,
.fulfillment-overview-row {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.75fr);
}

.fulfillment-overview-table .table-head {
  min-height: 44px;
  color: #5d6b78;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fulfillment-overview-row {
  min-height: 54px;
  cursor: pointer;
}

.fulfillment-overview-row strong,
.fulfillment-overview-row span {
  font-size: 14px;
}

.fulfillment-overview-row:hover {
  background: var(--surface-strong);
}

.fulfillment-stage-table .table-head,
.fulfillment-stage-row {
  gap: 10px;
}

.fulfillment-overview-head .table-info-button.inline,
.fulfillment-stage-head .table-info-button.inline {
  position: absolute;
  top: 13px;
  right: 10px;
  justify-self: auto;
}

.fulfillment-stage-table .table-head {
  color: #5d6b78;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fulfillment-stage-row {
  min-height: 56px;
  cursor: pointer;
}

.fulfillment-stage-row:hover {
  background: var(--surface-strong);
}

.ticket-detail-actions {
  margin-top: 16px;
  justify-content: flex-end;
}

.line-warning {
  color: var(--danger);
  font-weight: 700;
}

.empty {
  padding: 24px;
  color: var(--muted);
  background: var(--panel);
}

@media (max-width: 920px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
  }

  .sidebar-brand-logo {
    width: 150px;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 10px 12px;
  }

  .nav-group {
    min-width: max-content;
  }

  .sidebar-footer {
    position: static;
    padding: 10px 18px 14px;
  }

  .sidebar-notifications {
    width: 100%;
  }

  .sidebar-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    padding: 0;
  }

  .side-nav-button {
    width: auto;
    min-width: max-content;
    grid-template-columns: 18px auto;
  }

  .side-nav-button.sub {
    margin-left: 10px;
  }

  .app-shell {
    margin-left: 0;
  }

  .topbar,
  .layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-self: start;
  }

  .toast-stack {
    top: auto;
    bottom: 20px;
    left: 18px;
    right: 18px;
    width: auto;
  }

  .notification-center {
    top: auto;
    right: 16px;
    left: 16px;
    bottom: 88px;
    width: auto;
    max-height: min(70vh, 620px);
  }

  .notification-center-head {
    flex-direction: column;
    align-items: stretch;
  }

  .metrics,
  .workspace,
  .dashboard-board,
  .dashboard-layout-editor,
  .report-controls,
  .fulfillment-stages,
  .product-entry form,
  .draft-order-form,
  .edit-record-form,
  .edit-field-grid,
  .draft-line-grid,
  .draft-cart-row,
  .pos-grid,
  .order-line-grid,
  .form-panel,
  .product-tools {
    grid-template-columns: 1fr;
  }

  .dashboard-board {
    grid-auto-rows: auto;
  }

  .dashboard-module-shell {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .dashboard-layout-row {
    grid-template-columns: 1fr;
  }

  .chart-card {
    grid-row: auto;
  }

  .dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .wide-chart-row {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .ticket-head,
  .detail-grid,
  .page-head {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px;
  }

  .accounts-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .settings-layout,
  .settings-grid,
  .settings-detail-grid {
    grid-template-columns: 1fr;
  }

  .settings-form-card,
  .settings-field-columns {
    grid-template-columns: 1fr;
  }

  .settings-toolbar {
    flex-direction: column;
  }

  .settings-actions {
    justify-content: flex-start;
  }

  .page-head {
    display: grid;
  }
}

@media (max-width: 640px) {
  .task-state-grid {
    grid-template-columns: 1fr;
  }
}
