:root {
  --ink: #14201d;
  --ink-soft: #263530;
  --muted: #69766f;
  --muted-2: #89948e;
  --canvas: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --line: #dde4de;
  --line-strong: #cbd6ce;
  --teal: #0f766e;
  --teal-dark: #0b5d57;
  --teal-soft: #e8f4f1;
  --amber: #a95f12;
  --amber-soft: #fff4e2;
  --red: #b33d3d;
  --red-soft: #fbeceb;
  --blue: #356f91;
  --blue-soft: #eaf3f8;
  --violet: #69558e;
  --violet-soft: #f1edf7;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-width: 232px;
  --topbar-height: 68px;
  --shadow-popover: 0 18px 45px rgba(20, 32, 29, 0.16);
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-number: "DIN Alternate", "Bahnschrift", "Aptos", var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
  flex: 0 0 auto;
}

::selection {
  color: #fff;
  background: var(--teal);
}

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.25);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

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

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
}

.boot-screen strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.boot-screen p {
  margin: 5px 0 0;
  color: var(--muted);
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-mark span {
  position: absolute;
  display: block;
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 5px;
  transform: rotate(45deg);
}

.brand-mark span:nth-child(1) {
  top: 3px;
  left: 2px;
  opacity: 0.45;
}

.brand-mark span:nth-child(2) {
  top: 8px;
  left: 8px;
  opacity: 0.75;
}

.brand-mark span:nth-child(3) {
  top: 13px;
  left: 14px;
}

.brand-mark-large {
  width: 44px;
  height: 44px;
  color: var(--teal);
}

.brand-mark-large span {
  width: 24px;
  height: 24px;
}

.brand-mark-large span:nth-child(1) {
  top: 3px;
  left: 2px;
}

.brand-mark-large span:nth-child(2) {
  top: 9px;
  left: 9px;
}

.brand-mark-large span:nth-child(3) {
  top: 15px;
  left: 16px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.75fr);
  background:
    linear-gradient(rgba(20, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 29, 0.035) 1px, transparent 1px),
    #eef2ee;
  background-size: 32px 32px;
}

.login-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 46px clamp(42px, 7vw, 110px) 42px;
  overflow: hidden;
  color: #f5f8f6;
  background: var(--ink);
}

.login-story::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 74px rgba(255, 255, 255, 0.025),
    0 0 0 148px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand .brand-mark {
  color: #99d8ce;
}

.login-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.login-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 64px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-copy .eyebrow {
  color: #99d8ce;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
}

.login-copy h1 {
  max-width: 560px;
  margin: 22px 0 20px;
  font-size: clamp(38px, 4.7vw, 66px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.login-copy h1 span {
  display: block;
  color: #99d8ce;
}

.login-copy > p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  line-height: 1.9;
}

.process-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 610px;
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.process-step {
  padding: 20px 22px 20px 0;
}

.process-step + .process-step {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.process-step small {
  display: block;
  color: #8dc9bf;
  font-family: var(--font-number);
  font-size: 11px;
}

.process-step strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.process-step span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.login-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.login-foot .sync-state {
  color: rgba(255, 255, 255, 0.55);
}

.login-access {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px clamp(24px, 5vw, 70px);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.login-mobile-brand .brand-mark {
  color: var(--teal);
}

.login-mobile-brand strong {
  font-size: 18px;
}

.login-card h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.login-card > p {
  margin: 10px 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  background: #e4eae5;
  border-radius: var(--radius);
}

.role-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: 160ms ease;
}

.role-switch button.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(20, 32, 29, 0.1);
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field + .field {
  margin-top: 16px;
}

.field label,
.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.field-hint {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.required {
  margin-left: 3px;
  color: var(--red);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell > .icon {
  position: absolute;
  left: 13px;
  color: var(--muted-2);
  pointer-events: none;
}

.input-shell input {
  padding-left: 40px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input,
.select {
  padding: 9px 12px;
}

.textarea {
  min-height: 104px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.65;
}

.input::placeholder,
.textarea::placeholder {
  color: #9ca7a1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #b7c5bc;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.password-toggle {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--surface-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--teal);
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: #aabbb0;
  background: var(--surface-soft);
}

.btn-quiet {
  color: var(--muted);
  background: transparent;
}

.btn-quiet:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.btn-danger {
  color: var(--red);
  border-color: #ebcaca;
  background: var(--red-soft);
}

.btn-danger:hover {
  background: #f8dede;
}

.btn-wide {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  font-size: 14px;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.demo-accounts {
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.demo-accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.demo-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.demo-account-row + .demo-account-row {
  border-top: 1px solid #edf0ed;
}

.demo-account-row:hover strong {
  color: var(--teal);
}

.demo-account-row strong {
  display: block;
  font-size: 12px;
  transition: color 150ms ease;
}

.demo-account-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 11px;
}

.demo-account-row .icon {
  color: var(--muted-2);
}

.login-error {
  display: none;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #f0cecb;
  border-radius: var(--radius-sm);
  color: var(--red);
  background: var(--red-soft);
  font-size: 12px;
  line-height: 1.55;
}

.login-error.is-visible {
  display: flex;
}

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

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 23px 16px 16px;
  color: #dce5e0;
  background: var(--ink);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 43px;
  padding: 0 8px;
}

.sidebar-brand .brand-mark {
  width: 29px;
  height: 29px;
  color: #9cd9cf;
}

.sidebar-brand .brand-mark span {
  width: 16px;
  height: 16px;
  border-width: 1.8px;
}

.sidebar-brand .brand-mark span:nth-child(1) {
  top: 2px;
  left: 1px;
}

.sidebar-brand .brand-mark span:nth-child(2) {
  top: 7px;
  left: 6px;
}

.sidebar-brand .brand-mark span:nth-child(3) {
  top: 12px;
  left: 11px;
}

.sidebar-brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.sidebar-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.side-context {
  margin: 25px 8px 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.side-context small {
  display: block;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
}

.side-context strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-section-label {
  padding: 0 12px;
  margin: 16px 0 8px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.side-nav {
  display: grid;
  gap: 3px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.53);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.055);
}

.nav-link.is-active {
  color: #fff;
  background: rgba(112, 196, 184, 0.15);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: #85d1c4;
}

.nav-link .icon {
  color: rgba(255, 255, 255, 0.42);
}

.nav-link.is-active .icon {
  color: #9cd9cf;
}

.nav-badge {
  min-width: 19px;
  padding: 2px 5px;
  margin-left: auto;
  border-radius: 9px;
  color: #f7d7ac;
  background: rgba(204, 130, 29, 0.18);
  font-family: var(--font-number);
  font-size: 10px;
  text-align: center;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-install {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.sidebar-install.is-available {
  display: flex;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #17433e;
  background: #b8e3db;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.sidebar-user-info strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
}

.sidebar-user .icon-btn {
  color: rgba(255, 255, 255, 0.36);
}

.sidebar-user .icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.main-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  height: var(--topbar-height);
  padding: 0 clamp(22px, 3vw, 38px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.mobile-menu-btn {
  display: none;
  margin-right: 9px;
}

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

.page-heading h1 {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-heading p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.global-search {
  position: relative;
  width: min(24vw, 258px);
}

.global-search .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.global-search input {
  width: 100%;
  height: 35px;
  padding: 7px 12px 7px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 11px;
}

.global-search input:focus {
  border-color: var(--teal);
  background: var(--surface);
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #36a274;
  box-shadow: 0 0 0 3px rgba(54, 162, 116, 0.1);
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.topbar-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10px;
}

.content {
  max-width: 1500px;
  padding: 28px clamp(22px, 3vw, 38px) 60px;
  margin: 0 auto;
}

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

.page-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.page-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

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

.metric-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.tone-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.tone-teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.tone-red {
  color: var(--red);
  background: var(--red-soft);
}

.tone-blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.tone-violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
}

.metric-value strong {
  font-family: var(--font-number);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.metric-value span {
  color: var(--muted-2);
  font-size: 10px;
}

.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 10px;
}

.metric-foot strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 57px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

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

.panel-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}

.panel-body {
  padding: 18px;
}

.panel-body-flush {
  padding: 0;
}

.queue-list {
  display: grid;
}

.queue-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(110px, 0.36fr) 92px 24px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 73px;
  padding: 11px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.queue-row + .queue-row {
  border-top: 1px solid #edf0ed;
}

.queue-row:hover {
  background: #f8faf8;
}

.product-thumb {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #edf1ee;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted-2);
}

.queue-main {
  min-width: 0;
}

.queue-main strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-supplier {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.queue-supplier strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-supplier span {
  display: block;
  margin-top: 4px;
}

.queue-arrow {
  color: var(--muted-2);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-approved {
  color: var(--teal);
  background: var(--teal-soft);
}

.status-needs_changes {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-rejected {
  color: var(--red);
  background: var(--red-soft);
}

.status-draft {
  color: var(--muted);
  background: #eff2ef;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.order-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.order-status-pending_shipment {
  color: var(--amber);
  background: var(--amber-soft);
}

.order-status-shipped {
  color: var(--blue);
  background: var(--blue-soft);
}

.order-status-completed {
  color: var(--teal);
  background: var(--teal-soft);
}

.order-status-cancelled {
  color: var(--muted);
  background: #eff2ef;
}

.order-status-after_sale {
  color: var(--red);
  background: var(--red-soft);
}

.order-status-unknown {
  color: var(--violet);
  background: var(--violet-soft);
}

.workflow-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.workflow-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.workflow-submitted,
.settlement-merchant_pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.workflow-approved,
.settlement-merchant_confirmed {
  color: var(--blue);
  background: var(--blue-soft);
}

.workflow-completed,
.settlement-paid {
  color: var(--teal);
  background: var(--teal-soft);
}

.workflow-rejected,
.settlement-disputed {
  color: var(--red);
  background: var(--red-soft);
}

.return-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.finance-icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.finance-return {
  color: var(--red) !important;
}

.finance-net {
  color: var(--teal-dark) !important;
  font-weight: 700;
}

.return-form-grid {
  margin-top: 16px;
}

.return-amount-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #c9dbd4;
  border-radius: var(--radius-sm);
  background: var(--teal-soft);
}

.return-amount-preview span {
  color: #4c6c64;
  font-size: 10px;
}

.return-amount-preview strong {
  color: var(--teal-dark);
  font-family: var(--font-number);
  font-size: 20px;
}

.settlement-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 22px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.settlement-summary-grid > div {
  min-height: 88px;
  padding: 15px;
  background: var(--surface);
}

.settlement-summary-grid span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
}

.settlement-summary-grid strong {
  display: block;
  margin-top: 9px;
  font-family: var(--font-number);
  font-size: 20px;
}

.settlement-summary-grid .workflow-status {
  margin-top: 11px;
}

.settlement-summary-grid .settlement-net {
  background: var(--teal-soft);
}

.settlement-summary-grid .settlement-net strong {
  color: var(--teal-dark);
}

.settlement-item-card {
  grid-template-columns: 30px minmax(0, 1fr) 110px;
}

.distribution-item-card {
  grid-template-columns: 30px minmax(0, 1fr) 100px;
}

.distribution-summary-grid .date-range-value {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.55;
}

.settlement-modal-note {
  margin-top: 18px;
}

.order-main-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 270px;
}

.order-icon-box {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
}

.table-substrong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.distribution-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal);
  font-size: 9px;
  white-space: nowrap;
}

.distribution-state.is-unmatched {
  color: var(--red);
}

.order-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  padding: 20px 22px 0;
}

.order-address-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.order-address-card .flow-node-icon {
  margin: 0;
  flex: 0 0 auto;
}

.order-address-card strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.order-address-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

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

.order-detail-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-detail-total > span:first-child {
  color: var(--muted-2);
  font-size: 9px;
}

.order-detail-total strong {
  font-family: var(--font-number);
  font-size: 24px;
}

.order-items-section {
  padding: 22px;
}

.order-item-list {
  display: grid;
  gap: 8px;
}

.order-item-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 80px 120px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.order-item-index {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 10px;
}

.order-item-copy {
  min-width: 0;
}

.order-item-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.order-code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 8px;
}

.order-item-numbers {
  text-align: right;
}

.order-item-numbers strong {
  display: block;
  font-family: var(--font-number);
  font-size: 12px;
}

.order-item-numbers span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
}

.import-notes {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.manual-order-lines {
  display: grid;
  gap: 9px;
}

.manual-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 34px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.manual-order-quantity {
  position: relative;
}

.manual-order-quantity .input {
  padding-right: 42px;
}

.manual-order-quantity span {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--muted-2);
  font-size: 9px;
  transform: translateY(-50%);
}

.manual-order-modal {
  width: min(760px, calc(100vw - 34px));
}

.manual-product-options {
  display: grid;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.manual-product-option {
  display: grid;
  grid-template-columns: 20px 42px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.manual-product-option:last-child {
  border-bottom: 0;
}

.manual-product-option:has(input[type="checkbox"]:checked) {
  background: var(--teal-soft);
}

.manual-product-option > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.manual-product-option > img,
.manual-product-option > .product-thumb-placeholder {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;
}

.manual-product-copy {
  min-width: 0;
  cursor: pointer;
}

.manual-product-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-product-copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.manual-product-quantity-box {
  position: relative;
}

.manual-product-quantity-box .input {
  min-height: 34px;
  padding: 6px 36px 6px 8px;
  font-size: 10px;
}

.manual-product-quantity-box span {
  position: absolute;
  top: 50%;
  right: 8px;
  color: var(--muted-2);
  font-size: 9px;
  transform: translateY(-50%);
  pointer-events: none;
}

.manual-product-empty {
  padding: 24px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted-2);
  background: var(--surface-soft);
  font-size: 10px;
  text-align: center;
}

.activity-list {
  display: grid;
  padding: 1px 18px;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
}

.activity-item + .activity-item {
  border-top: 1px solid #edf0ed;
}

.activity-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.activity-copy {
  min-width: 0;
}

.activity-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.activity-copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.load-list {
  display: grid;
  gap: 13px;
}

.load-row {
  display: grid;
  gap: 7px;
}

.load-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
}

.load-row-head strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-row-head span {
  color: var(--muted-2);
  font-family: var(--font-number);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf1ee;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.reason-list {
  display: grid;
  gap: 11px;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf0ed;
}

.reason-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.reason-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.reason-item span {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 10px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.filter-search {
  position: relative;
  width: min(290px, 35vw);
}

.filter-search .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.filter-search input {
  width: 100%;
  height: 34px;
  padding: 7px 11px 7px 35px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 11px;
}

.filter-search input:focus {
  border-color: var(--teal);
}

.filter-select {
  width: auto;
  min-width: 118px;
  height: 34px;
  padding: 6px 30px 6px 10px;
  font-size: 11px;
}

.filter-spacer {
  flex: 1;
}

.filter-count {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.history-filter-bar {
  flex-wrap: wrap;
}

.history-filter-bar .filter-search {
  flex: 1 1 240px;
  width: auto;
}

.history-product-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 190px;
}

.history-product-search .icon {
  position: absolute;
  top: 50%;
  left: 10px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.history-product-search .input {
  height: 34px;
  min-height: 34px;
  padding: 7px 10px 7px 32px;
  font-size: 10px;
}

.history-date-separator {
  color: var(--muted-2);
  font-size: 9px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  height: 39px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  background: #fafbfa;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.data-table td {
  height: 64px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0ed;
  color: var(--ink-soft);
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background-color 120ms ease;
}

.data-table tbody tr:hover {
  background: #f8faf8;
}

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

.check-cell {
  width: 42px;
  padding-right: 2px !important;
  text-align: center;
}

.check-cell input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.table-product {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 240px;
}

.table-product .product-thumb {
  width: 40px;
  height: 40px;
}

.table-product-copy {
  min-width: 0;
}

.table-product-copy strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-product-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.price-cell {
  font-family: var(--font-number);
  font-size: 12px;
  white-space: nowrap;
}

.price-cell small {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 9px;
}

.warning-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
  font-size: 9px;
  white-space: nowrap;
}

.cell-muted {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.row-action {
  width: 30px;
  height: 30px;
  margin-left: auto;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 32px 20px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 13px;
  border-radius: 50%;
  color: var(--muted);
  background: #edf1ee;
}

.empty-state strong {
  display: block;
  font-size: 13px;
}

.empty-state p {
  max-width: 330px;
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.form-section {
  padding: 20px;
}

.form-section + .form-section {
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

.food-fields {
  background: #fffdf8;
}

.food-back-label-heading {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.section-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}

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

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

.field-span-2 {
  grid-column: 1 / -1;
}

.field .field {
  margin: 0;
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
}

.input-group .input,
.input-group .select {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-addon {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
}

.shelf-life-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
}

.shelf-life-control .input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.shelf-life-control .select {
  padding-left: 12px;
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 70px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.form-actions-note {
  margin-right: auto;
  color: var(--muted-2);
  font-size: 10px;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 152px;
  padding: 24px;
  border: 1px dashed #b8c7bd;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fafcfb;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
}

.upload-zone strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
}

.upload-zone span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.image-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #edf1ee;
}

.image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-tile-cover {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: rgba(20, 32, 29, 0.78);
  font-size: 8px;
}

.image-tile-actions {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.image-tile:hover .image-tile-actions,
.image-tile:focus-within .image-tile-actions {
  opacity: 1;
}

.image-tile-actions button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: rgba(20, 32, 29, 0.8);
  cursor: pointer;
}

.image-tile-actions button:hover {
  background: var(--teal);
}

.sku-editor {
  display: grid;
  gap: 9px;
}

.sku-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(160px, 1.2fr) minmax(100px, 0.9fr) 100px 100px 100px 32px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.sku-row .input {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
  background: #fff;
}

.sku-row-remove {
  width: 29px;
  height: 29px;
}

.sku-editor-head {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(160px, 1.2fr) minmax(100px, 0.9fr) 100px 100px 100px 32px;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted-2);
  font-size: 9px;
}

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

.checklist {
  display: grid;
  gap: 11px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.checklist-item .icon {
  margin-top: 1px;
  color: var(--muted-2);
}

.checklist-item.is-ready .icon {
  color: var(--teal);
}

.aside-note {
  padding: 14px;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.aside-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 11px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(12, 20, 18, 0.44);
  animation: fade-in 160ms ease both;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(780px, 94vw);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
  animation: slide-in 220ms ease both;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-heading {
  min-width: 0;
}

.drawer-heading span {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 9px;
}

.drawer-heading h2 {
  max-width: 590px;
  margin: 5px 0 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 22px;
  padding: 22px;
}

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

.detail-main-image {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf1ee;
}

.detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 7px;
}

.detail-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.detail-thumb.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-code {
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 10px;
}

.detail-block + .detail-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-block h3 {
  margin: 0 0 13px;
  font-size: 12px;
  font-weight: 650;
}

.detail-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px 12px;
  font-size: 10px;
  line-height: 1.6;
}

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

.detail-list dd {
  margin: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.detail-price {
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 650;
}

.detail-skus {
  display: grid;
  gap: 7px;
}

.detail-sku-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) 72px 60px;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  font-size: 9px;
}

.detail-sku-row strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.quality-flag {
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 9px;
}

.review-note {
  padding: 12px;
  border-left: 3px solid var(--amber);
  color: var(--ink-soft);
  background: var(--amber-soft);
  font-size: 10px;
  line-height: 1.65;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-mark {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-mark::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.timeline-item:not(:last-child) .timeline-mark::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -5px;
  left: 50%;
  width: 1px;
  background: var(--line);
}

.timeline-copy strong {
  display: block;
  font-size: 10px;
}

.timeline-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.timeline-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 66px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.review-panel {
  margin: 0 22px 22px;
  padding: 16px;
  border: 1px solid #c9dbd4;
  border-radius: var(--radius);
  background: #f6fbf9;
}

.review-panel h3 {
  margin: 0 0 13px;
  font-size: 12px;
}

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

.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.review-actions .btn-primary {
  margin-left: auto;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 34px));
  max-height: calc(100vh - 42px);
  overflow-y: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
  transform: translate(-50%, -50%);
  animation: modal-in 180ms ease both;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

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

.supplier-search-panel .filter-bar {
  border-bottom: 0;
}

.supplier-search-field {
  width: min(540px, 58vw);
}

.supplier-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.supplier-card.is-clickable {
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.supplier-card.is-clickable:hover {
  border-color: #aac5b8;
  background: #fbfdfb;
}

.supplier-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.supplier-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 13px;
  font-weight: 700;
}

.supplier-head-copy {
  min-width: 0;
}

.supplier-head-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-head-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 9px;
}

.supplier-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.supplier-stat {
  padding: 11px 6px;
  background: var(--surface);
  text-align: center;
}

.supplier-stat strong {
  display: block;
  font-family: var(--font-number);
  font-size: 16px;
}

.supplier-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8px;
}

.supplier-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 9px;
}

.supplier-view-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--teal) !important;
  font-weight: 650;
}

.supplier-product-list {
  display: grid;
}

.supplier-product-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 86px 92px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.supplier-product-row:last-child {
  border-bottom: 0;
}

.supplier-product-row.is-clickable {
  cursor: pointer;
  transition: background-color 120ms ease;
}

.supplier-product-row.is-clickable:hover {
  background: var(--surface-soft);
}

.supplier-product-row .product-thumb {
  width: 42px;
  height: 42px;
}

.supplier-product-copy {
  min-width: 0;
}

.supplier-product-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-product-copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.supplier-product-numbers {
  text-align: right;
}

.supplier-product-numbers strong {
  display: block;
  font-family: var(--font-number);
  font-size: 12px;
}

.supplier-product-numbers span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.export-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.export-summary {
  padding: 19px;
  border: 1px solid #c9dbd4;
  border-radius: var(--radius);
  background: var(--teal-soft);
}

.export-summary .eyebrow {
  color: var(--teal-dark);
  font-size: 10px;
}

.export-summary h3 {
  margin: 14px 0 7px;
  font-size: 19px;
}

.export-summary p {
  margin: 0;
  color: #4c6c64;
  font-size: 10px;
  line-height: 1.7;
}

.export-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 0;
}

.export-count strong {
  font-family: var(--font-number);
  font-size: 38px;
  line-height: 1;
}

.export-count span {
  color: #4c6c64;
  font-size: 10px;
}

.export-actions {
  display: grid;
  gap: 8px;
}

.export-actions .btn {
  width: 100%;
}

.export-note {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(15, 118, 110, 0.18);
  color: #55736c;
  font-size: 9px;
  line-height: 1.65;
}

.export-history {
  display: grid;
}

.export-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 80px 105px 34px;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
}

.export-row + .export-row {
  border-top: 1px solid #edf0ed;
}

.export-file-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
}

.export-file-copy {
  min-width: 0;
}

.export-file-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-file-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.data-flow {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: center;
  gap: 8px;
  padding: 24px 18px;
}

.flow-node {
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
}

.flow-node-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 9px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
}

.flow-node strong {
  display: block;
  font-size: 10px;
}

.flow-node span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--line-strong);
}

.flow-arrow::before {
  content: "";
  width: 100%;
  height: 1px;
  background: currentColor;
}

.config-list {
  display: grid;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  font-size: 10px;
}

.config-row + .config-row {
  border-top: 1px solid #edf0ed;
}

.config-row span {
  color: var(--muted);
}

.config-row strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-map-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 18px;
}

.field-map-item {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 9px;
}

.toast-region {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 9px;
  padding: 12px 12px 12px 13px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 34px rgba(20, 32, 29, 0.22);
  pointer-events: auto;
  animation: toast-in 180ms ease both;
}

.toast.is-success .toast-icon {
  color: #93dfd2;
}

.toast.is-error .toast-icon {
  color: #ffaaa5;
}

.toast-copy strong {
  display: block;
  font-size: 11px;
}

.toast-copy span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1.5;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  cursor: pointer;
}

.skeleton {
  overflow: hidden;
  border-radius: 4px;
  background: #e9eeea;
}

.skeleton::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

.loading-page {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--muted);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.mobile-nav {
  display: none;
}

.mobile-overlay {
  display: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.tone-success {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.status-chip.tone-warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-chip.tone-blue {
  color: var(--blue);
  background: var(--blue-soft);
}

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

.license-manager {
  padding: 18px;
}

.license-placeholder,
.license-preview {
  display: grid;
  align-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.license-placeholder {
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.license-placeholder strong {
  color: var(--ink);
  font-size: 11px;
}

.license-placeholder span {
  font-size: 9px;
}

.license-preview {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(120px, 210px) minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
}

.license-preview img {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #fff;
}

.license-preview span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
}

.license-preview-large {
  min-height: 210px;
}

.license-preview-large img {
  height: 210px;
}

.license-upload-zone {
  margin-top: 14px;
}

.profile-form-body {
  padding: 18px;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}

.profile-facts {
  display: grid;
  margin: 0;
}

.profile-facts > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf0ed;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 9px;
}

.profile-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.profile-facts dd.account-number {
  font-family: var(--font-number);
  letter-spacing: 0.04em;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.account-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-summary span {
  color: var(--muted);
  font-size: 9px;
}

.account-summary strong {
  font-family: var(--font-number);
  font-size: 22px;
}

.account-section-gap {
  margin-top: 14px;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.account-identity > span:last-child {
  min-width: 0;
}

.account-identity strong,
.account-identity small {
  display: block;
}

.account-identity strong {
  font-size: 10px;
}

.account-identity small {
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-number);
  font-size: 8px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 9px;
  font-weight: 700;
}

.modal-compact {
  width: min(440px, calc(100vw - 28px));
}

.supplier-profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.supplier-profile-block {
  min-width: 0;
  padding: 14px;
  background: var(--surface-soft);
}

.supplier-profile-block .section-heading {
  margin-bottom: 12px;
}

.supplier-profile-block .license-preview {
  display: block;
  min-height: 0;
  padding: 8px;
}

.supplier-profile-block .license-preview img {
  height: 116px;
}

.supplier-profile-block .license-preview span {
  display: block;
  margin-top: 7px;
}

.supplier-profile-block .profile-facts > div {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 8px 0;
}

.supplier-profile-block .profile-facts > div:last-child {
  border-bottom: 0;
}

.supplier-profile-block .profile-facts dd {
  font-size: 9px;
}

.inline-empty {
  display: block;
  padding: 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.account-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-chip {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-soft);
  background: #fff;
  font-family: var(--font-number);
  font-size: 8px;
}

.settlement-bank-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 22px 16px;
  padding: 13px;
  border: 1px solid #bdd6cd;
  border-radius: var(--radius-sm);
  background: #f4fbf8;
}

.settlement-bank-card.is-missing {
  border-color: #efd3ad;
  background: var(--amber-soft);
}

.settlement-bank-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: var(--teal);
  background: #fff;
}

.settlement-bank-card.is-missing .settlement-bank-icon {
  color: var(--amber);
}

.settlement-bank-card > div {
  min-width: 0;
}

.settlement-bank-card strong,
.settlement-bank-card span,
.settlement-bank-card code {
  display: block;
}

.settlement-bank-card strong {
  font-size: 10px;
}

.settlement-bank-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.settlement-bank-card code {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 11px;
}

.supplier-compliance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf0ed;
}

.supplier-compliance span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
}

.supplier-compliance span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.supplier-compliance .is-ready {
  color: var(--teal);
}

.supplier-compliance .is-missing {
  color: var(--amber);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in {
  from { transform: translateX(32px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes modal-in {
  from { transform: translate(-50%, calc(-50% + 12px)); opacity: 0; }
  to { transform: translate(-50%, -50%); opacity: 1; }
}

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

@media (max-width: 1180px) {
  .dashboard-grid,
  .form-layout,
  .export-layout,
  .settings-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

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

  .queue-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(100px, 0.35fr) 90px 24px;
  }

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

  .sku-row,
  .sku-editor-head {
    grid-template-columns: minmax(90px, 0.8fr) minmax(130px, 1.2fr) minmax(90px, 0.8fr) 84px 84px 84px 32px;
  }

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

  .metric-grid-five .metric-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 61px;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .login-page {
    display: block;
    background: var(--canvas);
  }

  .login-story {
    display: none;
  }

  .login-access {
    min-height: 100vh;
    padding: 34px 24px;
  }

  .login-mobile-brand {
    display: flex;
  }

  .sidebar {
    width: min(286px, 84vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(12, 20, 18, 0.45);
  }

  body.mobile-nav-open .mobile-overlay {
    display: block;
  }

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

  .mobile-menu-btn {
    display: inline-grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .global-search,
  .topbar-entry,
  .topbar-divider {
    display: none;
  }

  .content {
    padding: 21px 16px calc(92px + env(safe-area-inset-bottom));
  }

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

  .dashboard-grid {
    gap: 14px;
  }

  .queue-row {
    grid-template-columns: 46px minmax(0, 1fr) 82px 20px;
  }

  .queue-supplier {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 31;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-count, 5), 1fr);
    min-height: 64px;
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    border: 0;
    border-radius: 5px;
    color: var(--muted-2);
    background: transparent;
    font-size: 8px;
  }

  .mobile-nav button.is-active {
    color: var(--teal);
    background: var(--teal-soft);
  }

  .mobile-nav .icon {
    width: 19px;
    height: 19px;
  }

  .drawer {
    width: 100%;
    max-width: none;
  }

  .drawer-content {
    grid-template-columns: 1fr;
  }

  .detail-gallery {
    max-width: 420px;
  }

  .order-detail-top {
    grid-template-columns: 1fr;
  }

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

  .review-fields {
    grid-template-columns: 1fr;
  }

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

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

  .order-item-card {
    grid-template-columns: 26px minmax(0, 1fr) 72px;
  }

  .order-item-card > .distribution-state {
    grid-column: 2 / -1;
  }

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

  .flow-arrow {
    height: 24px;
    justify-content: center;
    transform: rotate(90deg);
  }

  .flow-arrow::before {
    width: 32px;
  }

  .supplier-profile-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .login-copy h1 {
    font-size: 34px;
  }

  .page-header {
    display: grid;
    gap: 15px;
  }

  .page-header h2 {
    font-size: 22px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-value strong {
    font-size: 24px;
  }

  .metric-foot {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-header {
    padding: 13px 14px;
  }

  .panel-body {
    padding: 14px;
  }

  .queue-row {
    padding: 10px 13px;
  }

  .queue-main strong {
    max-width: 160px;
  }

  .filter-bar {
    flex-wrap: wrap;
    padding: 11px;
  }

  .filter-search {
    width: 100%;
  }

  .history-product-search {
    flex-basis: 100%;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }

  .filter-count {
    display: none;
  }

  .table-scroll {
    overflow: visible;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 9px;
    padding: 10px;
  }

  .data-table tbody tr {
    position: relative;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .data-table td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .data-table td:not(.table-product-cell):not(.check-cell) {
    display: none;
  }

  .data-table .check-cell {
    position: absolute;
    top: 13px;
    right: 12px;
    width: auto;
  }

  .table-product {
    min-width: 0;
    padding-right: 28px;
  }

  .table-product-copy strong {
    max-width: calc(100vw - 130px);
    white-space: normal;
  }

  .mobile-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-top: 10px;
  }

  .mobile-card-meta span {
    color: var(--muted-2);
    font-size: 9px;
  }

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

  .field-span-2 {
    grid-column: auto;
  }

  .form-section {
    padding: 16px 14px;
  }

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

  .manual-product-option {
    grid-template-columns: 20px 38px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .manual-product-option > img,
  .manual-product-option > .product-thumb-placeholder {
    width: 38px;
    height: 38px;
  }

  .manual-product-quantity-box {
    grid-column: 3;
    width: 112px;
  }

  .sku-editor-head {
    display: none;
  }

  .sku-row {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 10px;
  }

  .sku-row .field-span-2 {
    grid-column: 1 / -1;
  }

  .sku-row-remove {
    justify-self: end;
  }

  .form-actions {
    flex-wrap: wrap;
    padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  }

  .form-actions-note {
    width: 100%;
    margin: 0;
  }

  .form-actions .btn {
    flex: 1;
  }

  .drawer-header {
    padding: 15px 16px;
  }

  .drawer-heading h2 {
    max-width: calc(100vw - 90px);
    font-size: 16px;
    white-space: normal;
  }

  .drawer-content {
    padding: 16px;
  }

  .drawer-footer {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }

  .license-manager,
  .profile-form-body {
    padding: 14px;
  }

  .license-preview {
    grid-template-columns: 1fr;
  }

  .license-preview img,
  .license-preview-large img {
    height: 180px;
  }

  .panel-footer {
    flex-wrap: wrap;
  }

  .panel-footer .btn {
    width: 100%;
  }

  .account-summary {
    padding: 13px 12px;
  }

  .account-summary strong {
    font-size: 18px;
  }

  .account-identity {
    min-width: 0;
    margin-bottom: 8px;
  }

  .account-table td:last-child .btn {
    width: 100%;
  }

  .review-panel {
    margin: 0 16px 16px;
  }

  .settlement-bank-card {
    margin: 0 16px 16px;
  }

  .review-actions {
    flex-wrap: wrap;
  }

  .review-actions .btn {
    flex: 1;
  }

  .review-actions .btn-primary {
    margin-left: 0;
  }

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

  .export-row {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    gap: 9px;
  }

  .export-row > :nth-child(3),
  .export-row > :nth-child(4) {
    display: none;
  }

  .toast-region {
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .modal {
    top: auto;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: calc(100vh - 30px);
    transform: none;
    animation-name: modal-mobile-in;
  }

  @keyframes modal-mobile-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
